class base{
show(){
console.log('顯示')
}
}
class child extends base{
static init(){
this.show()
}
}
this.show()會報錯,找不到show這個方法
原因:還不知道。。
解決:把static先刪掉了
class base{
show(){
console.log('顯示')
}
}
class child extends base{
static init(){
this.show()
}
}
this.show()會報錯,找不到show這個方法
原因:還不知道。。
解決:把static先刪掉了