如何删除 [vue/no-use-v-if-with-v-for] 警告

如何删除 [vue/no-use-v-if-with-v-for] 警告

内容摘录:

在同一个标签上使用v-for和v-if会提示错误

[vue/no-use-v-if-with-v-for]

The 'menu' variable inside 'v-for' directive should be replaced with a computed property that returns filtered array instead. You should not mix 'v-for' with 'v-if'.eslint-plugin-vue