mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
fix: 修复弹窗中表单内再弹窗新弹窗按钮不可点问题 (#10481)
This commit is contained in:
parent
46aef7e5de
commit
4941ca0351
@ -497,6 +497,7 @@ export default class Dialog extends React.Component<DialogProps> {
|
||||
onInit: this.handleFormInit,
|
||||
onSaved: this.handleFormSaved,
|
||||
onActionSensor: this.handleActionSensor,
|
||||
btnDisabled: store.loading,
|
||||
syncLocation: false // 弹框中的 crud 一般不需要同步地址栏
|
||||
};
|
||||
|
||||
@ -559,6 +560,7 @@ export default class Dialog extends React.Component<DialogProps> {
|
||||
// 弹窗观察内部的动作执行,不需要观察到子弹窗里面去
|
||||
// 所以这里传递了 undefined
|
||||
onActionSensor: undefined,
|
||||
btnDisabled: store.loading,
|
||||
key,
|
||||
disabled: action.disabled || store.loading || !show
|
||||
})
|
||||
@ -720,7 +722,8 @@ export default class Dialog extends React.Component<DialogProps> {
|
||||
{render('title', title, {
|
||||
data: store.formData,
|
||||
onAction: this.handleAction,
|
||||
onActionSensor: undefined
|
||||
onActionSensor: undefined,
|
||||
btnDisabled: store.loading
|
||||
})}
|
||||
</div>
|
||||
) : showCloseButton !== false && !store.loading ? (
|
||||
@ -737,7 +740,8 @@ export default class Dialog extends React.Component<DialogProps> {
|
||||
? render('header', header, {
|
||||
data: store.formData,
|
||||
onAction: this.handleAction,
|
||||
onActionSensor: undefined
|
||||
onActionSensor: undefined,
|
||||
btnDisabled: store.loading
|
||||
})
|
||||
: null}
|
||||
|
||||
@ -804,7 +808,7 @@ export default class Dialog extends React.Component<DialogProps> {
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{this.renderFooter()}
|
||||
{body ? this.renderFooter() : null}
|
||||
|
||||
{body
|
||||
? render(
|
||||
|
@ -493,6 +493,7 @@ export default class Drawer extends React.Component<DrawerProps> {
|
||||
onInit: this.handleFormInit,
|
||||
onSaved: this.handleFormSaved,
|
||||
onActionSensor: this.handleActionSensor,
|
||||
btnDisabled: store.loading,
|
||||
syncLocation: false
|
||||
};
|
||||
|
||||
@ -551,6 +552,7 @@ export default class Drawer extends React.Component<DrawerProps> {
|
||||
render(`action/${key}`, action, {
|
||||
onAction: this.handleAction,
|
||||
onActionSensor: undefined,
|
||||
btnDisabled: store.loading,
|
||||
data: store.formData,
|
||||
key,
|
||||
disabled: action.disabled || store.loading
|
||||
@ -686,7 +688,8 @@ export default class Drawer extends React.Component<DrawerProps> {
|
||||
onConfirm: this.handleDrawerConfirm,
|
||||
onClose: this.handleDrawerClose,
|
||||
onAction: this.handleAction,
|
||||
onActionSensor: undefined
|
||||
onActionSensor: undefined,
|
||||
btnDisabled: store.loading
|
||||
})}
|
||||
</div>
|
||||
) : null}
|
||||
@ -696,7 +699,8 @@ export default class Drawer extends React.Component<DrawerProps> {
|
||||
onConfirm: this.handleDrawerConfirm,
|
||||
onClose: this.handleDrawerClose,
|
||||
onAction: this.handleAction,
|
||||
onActionSensor: undefined
|
||||
onActionSensor: undefined,
|
||||
btnDisabled: store.loading
|
||||
})
|
||||
: null}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user