From 4b57949d2fbcc6b3bdd2745c249468dd748fa364 Mon Sep 17 00:00:00 2001 From: YangFong Date: Sun, 19 Oct 2025 09:50:04 +0800 Subject: [PATCH] feat: add custom panel for editer --- .../web/src/components/editor/RightSlider.vue | 81 +--------------- .../src/components/editor/ThemeCustomizer.vue | 96 +++++++++++++++++++ .../components/editor/editor-header/index.vue | 14 ++- 3 files changed, 112 insertions(+), 79 deletions(-) create mode 100644 apps/web/src/components/editor/ThemeCustomizer.vue diff --git a/apps/web/src/components/editor/RightSlider.vue b/apps/web/src/components/editor/RightSlider.vue index 4c584c2016..8f91e205e3 100644 --- a/apps/web/src/components/editor/RightSlider.vue +++ b/apps/web/src/components/editor/RightSlider.vue @@ -7,14 +7,12 @@ import { fontSizeOptions, legendOptions, themeOptions, - widthOptions, } from '@md/shared/configs' -import { Moon, Sun, X } from 'lucide-vue-next' +import { X } from 'lucide-vue-next' import PickColors from 'vue-pick-colors' -import { useDisplayStore, useStore } from '@/stores' +import { useStore } from '@/stores' const store = useStore() -const displayStore = useDisplayStore() // 控制是否启用动画 const enableAnimation = ref(false) @@ -32,11 +30,7 @@ watch(() => store.isMobile, () => { enableAnimation.value = false }) -const { isDark, primaryColor } = storeToRefs(store) - -function customStyle() { - displayStore.toggleShowCssEditor() -} +const { primaryColor } = storeToRefs(store) const isOpen = ref(false) @@ -282,75 +276,6 @@ const formatOptions = ref([`rgb`, `hex`, `hsl`, `hsv`]) -
-

自定义 CSS 面板

-
- - -
-
-
-

编辑区位置

-
- - -
-
-
-

预览模式

-
- -
-
-
-

模式

-
- - -
-

样式配置