首页 > 解决方案 > 如何获取嵌入在el-table中的el-rate元素的所有值

问题描述

<el-table-column label="id" width="80">
    <template slot-scope="scope">
        <span style="margin-left: 10px">{{(currentPage-1) * pageSize +TableMovie.indexOf(scope.row) +1 }} </span>
    </template>
</el-table-column>
<el-table-column label="name" width="120">
    <template slot-scope="scope">
        <span style="margin-left: 10px">{{ scope.row.movie }}</span>
    </template>
</el-table-column> 
<el-table-column label="Rate" width="120">
    <template slot-scope="scope">
        <el-rate
          v-model="scope.row.evaValue"
          @change="handleRate(scope.row.id,scope.row.evaValue)"
          show-text>
        </el-rate>

我想收集每部电影的费率。当用户点击提交按钮时,数据库将相应更新。我想知道如何收集费率,因为v-modelforel-rate是一个值。

标签: vue.js

解决方案


推荐阅读