diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-container-property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-container-property.vue index 4ac5f3b7a..980cd82a4 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-container-property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-container-property.vue @@ -27,7 +27,7 @@ const props = defineProps<{ modelValue: ComponentStyle }>(); const emit = defineEmits(['update:modelValue']); const formData = useVModel(props, 'modelValue', emit); -const treeData = [ +const treeData: any[] = [ { label: '外部边距', prop: 'margin', @@ -96,7 +96,7 @@ const treeData = [ }, ]; -const handleSliderChange = (prop: string) => { +function handleSliderChange(prop: string) { switch (prop) { case 'borderRadius': { formData.value.borderTopLeftRadius = formData.value.borderRadius; @@ -120,7 +120,7 @@ const handleSliderChange = (prop: string) => { break; } } -}; +} @@ -161,7 +161,9 @@ const handleSliderChange = (prop: string) => { diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-library.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-library.vue index 80c566079..2133d49d0 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-library.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/component-library.vue @@ -129,7 +129,7 @@ const handleCloneComponent = (component: DiyComponent) => { border-bottom: none; } - /* 组件 hover 和 active 状态(需要 CSS 变量)*/ + /* 组件 hover 和 active 状态(需要 CSS 变量) */ .component.active, .component:hover { color: var(--ant-color-white); diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Carousel/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Carousel/property.vue index 3dcc075e5..fba42af2e 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Carousel/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Carousel/property.vue @@ -4,6 +4,17 @@ import type { CarouselProperty } from './config'; import { IconifyIcon } from '@vben/icons'; import { useVModel } from '@vueuse/core'; +import { + Card, + Form, + FormItem, + Radio, + RadioButton, + RadioGroup, + Slider, + Switch, + Tooltip, +} from 'ant-design-vue'; import UploadFile from '#/components/upload/file-upload.vue'; import UploadImg from '#/components/upload/image-upload.vue'; @@ -21,33 +32,33 @@ const formData = useVModel(props, 'modelValue', emit); - - - - - - + + + + + + - - - - + + + + - - - - - - - 小圆点 - 数字 - - - - - - - + + + + + + 小圆点 + 数字 + + + + + + + - 单位:秒 - - - + 单位:秒 + + + - - - 图片 - 视频 - - - + + 图片 + 视频 + + + - + - + - - + + - + - + - + - - + + diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Divider/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Divider/property.vue index f88703907..81515bec3 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Divider/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Divider/property.vue @@ -50,11 +50,7 @@ const formData = useVModel(props, 'modelValue', emit); - + @@ -72,11 +68,7 @@ const formData = useVModel(props, 'modelValue', emit); - + diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue index 403467334..bd40e4330 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/Popover/property.vue @@ -2,13 +2,7 @@ import type { PopoverProperty } from './config'; import { useVModel } from '@vueuse/core'; -import { - Form, - FormItem, - Radio, - RadioGroup, - Tooltip, -} from 'ant-design-vue'; +import { Form, FormItem, Radio, RadioGroup, Tooltip } from 'ant-design-vue'; import UploadImg from '#/components/upload/image-upload.vue'; import { AppLinkInput, Draggable } from '#/views/mall/promotion/components'; @@ -40,10 +34,7 @@ const formData = useVModel(props, 'modelValue', emit); - + 一次 diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/coupon-discount-desc.tsx b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/coupon-discount-desc.tsx index a79e1f0cb..8056bd29d 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/coupon-discount-desc.tsx +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/coupon-discount-desc.tsx @@ -23,7 +23,7 @@ export const CouponDiscountDesc = defineComponent({ const discountDesc = coupon.discountType === PromotionDiscountTypeEnum.PRICE.type ? `减${floatToFixed2(coupon.discountPrice)}元` - : `打${coupon.discountPercent / 10}折`; + : `打${coupon.discountPercent ?? 0 / 10}折`; return () => ( {useCondition} diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/coupon-discount.tsx b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/coupon-discount.tsx index 9f0c7f5b4..bd1acea06 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/coupon-discount.tsx +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/coupon-discount.tsx @@ -17,7 +17,7 @@ export const CouponDiscount = defineComponent({ setup(props) { const coupon = props.coupon as MallCouponTemplateApi.CouponTemplate; // 折扣 - let value = `${coupon.discountPercent / 10}`; + let value = `${coupon.discountPercent ?? 0 / 10}`; let suffix = ' 折'; // 满减 if (coupon.discountType === PromotionDiscountTypeEnum.PRICE.type) { diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/index.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/index.vue index 39668774c..13e946cf3 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/index.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/index.vue @@ -5,6 +5,8 @@ import type { MallCouponTemplateApi } from '#/api/mall/promotion/coupon/couponTe import { onMounted, ref, watch } from 'vue'; +import { getCouponTemplateList } from '#/api/mall/promotion/coupon/couponTemplate'; + import { CouponDiscount, CouponDiscountDesc, diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/property.vue index b31f9f8ce..50afc547f 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/coupon-card/property.vue @@ -33,8 +33,6 @@ import CouponSelect from '#/views/mall/promotion/coupon/components/select.vue'; import ComponentContainerProperty from '../../component-container-property.vue'; -const { Text: ATypographyText } = Typography; - /** 优惠券卡片属性面板 */ defineOptions({ name: 'CouponCardProperty' }); @@ -42,6 +40,8 @@ const props = defineProps<{ modelValue: CouponCardProperty }>(); const emit = defineEmits(['update:modelValue']); +const { Text: ATypographyText } = Typography; + const formData = useVModel(props, 'modelValue', emit); const couponList = ref([]); // 已选择的优惠券列表 @@ -90,7 +90,9 @@ watch( :key="index" class="flex items-center justify-between" > - {{ coupon.name }} + + {{ coupon.name }} + 满{{ floatToFixed2(coupon.usePrice) }}元, @@ -158,11 +160,7 @@ watch( - + diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/index.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/index.vue index 89b74ad2e..9ccad9d7f 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/index.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/index.vue @@ -5,7 +5,7 @@ import { ref } from 'vue'; import { IconifyIcon } from '@vben/icons'; -import { Image, message } from 'ant-design-vue'; +import { Button, Image, message } from 'ant-design-vue'; /** 悬浮按钮 */ defineOptions({ name: 'FloatingActionButton' }); @@ -57,13 +57,13 @@ const handleActive = (index: number) => { - + - + diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/components/hot-zone-edit-dialog/index.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/components/hot-zone-edit-dialog/index.vue index 41c5b1f5c..1c496ebe8 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/components/hot-zone-edit-dialog/index.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/components/hot-zone-edit-dialog/index.vue @@ -11,7 +11,7 @@ import { IconifyIcon } from '@vben/icons'; import { Button, Image } from 'ant-design-vue'; -import { AppLinkSelectDialog } from '#/views/mall/promotion/components'; +import AppLinkSelectDialog from '#/views/mall/promotion/components/app-link-input/app-link-select-dialog.vue'; import { CONTROL_DOT_LIST, @@ -201,7 +201,8 @@ const handleAppLinkChange = (appLink: AppLink) => { top: `${item.top}px`, left: `${item.left}px`, color: 'var(--ant-color-primary)', - background: 'color-mix(in srgb, var(--ant-color-primary) 30%, transparent)', + background: + 'color-mix(in srgb, var(--ant-color-primary) 30%, transparent)', borderColor: 'var(--ant-color-primary)', }" @mousedown="handleMove(item, $event)" diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/index.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/index.vue index 37bab23f1..9fc6f8b5f 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/index.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/hot-zone/index.vue @@ -1,6 +1,7 @@ 菜单设置 - 拖动左侧的小圆点可以调整顺序 + + 拖动左侧的小圆点可以调整顺序 + - { +function calculateSpace(index: number) { // 商品的列数 const columns = props.property.layoutType === 'twoCol' ? 2 : 1; // 第一列没有左边距 @@ -41,19 +41,19 @@ const calculateSpace = (index: number) => { const marginTop = index < columns ? '0' : `${props.property.space}px`; return { marginLeft, marginTop }; -}; +} // 容器 const containerRef = ref(); // 计算商品的宽度 -const calculateWidth = () => { +function calculateWidth() { let width = '100%'; // 双列时每列的宽度为:(总宽度 - 间距)/ 2 if (props.property.layoutType === 'twoCol') { width = `${(containerRef.value.offsetWidth - props.property.space) / 2}px`; } return { width }; -}; +} - + diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue index d2b473ad8..ba15df1d3 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-article/property.vue @@ -56,7 +56,7 @@ onMounted(() => { filterable :loading="loading" :options=" - articles.map((item) => ({ label: item.title, value: item.id })) + articles.map((item: any) => ({ label: item.title, value: item.id })) " @search="queryArticleList" /> diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-point/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-point/property.vue index 9fec7545e..5aafd3732 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-point/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-point/property.vue @@ -156,11 +156,7 @@ const formData = useVModel(props, 'modelValue', emit); /> - + diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-seckill/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-seckill/property.vue index 8790c686c..0657667e5 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-seckill/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/promotion-seckill/property.vue @@ -19,7 +19,8 @@ import { import UploadImg from '#/components/upload/image-upload.vue'; import { ColorInput } from '#/views/mall/promotion/components'; -import { SeckillShowcase } from '#/views/mall/promotion/seckill/components'; +// TODO: 添加组件 +// import { SeckillShowcase } from '#/views/mall/promotion/seckill/components'; import ComponentContainerProperty from '../../component-container-property.vue'; @@ -158,11 +159,7 @@ const formData = useVModel(props, 'modelValue', emit); /> - + diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue index 3b782b2b7..18fdd9e2a 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/search-bar/property.vue @@ -101,11 +101,7 @@ watch( - + diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue index 973a29cde..996283654 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/title-bar/property.vue @@ -65,18 +65,10 @@ const rules = {}; // 表单校验 - + - + @@ -89,11 +81,7 @@ const rules = {}; // 表单校验 /> - + import type { UserCouponProperty } from './config'; +import { Image } from 'ant-design-vue'; + /** 用户卡券 */ defineOptions({ name: 'UserCoupon' }); // 定义属性 diff --git a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue index 1eac1ee13..e2e0a0f74 100644 --- a/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue +++ b/apps/web-antd/src/views/mall/promotion/components/diy-editor/components/mobile/user-order/index.vue @@ -1,6 +1,8 @@
单位:秒