From ceb05a4f62e5d8da2046b2ef33caea5bc1f8723c Mon Sep 17 00:00:00 2001
From: plightfield <1207120484@qq.com>
Date: Wed, 11 Sep 2024 16:03:17 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AD=89=E5=BE=85=E5=BC=80=E5=8F=91=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6=E5=B8=83=E5=B1=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +
src/App.vue | 7 +-
src/GlobalModal.tsx | 4 +-
src/layout/grid/index.tsx | 81 ++++++++++++
src/layout/header/GlobalTime.tsx | 31 ++++-
src/layout/header/index.tsx | 21 +--
src/layout/header/search/index.tsx | 5 +-
src/layout/layout.types.ts | 1 -
src/layout/sider/index.tsx | 202 +++++++++++++++--------------
src/layout/useLayoutStore.ts | 14 +-
src/settings/useSettingsStore.ts | 2 +-
src/user/LoginModal.tsx | 11 +-
src/user/useUserStore.ts | 40 +++++-
13 files changed, 285 insertions(+), 136 deletions(-)
create mode 100644 src/layout/grid/index.tsx
diff --git a/package.json b/package.json
index cbe5b3c..2d75726 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
"oh-vue-icons": "^1.0.0-rc3",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.3",
+ "sortablejs": "^1.15.3",
"ua-parser-js": "^1.0.38",
"uuid": "^10.0.0",
"v-viewer": "^3.0.13",
@@ -34,6 +35,7 @@
"@tsconfig/node20": "^20.1.4",
"@types/ali-oss": "^6.16.11",
"@types/node": "^20.14.5",
+ "@types/sortablejs": "^1.15.8",
"@types/ua-parser-js": "^0.7.39",
"@types/uuid": "^10.0.0",
"@vitejs/plugin-vue": "^5.0.5",
diff --git a/src/App.vue b/src/App.vue
index bab5a9e..e77fa30 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -8,11 +8,15 @@ import SettingsOverlay from './settings/SettingsOverlay'
import Sider from './layout/sider'
import LoginModal from './user/LoginModal'
import { computed } from 'vue'
+import asyncLoader from './utils/asyncLoader'
+import useLayoutStore from './layout/useLayoutStore'
+const Grid = asyncLoader(() => import('./layout/grid'))
const settings = useSettingsStore()
const blockSize = computed(() => settings.state.blockSize + 'rem')
const blockPadding = computed(() => settings.state.blockPadding + 'rem')
const mainWidth = computed(() => settings.state.mainWidth + '%')
-const blockRadius = computed(() => settings.state.blockRadius + 'rem')
+const blockRadius = computed(() => settings.state.blockRadius)
+const layout = useLayoutStore()