v-for and v-if not working together in vue.js

后端 未结 6 1316
轻奢々
轻奢々 2020-12-16 13:27

A form is used to submit text and two options which tell vue which column to display the text in. When the col2 radio button is checked the submitted text should display in

6条回答
  •  离开以前
    2020-12-16 14:08

    Remove ! from second if v-if="item.col==='two'"

    better you can do this way (to iterate only once):

    1. text: {{ item.text }}, col: {{ item.col }}
    1. text: {{ item.text }}, col: {{ item.col }}

提交回复
热议问题