chore: modal 里面处理子组件改成后面的优先 (#2463)

This commit is contained in:
liaoxuezhi 2021-08-27 19:51:42 +08:00 committed by GitHub
parent 833f5ca279
commit dab5af99f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -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());
}
}
}

View File

@ -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());
}
}
}