Browse Source

fix: eslint

xingyu4j 2 years ago
parent
commit
753d8dda73

+ 1 - 1
yudao-ui-admin-vue3/src/components/Qrcode/src/Qrcode.vue

@@ -64,7 +64,7 @@ const initQrcode = async () => {
       options.errorCorrectionLevel || getErrorCorrectionLevel(unref(renderText))
     const _width: number = await getOriginWidth(unref(renderText), options)
     options.scale = props.width === 0 ? undefined : (props.width / _width) * 4
-    const canvasRef: HTMLCanvasElement = await toCanvas(
+    const canvasRef: HTMLCanvasElement | any = await toCanvas(
       unref(wrapRef) as HTMLCanvasElement,
       unref(renderText),
       options

+ 2 - 2
yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue

@@ -64,8 +64,8 @@
       <el-form-item label="存储器" prop="storage">
         <el-select v-model="form.storage" placeholder="请选择存储器" :disabled="form.id !== 0">
           <el-option
-            v-for="dict in getIntDictOptions(DICT_TYPE.INFRA_FILE_STORAGE)"
-            :key="dict.value"
+            v-for="(dict, index) in getIntDictOptions(DICT_TYPE.INFRA_FILE_STORAGE)"
+            :key="index"
             :label="dict.label"
             :value="dict.value"
           />

+ 4 - 4
yudao-ui-admin-vue3/src/views/system/menu/index.vue

@@ -8,8 +8,8 @@
       <el-form-item label="状态" prop="status">
         <el-select v-model="queryParams.status" placeholder="请选择菜单状态">
           <el-option
-            v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
-            :key="dict.value"
+            v-for="(dict, index) in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
+            :key="index"
             :label="dict.label"
             :value="dict.value"
           />
@@ -124,7 +124,7 @@
         <el-radio-group v-model="menuForm.type">
           <el-radio-button
             v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_MENU_TYPE)"
-            :key="dict.value"
+            :key="dict.label"
             :label="dict.value"
           >
             {{ dict.label }}
@@ -178,7 +178,7 @@
             <el-radio
               border
               v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
-              :key="dict.value"
+              :key="dict.label"
               :label="dict.value"
             >
               {{ dict.label }}

+ 1 - 1
yudao-ui-admin-vue3/src/views/system/user/index.vue

@@ -145,7 +145,7 @@
             v-for="item in postOptions"
             :key="item.id"
             :label="item.name"
-            :value="item.id"
+            :value="(item.id as unknown as number)"
           />
         </el-select>
       </template>

+ 1 - 2
yudao-ui-admin-vue3/src/views/system/user/user.data.ts

@@ -14,8 +14,7 @@ export const rules = reactive({
   status: [required],
   mobile: [
     {
-      min: 11,
-      max: 11,
+      len: 11,
       trigger: 'blur',
       message: '请输入正确的手机号码'
     }