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先删掉了