Refactor #3965 - For Tag
parent
42345f106f
commit
58690ee93f
|
@ -31,7 +31,7 @@ const classes = {
|
|||
'p-tag-rounded': props.rounded
|
||||
}
|
||||
],
|
||||
icon: ({ props }) => ['p-tag-icon', props.icon],
|
||||
icon: 'p-tag-icon',
|
||||
value: 'p-tag-value'
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<span :class="cx('root')" v-bind="ptm('root')">
|
||||
<component v-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" v-bind="ptm('icon')" />
|
||||
<span v-else-if="icon" :class="cx('icon')" v-bind="ptm('icon')"></span>
|
||||
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="ptm('icon')"></span>
|
||||
<slot>
|
||||
<span :class="cx('value')" v-bind="ptm('value')">{{ value }}</span>
|
||||
</slot>
|
||||
|
|
Loading…
Reference in New Issue