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

推荐订阅源

T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
O
OpenAI News
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cisco Blogs
AWS News Blog
AWS News Blog
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
美团技术团队
T
Threatpost
S
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
C
CERT Recently Published Vulnerability Notes
Blog — PlanetScale
Blog — PlanetScale
C
Cybersecurity and Infrastructure Security Agency CISA
F
Full Disclosure
博客园_首页
N
Netflix TechBlog - Medium
Security Latest
Security Latest
有赞技术团队
有赞技术团队
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Register - Security
The Register - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Recent Announcements
Recent Announcements
博客园 - Franky
P
Palo Alto Networks Blog
Project Zero
Project Zero
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
H
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
GbyAI
GbyAI

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()})