济南教育加盟网站建设,搜索引擎优化网站,台州专业做网站,信息网站制作原由#xff1a;
在进行项目开发的时候因为在一个标签上同时使用了v-for和v-if两个指令导致的报错。 提示错误#xff1a;The undefined variable inside v-for directive should be replaced with a computed property that returns filtered array instead. You should no…原由
在进行项目开发的时候因为在一个标签上同时使用了v-for和v-if两个指令导致的报错。 提示错误The undefined 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 原因v-for的优先级会高于v-if因此v-if会重复运行在每个v-for中。 正确写法使用template标签进行包裹(template为html5的新标签无特殊含义) 注意点key值写在包裹的元素中