vue v-for和v-if同时使用

tech2025-03-18  6

当v-for和v-if一起使用时,v-for的优先级比v-if要高,这意味着v-if 将分别重复运行于每个v-for循环中。

解决方法:div嵌套起来分开写。

最新回复(0)