From 061f4372b6a54be3096b7e6af4c39a36f31e3137 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Tue, 11 Mar 2025 15:37:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/index.vue | 1 - src/views/product/indexconfig/search.ts | 42 ++++++++++++++----------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/views/product/index.vue b/src/views/product/index.vue index 464bc59..40159f7 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -109,7 +109,6 @@ async function handleAddClick() { } // 上架 function handleSwitchChange(data: any) { - console.log(data, '条似乎22222') let obj = { type: data.isGrounding ? 'sku' : 'product', id: data.id, diff --git a/src/views/product/indexconfig/search.ts b/src/views/product/indexconfig/search.ts index 1737f91..a9c7cf0 100644 --- a/src/views/product/indexconfig/search.ts +++ b/src/views/product/indexconfig/search.ts @@ -34,32 +34,38 @@ const searchConfig: ISearchConfig = { formItem.options = await UserAPI.getList(); }, }, - { - type: "tree-select", - label: "商品规格", - prop: "specId", + type: "select", + label: "商品类型", + prop: "type", attrs: { - placeholder: "请选择商品规格", - data: [], - filterable: true, - "check-strictly": true, - "render-after-expand": false, + placeholder: "请选择商品类型", clearable: true, style: { width: "200px", }, - props: { - label: 'name', // 指定节点显示的文本字段为 name - value: 'id' // 指定节点的值字段为 id - } - }, - async initFn(formItem) { - formItem.attrs.data = await DeptAPI.getPage(); - // 注意:如果initFn函数不是箭头函数,this会指向此配置项对象,那么也就可以用this来替代形参formItem - // this.attrs!.data = await DeptAPI.getOptions(); }, + options: [{ + label: "单规格商品", + value: "single" + }, { + label: "多规格商品", + value: "sku" + }, { + label: "套餐商品", + value: "package" + }, { + label: "称重商品", + value: "weight" + }, { + label: "团购券", + value: "coupon" + }], + // async initFn(formItem) { + // formItem.options = await UserAPI.getList(); + // }, }, + { type: "date-picker", label: "日期",