效果展示

<el-table-column prop="img_list" label="热门展品排名" min-width="80"> <template
slot-scope="scope"> <div class="hot_list"> <i class="upward-icon" @click.stop="
sortUp(scope.$index,scope.row)">上</i> <i class="down-icon" @click.stop="
sortDown(scope.$index,scope.row)">下</i> </div> </template> </el-table-column>
sortUp(index, row) { console.log(index, row); if (index > 0) { let temp = this.
tableData[index - 1]; this.$set(this.tableData, index - 1, this.tableData[index]
); this.$set(this.tableData, index, temp); } }, sortDown(index, row) { console.
log(index, row); if (index < this.tableData.length - 1) { let i = this.tableData
[index + 1]; this.$set(this.tableData, index + 1, this.tableData[index]); this.$
set(this.tableData, index, i); } }

技术
今日推荐
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:[email protected]
QQ群:766591547
关注微信