{"size": 901, "ext": "js", "max_stars_repo_path": "template/store/index.js", "max_stars_repo_name": "ddvs/esy-template", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "template/store/index.js", "max_issues_repo_name": "ddvs/esy-template", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "template/store/index.js", "max_forks_repo_name": "ddvs/esy-template", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.0222222222, "max_line_length": 46, "alphanum_fraction": 0.5271920089}
import Vue from 'vue'
import Vuex from 'vuex'

import adminStore from './layouts/admin.js'

Vue.use(Vuex)

const store = () => {
  return new Vuex.Store({
    modules: {
      admin: adminStore
    },
    // 本地存库
    state: {
      // 基本信息
      baseData: '',
      // 菜单列表
      menuList: '',
      // seotitle
      siteTitle: '',
      siteKeywords: '',
      siteDescription: ''
    },
    // 存入方法
    mutations: {
      setBaseData (state, input = {}) {
        this.state.baseData = input
      },
      setMenuList (state, input = {}) {
        this.state.menuList = input
      },
      setSiteTitle (state, input = '') {
        this.state.siteTitle = input
      },
      setSiteKeywords (state, input = '') {
        this.state.siteKeywords = input
      },
      setSiteDescription (state, input = '') {
        this.state.siteDescription = input
      }
    }
  })
}
export default store
