From 1f07d5db268d1820e4f6de1c8082434ce813711f Mon Sep 17 00:00:00 2001 From: timerzz Date: Wed, 15 May 2024 20:13:00 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=B7=BB=E5=8A=A0=E6=8A=98=E6=89=A3?= =?UTF-8?q?=E5=8A=9B=E5=BA=A6=E5=92=8C=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Product/index.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/views/Product/index.vue b/src/views/Product/index.vue index baccf32..d86332c 100644 --- a/src/views/Product/index.vue +++ b/src/views/Product/index.vue @@ -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() }