const state = () => ({
  data: {
    id:"",
    canvasName:"视图",
    scale: 1,
    locked: 0,
    opt:'space',
    lineWidth:1,
  },
  topologyData:{},
  topologyId:""
})

const mutations = {
  data(state, data) {
    state.data = data
  },
  MUT_SCALE(state,data){
    state.data.scale=data
  },
  MUT_LINEWIDTH(state,data){
    state.data.lineWidth=data
  },
  MUT_LOCKED(state,data){
    state.data.locked=data
  },
  MUT_SPACE(state,data){
    state.data.opt=data
  },
  MUT_NAME(state,data){
    state.data.canvasName=data
  }
}
const actions = {
  scaleSetting({ commit }, data) {
    commit('MUT_SCALE', data)
  }
}
export default {
  // namespaced: true,
  state,
  mutations,
  actions
}