文章目录
【强制更新视图】this.$forceUpdate()
import Vue from 'vue'
Vue.forceUpdate()
export default {
methods: {
handleUpdateClick() {
// built-in
this.$forceUpdate()
}
}
}
【vue获取当前行索引】scope.$index
<el-button type="text" style="margin-left: 10px" v-on:click="updatesort(scope.row,scope.$index)">{
{
$t("置顶")}}</el-button>
updatesort(row,index){
varrowindex=(this.pageIndex - 1) * this.pageSize + index + 1;
console.log(rowindex, row)