我正在利用vuejs将数据提取到我的项目中。如果v-for中没有数据,我有一个简单的请求,等待隐藏认证文本。有没有超级简单的方法来实现这一目标?
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<p style="text-align:left;"> <strong>Certification:</strong> <span v-for="certification in getCertText(selectedJob)" href="#" v-on:click="updateCertfication(certification)" >{{certification}} </span></p></br>
只需检查数组是否为空。
<strong v-if="getCertText(selectedJob).length > 0">Certification:</strong>
这应该工作
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句