ソースを参照

chore(shortpassword): use icons-vue component (#1938)

Kason Yang 3 年 前
コミット
3f8d2fa7f6

+ 0 - 2
src/packages/__VUE/shortpassword/__tests__/index.spec.ts

@@ -1,12 +1,10 @@
 import { config, DOMWrapper, mount } from '@vue/test-utils';
 import ShortPassword from '../index.vue';
 import { nextTick } from 'vue';
-import NutIcon from '../../icon/index.vue';
 import NutPopup from '../../popup/index.vue';
 
 beforeAll(() => {
   config.global.components = {
-    NutIcon,
     NutPopup
   };
 });

+ 4 - 2
src/packages/__VUE/shortpassword/index.taro.vue

@@ -43,7 +43,7 @@
       <view class="nut-shortpsd-message">
         <view class="nut-shortpsd-error">{{ errorMsg }}</view>
         <view class="nut-shortpsd-forget" @click="onTips" v-if="tips || translate('tips')">
-          <nut-icon class="icon" size="11px" name="tips"></nut-icon>
+          <tips class="icon" height="11px" width="11px"></tips>
           <view>{{ tips || translate('tips') }}</view>
         </view>
       </view>
@@ -58,11 +58,13 @@
 import { ref, computed, watch, onMounted } from 'vue';
 import { createComponent } from '@/packages/utils/create';
 import Popup from '../popup/index.taro.vue';
+import { Tips } from '@nutui/icons-vue';
 const { create, translate } = createComponent('short-password');
 import Taro, { eventCenter, getCurrentInstance } from '@tarojs/taro';
 export default create({
   components: {
-    [Popup.name]: Popup
+    [Popup.name]: Popup,
+    Tips
   },
   props: {
     title: {

+ 4 - 2
src/packages/__VUE/shortpassword/index.vue

@@ -36,7 +36,7 @@
       <view class="nut-shortpsd-message">
         <view class="nut-shortpsd-error">{{ errorMsg }}</view>
         <view class="nut-shortpsd-forget" v-if="tips || translate('tips')">
-          <nut-icon class="icon" size="11px" name="tips"></nut-icon>
+          <tips class="icon" width="11px" height="11px"></tips>
           <view @click="onTips">{{ tips || translate('tips') }}</view>
         </view>
       </view>
@@ -51,10 +51,12 @@
 import { ref, computed, watch, onMounted } from 'vue';
 import { createComponent } from '@/packages/utils/create';
 import Popup from '../popup/index.vue';
+import { Tips } from '@nutui/icons-vue';
 const { create, translate } = createComponent('short-password');
 export default create({
   components: {
-    [Popup.name]: Popup
+    [Popup.name]: Popup,
+    Tips
   },
   props: {
     title: {