【问题标题】:How to disable/enable text field according to a selected value in b-form-select?如何根据 b-form-select 中的选定值禁用/启用文本字段?
【发布时间】:2019-05-13 08:36:22
【问题描述】:

我正在尝试根据在 b-form-select

如果有人可以帮助我,我将不胜感激。

【问题讨论】:

    标签: vue.js bootstrap-vue


    【解决方案1】:

    new Vue({
      el: "#app",
      data: {
        selected: 0,
        options: [
          { value: 0, text: 'Enabled' },
          { value: 1, text: 'Disabled' }
        ]
      }
    });
    <div id="app" class="m-5">
      <b-form-select v-model="selected" :options="options"></b-form-select>
      <b-form-input type="text" :disabled="selected === 1" class="mt-3"></b-form-input>
    </div>

    Here's a jsfiddle 给它。

    【讨论】:

      猜你喜欢
      • 2022-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-27
      • 2018-04-22
      相关资源
      最近更新 更多