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

推荐订阅源

T
The Blog of Author Tim Ferriss
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Palo Alto Networks Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
Engineering at Meta
Engineering at Meta
I
InfoQ
L
LangChain Blog
Cyberwarzone
Cyberwarzone
T
Tenable Blog
WordPress大学
WordPress大学
P
Privacy & Cybersecurity Law Blog
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Jina AI
Jina AI
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Last Watchdog
The Last Watchdog
Last Week in AI
Last Week in AI
Cloudbric
Cloudbric
S
SegmentFault 最新的问题
爱范儿
爱范儿
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
AI
AI
T
Tor Project blog
I
Intezer
T
Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
N
News and Events Feed by Topic
Latest news
Latest news
S
Security Affairs
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog RSS Feed
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
S
Securelist

Nuxt.js

Nuxt3 的 public 静态资源文件怎么更新 - V2EX 小心 Nuxt/Device 的坑 - V2EX nuxt3 axios 请求出来的数据在源代码中没有这也没有办法 SEO 呀? - V2EX nuxt 部署在 cf Page 上 想用 env 里的环境变量 - V2EX Nuxt 下大家如何做用户身份认证 - V2EX nuxt 官网首页的水波效果动画是如何实现的? - V2EX nuxt3 在使用 nuxt/i18n 之后打包中的依赖生成软链接的文件夹,如何让它不生成这种文件夹? - V2EX 如何确定 Nuxtjs 当前的渲染模式? - V2EX nuxt3 请求数据的最佳实践是什么 - V2EX 用 nuxtjs vue 开发的一个后台系统 后悔了 还不如用 extjs - V2EX nuxt 怎么直接查询数据库然后给页面插值呢? - V2EX Nuxt 能不能结合 generate 和 build 两种方式? - V2EX 居然有 nuxtjs 的节点了,分享一下我的基于 nuxtjs 的博客吧 - V2EX
nuxt3 大佬帮忙看个问题! - V2EX
Strive123456 · 2025-04-23 · via Nuxt.js
yunyuyuan

1

yunyuyuan      2025 年 4 月 23 日

你已经说出了问题所在啊,有两种办法:
* 使用 useState('some-key', () => new Date()),这样只会在 ssr 的时候初始化一次,然后数据被存在 payload 里,带到了浏览器,浏览器 hydrate 的时候值没有改变
* 如果这个值只会在浏览器用到,而且需要显示真正的页面加载完成时候的时间,可以这样写:const now = ref();onMounted(() => {now.value = new Date()})