feat 添加折扣力度和排序
All checks were successful
Build image / build (push) Successful in 20s

This commit is contained in:
timerzz 2024-05-15 20:13:00 +08:00
parent 4cb2da49d8
commit 1f07d5db26

View File

@ -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()
}