From 071c48636768e8de71ec81cf8f4ff49e9cc5011a Mon Sep 17 00:00:00 2001 From: fanfan Date: Sat, 23 Mar 2024 21:02:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/goods/Index.vue | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/views/goods/Index.vue b/src/views/goods/Index.vue index 6be4b82..a5150b8 100644 --- a/src/views/goods/Index.vue +++ b/src/views/goods/Index.vue @@ -119,7 +119,8 @@ import CategoryModel from '@/common/model/Category' const columns = [ { title: '商品ID', - dataIndex: 'goods_id' + dataIndex: 'goods_id', + sorter: true, }, { title: '商品图片', @@ -135,20 +136,24 @@ const columns = [ { title: '商品价格', dataIndex: 'goods_price_min', - scopedSlots: { customRender: 'goods_price_min' } + scopedSlots: { customRender: 'goods_price_min' }, + sorter: true, }, { title: '成本价', dataIndex: 'cost_price', - scopedSlots: { customRender: 'cost_price' } + scopedSlots: { customRender: 'cost_price' }, + sorter: true, }, { title: '总销量', - dataIndex: 'sales_actual' + dataIndex: 'sales_actual', + sorter: true, }, { title: '库存总量', - dataIndex: 'stock_total' + dataIndex: 'stock_total', + sorter: true, }, { title: '状态', @@ -157,12 +162,14 @@ const columns = [ }, { title: '排序', - dataIndex: 'sort' + dataIndex: 'sort', + sorter: true, }, { title: '添加时间', width: '180px', - dataIndex: 'create_time' + dataIndex: 'create_time', + sorter: true, }, { title: '操作',