当前位置:网站首页>Bidirectional data binding V-model and v-decorator
Bidirectional data binding V-model and v-decorator
2022-06-22 16:36:00 【xiao_ zhu_ ting_ feng】
Data binding
1. One way data binding
Write the data in html In structure , Then render , once HTML After code generation , There's no way to change , If new data appears , Then you have to put the previous HTML Delete the code , And then integrate the new data and template together to form a new HTML Code , Then insert it into the document stream
2. Two way data binding
Two way binding between data model and view . When the data changes , The view changes , When the view changes , The data will also change synchronously ; It can be said that the user's changes on the view will be automatically synchronized to the data model , The data model changes the same . Advantages of two-way data binding : You don't need to do it like one-way data binding CRUD(Create,Retrieve,Update,Delete) operation , Two way data binding is most often used on forms , In this way, when the user completes the input on the front page , Without any operation , We have got the data entered by the user , And put it into the data model .
2.1 v-decorator
Vue in , Use v-model To do data binding , stay Vue-Ant Design The use of the framework , There will be v-decorator Use , But when both are used at the same time ,v-model Data binding fails ,
2.2 v-model
v-model Two way binding for form data , In fact, it is a grammatical sugar , There are two operations behind this :
1. v-bind Bind one value attribute
2. v-on Instruction to bind the current element input event
Custom components use v-model, There should be the following operations :
1. Receive one value prop
2. Trigger input event , And pass in a new value
边栏推荐
- SAP ABAP 中的用户出口和客户出口-015
- GD32F4xx MCU 驱动mcp2515扩展CAN接口
- 浙江创投圈的“半壁江山”,还得是国资
- 过气剧本杀,被露营“复活”
- 什么是RESTful,REST api设计时应该遵守什么样的规则?
- 双向数据绑定v-model与v-decorator
- [C language] deeply analyze the relationship between pointer and array
- How to use IDM to accelerate Baidu cloud
- JS method for judging data type of interview questions
- Learning about ABAP program tuning (IV) loop where key
猜你喜欢

【微信小程序自定义底部tabbar】

SAP ABAP data types, operators and editors-02

SAP ABAP 中的用户出口和客户出口-015
![Consumption monitoring of Prometheus monitoring [consult exporter]](/img/9e/8547b2c38143ab0e051c1cf0b04986.png)
Consumption monitoring of Prometheus monitoring [consult exporter]

北京恢复堂食半月记:如何重燃门店经营烟火气

【C语言】库函数qsort的使用

Static assertion static_ assert

6.gui (graphics, filling)

对ABAP程序调优的学习(四)LOOP WHERE KEY

User exit and customer exit in SAP ABAP -015
随机推荐
jsp學習之(二)---------jsp脚本元素和指令
What is SAP ABAP? Type, ABAP full form and meaning
【微信小程序封装底部弹出框二】
VHEDT业务发展框架
2022年中国重卡智能化升级专题研究
Modularity in SAP ABAP: macros, subroutines and function modules -04
音视频基础知识|ANS 噪声抑制原理解析
洞见科技牵头的全球「首个」IEEE隐私计算「互联互通」国际标准正式启动
shell学习
SAP ABAP report programming-08
Interface idempotent design
SAP ABAP 中的用户出口和客户出口-015
Parts beyond the text are indicated by ellipsis
How to use IDM to accelerate Baidu cloud
Reddit对LaMDA模型的探讨:并非无状态,采用双重过程,相比它编辑维基百科的方式,有没有感情并不重要
Summary of JS methods for obtaining data types
数睿数据受邀参与南通企业数字化转型研讨会
SAP ABAP dialog programming tutorial: module pool in -09
SAP value process & help request process-011
ABAP query tutorial in sap: sq01, sq02, sq03-017