前言
在最近的项目中,有需求要点击校区选择器框后动态显示现有校区选项(使用element-ui)
对于这个需求有两个解决的思路:
- 使用eladmin提供的“新增和编辑之前钩子”()
[CRUD.HOOK.beforeToCU](crud, form) {
this.getTeacherAndCate()
}
async getTeacherAndCate() {
await getTeacher()
.then((res) => {
this.teachOptions = res.data
})
.