fix: svg-icon 默认改为 large

This commit is contained in:
mario.gk 2020-12-11 12:25:38 +08:00
parent 07dab6db8e
commit 21d92ffd2d
2 changed files with 5 additions and 12 deletions

View File

@ -280,17 +280,10 @@ export class ComponentMeta {
checkNestingDown(my: Node, target: Node | NodeSchema | NodeSchema[]) { checkNestingDown(my: Node, target: Node | NodeSchema | NodeSchema[]) {
// 检查父子关系,直接约束型,在画布中拖拽直接掠过目标容器 // 检查父子关系,直接约束型,在画布中拖拽直接掠过目标容器
if (this.childWhitelist) { if (this.childWhitelist) {
let _target: any = target; const _target: any = !Array.isArray(target) ? [target] : target;
if (!Array.isArray(_target)) { return _target.every((item: Node | NodeSchema) => {
_target = [_target]; const _item = !isNode(item) ? new Node(my.document, item) : item;
} return this.childWhitelist && this.childWhitelist(_item, my);
return !_target.some((item: Node | NodeSchema) => {
let _item = item;
if (!isNode(_item)) {
_item = new Node(my.document, _item);
}
return this.childWhitelist && !this.childWhitelist(_item, my);
}); });
} }
return true; return true;

View File

@ -18,7 +18,7 @@ export interface IconProps {
export function SVGIcon({ export function SVGIcon({
fill, fill,
size = 'medium', size = 'large',
viewBox, viewBox,
style, style,
children, children,