|
|
@@ -1,15 +1,15 @@
|
|
|
<template>
|
|
|
<view :class="classes" :style="getStyle()" @click="onClick">
|
|
|
<slot></slot>
|
|
|
- <nut-icon class="nut-tag--close" v-if="closeable" name="close" size="11" @click="onClose"></nut-icon>
|
|
|
+ <Close class="nut-tag--close" v-if="closeable" width="11px" height="11px" @click="onClose"></Close>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { PropType, CSSProperties, computed, toRefs } from 'vue';
|
|
|
+import { Close } from '@nutui/icons-vue';
|
|
|
import { createComponent } from '@/packages/utils/create';
|
|
|
const { componentName, create } = createComponent('tag');
|
|
|
-
|
|
|
export type TagType = 'primary' | 'success' | 'danger' | 'warning';
|
|
|
|
|
|
export default create({
|
|
|
@@ -37,6 +37,9 @@ export default create({
|
|
|
default: false
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ Close
|
|
|
+ },
|
|
|
emits: ['close', 'click'],
|
|
|
setup(props, { emit }) {
|
|
|
const { type, color, plain, round, mark, textColor } = toRefs(props);
|