画布移植
This commit is contained in:
@ -1,4 +1,9 @@
|
||||
const getters = {
|
||||
// 画布
|
||||
terminal: state => state.container.terminal,
|
||||
activeComponent: state => state.container.activeComponent,
|
||||
componentsData: state => state.container.componentsData,
|
||||
|
||||
deployUploadApi: state => state.api.deployUploadApi,
|
||||
databaseUploadApi: state => state.api.databaseUploadApi,
|
||||
size: state => state.app.size,
|
||||
|
20
src/store/modules/container.js
Normal file
20
src/store/modules/container.js
Normal file
@ -0,0 +1,20 @@
|
||||
const container = {
|
||||
state: {
|
||||
terminal: 3, // 画布选择的设备
|
||||
activeComponent: {}, // 选中模板数据
|
||||
componentsData: [] // 模板组件数据
|
||||
},
|
||||
mutations: {
|
||||
SET_TERMINAL: (state, terminal) => {
|
||||
state.terminal = terminal
|
||||
},
|
||||
SET_ACTIVECOMPONENT: (state, activeComponent) => {
|
||||
state.activeComponent = activeComponent
|
||||
},
|
||||
SET_COMPONENTSDATA: (state, componentsData) => {
|
||||
state.componentsData = componentsData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default container
|
Reference in New Issue
Block a user