当前位置:网站首页>Pass parent component to child component: props
Pass parent component to child component: props
2022-07-07 07:09:00 【To be a woman of light】
One 、 Communication between parent components is very common in development , For example, the parent component has some data , Sub components are required for presentation ;
- At this time we can adopt props To complete the communication between components ;
Two 、 What is? Props Well ?
- Props Yes, you can on the component Register some custom attribute;
- Parent component to these attribute assignment , Subcomponent pass attribute Get the corresponding value from the name of ;
3、 ... and 、Props There are two common uses :
- Mode one : Array of strings , The string in the array is attribute The name of ;
- Mode two : object type , The object type can be specified in attribute Name at the same time , Specify the type it passes , Is it necessary 、 Default value and so on ;
Mode one : Dynamic data should be colon
Mode two :
边栏推荐
- Graduation design game mall
- MySQL binlog related commands
- 品牌·咨询标准化
- 组件的通信
- Big coffee gathering | nextarch foundation cloud development meetup is coming
- Master-slave replication principle of MySQL
- How DHCP router works
- From zero to one, I will teach you to build the "clip search by text" search service (2): 5 minutes to realize the prototype
- 工具类:对象转map 驼峰转下划线 下划线转驼峰
- Take you to brush (niuke.com) C language hundred questions (the first day)
猜你喜欢
ANR 原理及实践
JDBC database connection pool usage problem
SQLMAP使用教程(四)实战技巧三之绕过防火墙
Implementation of AVL tree
Several index utilization of joint index ABC
一文带你了解静态路由的特点、目的及配置基本功能示例
Tujia, muniao, meituan... Home stay summer war will start
Matlab tips (30) nonlinear fitting lsqcurefit
Can 7-day zero foundation prove HCIA? Huawei certification system learning path sharing
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第一阶段答案
随机推荐
linux系统rpm方式安装的mysql启动失败
readonly 只读
libcurl返回curlcode说明
Under what circumstances should we consider sub database and sub table
AddressSanitizer 技术初体验
LC 面试题 02.07. 链表相交 & LC142. 环形链表II
How DHCP router works
Please answer the questions about database data transfer
Paranoid unqualified company
The startup of MySQL installed in RPM mode of Linux system failed
Matlab tips (30) nonlinear fitting lsqcurefit
toRefs API 与 toRef Api
请教一下,监听pgsql ,怎样可以监听多个schema和table
[noi simulation] regional division (conclusion, structure)
After the promotion, sales volume and flow are both. Is it really easy to relax?
Bus message bus
Maze games based on JS
Tujia, muniao, meituan... Home stay summer war will start
Exception of DB2 getting table information: caused by: com ibm. db2.jcc. am. SqlException: [jcc][t4][1065][12306][4.25.13]
From zero to one, I will teach you to build the "clip search by text" search service (2): 5 minutes to realize the prototype