小编Bal*_*rma的帖子

VueJS - 如何在单选按钮选择上显示不同的div

如何在单选按钮选择上显示不同的组件.

<input type="radio" name="book" value="One" checked="checked">
<input type="radio" name="book" value="Round">

      <div> // this should show show default, One is selected
        <p>Value One</p>
      </div>
      <div> // this should show show on radio change to Round selected
        <p>Value Round</p>
      </div>
Run Code Online (Sandbox Code Playgroud)

vue.js vue-component vuejs2

4
推荐指数
1
解决办法
5567
查看次数

标签 统计

vue-component ×1

vue.js ×1

vuejs2 ×1