chore: adjust popupSharedProps

This commit is contained in:
chenjiahan
2020-08-24 10:27:55 +08:00
parent 28f2fe340c
commit 00395f0146
4 changed files with 21 additions and 34 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ export default createComponent({
setup(props, { slots }) {
useParent(ACTION_BAR_KEY, ref());
function genIcon() {
const renderIcon = () => {
const { dot, badge, icon, color, iconClass } = props;
if (slots.icon) {
@@ -44,7 +44,7 @@ export default createComponent({
class={[bem('icon'), iconClass]}
/>
);
}
};
return (vm) => (
<div
@@ -55,7 +55,7 @@ export default createComponent({
route(vm.$router, vm);
}}
>
{genIcon()}
{renderIcon()}
{slots.default ? slots.default() : props.text}
</div>
);