你template中应该直接写currentCate,而不是this.currentCate template中的变量在解析的时候会使用with(this){...}来扩展其上变量的作用域,所以this.currentCate会被解析为this.this.currentCate,this.this是undefined,所以抛出错误
你template中应该直接写currentCate,而不是
this.currentCate
template中的变量在解析的时候会使用
with(this){...}
来扩展其上变量的作用域,所以this.currentCate
会被解析为this.this.currentCate
,this.this
是undefined,所以抛出错误