From ef4b0c892214499533dc6e19c3c4fa14a4c43574 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 27 Feb 2026 22:25:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=8C=81=E4=BB=93?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursor/rules/trae-development.mdc | 70 ++++ .cursor/skills/trae-development/SKILL.md | 154 +++++++++ docs/components/TradeComponent.md | 35 ++ docs/views/TradeDetail.md | 14 +- src/api/order.ts | 27 +- src/api/position.ts | 59 ++-- src/components/TradeComponent.vue | 38 ++- src/locales/en.json | 14 +- src/locales/ja.json | 14 +- src/locales/ko.json | 14 +- src/locales/zh-CN.json | 14 +- src/locales/zh-TW.json | 14 +- src/views/EventMarkets.vue | 85 +++++ src/views/TradeDetail.vue | 390 ++++++++++++++++++++++- src/views/Wallet.vue | 4 +- 15 files changed, 905 insertions(+), 41 deletions(-) create mode 100644 .cursor/rules/trae-development.mdc create mode 100644 .cursor/skills/trae-development/SKILL.md diff --git a/.cursor/rules/trae-development.mdc b/.cursor/rules/trae-development.mdc new file mode 100644 index 0000000..8da5a18 --- /dev/null +++ b/.cursor/rules/trae-development.mdc @@ -0,0 +1,70 @@ +--- +description: Trae 开发规则,定义如何使用 Trae 进行项目开发和维护 +globs: src/**/* +alwaysApply: true +--- + +# Trae 开发规则 + +**使用 Trae 进行开发时必须遵循的规则**,确保代码质量和开发效率。 + +## 开发流程 + +1. **需求分析**:理解用户需求,明确功能边界 +2. **代码实现**:按照项目框架规范实现功能 +3. **测试验证**:确保功能正常工作 +4. **文档更新**:同步更新相关文档 +5. **代码检查**:运行 lint 和类型检查 + +## 代码规范 + +### 1. 代码风格 +- 遵循项目现有的代码风格(Prettier + ESLint) +- 使用 TypeScript 严格模式 +- 避免使用 `any` 类型 +- 函数和变量命名清晰,符合语义 + +### 2. 组件开发 +- 使用 Vue 3 Composition API +- 组件文件使用 PascalCase 命名 +- 样式使用 `