zoukankan
html css js c++ java
vue__具名插槽
先创建一父组件 redact.vue
再创建一个 子组件 userRedact.vue
在 父组件里 引入 子组件 , 并且给 子组件传 值:
子组件 渲染 父组件 传来的 solot = "right"
只要 父组件中 使用 slot = "right", 所有的内容都被 渲染到 子组件的 slot name : right的位置
这里使用了 父组件 给 子组件传值 :
5.1 一般请情况下 子组件接受 父组件的值 使用的是 props:['left']
但是由于有些标签的类型不一样: 如 a, img, 又想接受父组件传来的值
5.2 这时候就要使用 具名插槽的方式 传 值
查看全文
相关阅读:
招行面试
今日头条面试[教育岗]
四方精创 面试
ArrayList 源码
redis缓存,穿透,击穿,雪崩
hashMap
集合整理
阿里CBU技术部一面
网安面试
php递归获取顶级父类id
原文地址:https://www.cnblogs.com/cl1998/p/13194301.html
最新文章
python subprocess pipe 实时输出日志
python + Jenkins + requests 数据驱动接口测试 环境部署
windows 远程连接
python request 接口自动化设计
python unnitest 经验总结
python 复制文件到其他路径
python turtle 绘制图像
python 多进程、多线程
python 遇到的一些坑
DEL: 第五大名著
热门文章
EV: Working with Proxies
EV: Virtual Properties in Entity Framework
EV: Alt+W快捷键在Visual?Studio不起作用
DEL: Ten Things I Hate to See in T-SQL
EV: Workaround to Allow Only One Instance or Window of outlook
EV: 谷歌是如何做代码审查的
EV: Play radio stream in Winamp
EV: 谷歌拼音输入法 Google Pinyin
EV: Using Git Bash
mybatis 接口和.xml配置小点
Copyright © 2011-2022 走看看