feat: update skeleton support multiple chilren

pull/2049/head 1.5.2
tangjinzhou 2020-04-09 22:53:53 +08:00
parent d10ae9c533
commit dd5df852ef
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,8 @@ const Skeleton = {
</div>
);
}
return <span>{this.$slots.default}</span>;
const children = this.$slots.default;
return children && children.length === 1 ? children[0] : <span>{children}</span>;
},
};
/* istanbul ignore next */