当前位置:网站首页>20.ref与props
20.ref与props
2022-07-23 18:53:00 【风落不归处】
1.ref
1.作用:用于给节点打标识
2.读取方式:this.$refs.xxxx
2.props
1.作用:用于父组件给子组件传递数据
2.读取方式1:只指定名称
props:['name','age','setName']3.读取方式2:指定名称和类型
props: {
name: String,
age: Number,
setName: Function
}4.读取方式三:指定名称/类型/必要性/默认值
props: {
name: {
type: String,
required: true,
default: xxxx
}
}边栏推荐
- Debian | Can’t locate Debian/Debhelper/Sequence/germinate.pm in @INC
- Powercli add esxi host to vCenter
- TASK03|回归
- Codeworks round 805-808 [partial solution]
- 2022山东老博会,山东养老展,中国国际养老服务业展9月举办
- 设置ASP.NET MVC站点默认页为指定页面
- solidworkd学习笔记:草图几何关系及编辑
- Ggarrange function of R language ggpubr package combines and annotates multiple images_ Figure add annotation, annotation, annotation information to the combined image, and add annotation information
- AtCoder——Subtree K-th Max
- Attack and defense world web question Fakebook
猜你喜欢

3D point cloud course (VII) -- feature point description

I deliberately leave a loophole in the code. Is it illegal?

dokcer镜像理解

scanf()和getchar()的用法讨论

3D point cloud course (VI) -- 3D target detection

Energy principle and variational method note 15: solution of differential element method

phar反序列化

安装Win11找不到固态硬盘如何解决?

2022上半年中国十大收缩行业

Osgearth uses sundog's Triton ocean and silverlining cloud effects
随机推荐
Configure MySQL master-slave replication with mysqldump or mydumper
Typescript新数据类型Symbol的使用
Atelier macoll - notes de développement de la secte de l'ours 2
Introduction to web security SSH testing and defense
Typescript use of new data type symbol
Redux summation case explanation version tutorial
What if redis breaks down?
能量原理与变分法笔记14:总结+问题的求解
Construction deployment scheme of GPS Beidou clock server (NTP network clock system)
LeetCode - 最接近的三数之和
20. Valid Parentheses有效的括号
如何给电脑系统重置系统?方法其实很简单
Viewing the "Empathy" energy of iqoo 10 pro from 200W super flash charging
The full text of Li Hongzhang's deathbed poem
R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram, and use the theme of ggpubr package_ The classic2 function sets the visual image to classic theme with axis lines
李鸿章 临终诗 临终奏折 全文
QT下assimp库的模型加载
[Luogu p6656] [LOJ 173] [template] runs (string) (Lyndon string)
2022DASCTF MAY
从200W超级闪充看iQOO 10 Pro的 “共情”能量