This commit is contained in:
parent
4cb2da49d8
commit
1f07d5db26
@ -117,7 +117,8 @@ onMounted(()=>{
|
||||
const query = reactive({
|
||||
page: 1,
|
||||
size:6,
|
||||
rate_sort: null
|
||||
rate_sort: null,
|
||||
disc_sort: null,
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
@ -160,6 +161,13 @@ const columns = computed(()=>[
|
||||
dataIndex: 'usPrice',
|
||||
key: 'usPrice',
|
||||
},
|
||||
{
|
||||
title: '折扣力度',
|
||||
dataIndex: 'discPercent',
|
||||
key: 'discPercent',
|
||||
sorter:true,
|
||||
sortOrder: query.disc_sort
|
||||
},
|
||||
{
|
||||
title: '成本(CNY)',
|
||||
dataIndex: 'cnyPrice',
|
||||
@ -248,6 +256,8 @@ const doUpdate=()=>{
|
||||
const tableChange = (pagination, filters, sorter, { action, currentDataSource })=>{
|
||||
if(sorter.columnKey === 'rate') {
|
||||
query.rate_sort = sorter.order
|
||||
}else if (sorter.columnKey === 'discPercent'){
|
||||
query.disc_sort = sorter.order
|
||||
}
|
||||
list()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user