diff --git a/.eslintrc.js b/.eslintrc.js index 71a0ffa..3049d24 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,18 +8,96 @@ module.exports = { env: { node: true, }, - extends: ['plugin:vue/recommended', '@vue/prettier'], + extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'], rules: { - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'vue/no-v-html': 'off', - 'vue/multi-word-component-names': 'off', - 'vue/no-useless-template-attributes': 'off', + 'no-undef': 'off', + 'no-console': 'off', + 'no-debugger': 'off', + 'prettier/prettier': 'warn', + 'prefer-template': 'error', + '@typescript-eslint/no-this-alias': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/ban-ts-comment': 'off', 'vue/no-reserved-component-names': 'off', + 'vue/no-v-html': 'off', + 'no-unused-vars': 'off', + 'vue/no-useless-template-attributes': 'off', + 'use-isnan': 'off', + 'vue/html-self-closing': [ + 'error', + { + html: { + void: 'any', + normal: 'any', + component: 'always', + }, + svg: 'always', + math: 'always', + }, + ], + // 多字组件名称 + 'vue/multi-word-component-names': 'off', + // Vue组件排序 + 'vue/order-in-components': [ + 'warn', + { + order: [ + 'el', + 'name', + 'key', + 'parent', + 'functional', + ['delimiters', 'comments'], + ['components', 'directives', 'filters'], + 'extends', + 'mixins', + ['provide', 'inject'], + 'ROUTER_GUARDS', + 'layout', + 'middleware', + 'validate', + 'scrollToTop', + 'transition', + 'loading', + 'inheritAttrs', + 'model', + ['props', 'propsData'], + 'emits', + 'setup', + 'fetch', + 'asyncData', + 'data', + 'head', + 'computed', + 'watch', + 'watchQuery', + 'LIFECYCLE_HOOKS', + 'methods', + ['template', 'render'], + 'renderError', + ], + }, + ], + // Vue属性排序 'vue/attributes-order': [ 'warn', { - alphabetical: true, + order: [ + 'DEFINITION', + 'LIST_RENDERING', + 'CONDITIONALS', + 'RENDER_MODIFIERS', + 'GLOBAL', + 'UNIQUE', + 'TWO_WAY_BINDING', + 'OTHER_DIRECTIVES', + 'OTHER_ATTR', + 'EVENTS', + 'CONTENT', + ], + alphabetical: true, //字母顺序 }, ], }, diff --git a/package.json b/package.json index 29fa078..1846401 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-admin-better", - "version": "2.4.0", + "version": "2.5.5", "author": "vue-admin-better", "participants": [], "homepage": "https://chu1204505056.gitee.io/vue-admin-better", @@ -12,7 +12,7 @@ "lint": "vue-cli-service lint --fix", "clear": "rimraf node_modules&&npm install --registry=--registry=https://registry.npmmirror.com", "image-webpack-loader": "cnpm i image-webpack-loader -D", - "update": "ncu -u --reject prettier,layouts,sass-loader,sass,screenfull,eslint,chalk,vue,vue-template-compiler,vue-router,vuex,@vue/cli-plugin-babel,@vue/cli-plugin-eslint,@vue/cli-service,eslint-plugin-vue --registry=https://registry.npmmirror.com&&cnpm i", + "update": "ncu -u --reject eslint-plugin-prettier,@vue/eslint-config-prettier,prettier,layouts,sass-loader,sass,screenfull,eslint,chalk,vue,vue-template-compiler,vue-router,vuex,@vue/cli-plugin-babel,@vue/cli-plugin-eslint,@vue/cli-service,eslint-plugin-vue --registry=https://registry.npmmirror.com&&cnpm i", "push": "start ./push.sh" }, "repository": { @@ -58,13 +58,13 @@ "@vue/cli-plugin-eslint": "^4.5.15", "@vue/cli-service": "^4.5.15", "@vue/composition-api": "^1.7.1", - "@vue/eslint-config-prettier": "^7.1.0", + "@vue/eslint-config-prettier": "^6.0.0", "babel-eslint": "^10.1.0", "body-parser": "^1.20.2", "chalk": "^4.1.2", "chokidar": "^3.5.3", "eslint": "^7.32.0", - "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-prettier": "^3.4.1", "eslint-plugin-vue": "^9.1.1", "filemanager-webpack-plugin": "^8.0.0", "image-webpack-loader": "^8.1.0", diff --git a/src/components/SelectTree/index.vue b/src/components/SelectTree/index.vue index 816afbb..db20eed 100644 --- a/src/components/SelectTree/index.vue +++ b/src/components/SelectTree/index.vue @@ -24,7 +24,7 @@ :show-checkbox="selectType == 'multiple'" @check="checkNode" @node-click="nodeClick" - > + /> @@ -96,7 +96,6 @@ } }, mounted() { - const that = this this.initTree() }, methods: { @@ -132,18 +131,18 @@ allNode.forEach((element) => element.classList.remove('is-current')) }, // select多选时移除某项操作 - removeTag(val) { + removeTag() { this.$refs.treeOption.setCheckedKeys([]) }, // 点击叶子节点 - nodeClick(data, node, el) { + nodeClick(data) { if (data.rank >= this.selectLevel) { this.selectValue = data.name this.selectKey = data.id } }, // 节点选中操作 - checkNode(data, node, el) { + checkNode() { const checkedNodes = this.$refs.treeOption.getCheckedNodes() const keyArr = [] const valueArr = [] diff --git a/src/components/VabProfile/index.vue b/src/components/VabProfile/index.vue index 8517f7f..bfe2fb4 100644 --- a/src/components/VabProfile/index.vue +++ b/src/components/VabProfile/index.vue @@ -7,8 +7,10 @@
- -
{{ username }}
+ +
+ {{ username }} +
-
{{ item.title }}
-
{{ item.description }}
+
+ {{ item.title }} +
+
+ {{ item.description }} +
¥ {{ item.price }} 元
@@ -60,7 +64,7 @@ :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange" - > + />
diff --git a/src/views/mall/pay/components/Step1.vue b/src/views/mall/pay/components/Step1.vue index 096ed07..af85708 100644 --- a/src/views/mall/pay/components/Step1.vue +++ b/src/views/mall/pay/components/Step1.vue @@ -5,16 +5,16 @@ 请务必仔细填写并核对 - + - + - + - +
diff --git a/src/views/mall/pay/components/Step3.vue b/src/views/mall/pay/components/Step3.vue index c04f25b..131fbb1 100644 --- a/src/views/mall/pay/components/Step3.vue +++ b/src/views/mall/pay/components/Step3.vue @@ -1,7 +1,7 @@