From d602b8880600c2769aa9d7243f099ee2513d0fb5 Mon Sep 17 00:00:00 2001 From: cc Date: Wed, 20 Mar 2024 08:42:11 +0000 Subject: [PATCH] =?UTF-8?q?=E5=8E=9F=E5=9E=8B=E6=94=B9=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 68 +++++++++++++++++++++++++++++++++++++++++ package.json | 1 + src/main.js | 3 +- src/store/project.js | 7 +++++ src/views/Home copy.vue | 52 +++++++++++++++++++++++++++++++ src/views/Home.vue | 48 ++++++++++++++++++++++++++++- src/views/Project.vue | 50 +++++++++++++++++++++++++++++- 7 files changed, 226 insertions(+), 3 deletions(-) create mode 100644 src/store/project.js create mode 100644 src/views/Home copy.vue diff --git a/package-lock.json b/package-lock.json index 8f15bea..b2534ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "dependencies": { "element-plus": "^2.6.1", + "pinia": "^2.1.7", "vue": "^3.4.21", "vue-router": "^4.3.0" }, @@ -1009,6 +1010,56 @@ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, + "node_modules/pinia": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.7.tgz", + "integrity": "sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==", + "dependencies": { + "@vue/devtools-api": "^6.5.0", + "vue-demi": ">=0.14.5" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "@vue/composition-api": "^1.4.0", + "typescript": ">=4.4.4", + "vue": "^2.6.14 || ^3.3.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/pinia/node_modules/vue-demi": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", + "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/postcss": { "version": "8.4.36", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.36.tgz", @@ -1764,6 +1815,23 @@ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, + "pinia": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.1.7.tgz", + "integrity": "sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==", + "requires": { + "@vue/devtools-api": "^6.5.0", + "vue-demi": ">=0.14.5" + }, + "dependencies": { + "vue-demi": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", + "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", + "requires": {} + } + } + }, "postcss": { "version": "8.4.36", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.36.tgz", diff --git a/package.json b/package.json index 91878ad..f8a659f 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "element-plus": "^2.6.1", + "pinia": "^2.1.7", "vue": "^3.4.21", "vue-router": "^4.3.0" }, diff --git a/src/main.js b/src/main.js index ee3bc9a..77a3dfb 100644 --- a/src/main.js +++ b/src/main.js @@ -4,5 +4,6 @@ import App from './App.vue' import router from './router' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' +import { createPinia } from 'pinia' -createApp(App).use(router).use(ElementPlus).mount('#app') +createApp(App).use(router).use(ElementPlus).use(createPinia()).mount('#app') diff --git a/src/store/project.js b/src/store/project.js new file mode 100644 index 0000000..dcd9925 --- /dev/null +++ b/src/store/project.js @@ -0,0 +1,7 @@ +import { defineStore } from "pinia" + +export const usrProjectStore = defineStore("project", { + state: () => ({ + list: [], + }), +}) diff --git a/src/views/Home copy.vue b/src/views/Home copy.vue new file mode 100644 index 0000000..8a04681 --- /dev/null +++ b/src/views/Home copy.vue @@ -0,0 +1,52 @@ + + diff --git a/src/views/Home.vue b/src/views/Home.vue index c821497..e1977a5 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,6 +1,52 @@ \ No newline at end of file diff --git a/src/views/Project.vue b/src/views/Project.vue index a4f84df..9ff44f8 100644 --- a/src/views/Project.vue +++ b/src/views/Project.vue @@ -1,6 +1,54 @@ \ No newline at end of file