vue-learning/入门/cli/hello-cli/src/main.js

34 lines
680 B
JavaScript
Raw Normal View History

2022-11-29 06:29:26 +00:00
/*
* @Author: Kane
* @Date: 2022-11-22 17:50:49
* @LastEditors: Kane
2022-11-29 07:29:41 +00:00
* @LastEditTime: 2022-11-29 15:23:25
2022-11-29 06:29:26 +00:00
* @FilePath: \hello-cli\src\main.js
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { createApp } from 'vue';
2022-11-29 07:29:41 +00:00
import { createStore } from "vuex";
2022-11-29 06:29:26 +00:00
import App from './App.vue';
import ElementPlus from "element-plus";
import 'element-plus/dist/index.css';
const app = createApp(App);
2022-11-29 07:29:41 +00:00
const vuex = createStore({
state() {
return {
count: 0,
};
},
mutations: {
increment(state) {
state.count++;
}
}
});
app.use(vuex);
2022-11-29 06:29:26 +00:00
app.use(ElementPlus);
app.mount('#app');
2022-11-22 09:57:20 +00:00