1
0
mirror of https://gitee.com/baidu/amis.git synced 2024-12-15 01:11:15 +08:00

添加 isAlive 检测

This commit is contained in:
liaoxuezhi 2023-05-20 09:34:04 +08:00
parent 2ef3830e85
commit 227887ae04
2 changed files with 2 additions and 2 deletions
packages/amis/src/renderers

View File

@ -371,7 +371,7 @@ export default class Dialog extends React.Component<DialogProps> {
handleExited() {
const {lazySchema, store, statusStore} = this.props;
statusStore?.resetAll();
statusStore && isAlive(statusStore) && statusStore.resetAll();
if (isAlive(store)) {
store.reset();
store.setEntered(false);

View File

@ -430,7 +430,7 @@ export default class Drawer extends React.Component<DrawerProps> {
handleExited() {
const {lazySchema, store, statusStore} = this.props;
statusStore?.resetAll();
statusStore && isAlive(statusStore) && statusStore.resetAll();
if (isAlive(store)) {
store.reset();
store.setEntered(false);