组件的格式写法
模板里的arr

在components 里创建 tagNode
没有functional :true. 取模板里的status 用this.status


有functional :true
取status 不用写props. 直接用runder函数的第二个参数 ctx.props.status

博客主要介绍了Vue组件的格式写法,包括在components里创建tagNode。还说明了在模板中有arr的情况,以及有无functional:true时获取模板里status的不同方式,无functional:true用this.status,有则用render函数第二个参数ctx.props.status。
组件的格式写法
模板里的arr

在components 里创建 tagNode
没有functional :true. 取模板里的status 用this.status


有functional :true
取status 不用写props. 直接用runder函数的第二个参数 ctx.props.status

1198

被折叠的 条评论
为什么被折叠?