摘要: 背景 在网络请求后,将数据保存到Vuex中,需要对state中数据进行修改,使用到mutation 需求是在state.votes中找到对应的对象,然后替换成新的对象 const mutations = { UPDATEVOTE(state, data) { const { votes } = st 阅读全文
posted @ 2023-09-18 21:19 Karle 阅读(176) 评论(0) 推荐(0)