pinia的创建

This commit is contained in:
刘旋 2023-03-29 16:32:02 +08:00
parent 1f29266860
commit ee30abff14
3 changed files with 28 additions and 7 deletions

12
package-lock.json generated
View File

@ -273,6 +273,11 @@
"fastq": "^1.6.0" "fastq": "^1.6.0"
} }
}, },
"@popperjs/core": {
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
},
"@rollup/pluginutils": { "@rollup/pluginutils": {
"version": "4.2.1", "version": "4.2.1",
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
@ -734,13 +739,6 @@
"lodash-unified": "^1.0.2", "lodash-unified": "^1.0.2",
"memoize-one": "^6.0.0", "memoize-one": "^6.0.0",
"normalize-wheel-es": "^1.2.0" "normalize-wheel-es": "^1.2.0"
},
"dependencies": {
"@popperjs/core": {
"version": "npm:@sxzz/popperjs-es@2.11.7",
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
}
} }
}, },
"esbuild": { "esbuild": {

19
src/store/index.ts Normal file
View File

@ -0,0 +1,19 @@
import { defineStore } from "pinia";
import { Names } from "./store_name";
export const useVariableStore = defineStore(Names.TEST, {
state: () => {
return {
}
},
getters: {
},
actions: {
}
})

4
src/store/store_name.ts Normal file
View File

@ -0,0 +1,4 @@
export const enum Names {
TEST = "TEST"
}