mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
commit
087a0f4f4d
@ -28,6 +28,7 @@ export interface ColorProps {
|
||||
classnames: ClassNamesFn;
|
||||
onChange: (value: any) => void;
|
||||
presetColors?: string[];
|
||||
resetValue?: string;
|
||||
}
|
||||
|
||||
export interface ColorControlState {
|
||||
@ -122,8 +123,8 @@ export class ColorControl extends React.PureComponent<
|
||||
}
|
||||
|
||||
clearValue() {
|
||||
const onChange = this.props.onChange;
|
||||
onChange('');
|
||||
const {onChange, resetValue} = this.props;
|
||||
onChange(resetValue || '');
|
||||
}
|
||||
|
||||
handleClick() {
|
||||
|
@ -184,7 +184,7 @@ import {addRule, str2rules} from './utils/validations';
|
||||
import {normalizeOptions} from './components/Select';
|
||||
import {OptionsControl} from './renderers/Form/Options';
|
||||
|
||||
import {classnames, getClassPrefix, setDefaultTheme} from './theme';
|
||||
import {classnames, getClassPrefix, setDefaultTheme, theme} from './theme';
|
||||
const classPrefix = getClassPrefix();
|
||||
|
||||
export {
|
||||
@ -256,6 +256,7 @@ export {
|
||||
Scoped,
|
||||
ScopedContext,
|
||||
setDefaultTheme,
|
||||
theme,
|
||||
classPrefix,
|
||||
getClassPrefix,
|
||||
classnames
|
||||
|
@ -9,6 +9,7 @@ export interface ColorProps extends FormControlProps {
|
||||
timeConstrainst?: object;
|
||||
closeOnSelect?: boolean;
|
||||
presetColors?: string[];
|
||||
resetValue?: string;
|
||||
}
|
||||
|
||||
export interface ColorControlState {
|
||||
|
Loading…
Reference in New Issue
Block a user