watchmixinswatchloadingaxioshttploading
1. Can you go to this.store.actions ("getList") as soon as you enter through the vuex, page? I tried to write
const actions = {
getGradeList ({commit}) {
this.$request(this.$api.home_list).then(res => {
console.log("res111", res)
}).catch(err => {
console.log("err", err)
})
commit()
},
}
will report an error home_list is not defined, and the this introduced by the Vue instance is also reported as an error. What should I pay attention to when I hang up and request the backend interface in actions?
2. If there is a drop-down box like this, it depends on the previous value. It is recommended that it be encapsulated into a component (whether it will be more common)