💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
[TOC] ### vue2.x vuex定义 * [ ] 建立文件 store 文件夹 * [ ] store 文件夹内建立三个文件 ``` store module ## vuex模块 city.js navbar.js index.js ## vuex 主入口文件 ``` * [ ] city.js ~~~ const state = () => ({ list: [] }) const mutations = { add(state, text) { state.list.push(text) } } const actions = { add: ({commit}, text) => { commit('add', text) } } export default { namespaced: true, state, mutations, actions } ~~~