This commit is contained in:
YeMingfei666 2025-03-11 16:17:01 +08:00
commit 37d6d62785
2 changed files with 24 additions and 19 deletions

View File

@ -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,

View File

@ -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: "日期",