shaw
|
090c9e665b
|
fix(frontend): 启用 vue-i18n JIT 编译修复消息插值不工作问题
问题:使用 vue-i18n 运行时版本后,带变量的翻译(如 '{days} 天')
无法正确显示,直接显示原始字符串。
原因:运行时版本不含消息编译器,无法在运行时编译消息插值。
解决:启用 JIT 编译(__INTLIFY_JIT_COMPILATION__: true)
- JIT 编译器将消息编译为 AST 对象而非 JavaScript 代码
- 通过解释执行 AST 实现插值,无需 eval 或 new Function
- 符合 CSP script-src 'self' 策略,不降低安全性
同时将 vite.config.js.timestamp-* 临时文件添加到 .gitignore
|
2026-01-05 09:32:26 +08:00 |
|
shaw
|
ad2ff90851
|
fix(前端): 修复 CSP 策略阻止 vue-i18n 运行时编译
使用 vue-i18n 纯运行时版本替代默认版本,避免运行时消息编译
需要 `new Function` 而被 CSP `script-src 'self'` 策略阻止。
|
2026-01-04 23:51:48 +08:00 |
|
ianshaw
|
cab681c7d1
|
chore(frontend): 更新项目配置和依赖
- 更新 package-lock.json 依赖版本
- 优化 Vite、PostCSS、Tailwind 配置
- 更新入口 HTML 文件
- 更新 TypeScript 构建缓存
|
2025-12-26 00:10:44 -08:00 |
|
shaw
|
3d05e50335
|
fix: frontend build error
|
2025-12-18 14:26:55 +08:00 |
|
shaw
|
642842c29e
|
First commit
|
2025-12-18 13:50:39 +08:00 |
|