Browse Source

fix(tag): taro env bug

richard1015 3 years ago
parent
commit
4b9b5f82a3
1 changed files with 11 additions and 3 deletions
  1. 11 3
      src/packages/__VUE/tag/index.taro.vue

+ 11 - 3
src/packages/__VUE/tag/index.taro.vue

@@ -1,13 +1,21 @@
 <template>
   <view :class="classes" :style="getStyle()" @click="onClick">
     <slot></slot>
-    <Close class="nut-tag--close" v-if="closeable" width="11px" height="11px" @click="onClose"></Close>
+    <IconFont
+      name="close"
+      class="nut-tag--close"
+      v-if="closeable"
+      font-size="12px"
+      width="11px"
+      height="11px"
+      @click="onClose"
+    ></IconFont>
   </view>
 </template>
 
 <script lang="ts">
 import { PropType, CSSProperties, computed, toRefs } from 'vue';
-import { Close } from '@nutui/icons-vue';
+import { IconFont } from '@nutui/icons-vue';
 import { createComponent } from '@/packages/utils/create';
 const { componentName, create } = createComponent('tag');
 export type TagType = 'primary' | 'success' | 'danger' | 'warning';
@@ -38,7 +46,7 @@ export default create({
     }
   },
   components: {
-    Close
+    IconFont
   },
   emits: ['close', 'click'],
   setup(props, { emit }) {