avue、vue、element-UI

1、表格多选时,处理完数据后会保留上一次选择的数据,再次处理时会带出上一次处理的数据,需要在第一次处理完数据后清空之前选择的内容(在处理完数据后,清空选择的数据)

<avue-crud ref="crud"></avue-crud>
this.$refs.crud.selectClear();

2、avue-crud参数: 

<avue-crud
  ref="crudTable"
  :data="listData"
  id="crudTable"
  :option="option"
  stripe
  :page.sync="page"
  @on-load="onPageLoad"
  @sort-change="sortChange"
  @current-row-change="handleCurrentRowChange"
  @selection-change="selectionChange" 
>
  <template slot-scope="scope" slot="menu">
  </template>
  <template slot-scope="scope" slot="menuLeft">
  </template>
</avue-crud>

 @selection-change="selectionChange": 开启多选后的选中事件

option: {
  selection: true, // 开起表格多选
  columnBtn: false, // 隐藏表格右侧列显影按钮
  refreshBtn: false, // 隐藏表格右侧刷新按钮
  column: [
    {
      sortable: true,
      label: "状态",
      type: 'select',
      props: {
        label: 'F_ItemName',
        value: 'F_ItemValue'
      },
      dicUrl:  baseUrl + '/data-items/rptstatus/detail',
      prop: "status",
    },
  ]
}

3、表格加载默认全部选中

this.$nextTick(() => {
  for (let i = 0; i < this.listData.length; i++) {
    this.$refs.rfqvendorsignupTable.toggleRowSelection(this.listData[i],true);
  }
});

3、表格中change等方法执行了多次(存在固定列,多一个固定列多执行一次)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值