return this.option.defaultExpandAll || true
上面的语法 如果option中 defaultExpandAll设置成false 这个也是返回true 可以改成
return this.$util.getObjType(this.option.defaultExpandAll) === 'boolean' ? this.option.defaultExpandAll : true
登录 后才可以发表评论