From 4636f9fde40f3f06d6291a6f3d609212157bc91e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Mon, 31 Mar 2025 19:43:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20Cesium=20Viewer=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=8F=8A=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E5=92=8C=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .clinerules | 1 + .clinerules-code | 5 - .clinerules_MD | 4 + .github/copilot-instructions.md | 53 +++++++- .vscode/settings.json | 9 +- eslint.config.ts | 2 + .../h-cesium-viewer/VIEWER_OPTIONS.ts | 33 +++++ .../h-cesium-viewer/h-cesium-viewer-class.ts | 100 ++++++++++++++ src/components/h-cesium-viewer/index.vue | 122 ++++++++++++++++++ .../Cesium/cesium-helper/_TOOLTIP_MAP.ts | 2 +- src/pages/cesium-viewer.page.vue | 67 ++++++++++ tsconfig.app.json | 1 + typed-router.d.ts | 1 + 13 files changed, 387 insertions(+), 13 deletions(-) create mode 120000 .clinerules delete mode 100644 .clinerules-code create mode 100644 .clinerules_MD create mode 100644 src/components/h-cesium-viewer/VIEWER_OPTIONS.ts create mode 100644 src/components/h-cesium-viewer/h-cesium-viewer-class.ts create mode 100644 src/components/h-cesium-viewer/index.vue create mode 100644 src/pages/cesium-viewer.page.vue diff --git a/.clinerules b/.clinerules new file mode 120000 index 0000000..02dd134 --- /dev/null +++ b/.clinerules @@ -0,0 +1 @@ +.github/copilot-instructions.md \ No newline at end of file diff --git a/.clinerules-code b/.clinerules-code deleted file mode 100644 index 3ad4bb4..0000000 --- a/.clinerules-code +++ /dev/null @@ -1,5 +0,0 @@ -# 项目指导 - -## UnoCSS 使用规范 -1. **优先使用 UnoCSS 原子类**,避免手写 CSS: -- 例如:`text-red-500`、`p-4`、`flex items-center`。 diff --git a/.clinerules_MD b/.clinerules_MD new file mode 100644 index 0000000..bceabfc --- /dev/null +++ b/.clinerules_MD @@ -0,0 +1,4 @@ +```bash +ln -s .github/copilot-instructions.md .clinerules +ln -s .github/copilot-instructions.md .clinerules-code +``` \ No newline at end of file diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index fe5dbba..1e13659 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,5 +1,50 @@ -# 项目指导 +# Project Conventions and Technical Guidelines -## UnoCSS 使用规范 -1. **优先使用 UnoCSS 原子类**,避免手写 CSS: - - 例如:`text-red-500`、`p-4`、`flex items-center`。 +This document outlines the core technical choices, coding conventions, and configuration details for this project. Adhering to these guidelines ensures consistency and leverages the project's setup effectively. + +## 🚀 Core Technologies & Conventions + +* **Framework:** Vue 3 +* **Language:** TypeScript +* **API Style:** **Strictly use the Composition API with ` + + + + diff --git a/src/pages/Satellite/Cesium/cesium-helper/_TOOLTIP_MAP.ts b/src/pages/Satellite/Cesium/cesium-helper/_TOOLTIP_MAP.ts index 8dc2058..9521cb9 100644 --- a/src/pages/Satellite/Cesium/cesium-helper/_TOOLTIP_MAP.ts +++ b/src/pages/Satellite/Cesium/cesium-helper/_TOOLTIP_MAP.ts @@ -1,4 +1,4 @@ -/* eslint-disable perfectionist/sort-objects */ + /* prettier-ignore */ export const TOOLTIP_MAP = { NORAD_CAT_ID_卫星编号: "5位数字,如'63158',表示NORAD卫星唯一目录编号", diff --git a/src/pages/cesium-viewer.page.vue b/src/pages/cesium-viewer.page.vue new file mode 100644 index 0000000..d6098ac --- /dev/null +++ b/src/pages/cesium-viewer.page.vue @@ -0,0 +1,67 @@ + +meta: + layout: false + + + + + diff --git a/tsconfig.app.json b/tsconfig.app.json index 7fd7b2e..4973a67 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -11,6 +11,7 @@ ], "exclude": ["src/**/__tests__/*"], "compilerOptions": { + "lib": ["ES2022", "DOM", "DOM.Iterable"], "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", "allowJs": true, // 允许编译 JavaScript 文件 "checkJs": true, // 启用 JavaScript 文件的类型检查 diff --git a/typed-router.d.ts b/typed-router.d.ts index 24da8d1..ff6e17f 100644 --- a/typed-router.d.ts +++ b/typed-router.d.ts @@ -20,6 +20,7 @@ declare module 'vue-router/auto-routes' { export interface RouteNamedMap { 'Root': RouteRecordInfo<'Root', '/', Record, Record>, '$Path': RouteRecordInfo<'$Path', '/:path(.*)', { path: ParamValue }, { path: ParamValue }>, + 'CesiumViewer': RouteRecordInfo<'CesiumViewer', '/cesium-viewer', Record, Record>, 'DataLoadersId': RouteRecordInfo<'DataLoadersId', '/data-loaders/:id', { id: ParamValue }, { id: ParamValue }>, 'DataLoadersIdSub1UserId': RouteRecordInfo<'DataLoadersIdSub1UserId', '/data-loaders/:id/sub-1/:userId', { id: ParamValue, userId: ParamValue }, { id: ParamValue, userId: ParamValue }>, 'FlowbiteSidebar': RouteRecordInfo<'FlowbiteSidebar', '/FlowbiteSidebar', Record, Record>,