首页 |  我的博客 |  查看该博主内容分类 | 
摘要: ## 解决办法 不要使用`{{$slots}}`,因里边使用了JSON.stringify格式化数据,而 JSON.stringify 是不能用于有循环引用的对象。 查看他的值可以用按钮触发打印 ~~~html 点击查看$slots ~~~ ~~~js viewSlots(){ console.lo 阅读全文
posted @ 2023-07-13 20:41 Z哎呀 阅读(365) 评论(0) 推荐(0)
摘要: 父组件 <child-component> <template slot="content" slot-scope="slotProps"> <p>{{ slotProps.message }}</p> </template> </child-component> 子组件 <slot name="c 阅读全文
posted @ 2023-07-13 11:49 Z哎呀 阅读(246) 评论(0) 推荐(0)