From c6d0694737ea1855bd347ab481c99c6e7772b22d Mon Sep 17 00:00:00 2001 From: MSuMshk <2039814060@qq.com> Date: Fri, 20 Feb 2026 17:57:20 +0800 Subject: [PATCH] feat(project): align category manager with prototype and clean drawer implementation --- .../components/CategoryDetailPanel.vue | 71 ++- .../components/CategoryEditorDrawer.vue | 267 ++++++---- .../category/components/CategorySidebar.vue | 75 +-- .../composables/useProductCategoryPage.ts | 35 +- .../src/views/product/category/index.vue | 15 +- .../views/product/category/styles/base.less | 37 +- .../views/product/category/styles/detail.less | 68 ++- .../views/product/category/styles/drawer.less | 457 ++++++++---------- .../product/category/styles/sidebar.less | 51 +- .../src/views/product/category/types.ts | 5 + 10 files changed, 630 insertions(+), 451 deletions(-) diff --git a/apps/web-antd/src/views/product/category/components/CategoryDetailPanel.vue b/apps/web-antd/src/views/product/category/components/CategoryDetailPanel.vue index 7d90861..3705c75 100644 --- a/apps/web-antd/src/views/product/category/components/CategoryDetailPanel.vue +++ b/apps/web-antd/src/views/product/category/components/CategoryDetailPanel.vue @@ -6,6 +6,10 @@ import type { ProductPreviewItem } from '../types'; */ import type { ProductCategoryManageDto } from '#/api/product'; +import { IconifyIcon } from '@vben/icons'; + +import { Button } from 'ant-design-vue'; + import { CATEGORY_CHANNEL_META, CATEGORY_CHANNEL_ORDER, @@ -29,6 +33,17 @@ interface Emits { const props = defineProps(); const emit = defineEmits(); + +function isImageUrl(value: string) { + const source = value.trim(); + if (!source) return false; + return ( + source.startsWith('data:image/') || + source.startsWith('http://') || + source.startsWith('https://') || + source.startsWith('/') + ); +}