Closed
Description
Checklist
- I have tried restarting my IDE and the issue persists.
- I have read the FAQ and my problem is not listed.
Tell us about your environment
- ESLint version:
- eslint-plugin-vue version:
- Node version:
- Operating System:
Please show your full configuration:
const path = require("path");
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true,
},
globals: {
__webpack_public_path__: true,
},
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
plugins: ["prettier"],
overrides: [
{
files: ["*.vue"],
parser: "vue-eslint-parser",
plugins: ["vue"],
extends: ["plugin:vue/recommended", "plugin:prettier/recommended"],
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
rules: {
"vue/require-default-prop": "off",
},
},
],
extends: ["eslint:recommended", "plugin:import/recommended", "plugin:prettier/recommended"],
rules: {
"no-console": "off",
"no-debugger": "off",
"import/no-named-as-default": "off",
},
settings: {
"import/core-modules": ["@nh/micro-base-service"],
"import/resolver": {
alias: {
map: [
["@", path.resolve(__dirname, "./src")],
["@base-service", path.resolve(__dirname, "./micro/base-service")],
],
extensions: [".js", ".vue"],
},
},
},
};
What did you do?
<template>
<div class="nav-multi">
<el-tabs
class="nav-multi-tag"
:value="$route.fullPath"
type="card"
:closable="multiTab.length !== 1"
@tab-remove="handleClose"
@tab-click="handleOpen"
>
<el-tab-pane
v-for="tab in multiTab"
:key="tab.fullPath"
:name="tab.fullPath"
:label="(tab.query?.patientName || '') + (tab.meta.customTitle || tab.meta.title)"
/>
</el-tabs>
</div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
import { findIndex } from "lodash-es";
export default {
name: "NavMultiTab",
watch: {
$route(val) {
this.addMultiTab(val);
},
},
created() {
this.addMultiTab(this.$route);
},
// The "computed" property should be above the "watch" property on line 26.eslint[vue/order-in-components]
computed: {
...mapGetters(["multiTab"]),
},
methods: {
...mapActions({ addMultiTab: "multiTab/add" }),
},
};
</script>
What did you expect to happen?
1.computed内含有辅助函数时, 应该自动修复;
What actually happened?
1.computed内含有辅助函数无法自动修复, 请排查, 谢谢;
Repository to reproduce this issue
Metadata
Metadata
Assignees
Labels
No labels