From 5531f6e87afdd95729470aba5aa4a2cc64e89cca Mon Sep 17 00:00:00 2001 From: AoXuan Date: Mon, 4 Aug 2025 15:49:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(script):=20=E6=B7=BB=E5=8A=A0=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=84=9A=E6=9C=AC=E7=BC=96=E8=BE=91=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 ScriptEdit.vue 中添加删除脚本 API 响应类型 - 在 Scripts.vue 和 ScriptTable.vue 中移除冗余样式 - 在 tsconfig.json 中添加路径别名配置 - 重构 useScriptApi.ts 中的 deleteScript 函数,实现真正的脚本删除 --- frontend/src/components/ScriptTable.vue | 1 - frontend/src/composables/useScriptApi.ts | 28 +- frontend/src/types/electron.d.ts | 4 +- frontend/src/types/script.ts | 7 + frontend/src/views/ScriptEdit.vue | 355 ++++++++++------------- frontend/src/views/Scripts.vue | 27 -- frontend/tsconfig.json | 6 +- 7 files changed, 189 insertions(+), 239 deletions(-) diff --git a/frontend/src/components/ScriptTable.vue b/frontend/src/components/ScriptTable.vue index 6082e60..dc119b3 100644 --- a/frontend/src/components/ScriptTable.vue +++ b/frontend/src/components/ScriptTable.vue @@ -292,7 +292,6 @@ const handleDeleteUser = (user: User) => { \ No newline at end of file + diff --git a/frontend/src/views/Scripts.vue b/frontend/src/views/Scripts.vue index 6600eef..c8d3dbc 100644 --- a/frontend/src/views/Scripts.vue +++ b/frontend/src/views/Scripts.vue @@ -216,33 +216,6 @@ const handleRefresh = () => { background-clip: text; } -.add-button { - height: 48px; - padding: 0 24px; - font-size: 16px; - font-weight: 600; - border-radius: 12px; - box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3); - transition: all 0.3s ease; -} - -.add-button:hover { - transform: translateY(-2px); - box-shadow: 0 6px 16px rgba(24, 144, 255, 0.4); -} - -.refresh-button { - height: 48px; - padding: 0 24px; - font-size: 16px; - font-weight: 500; - border-radius: 12px; - border: 2px solid var(--ant-color-border); - background: var(--ant-color-bg-container); - color: var(--ant-color-text); - transition: all 0.3s ease; -} - /* 脚本类型选择弹窗样式 */ .type-select-modal :deep(.ant-modal-content) { border-radius: 16px; diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 574cf3d..404ad04 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -6,7 +6,11 @@ "outDir": "dist-electron", "rootDir": "electron", "esModuleInterop": true, - "types": ["node", "electron"] + "types": ["node", "electron"], + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] + } }, "include": ["electron"] }