Files
g3fo-recurring-investment/.cursor/rules/project-core.mdc
T

23 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: schedule-invest-plan 技术栈与全局约定(URL 语言/主题、文档)
alwaysApply: true
---
# 项目核心约定
- 栈:Vue 3 + TypeScript + Vite、Vue Router、Pinia、Axios、vue-i18n、Sass、ECharts、Element Plus(按需自动导入)。
- 代码修改须同步维护 `IMPACT_ANALYSIS.md`、`TASK_SUMMARY.md`(团队规范)。
## 语言与主题(仅 URL)
- 查询参数:`lang`(或 `locale`)、`theme`;**禁止**用 `localStorage` 持久化语言/主题。
- 缺省:`lang=zh-TW`、`theme=dark`;`theme` 支持别名 `light`/`day`、`dark`/`night`。
- 解析与写入:`src/config/urlPreferences.ts`;切换语言/主题用 `useUrlPreferences()`(更新 `router.replace` 的 query)。
- 路由跳转保留 query:`useRouteWithPreferences().linkTo(path)` 或等价 `{ path, query: route.query }`。
- i18n:`src/i18n/`(简/繁/英);Element Plus 语言:`getElementPlusLocale` + 根节点 `el-config-provider`。
- 深色:`applyTheme` 设置 `data-theme` 与 `html.dark`(Element Plus 深色变量)。
## 详细规范文档
- 响应式:`docs/RESPONSIVE_SPEC.md`(断点、布局、禁止事项以该文档为准)。