jsx
100斤的狗
这个作者很懒,什么都没留下…
展开
-
jsx的默认插槽、具名插槽、作用域插槽使用
目录:默认插槽和具名插槽:子组件:<script>export default { name: 'HellHome', render() { return ( <div class="hello"> <h1>默认插槽</h1> {this.$slots.default} <h1>具名插槽</h1> {this.$slots.mike}原创 2020-09-29 17:35:59 · 3540 阅读 · 1 评论 -
vue 使用jsx进行渲染时,出现提示可能无限循环You may have an infinite update loop in a component render function.
错误提示:[Vue warn]: You may have an infinite update loop in a component render function.错误代码:正确写法:1.不需要入参:onClick={this.changeLanguage}2.需要入参写成箭头函数onClick={() =>{ this.changeLanguage(item.type) }}错误原因:写 onClick={this.cha原创 2020-07-10 10:01:15 · 720 阅读 · 0 评论