vue-zhihu-daily
vue-zhihu-daily copied to clipboard
news.vue报错 正则
const imgReg = /<img\s[^>]?src\s=\s*'"['"][^>]?>/g 改为 const imgReg = /<img\s[^>]?src\s*=\s*'"['"][^>]*?>/g 就好了
再就是要自己在装下vuex-router-sync
整个程序就能启动了。
index/store.js const mutations = { SET_ARTICLES (state, date, arr) { state.days.push({ date: date, articles: arr }) }, SET_DATE_POINTER (state, value) { state.datePointer = value }, SET_THEMES (state, arr) { state.themes = arr } }
@torresyb 看来忘了添加 vuex-router-sync 依赖了