new global api for vue and vuex
This commit is contained in:
parent
d201a73ede
commit
20434ab52a
@ -12,8 +12,7 @@
|
|||||||
import MainMenu from "./components/MainMenu.vue";
|
import MainMenu from "./components/MainMenu.vue";
|
||||||
import CanvasBoard from "./components/CanvasBoard.vue";
|
import CanvasBoard from "./components/CanvasBoard.vue";
|
||||||
|
|
||||||
export default {
|
export const App = {
|
||||||
name: "App",
|
|
||||||
components: {
|
components: {
|
||||||
MainMenu,
|
MainMenu,
|
||||||
CanvasBoard,
|
CanvasBoard,
|
||||||
|
13
src/main.js
13
src/main.js
@ -1,10 +1,9 @@
|
|||||||
import Vue from "vue";
|
import { createApp } from 'vue'
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import store from "./store";
|
import { store } from "./store";
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
const app = createApp(App)
|
||||||
|
|
||||||
new Vue({
|
app.use(store)
|
||||||
store,
|
|
||||||
render: (h) => h(App),
|
app.mount('#app')
|
||||||
}).$mount("#app");
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
import Vue from "vue";
|
import { createStore } from 'vuex'
|
||||||
import Vuex from "vuex";
|
|
||||||
|
|
||||||
Vue.use(Vuex);
|
export const store = createStore({
|
||||||
|
|
||||||
export default new Vuex.Store({
|
|
||||||
state: {
|
state: {
|
||||||
drawing: 0,
|
drawing: 0,
|
||||||
rules1d: {
|
rules1d: {
|
||||||
|
Loading…
Reference in New Issue
Block a user