💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
1.使用this.$store.commit ~~~ methods:{ handleCityClick(city){ // this.$store.dispatch('changeCity',city); this.$store.commit('changeCity',city) } } ~~~ ## 2.在vuex的mutations中接收 ~~~ mutations: { changeCity(state,city){ //state表示state属性中的数据 state.city = city; } }, ~~~