功能优化:商品选择、按钮展示

This commit is contained in:
季圣华
2021-05-31 23:39:35 +08:00
parent 84682eef9f
commit 21633c673f
8 changed files with 82 additions and 21 deletions

View File

@@ -55,6 +55,7 @@
:pagination="ipagination"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: getType}"
:loading="loading"
:customRow="rowAction"
@change="handleTableChange">
</a-table>
</div>
@@ -108,8 +109,8 @@
title: '选择商品',
ipagination: {
current: 1,
pageSize: 5,
pageSizeOptions: ['5', '10', '20', '30'],
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 共' + total + '条'
},
@@ -275,6 +276,23 @@
},
modalFormOk() {
this.loadData();
},
rowAction(record, index) {
return {
on: {
click: () => {
let arr = []
arr.push(record.id)
this.selectedRowKeys = arr
},
dblclick: () => {
let arr = []
arr.push(record.id)
this.selectedRowKeys = arr
this.handleSubmit()
}
}
}
}
}
}