mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:09:08 +08:00
chore: modal 里面处理子组件改成后面的优先 (#2463)
This commit is contained in:
parent
833f5ca279
commit
dab5af99f5
@ -652,15 +652,15 @@ export class DialogRenderer extends Dialog {
|
||||
const pool = components.concat();
|
||||
|
||||
while (pool.length) {
|
||||
const item = pool.shift()!;
|
||||
const item = pool.pop()!;
|
||||
|
||||
if (~['drawer', 'dialog'].indexOf(item.props.type)) {
|
||||
continue;
|
||||
} else if (~['page', 'service'].indexOf(item.props.type)) {
|
||||
pool.push.apply(pool, item.context.getComponents());
|
||||
} else if (~['crud', 'form', 'wizard'].indexOf(item.props.type)) {
|
||||
if (~['crud', 'form', 'wizard'].indexOf(item.props.type)) {
|
||||
targets.push(item);
|
||||
break;
|
||||
} else if (~['drawer', 'dialog'].indexOf(item.props.type)) {
|
||||
continue;
|
||||
} else if (~['page', 'service'].indexOf(item.props.type)) {
|
||||
pool.unshift.apply(pool, item.context.getComponents());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -710,15 +710,15 @@ export class DrawerRenderer extends Drawer {
|
||||
const pool = components.concat();
|
||||
|
||||
while (pool.length) {
|
||||
const item = pool.shift()!;
|
||||
const item = pool.pop()!;
|
||||
|
||||
if (~['drawer', 'dialog'].indexOf(item.props.type)) {
|
||||
continue;
|
||||
} else if (~['page', 'service'].indexOf(item.props.type)) {
|
||||
pool.push.apply(pool, item.context.getComponents());
|
||||
} else if (~['crud', 'form', 'wizard'].indexOf(item.props.type)) {
|
||||
if (~['crud', 'form', 'wizard'].indexOf(item.props.type)) {
|
||||
targets.push(item);
|
||||
break;
|
||||
} else if (~['drawer', 'dialog'].indexOf(item.props.type)) {
|
||||
continue;
|
||||
} else if (~['page', 'service'].indexOf(item.props.type)) {
|
||||
pool.unshift.apply(pool, item.context.getComponents());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user