From 715551d43158f244085c906e715f733601537573 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 27 Oct 2025 23:42:43 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy=20editor?= =?UTF-8?q?=20=E7=9A=84=E5=91=8A=E8=AD=A6=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/promotion/components/diy-editor/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/index.vue index 4df691994..823c55e21 100644 --- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/index.vue +++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/index.vue @@ -19,6 +19,7 @@ import { ElText, ElTooltip, } from 'element-plus'; +import draggable from 'vuedraggable'; import statusBarImg from '#/assets/imgs/diy/statusBar.png'; @@ -77,17 +78,20 @@ watch( isString(props.modelValue) && !isEmpty(props.modelValue) ? (JSON.parse(props.modelValue) as PageConfig) : props.modelValue; - // TODO @AI:这里可以简化么?idea 提示 Invalid 'typeof' check: 'modelValue' cannot have type 'string' + // noinspection SuspiciousTypeOfGuard pageConfigComponent.value.property = (typeof modelValue !== 'string' && modelValue?.page) || PAGE_CONFIG_COMPONENT.property; + // noinspection SuspiciousTypeOfGuard navigationBarComponent.value.property = (typeof modelValue !== 'string' && modelValue?.navigationBar) || NAVIGATION_BAR_COMPONENT.property; + // noinspection SuspiciousTypeOfGuard tabBarComponent.value.property = (typeof modelValue !== 'string' && modelValue?.tabBar) || TAB_BAR_COMPONENT.property; // 查找对应的页面组件 + // noinspection SuspiciousTypeOfGuard pageComponents.value = ( (typeof modelValue !== 'string' && modelValue?.components) || [] @@ -233,7 +237,6 @@ function handleCopyComponent(index: number) { /** 删除组件 */ function handleDeleteComponent(index: number) { - // 删除组件 pageComponents.value.splice(index, 1); if (index < pageComponents.value.length) { // 1. 不是最后一个组件时,删除后选中下面的组件 @@ -481,10 +484,10 @@ onMounted(() => {
-
手机扫码预览