对于data中声明的一个数组变量arr=[],在绑定时候可以如下:

 <div style="margin-top: 10px;margin-left: 40px;">
              <span style="display: inline-block;width: 70px;"><el-checkbox v-model="checked[0]">MTS</el-checkbox></span><span style="display: inline-block;"><el-input size="medium" style="width: 360px;" v-model="input[0]"></el-input></span>
            </div>
            <div style="margin-top: 10px;margin-left: 40px;">
              <span style="display: inline-block;width: 70px;"><el-checkbox v-model="checked[1]">SS</el-checkbox></span><span style="display: inline-block;"><el-input size="medium" style="width: 360px;" v-model="input[1]"></el-input></span>
            </div>
            <div style="margin-top: 10px;margin-left: 40px;">
              <span style="display: inline-block;width: 70px;"><el-checkbox v-model="checked[2]">DMS</el-checkbox></span><span style="display: inline-block;"><el-input size="medium" style="width: 360px;" v-model="input[2]"></el-input></span>
            </div>

  数组中加index

效果图:

 

转载于:https://www.cnblogs.com/sweeeper/p/11217076.html

Logo

前往低代码交流专区

更多推荐