mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
merge feat-4
Change-Id: Ie1349dc7374a99b7ad9fea457f703144827e6b9a
This commit is contained in:
commit
d007ffc9ae
@ -129,11 +129,9 @@ export default class APIControl extends React.Component<
|
|||||||
|
|
||||||
componentDidUpdate(prevProps: APIControlProps) {
|
componentDidUpdate(prevProps: APIControlProps) {
|
||||||
const props = this.props;
|
const props = this.props;
|
||||||
|
|
||||||
if (prevProps.value !== props.value) {
|
if (prevProps.value !== props.value) {
|
||||||
this.setState({apiStr: this.transformApi2Str(props.value)});
|
this.setState({apiStr: this.transformApi2Str(props.value)});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anyChanged(['enablePickerMode', 'pickerSchema'], prevProps, props)) {
|
if (anyChanged(['enablePickerMode', 'pickerSchema'], prevProps, props)) {
|
||||||
this.setState({schema: props.pickerSchema});
|
this.setState({schema: props.pickerSchema});
|
||||||
}
|
}
|
||||||
@ -198,7 +196,6 @@ export default class APIControl extends React.Component<
|
|||||||
if (typeof value !== 'string' || typeof values !== 'string') {
|
if (typeof value !== 'string' || typeof values !== 'string') {
|
||||||
api = merge({}, normalizeApi(values));
|
api = merge({}, normalizeApi(values));
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange?.(api);
|
onChange?.(api);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user