review:【antd/ele】【mall】商品模块的迁移
This commit is contained in:
@@ -31,6 +31,7 @@ function handleRadioChange() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO @puhui999:这里的代码风格,对齐 antd 的;可以使用 idea 对比两个文件哈;
|
||||
const [Grid, gridApi] = useVbenVxeGrid({
|
||||
gridOptions: {
|
||||
columns: useSkuGridColumns(),
|
||||
|
||||
@@ -127,7 +127,7 @@ watch(
|
||||
</SkuList>
|
||||
</template>
|
||||
</VxeColumn>
|
||||
<VxeColumn field="id" align="center" title="商品编号" />
|
||||
<VxeColumn field="id" align="center" title="商品编号" min-width="30" />
|
||||
<VxeColumn title="商品图" min-width="80">
|
||||
<template #default="{ row }">
|
||||
<ElImage
|
||||
|
||||
@@ -112,6 +112,7 @@ function emitSpuChange() {
|
||||
fit="cover"
|
||||
/>
|
||||
<!-- 删除按钮 -->
|
||||
<!-- TODO @puhui999:还是使用 IconifyIcon:使用自己的中立的图标,方便 antd 和 ele 共享 -->
|
||||
<IconifyIcon
|
||||
v-if="!disabled"
|
||||
icon="ep:circle-close-filled"
|
||||
@@ -128,6 +129,7 @@ function emitSpuChange() {
|
||||
class="flex h-[60px] w-[60px] cursor-pointer items-center justify-center rounded-lg border-2 border-dashed transition-colors hover:border-primary hover:bg-primary/5"
|
||||
@click="handleOpenSpuSelect"
|
||||
>
|
||||
<!-- TODO @puhui999:还是使用 IconifyIcon:使用自己的中立的图标,方便 antd 和 ele 共享 -->
|
||||
<IconifyIcon icon="ep:plus" class="text-xl text-gray-400" />
|
||||
</div>
|
||||
</ElTooltip>
|
||||
|
||||
@@ -70,6 +70,7 @@ const formData = ref<MallSpuApi.Spu>({
|
||||
}); // spu 表单数据
|
||||
const propertyList = ref<PropertyAndValues[]>([]); // 商品属性列表
|
||||
const ruleConfig: RuleConfig[] = [
|
||||
// TODO @puhui999:ele 这里都有 :number,antd 要不要加?
|
||||
{
|
||||
name: 'stock',
|
||||
rule: (arg: number) => arg >= 0,
|
||||
@@ -199,7 +200,7 @@ async function handleSubmit() {
|
||||
item.secondBrokeragePrice = convertToInteger(item.secondBrokeragePrice);
|
||||
});
|
||||
}
|
||||
// 处理轮播图列表
|
||||
// 处理轮播图列表 TODO @puhui999:这个是必须的哇?
|
||||
const newSliderPicUrls: any[] = [];
|
||||
values.sliderPicUrls!.forEach((item: any) => {
|
||||
// 如果是前端选的图
|
||||
|
||||
@@ -130,7 +130,6 @@ const [Modal, modalApi] = useVbenModal({
|
||||
await modalApi.close();
|
||||
emit('success');
|
||||
},
|
||||
|
||||
async onOpenChange(isOpen: boolean) {
|
||||
if (!isOpen) {
|
||||
return;
|
||||
|
||||
@@ -12,7 +12,9 @@ import { getRangePickerDefaultProps } from '#/utils';
|
||||
|
||||
/** 关联数据 */
|
||||
const userStore = useUserStore();
|
||||
const pickUpStoreList = ref<MallDeliveryPickUpStoreApi.PickUpStore[]>([]);
|
||||
const pickUpStoreList = ref<MallDeliveryPickUpStoreApi.DeliveryPickUpStore[]>(
|
||||
[],
|
||||
);
|
||||
getSimpleDeliveryPickUpStoreList().then((res) => {
|
||||
pickUpStoreList.value = res;
|
||||
// 移除自己无法核销的门店
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
|
||||
// TODO @芋艿:风格和 antd 不一致;
|
||||
const summary = ref<MallOrderApi.OrderSummary>();
|
||||
|
||||
/** 刷新表格 */
|
||||
|
||||
Reference in New Issue
Block a user