<div v-if="test()"></div>
methods属性这样配置:
methods: {
test: function() {
var result = false;
// ...
return result;
}
}
更多推荐
vue的v-if里如何调用函数
发布评论