From 71320e2656f393b4e452825aba8d66de4d6a3bbb Mon Sep 17 00:00:00 2001 From: plightfield <1207120484@qq.com> Date: Sun, 29 Sep 2024 15:18:00 +0800 Subject: [PATCH] change --- src/GlobalModal.tsx | 15 +++++++++++ src/index.html | 12 +++++++++ src/layout/GlobalMenu.tsx | 13 ++++++++++ src/layout/adder/WidgetAdder.tsx | 33 +++++++++++++++++++++--- src/layout/grid/BlockWrapper.tsx | 3 ++- src/layout/grid/WidgetBlock.tsx | 43 ++++++++++++++++++++++++++++++++ src/test.js | 1 + src/useRouterStore.ts | 3 +-- src/widgets/calendar/Large.tsx | 2 +- src/widgets/calendar/Middle.tsx | 2 +- src/widgets/calendar/Modal.tsx | 2 +- src/widgets/calendar/Small.tsx | 2 +- src/widgets/calendar/index.ts | 9 ++++--- src/widgets/index.ts | 5 ++-- 14 files changed, 128 insertions(+), 17 deletions(-) create mode 100644 src/index.html create mode 100644 src/layout/grid/WidgetBlock.tsx create mode 100644 src/test.js diff --git a/src/GlobalModal.tsx b/src/GlobalModal.tsx index 3e56220..f39aeb2 100644 --- a/src/GlobalModal.tsx +++ b/src/GlobalModal.tsx @@ -3,6 +3,7 @@ import { computed, defineComponent, ref, Transition, watch } from 'vue' import { OhVueIcon, addIcons } from 'oh-vue-icons' import { MdClose, MdOpeninfull, MdClosefullscreen } from 'oh-vue-icons/icons' import asyncLoader from './utils/asyncLoader' +import widgetList from '@/widgets' addIcons(MdClose, MdOpeninfull, MdClosefullscreen) const SearchPage = asyncLoader(() => import('@/layout/header/search/SearchPage')) const AdderPage = asyncLoader(() => import('@/layout/adder/AdderPage')) @@ -79,6 +80,20 @@ export default defineComponent(() => { ) : router.path === 'global-adder' ? ( + ) : router.path.startsWith('widget-') ? ( + (() => { + const name = router.path.split('-')[1] + const selected = widgetList.find((el) => el.name === name) + if (!selected) + return ( +
+ 组件维护中 +
+ ) + const compo = selected.modal + console.log(compo) + return + })() ) : null} diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..4813512 --- /dev/null +++ b/src/index.html @@ -0,0 +1,12 @@ + + + + + + Document + + +
要什么服务器,直接 oss
+