我有以下代码:
@computedFrom(['id', 'isDiscontinued'])
get disableAdd(){
return this.id === '0' || this.isDiscontinued;
}
这会抛出以下错误:aurelia-binding.js:2580 Uncaught TypeError:this.input.charCodeAt不是函数
然而这有效:
@computedFrom('id')
get disableAdd(){
return this.id === '0' || this.isDiscontinued;
}
但我需要两个computedFrom字段,我做错了什么?
答案 0 :(得分:5)
<style >
:host{
--iron-overlay-backdrop-background-color: #fff;
}
</style>
不需要@computedFrom('id', 'isDiscontinued')
get disableAdd(){
return this.id === '0' || this.isDiscontinued;
}