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