🎉 初始化vuex
This commit is contained in:
parent
bfaaeb8843
commit
5546635e31
|
@ -1,5 +1,3 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
presets: [
|
presets: ["@vue/cli-plugin-babel/preset"],
|
||||||
'@vue/cli-plugin-babel/preset'
|
};
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,12 +9,14 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
"vue": "^2.6.14"
|
"vue": "^2.6.14",
|
||||||
|
"vuex": "3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.12.16",
|
"@babel/core": "^7.27.4",
|
||||||
"@babel/eslint-parser": "^7.12.16",
|
"@babel/eslint-parser": "^7.12.16",
|
||||||
"@vue/cli-plugin-babel": "~5.0.0",
|
"@babel/preset-env": "^7.27.2",
|
||||||
|
"@vue/cli-plugin-babel": "~5.0.8",
|
||||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
"@vue/cli-service": "~5.0.0",
|
"@vue/cli-service": "~5.0.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
|
|
|
@ -14,15 +14,21 @@ importers:
|
||||||
vue:
|
vue:
|
||||||
specifier: ^2.6.14
|
specifier: ^2.6.14
|
||||||
version: 2.7.16
|
version: 2.7.16
|
||||||
|
vuex:
|
||||||
|
specifier: '3'
|
||||||
|
version: 3.6.2(vue@2.7.16)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@babel/core':
|
'@babel/core':
|
||||||
specifier: ^7.12.16
|
specifier: ^7.27.4
|
||||||
version: 7.27.4
|
version: 7.27.4
|
||||||
'@babel/eslint-parser':
|
'@babel/eslint-parser':
|
||||||
specifier: ^7.12.16
|
specifier: ^7.12.16
|
||||||
version: 7.27.5(@babel/core@7.27.4)(eslint@7.32.0)
|
version: 7.27.5(@babel/core@7.27.4)(eslint@7.32.0)
|
||||||
|
'@babel/preset-env':
|
||||||
|
specifier: ^7.27.2
|
||||||
|
version: 7.27.2(@babel/core@7.27.4)
|
||||||
'@vue/cli-plugin-babel':
|
'@vue/cli-plugin-babel':
|
||||||
specifier: ~5.0.0
|
specifier: ~5.0.8
|
||||||
version: 5.0.8(@vue/cli-service@5.0.8(@vue/compiler-sfc@3.5.16)(lodash@4.17.21)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.3.2))(core-js@3.43.0)(vue@2.7.16)
|
version: 5.0.8(@vue/cli-service@5.0.8(@vue/compiler-sfc@3.5.16)(lodash@4.17.21)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.3.2))(core-js@3.43.0)(vue@2.7.16)
|
||||||
'@vue/cli-plugin-eslint':
|
'@vue/cli-plugin-eslint':
|
||||||
specifier: ~5.0.0
|
specifier: ~5.0.0
|
||||||
|
@ -3582,6 +3588,11 @@ packages:
|
||||||
resolution: {integrity: sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==}
|
resolution: {integrity: sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==}
|
||||||
deprecated: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
|
deprecated: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
|
||||||
|
|
||||||
|
vuex@3.6.2:
|
||||||
|
resolution: {integrity: sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==}
|
||||||
|
peerDependencies:
|
||||||
|
vue: ^2.0.0
|
||||||
|
|
||||||
watchpack@2.4.4:
|
watchpack@2.4.4:
|
||||||
resolution: {integrity: sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==}
|
resolution: {integrity: sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==}
|
||||||
engines: {node: '>=10.13.0'}
|
engines: {node: '>=10.13.0'}
|
||||||
|
@ -7706,6 +7717,10 @@ snapshots:
|
||||||
'@vue/compiler-sfc': 2.7.16
|
'@vue/compiler-sfc': 2.7.16
|
||||||
csstype: 3.1.3
|
csstype: 3.1.3
|
||||||
|
|
||||||
|
vuex@3.6.2(vue@2.7.16):
|
||||||
|
dependencies:
|
||||||
|
vue: 2.7.16
|
||||||
|
|
||||||
watchpack@2.4.4:
|
watchpack@2.4.4:
|
||||||
dependencies:
|
dependencies:
|
||||||
glob-to-regexp: 0.4.1
|
glob-to-regexp: 0.4.1
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
ignoredBuiltDependencies:
|
||||||
|
- core-js
|
|
@ -1,8 +1,10 @@
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
|
import store from "./store";
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
render: (h) => h(App),
|
render: (h) => h(App),
|
||||||
|
store,
|
||||||
}).$mount("#app");
|
}).$mount("#app");
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
import Vue from "vue";
|
||||||
|
import Vuex from "vuex";
|
||||||
|
Vue.use(Vuex);
|
||||||
|
|
||||||
|
const store = new Vuex.Store({
|
||||||
|
state: {},
|
||||||
|
mutations: {},
|
||||||
|
actions: {},
|
||||||
|
modules: {},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default store;
|
Loading…
Reference in New Issue