vue:v-if条件
在我的VUE应用程序中,我有以下代码:
<div v-if="partner == true && kids == false" class="row">
<input type="text" id="testInput">
</div>
现在,当我想尝试此代码段时,它不会呈现输入。我很确定它应该是因为变量目前具有正确的值。
我也尝试过,但这也不起作用:
<div v-if="partner && !kids" class="row">
<input type="text" id="testInput">
<div>
条件是错误的还是该代码的问题是什么?
in my vue application I have following code:
<div v-if="partner == true && kids == false" class="row">
<input type="text" id="testInput">
</div>
Now when I want to try out this code snippet it does not render the input. I am pretty sure it should because the variables have the right value at this moment.
I also tried this but this does not work either:
<div v-if="partner && !kids" class="row">
<input type="text" id="testInput">
<div>
Is the condition wrong or what is the problem with this code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的代码很好:
Your code is fine: