当前位置:网站首页>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 :

边栏推荐
- 栈题目:有效括号的嵌套深度
- Esxi attaching mobile (Mechanical) hard disk detailed tutorial
- Multidisciplinary integration
- Comment les entreprises gèrent - elles les données? Partager les leçons tirées des quatre aspects de la gouvernance des données
- MySql用户权限
- Please tell me how to monitor multiple schemas and tables by listening to PgSQL
- 服装门店如何盈利?
- 异步组件和Suspense(真实开发中)
- freeswitch拨打分机号源代码跟踪
- Test of transform parameters of impdp
猜你喜欢

JWT的基础介绍

LVS+Keepalived(DR模式)学习笔记

Use of completable future

Paranoid unqualified company

Tujia, muniao, meituan... Home stay summer war will start

Esxi attaching mobile (Mechanical) hard disk detailed tutorial

Special behavior of main function in import statement

. Net 5 fluentftp connection FTP failure problem: this operation is only allowed using a successfully authenticated context

How to share the same storage among multiple kubernetes clusters

Graduation design game mall
随机推荐
How can clothing stores make profits?
JWT的基础介绍
Multidisciplinary integration
from .onnxruntime_pybind11_state import * # noqa ddddocr运行报错
Master-slave replication principle of MySQL
ViewModelProvider. Of obsolete solution
Get the city according to IP
组件的嵌套和拆分
Tujia, muniao, meituan... Home stay summer war will start
Comment les entreprises gèrent - elles les données? Partager les leçons tirées des quatre aspects de la gouvernance des données
MySQL binlog related commands
Config distributed configuration center
[Luogu p1971] rabbit and egg game (bipartite game)
子组件传递给父组件
Please tell me how to monitor multiple schemas and tables by listening to PgSQL
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第一阶段答案
Tool class: object to map hump to underline underline hump
SolidWorks的GB库(钢型材库,包括铝型材、铝管等结构)安装及使用教程(生成铝型材为例)
Bus message bus
Answer to the first stage of the assignment of "information security management and evaluation" of the higher vocational group of the 2018 Jiangsu Vocational College skills competition