mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +08:00
commit
e692625457
@ -158,9 +158,9 @@
|
|||||||
"react-testing-library": "6.0.4",
|
"react-testing-library": "6.0.4",
|
||||||
"strip-json-comments": "^2.0.1",
|
"strip-json-comments": "^2.0.1",
|
||||||
"ts-jest": "^24.0.0",
|
"ts-jest": "^24.0.0",
|
||||||
"ts-json-schema-generator": "^0.73.0",
|
"ts-json-schema-generator": "^0.80.0",
|
||||||
"ts-node": "^9.0.0",
|
"ts-node": "^9.0.0",
|
||||||
"typescript": "^4.0.2"
|
"typescript": "~4.1.2"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"testEnvironment": "jsdom",
|
"testEnvironment": "jsdom",
|
||||||
|
@ -181,7 +181,7 @@ export default class MatrixCheckbox extends React.Component<
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo 优化这块
|
// todo 优化这块
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise<void>((resolve, reject) => {
|
||||||
if (!this.mounted) {
|
if (!this.mounted) {
|
||||||
return resolve();
|
return resolve();
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ export default class MatrixCheckbox extends React.Component<
|
|||||||
error: reason,
|
error: reason,
|
||||||
loading: false
|
loading: false
|
||||||
},
|
},
|
||||||
resolve
|
() => resolve()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,14 @@ export default class TextControl extends React.PureComponent<
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const {formItem, autoComplete, addHook, formInited, data} = this.props;
|
const {
|
||||||
|
formItem,
|
||||||
|
autoComplete,
|
||||||
|
addHook,
|
||||||
|
formInited,
|
||||||
|
data,
|
||||||
|
name
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
if (isEffectiveApi(autoComplete, data) && formItem) {
|
if (isEffectiveApi(autoComplete, data) && formItem) {
|
||||||
if (formInited) {
|
if (formInited) {
|
||||||
|
@ -1269,7 +1269,7 @@ export function mapObject(value: any, fn: Function): any {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function loadScript(src: string) {
|
export function loadScript(src: string) {
|
||||||
return new Promise((ok, fail) => {
|
return new Promise<void>((ok, fail) => {
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
script.onerror = reason => fail(reason);
|
script.onerror = reason => fail(reason);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user