惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - 草木物语

Day2: Prompt Engineering 与结构化输出 - 草木物语 三招优化电脑瞬间变流畅 Hutool 的 HttpUtil.post() 方法在高并发场景下的线程安全问题 从技术大牛到管理新手:那些让你痛苦的转换期,终会成为你的铠甲 Git 提交 与 修正提交 AI的"半衰期"陷阱 越用AI我能力越差? AI时代的"认知差异陷阱" 教育在AI时代,得重新来过 AI都能写作业了,孩子还要不要学习? AI 时代,你的孩子要学会这些 java17 有什么好用的特性 vue2,vue3 父子组件交互 props,emit,slot 软件工程-第七章第七节 组织 软件工程-六 谁是解结的人 软件工程-软件工程层状模型(EHM) 软件工程-五 过程 软件工程-三 团队缺乏的不只是管理 软件工程-四 流于形式的沟通 Netty ChannelHandler的生命周期 Netty 客户端与服务端收发消息demo
vue3 ref()和reactive()
草木物语 · 2024-06-13 · via 博客园 - 草木物语

能在改变时触发更新的状态被称作是响应式的。

reactive()与ref()

reactive() 只适用于对象 (包括数组和内置类型,如 Map 和 Set)。而另一个 API ref() 则可以接受任何值类型。ref 会返回一个包裹对象,并在 .value 属性下暴露内部值。

<script setup>

Vue 3 引入的一种新的组件编写语法<script setup>

在 <script setup> 中,你不需要显式地导入 reactiveref 等 Composition API 函数,也不需要定义 setup 函数。Vue 会自动处理响应式状态和方法的暴露。

选项式 与  组合式

相关文章:

https://cn.vuejs.org/tutorial/#step-2

https://cn.vuejs.org/guide/essentials/reactivity-fundamentals.html#limitations-of-reactive

https://zhuanlan.zhihu.com/p/601134083