当前位置:网站首页>Calculate properties and listeners
Calculate properties and listeners
2022-07-29 00:29:00 【qiansli12138】
Concept : Computing attributes are generally used for more complex operations , Write directly in html The page will appear very bloated , There is the concept of computing attributes . Listeners are derived to assist in computing properties , Perform asynchronous or expensive operations when data changes , Limited choice of listeners .
When and how ? This needs continuous accumulation in practical application . There are probably the following scenes :
Use calculated properties :
1. Data that requires simple mathematical calculations , For example, the little red dot on the shopping cart , You need to calculate the length of the array in the background ~~~
2. Routing data , For example, carry url~~
3.vuex The value in , For example, existence vuex The value of the sum of ~~
4. Changing one of these values will affect the other values ~~ for instance firstname and seconedname, Will affect fullname, Just use the calculation properties
Using listeners :
1. For asynchronous operation , Choose it first
2. Expensive , I don't know how to understand this , You can leave a message if you know
3. Changing a value will affect many values , For example, to show firsname, But he was fullname Part of , You can listen with a listener firstname that will do .
My understanding is that .
边栏推荐
- Web系统常见安全漏洞介绍及解决方案-sql注入
- 递归/回溯刷题(下)
- Okaleido ecological core equity Oka, all in fusion mining mode
- 软考 --- 数据库(4)SQL语句
- Basic knowledge of PHP language (super detailed)
- 递归/回溯刷题(中)
- With this, your messages can't be monitored
- Immutable x officially opens IMX token pledge detailed IMX pledge introduction optimistic about the development prospect of IMX
- @Transactional 注解使用详解
- [micro services ~nacos] Nacos service providers and service consumers
猜你喜欢

Linux下安装Mysql5.7,超详细完整教程,以及云mysql连接

“吃货联盟定餐系统”

Advanced area of attack and defense world web masters training www robots

MySQL sub database and sub table and its smooth expansion scheme

【微服务~Nacos】Nacos服务提供者和服务消费者

Plato farm is expected to further expand its ecosystem through elephant swap
![[small bug diary] Navicat failed to connect to MySQL | MySQL service disappeared | mysqld installation failed (this application cannot run on your computer)](/img/ac/f63e370df72ace484a618cf946d4b7.png)
[small bug diary] Navicat failed to connect to MySQL | MySQL service disappeared | mysqld installation failed (this application cannot run on your computer)

ES6 operation tutorial

Attack and defense world web master advanced area web_ php_ unserialize

Web系统常见安全漏洞介绍及解决方案-sql注入
随机推荐
PTA (one question per day) 7-76 ratio
Plato farm is expected to further expand its ecosystem through elephant swap
Oracle super full SQL, details crazy
12个MySQL慢查询的原因分析
MySQL stored procedure
Google browser, no installation required
总结:POD与容器的区别
【MySQL 8】Generated Invisible Primary Keys(GIPK)
Teach you how to install latex (nanny level tutorial)
vulnhub:BTRSys2
面试被问到了String相关的几道题,你能答上来吗?
“Method Not Allowed“,405问题分析及解决
软考 --- 数据库(4)SQL语句
Advanced area of attack and defense world web masters training www robots
【微服务~Nacos】Nacos服务提供者和服务消费者
MySQL的存储过程
动态规划问题(三)
PTA (daily question) 7-74 yesterday
Where is sandbox's confidence in rejecting meta's acquisition of meta universe leader sand?
DCAT in laravel_ Admin preliminary use record