Преглед изворни кода

eslint "vue/no-setup-props-destructure": "off"

Michael Wang пре 3 година
родитељ
комит
a562b136b1

+ 3 - 0
.eslintrc.js

@@ -41,6 +41,9 @@ module.exports = {
     "vue/attribute-hyphenation": ["error", "never"],
     "vue/v-on-event-hyphenation": ["error", "never", { autofix: true }],
     "vue/no-v-html": "off",
+    // TODO: https://github.com/vuejs/rfcs/discussions/369  defineProps deconstructure retain reactivity
+    // eslint-disable-next-line vue/no-setup-props-destructure
+    "vue/no-setup-props-destructure": "off",
   },
   ignorePatterns: [
     ".eslintrc.js",

+ 0 - 2
src/components/CommonMarkHeader.vue

@@ -166,8 +166,6 @@ import {
 import ZoomPaper from "@/components/ZoomPaper.vue";
 import { AxiosResponse } from "axios";
 
-// TODO: https://github.com/vuejs/rfcs/discussions/369  defineProps deconstructure retain reactivity
-// eslint-disable-next-line vue/no-setup-props-destructure
 const {
   isSingleStudent = true,
   clearTasks,

+ 0 - 2
src/components/QmButton.vue

@@ -18,8 +18,6 @@ export default {
 import { reactive, useAttrs } from "vue";
 
 // 默认loading一秒,以免重复点击
-// TODO: https://github.com/vuejs/rfcs/discussions/369  defineProps deconstructure retain reactivity
-// eslint-disable-next-line vue/no-setup-props-destructure
 const { clickTimeout = 1000 } = defineProps<{ clickTimeout?: number }>();
 
 const attrs = useAttrs();

+ 0 - 2
src/components/QmDialog.vue

@@ -44,8 +44,6 @@ import { CloseOutlined } from "@ant-design/icons-vue";
 import { store } from "@/store/store";
 
 // 因为要更改props取得的值,所以不需要reactivity
-// TODO: https://github.com/vuejs/rfcs/discussions/369  defineProps deconstructure retain reactivity
-// eslint-disable-next-line vue/no-setup-props-destructure
 const {
   top = "10%",
   width = "30%",

+ 0 - 2
src/features/mark/CommonMarkBody.vue

@@ -101,8 +101,6 @@ type MakeTrack = (
   theFinalHeight: number
 ) => void | (() => void);
 
-// TODO: https://github.com/vuejs/rfcs/discussions/369  defineProps deconstructure retain reactivity
-// eslint-disable-next-line vue/no-setup-props-destructure
 const {
   hasMarkResultToRender = false,
   makeTrack = () => console.debug("非评卷界面makeTrack没有意义"),

+ 0 - 3
src/features/mark/MarkHistory.vue

@@ -118,8 +118,6 @@ import { cloneDeep } from "lodash-es";
 import EventBus from "@/plugins/eventBus";
 import { addFileServerPrefixToTask } from "@/utils/utils";
 
-// TODO: https://github.com/vuejs/rfcs/discussions/369  defineProps deconstructure retain reactivity
-// eslint-disable-next-line vue/no-setup-props-destructure
 const {
   title = "回评",
   showOrder = false,
@@ -147,7 +145,6 @@ let loading = $ref(false);
 let currentPage = $ref(1);
 let order: MarkHistoryOrderBy = $ref("markerTime");
 if (orderTimeField) {
-  // eslint-disable-next-line vue/no-setup-props-destructure
   order = orderTimeField;
 }
 let sort: MarkHistorySortField = $ref("DESC");

+ 0 - 2
src/features/student/studentInspect/MarkBody.vue

@@ -43,8 +43,6 @@ interface SliceImage {
   width: string; // 图片在整个图片列表里面的宽度比例
 }
 
-// TODO: https://github.com/vuejs/rfcs/discussions/369  defineProps deconstructure retain reactivity
-// eslint-disable-next-line vue/no-setup-props-destructure
 const { origImageUrls = "sliceUrls" } = defineProps<{
   origImageUrls?: "sheetUrls" | "sliceUrls";
 }>();