1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-12-18 16:34:17 +08:00

update: 集成好vuedraggable

This commit is contained in:
shangbin
2021-12-08 18:59:04 +08:00
parent 1c61f4b83a
commit b870e28608
9 changed files with 766 additions and 92 deletions

24
src/libs/store.js Normal file
View File

@@ -0,0 +1,24 @@
import { createStore } from 'vuex'
const store = createStore({
state() {
return {
count: 0,
currentEditComp: null,
renderCount: 0
}
},
mutations: {
increment(state) {
state.count++
},
storeCurrentEditComp(state, newComp) {
state.currentEditComp = newComp;
},
onDragEnd(state) {
state.renderCount++;
}
}
})
globalApp.use(store);