fix: mall

This commit is contained in:
xingyu4j
2025-10-22 18:17:21 +08:00
parent 1f64551a3e
commit 1db4c4170b
4 changed files with 51 additions and 53 deletions

View File

@@ -221,14 +221,9 @@ function selectSku(skus: MallSpuApi.Sku[]) {
selectedSkuIds.value = [];
return;
}
if (props.radio) {
// 单选模式
selectedSkuIds.value = [skus[0]?.id!];
} else {
// 多选模式
selectedSkuIds.value = skus.map((sku) => sku.id!);
}
props.radio
? (selectedSkuIds.value = [skus[0]?.id!])
: (selectedSkuIds.value = skus.map((sku) => sku.id!));
}
// 展开行,加载 SKU 列表
@@ -308,6 +303,10 @@ const [Modal, modalApi] = useVbenModal({
await gridApi.query();
},
});
defineExpose({
open: modalApi.open,
close: modalApi.close,
});
</script>
<template>