From 55f8492cfe676e3795d20592505a840a3bba0a77 Mon Sep 17 00:00:00 2001 From: zhaojisen <1301338853@qq.com> Date: Thu, 11 Jul 2024 19:22:53 +0800 Subject: [PATCH] feat(layout): page building --- components.d.ts | 4 + package.json | 4 +- pnpm-lock.yaml | 35 ++- src/App.vue | 8 +- src/ThemeOverrides.ts | 26 ++ src/languages/modules/en.ts | 8 + src/languages/modules/zh.ts | 8 + .../components/FileManagement/index.vue | 258 ++++++++++++------ src/layouts/components/Header/headerLeft.vue | 22 +- src/layouts/components/MainContent/index.vue | 11 + .../components/SettingDrawer/index.vue | 116 +++++++- src/layouts/components/Tab/index.vue | 59 ++++ src/layouts/index.scss | 5 + src/layouts/index.vue | 46 +++- vite.config.ts | 8 +- 15 files changed, 489 insertions(+), 129 deletions(-) create mode 100644 src/ThemeOverrides.ts create mode 100644 src/layouts/components/MainContent/index.vue create mode 100644 src/layouts/components/Tab/index.vue diff --git a/components.d.ts b/components.d.ts index d04448d8..9828f699 100644 --- a/components.d.ts +++ b/components.d.ts @@ -19,6 +19,7 @@ declare module 'vue' { NH2: typeof import('naive-ui')['NH2'] NIcon: typeof import('naive-ui')['NIcon'] NImage: typeof import('naive-ui')['NImage'] + NInput: typeof import('naive-ui')['NInput'] NLayout: typeof import('naive-ui')['NLayout'] NLayoutContent: typeof import('naive-ui')['NLayoutContent'] NLayoutFooter: typeof import('naive-ui')['NLayoutFooter'] @@ -26,9 +27,12 @@ declare module 'vue' { NLayoutSider: typeof import('naive-ui')['NLayoutSider'] NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NPopover: typeof import('naive-ui')['NPopover'] + NSelect: typeof import('naive-ui')['NSelect'] NSpace: typeof import('naive-ui')['NSpace'] NSpin: typeof import('naive-ui')['NSpin'] NSwitch: typeof import('naive-ui')['NSwitch'] + NTabPane: typeof import('naive-ui')['NTabPane'] + NTabs: typeof import('naive-ui')['NTabs'] NText: typeof import('naive-ui')['NText'] NTooltip: typeof import('naive-ui')['NTooltip'] NTree: typeof import('naive-ui')['NTree'] diff --git a/package.json b/package.json index 8dfb37d6..0f1dd230 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,14 @@ "@vicons/ionicons5": "^0.12.0", "axios": "^1.7.2", "mitt": "^3.0.1", + "naive-ui": "^2.38.2", "normalize.css": "^8.0.1", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", + "sortablejs": "^1.15.2", "vite-project": "link:", "vue": "^3.4.31", + "vue-draggable-plus": "^0.5.2", "vue-i18n": "^9.13.1", "vue-router": "^4.4.0" }, @@ -43,7 +46,6 @@ "globals": "^15.8.0", "husky": "^9.0.11", "lint-staged": "^15.2.7", - "naive-ui": "^2.38.2", "postcss": "^8.4.39", "postcss-scss": "^4.0.9", "prettier": "^3.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9df59935..6b613381 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: mitt: specifier: ^3.0.1 version: 3.0.1 + naive-ui: + specifier: ^2.38.2 + version: 2.38.2(vue@3.4.31(typescript@5.5.3)) normalize.css: specifier: ^8.0.1 version: 8.0.1 @@ -26,12 +29,18 @@ importers: pinia-plugin-persistedstate: specifier: ^3.2.1 version: 3.2.1(pinia@2.1.7(typescript@5.5.3)(vue@3.4.31(typescript@5.5.3))) + sortablejs: + specifier: ^1.15.2 + version: 1.15.2 vite-project: specifier: 'link:' version: 'link:' vue: specifier: ^3.4.31 version: 3.4.31(typescript@5.5.3) + vue-draggable-plus: + specifier: ^0.5.2 + version: 0.5.2(@types/sortablejs@1.15.8) vue-i18n: specifier: ^9.13.1 version: 9.13.1(vue@3.4.31(typescript@5.5.3)) @@ -87,9 +96,6 @@ importers: lint-staged: specifier: ^15.2.7 version: 15.2.7 - naive-ui: - specifier: ^2.38.2 - version: 2.38.2(vue@3.4.31(typescript@5.5.3)) postcss: specifier: ^8.4.39 version: 8.4.39 @@ -644,6 +650,9 @@ packages: '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + '@types/sortablejs@1.15.8': + resolution: {integrity: sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==} + '@types/svgo@2.6.4': resolution: {integrity: sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng==} @@ -2771,6 +2780,9 @@ packages: resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} engines: {node: '>=0.10.0'} + sortablejs@1.15.2: + resolution: {integrity: sha512-FJF5jgdfvoKn1MAKSdGs33bIqLi3LmsgVTliuX6iITj834F+JRQZN90Z93yql8h0K2t0RwDPBmxwlbZfDcxNZA==} + source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} @@ -3228,6 +3240,15 @@ packages: '@vue/composition-api': optional: true + vue-draggable-plus@0.5.2: + resolution: {integrity: sha512-+EWOYOtY6MVbhPpG+H4rjyuWAJiQU2VoLI/ehOCZkz62anrKrGHz5CBL2HDXi01hpNSP9BTDgkBcibhdO9/Jgg==} + peerDependencies: + '@types/sortablejs': ^1.15.0 + '@vue/composition-api': '*' + peerDependenciesMeta: + '@vue/composition-api': + optional: true + vue-eslint-parser@9.4.3: resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} engines: {node: ^14.17.0 || >=16.0.0} @@ -3808,6 +3829,8 @@ snapshots: '@types/normalize-package-data@2.4.4': {} + '@types/sortablejs@1.15.8': {} + '@types/svgo@2.6.4': dependencies: '@types/node': 20.14.10 @@ -6134,6 +6157,8 @@ snapshots: transitivePeerDependencies: - supports-color + sortablejs@1.15.2: {} + source-map-js@1.2.0: {} source-map-resolve@0.5.3: @@ -6646,6 +6671,10 @@ snapshots: dependencies: vue: 3.4.31(typescript@5.5.3) + vue-draggable-plus@0.5.2(@types/sortablejs@1.15.8): + dependencies: + '@types/sortablejs': 1.15.8 + vue-eslint-parser@9.4.3(eslint@8.57.0): dependencies: debug: 4.3.5 diff --git a/src/App.vue b/src/App.vue index 0133b254..675e7ab8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,10 @@