在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ vue 遍歷數(shù)據(jù)之后獲得多個(gè)Input框,想要獲取他們的值如何處理?

vue 遍歷數(shù)據(jù)之后獲得多個(gè)Input框,想要獲取他們的值如何處理?

clipboard.png
table數(shù)據(jù)來自后臺傳來的數(shù)據(jù)
Input里面可以輸入不同的數(shù)值

 <el-table :data="tableData" style="width: 100%;" @selection-change="handleSelectionChange">
        <el-table-column align="center" type="selection" width="55" fixed></el-table-column>
        <el-table-column align="center" prop="" label="方案名稱">
          <!-- <template slot-scope="scope">{{scope.row.beginCardNo}} - {{scope.row.endCardNo}}</template> -->
        </el-table-column>
        <el-table-column align="center" label="兌換類型">
          <!-- <template slot-scope="scope">{{scope.row.cardTypeName}}</template> -->
        </el-table-column>
        <el-table-column align="center" prop="count" label="兌換個(gè)數(shù)">\
          <template slot-scope="scope">
             <el-col :span="16" align ="center">
            <el-input placeholder="請輸入兌換個(gè)數(shù)" v-model="input"></el-input>
             </el-col>
          </template>
        </el-table-column>
        <!--<el-table-column align="center" prop="" label="未配送數(shù)量"></el-table-column>-->
        <el-table-column align="center" label="消耗積分" prop="price">
          <!-- <template slot-scope="scope">{{scope.row.deposit | money}}</template> -->
        </el-table-column>
        <!-- <el-table-column align="center" label="操作" fixed="right">
          <template slot-scope="scope">
            <a class="operation" @click="deleteItem(scope.row)" v-authority="508003">刪除</a>
          </template>
        </el-table-column> -->
      </el-table>

但是寫成這樣的話 選中一行數(shù)據(jù) 輸入的話 其他行的input都是相同的值 有什么方法可以區(qū)分開他們

回答
編輯回答
巫婆

<input v-model=“scope.row.input”>

2017年5月14日 01:05
編輯回答
小眼睛

table 里面再用input 感覺是vue設(shè)計(jì)的時(shí)候沒考慮清楚一樣,v-model必須要在data里面定義了,然后區(qū)分每一個(gè)值的時(shí)候好困惑

2017年6月6日 00:32
編輯回答
大濕胸

求問該如何綁定 獲得input里面的輸入值

2017年8月23日 22:11
編輯回答
安淺陌
v-model="'tableData.' + scope.$index + '.input'"
2017年8月25日 06:07