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:
24
src/libs/store.js
Normal file
24
src/libs/store.js
Normal 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);
|
||||
Reference in New Issue
Block a user