review:【antd】【mall】商品选择相关逻辑

This commit is contained in:
YunaiV
2025-11-29 10:30:48 +08:00
parent 6a8f60957d
commit d868e4abfc
6 changed files with 7 additions and 2 deletions

View File

@@ -86,6 +86,7 @@ const [Modal, modalApi] = useVbenModal({
</script> </script>
<template> <template>
<!-- TODO @puhui999这里缺少商品的选择 -->
<Modal class="w-2/5" :title="getTitle"> <Modal class="w-2/5" :title="getTitle">
<Form class="mx-4" /> <Form class="mx-4" />
</Modal> </Modal>

View File

@@ -106,7 +106,7 @@ export function useFormSchema(): VbenFormSchema[] {
}, },
}, },
{ {
// TODO // TODO <!-- TODO @puhui999这里缺少商品的选择 -->
fieldName: 'spuId', fieldName: 'spuId',
label: '拼团商品', label: '拼团商品',
component: 'Input', component: 'Input',

View File

@@ -68,7 +68,7 @@ export function useFormSchema(): VbenFormSchema[] {
rows: 4, rows: 4,
}, },
}, },
// TODO // TODO @puhui999少了商品选择~
]; ];
} }

View File

@@ -126,12 +126,14 @@ export function useFormSchema(): VbenFormSchema[] {
}, },
formItemClass: 'col-span-2', formItemClass: 'col-span-2',
}, },
// TODO @puhui999商品图太大了。
{ {
fieldName: 'spuId', fieldName: 'spuId',
label: '活动商品', label: '活动商品',
component: 'Input', component: 'Input',
rules: 'required', rules: 'required',
formItemClass: 'col-span-2', formItemClass: 'col-span-2',
// TODO @puhui999貌似 renderComponentContent 不需要哇?
renderComponentContent: () => ({ renderComponentContent: () => ({
default: () => null, default: () => null,
}), }),

View File

@@ -32,6 +32,7 @@ const formData = ref<Partial<MallRewardActivityApi.RewardActivity>>({
rules: [], rules: [],
}); });
// TODO @puhui999点击“编辑”后会出现 Cannot read properties of null (reading 'type') 报错;
const getTitle = computed(() => { const getTitle = computed(() => {
return formData.value?.id return formData.value?.id
? $t('ui.actionTitle.edit', ['满减送']) ? $t('ui.actionTitle.edit', ['满减送'])

View File

@@ -154,6 +154,7 @@ const [Modal, modalApi] = useVbenModal({
<Form /> <Form />
<!-- 商品选择区域 --> <!-- 商品选择区域 -->
<!-- TODO @puhui999这里缺少商品的选择 -->
<div class="mt-4"> <div class="mt-4">
<div class="mb-2 flex items-center"> <div class="mb-2 flex items-center">
<span class="text-sm font-medium">秒杀活动商品:</span> <span class="text-sm font-medium">秒杀活动商品:</span>