# AGENTS.md - Swimming uni-app Project ## Scope - This file applies to the entire repository rooted at `D:\Project\游泳\swimming`. - There are currently no deeper `AGENTS.md` files in subdirectories. - No `.cursor/rules/`, `.cursorrules`, or `.github/copilot-instructions.md` files exist in this repo. ## Project Overview - This is a `uni-app` + Vue 3 + TypeScript project built with Vite. - Main app source lives under `src/`. - The app appears to target H5, app, and multiple mini-program platforms. - Primary UI library is `uview-plus`. - Charting-related code exists under `src/uni_modules/qiun-data-charts` and `src/uni_modules/lime-echart`. - Service-layer code is centralized under `src/Service/`. ## Tooling Snapshot - Package manager: `npm`. - Bundler/dev server: `vite` via `@dcloudio/vite-plugin-uni`. - Type checking: `vue-tsc --noEmit`. - Language level: TypeScript `^4.9.4`. - Framework: Vue `^3.4.21`. - No ESLint config is present. - No Prettier config is present. - No unit or e2e test runner config is present. ## Install ```bash npm install ``` ## Build And Dev Commands ### Common Development ```bash npm run dev:h5 npm run dev:h5:ssr npm run dev:app npm run dev:app-android npm run dev:app-ios npm run dev:mp-weixin npm run dev:mp-alipay npm run dev:mp-baidu npm run dev:mp-jd npm run dev:mp-kuaishou npm run dev:mp-lark npm run dev:mp-qq npm run dev:mp-toutiao npm run dev:mp-xhs npm run dev:quickapp-webview npm run dev:quickapp-webview-huawei npm run dev:quickapp-webview-union ``` ### Common Build ```bash npm run build:h5 npm run build:h5:ssr npm run build:app npm run build:app-android npm run build:app-ios npm run build:mp-weixin npm run build:mp-alipay npm run build:mp-baidu npm run build:mp-jd npm run build:mp-kuaishou npm run build:mp-lark npm run build:mp-qq npm run build:mp-toutiao npm run build:mp-xhs npm run build:quickapp-webview npm run build:quickapp-webview-huawei npm run build:quickapp-webview-union ``` ### Validation ```bash npm run type-check ``` ## Lint And Test Status - There is no configured lint command in `package.json`. - There is no ESLint or Prettier configuration in the repository root. - There is no configured test framework such as Vitest, Jest, Playwright, Cypress, Mocha, or Ava. - There are no repository test files matching `*.spec.*` or `*.test.*` in app code. - Because no test runner exists, there is currently no supported command for running a single test. - For validation, prefer `npm run type-check` and, when relevant, a targeted platform build such as `npm run build:h5`. ## Single-Test Guidance - Single-test execution is not available in the current repo state. - If a future test runner is added, update this file with: - the root test command, - the single-test command pattern, - any platform-specific test setup, - and the location/naming convention for test files. ## Important Paths - `src/main.ts` bootstraps the app and registers `uview-plus`. - `src/App.vue` contains global app shell styles and setup. - `src/pages.json` defines pages and tab bar configuration. - `src/uni.scss` contains shared uni-app styling variables and theme-level styles. - `src/Service/` contains application services and shared app behavior. - `src/common/` contains shared domain models and utilities. - `src/components/` contains reusable Vue components. - `src/pages/` contains page-level Vue SFCs. - `src/uni_modules/` contains vendored or external uni-app modules. ## Source Layout Conventions ```text src/ ├── Service/ Service classes and base config ├── common/ Shared utilities and domain models ├── components/ Reusable Vue SFC components ├── pages/ Routed uni-app pages ├── static/ Static assets ├── types/ Type declarations ├── uni_modules/ Third-party or packaged uni modules ├── colorui/ ColorUI-related assets/components ├── App.vue Root application component ├── main.ts App bootstrap ├── pages.json Route and tab-bar registration └── uni.scss Global uni-app SCSS ``` ## Imports And Module Usage - Use the `@/` alias for imports rooted in `src/`. - `tsconfig.json` maps `@/*` to `./src/*`. - Prefer alias imports for app code instead of long relative paths. - Import Vue composition helpers from `vue`. - Import uni-app page lifecycle APIs from `@dcloudio/uni-app` when needed. - Keep imports grouped with framework imports first, then app services/types, then local modules. - Existing code sometimes re-exports shared utilities from `src/common/Common.ts`; preserve that pattern where it already exists. ## Vue SFC Conventions - Use Vue 3 `