从观察者调用函数时,发生“ TypeError ...不是函数”错误:
selected_project_id : {
type: Number,
observer: '_selected_project_idChanged'
},
...
_selected_project_idChanged(selected_project_id) {
this.some_function();
}
未捕获的TypeError:this.some_function不是HTMLElement上的函数
答案 0 :(得分:0)
参数的类型应为Object
selected_project_id : {
type: Oblect,
observer: '_selected_project_idChanged'
},