Browse Source

fix: taro build error

suzigang 3 years ago
parent
commit
c91fea8292

+ 4 - 4
package.json

@@ -85,7 +85,7 @@
     "@typescript-eslint/parser": "^4.20.0",
     "@vitejs/plugin-legacy": "^1.6.4",
     "@vitejs/plugin-vue": "^2.1.0",
-    "@vue/compiler-sfc": "3.2.34",
+    "@vue/compiler-sfc": "^3.2.30",
     "@vue/eslint-config-prettier": "^6.0.0",
     "@vue/eslint-config-typescript": "^7.0.0",
     "@vue/test-utils": "^2.0.0-rc.18",
@@ -111,10 +111,10 @@
     "transliteration": "^2.2.0",
     "ts-jest": "^26.5.5",
     "typescript": "4.6.4",
-    "vite": "2.9.9",
-    "vite-plugin-dts": "1.1.1",
+    "vite": "^2.9.1",
+    "vite-plugin-dts": "^1.0.5",
     "vite-plugin-md": "^0.11.8",
-    "vue": "3.2.34",
+    "vue": "3.2.24",
     "vue-jest": "^5.0.0-alpha.7"
   },
   "eslintConfig": {

+ 1 - 1
src/packages/__VUE/menu/__tests__/menu.spec.ts

@@ -181,7 +181,7 @@ test('menu item change props: value2 should be b after click', async () => {
     },
     methods: {
       handleChange(val: any) {
-        this.value2 = val;
+        (this as any).value2 = val;
       }
     }
   });

+ 1 - 1
src/packages/__VUE/radiogroup/__tests__/radiogroup.spec.ts

@@ -20,7 +20,7 @@ test('should emit "update:modelValue" and "change" event when radio is clicked',
         </nut-radiogroup>
       </template>
     `,
-    setup(props, { emit }) {
+    setup(props: any, { emit }: any) {
       const state = reactive({
         radioVal: ''
       });

+ 2 - 2
src/packages/__VUE/searchbar/__tests__/__snapshots__/searchbar.spec.ts.snap

@@ -7,7 +7,7 @@ exports[`basic usage 1`] = `
   <view class=\\"nut-searchbar__search-input\\">
     <!--v-if-->
     <view class=\\"nut-searchbar__input-inner\\">
-      <form action=\\"#\\"><input class=\\"nut-searchbar__input-bar\\" type=\\"text\\" maxlength=\\"9999\\" placeholder=\\"请输入\\"></form>
+      <form action=\\"#\\"><input class=\\"nut-searchbar__input-bar\\" type=\\"textarea\\" maxlength=\\"9999\\" placeholder=\\"请输入\\" style=\\"text-align: left;\\"></form>
       <view class=\\"nut-searchbar__input-clear\\" style=\\"display: none;\\"><i class=\\"nutui-iconfont nut-icon nut-icon-circle-close\\" style=\\"color: rgb(85, 85, 85); font-size: 12px; width: 12px; height: 12px;\\" src=\\"\\"></i></view>
     </view>
     <!--v-if-->
@@ -23,7 +23,7 @@ exports[`slot test 1`] = `
   <view class=\\"nut-searchbar__search-input\\">
     <!--v-if-->
     <view class=\\"nut-searchbar__input-inner\\">
-      <form action=\\"#\\"><input class=\\"nut-searchbar__input-bar\\" type=\\"text\\" maxlength=\\"9999\\" placeholder=\\"请输入\\"></form>
+      <form action=\\"#\\"><input class=\\"nut-searchbar__input-bar\\" type=\\"textarea\\" maxlength=\\"9999\\" placeholder=\\"请输入\\" style=\\"text-align: left;\\"></form>
       <view class=\\"nut-searchbar__input-clear\\" style=\\"display: none;\\"><i class=\\"nutui-iconfont nut-icon nut-icon-circle-close\\" style=\\"color: rgb(85, 85, 85); font-size: 12px; width: 12px; height: 12px;\\" src=\\"\\"></i></view>
     </view>
     <!--v-if-->

+ 2 - 2
src/packages/__VUE/tabbar/__test__/index.spec.ts

@@ -165,8 +165,8 @@ test('should show sure emitted when click', async () => {
     },
     methods: {
       tabSwitch(item: any, index: number) {
-        this.val = index;
-        this.data = item;
+        (this as any).val = index;
+        (this as any).data = item;
       }
     }
   });