mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
redirect 调整
This commit is contained in:
parent
fc61c5ffcd
commit
1a68f8b560
@ -334,9 +334,8 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
const data = ctx;
|
||||
|
||||
// 由于 ajax 一段时间后再弹出,肯定被浏览器给阻止掉的,所以提前弹。
|
||||
action.redirect &&
|
||||
action.blank &&
|
||||
env.jumpTo(filter(action.redirect, data), action);
|
||||
const redirect = action.redirect && filter(action.redirect, data);
|
||||
redirect && action.blank && env.jumpTo(redirect, action);
|
||||
|
||||
return store
|
||||
.saveRemote(action.api!, data, {
|
||||
@ -355,9 +354,8 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
stopAutoRefreshWhenModalIsOpen && clearTimeout(this.timer);
|
||||
}
|
||||
|
||||
action.redirect &&
|
||||
!action.blank &&
|
||||
env.jumpTo(filter(action.redirect, data), action);
|
||||
const redirect = action.redirect && filter(action.redirect, data);
|
||||
redirect && !action.blank && env.jumpTo(redirect, action);
|
||||
action.reload
|
||||
? this.reloadTarget(action.reload, data)
|
||||
: this.search(undefined, undefined, true);
|
||||
|
@ -678,8 +678,9 @@ export class DialogRenderer extends Dialog {
|
||||
await this.openFeedback(action.feedback, store.data);
|
||||
}
|
||||
|
||||
action.redirect &&
|
||||
env.jumpTo(filter(action.redirect, store.data), action);
|
||||
const reidrect =
|
||||
action.redirect && filter(action.redirect, store.data);
|
||||
reidrect && env.jumpTo(reidrect, action);
|
||||
action.reload && this.reloadTarget(action.reload, store.data);
|
||||
action.close && this.handleSelfClose();
|
||||
})
|
||||
|
@ -675,8 +675,9 @@ export class DrawerRenderer extends Drawer {
|
||||
await this.openFeedback(action.feedback, store.data);
|
||||
}
|
||||
|
||||
action.redirect &&
|
||||
env.jumpTo(filter(action.redirect, store.data), action);
|
||||
const redirect =
|
||||
action.redirect && filter(action.redirect, store.data);
|
||||
redirect && env.jumpTo(redirect, action);
|
||||
action.reload && this.reloadTarget(action.reload, store.data);
|
||||
action.close && this.handleSelfClose();
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user