• This project
    • Loading...
  • Sign in

ui / vuedashboard

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • vuedashboard
  • src
  • store
  • components
  • layout.js
  • 孙玉明's avatar
    setting · c3abc622
    c3abc622
    孙玉明 authored 2019-04-26 17:32:44 +0800
layout.js 447 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
const state = {
  layout: [],
  isLock: true,
  dashboardId: null,
};

const mutations = {
  setDashboardId(state, id) {
    state.dashboardId = id;
  },
  setLock(state, value) {
    state.isLock = value;
  },
  setLatout(state, name) {
    state.layout.push({
        x: 0,
        y: 0,
        w: 10,
        h: 2,
        i: state.layout.length + 1,
        name
    });
  },
};

export default {
  namespaced: true,
  state,
  mutations,
};