From fce3725a4b573091e447419c4324918531034e28 Mon Sep 17 00:00:00 2001 From: log1997 <2694233102@qq.com> Date: Tue, 2 Dec 2025 17:43:56 +0800 Subject: [PATCH 01/11] =?UTF-8?q?feat(router=E3=80=81config):=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 FaceConfig、ImageConfig 和 MusicConfig 组件的导入路径从直接引用 `.vue` 文件改为引用 `index.vue`。 --- src/router/index.ts | 6 +++--- .../Global/{ => FaceConfig}/components/PatternSetting.vue | 0 .../Config/Global/{FaceConfig.vue => FaceConfig/index.vue} | 0 .../Global/{ImageConfig.vue => ImageConfig/index.vue} | 0 .../Global/{MusicConfig.vue => MusicConfig/index.vue} | 0 5 files changed, 3 insertions(+), 3 deletions(-) rename src/views/Config/Global/{ => FaceConfig}/components/PatternSetting.vue (100%) rename src/views/Config/Global/{FaceConfig.vue => FaceConfig/index.vue} (100%) rename src/views/Config/Global/{ImageConfig.vue => ImageConfig/index.vue} (100%) rename src/views/Config/Global/{MusicConfig.vue => MusicConfig/index.vue} (100%) diff --git a/src/router/index.ts b/src/router/index.ts index ef753a3..d5f9535 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -75,7 +75,7 @@ export const configRoutes = { { path: '/log-lottery/config/global/face', name: 'FaceConfig', - component: () => import('@/views/Config/Global/FaceConfig.vue'), + component: () => import('@/views/Config/Global/FaceConfig/index.vue'), meta: { title: i18n.global.t('sidebar.viewSetting'), icon: 'face', @@ -84,7 +84,7 @@ export const configRoutes = { { path: '/log-lottery/config/global/image', name: 'ImageConfig', - component: () => import('@/views/Config/Global/ImageConfig.vue'), + component: () => import('@/views/Config/Global/ImageConfig/index.vue'), meta: { title: i18n.global.t('sidebar.imagesManagement'), icon: 'image', @@ -93,7 +93,7 @@ export const configRoutes = { { path: '/log-lottery/config/global/music', name: 'MusicConfig', - component: () => import('@/views/Config/Global/MusicConfig.vue'), + component: () => import('@/views/Config/Global/MusicConfig/index.vue'), meta: { title: i18n.global.t('sidebar.musicManagement'), icon: 'music', diff --git a/src/views/Config/Global/components/PatternSetting.vue b/src/views/Config/Global/FaceConfig/components/PatternSetting.vue similarity index 100% rename from src/views/Config/Global/components/PatternSetting.vue rename to src/views/Config/Global/FaceConfig/components/PatternSetting.vue diff --git a/src/views/Config/Global/FaceConfig.vue b/src/views/Config/Global/FaceConfig/index.vue similarity index 100% rename from src/views/Config/Global/FaceConfig.vue rename to src/views/Config/Global/FaceConfig/index.vue diff --git a/src/views/Config/Global/ImageConfig.vue b/src/views/Config/Global/ImageConfig/index.vue similarity index 100% rename from src/views/Config/Global/ImageConfig.vue rename to src/views/Config/Global/ImageConfig/index.vue diff --git a/src/views/Config/Global/MusicConfig.vue b/src/views/Config/Global/MusicConfig/index.vue similarity index 100% rename from src/views/Config/Global/MusicConfig.vue rename to src/views/Config/Global/MusicConfig/index.vue From c6a10db36b74620d42dd77f9d5f50920557889ba Mon Sep 17 00:00:00 2001 From: log1997 <2694233102@qq.com> Date: Thu, 4 Dec 2025 12:43:45 +0800 Subject: [PATCH 02/11] =?UTF-8?q?build(eslint):=20=E6=9B=B4=E6=96=B0=20ESL?= =?UTF-8?q?int=20=E9=85=8D=E7=BD=AE=E4=BB=A5=E5=BF=BD=E7=95=A5=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E6=96=87=E4=BB=B6=E5=B9=B6=E6=B7=BB=E5=8A=A0=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在原有忽略文件列表中新增了 '*.config.js' 文件类型,同时添加了 'no-console' 和 'no-debugger' 规则,并将其设置为警告级别,以提高 代码质量和一致性。 --- eslint.config.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index b48901c..4a63dce 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,7 +1,13 @@ import antfu from '@antfu/eslint-config' export default antfu( - { - ignores: ['**/node_modules', '**/public', '**/dist', '**/package.json', '**/*.yaml', '**/.gitignore', '**/.env*', '**/tsconfig*'], - }, + { + ignores: ['**/node_modules', '**/public', '**/dist', '**/package.json', '**/*.yaml', '**/.gitignore', '**/.env*', '**/tsconfig*', '**/*.config.js'], + }, + { + rules: { + 'no-console': 'warn', + 'no-debugger': 'warn', + } + }, ) From f062f7c9e60e69105c2891c9b0068a8505e21909 Mon Sep 17 00:00:00 2001 From: log1997 <2694233102@qq.com> Date: Thu, 4 Dec 2025 12:45:00 +0800 Subject: [PATCH 03/11] =?UTF-8?q?feat(components):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E7=BB=84=E4=BB=B6=E5=8F=8A?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 `ImageUpload` 组件用于文件选择与预览,并集成到 `UploadDialog` 中实现图片上传逻辑。 更新了 `Dialog` 组件以支持可选属性和 model 绑定,增强其灵活性和可用性。 引入 `lucide-vue-next` 图标库支持图标渲染。 重构图片配置页面,移除旧上传逻辑,使用新的弹窗方式进行图片上传操作。 --- package.json | 1 + pnpm-lock.yaml | 12 ++ src/components.d.ts | 1 + src/components/Dialog/index.vue | 24 +++- src/components/ImageUpload/index.vue | 58 +++++++++ src/components/ImageUpload/type.ts | 5 + .../ImageConfig/components/UploadDialog.vue | 110 ++++++++++++++++++ src/views/Config/Global/ImageConfig/index.vue | 57 +-------- 8 files changed, 211 insertions(+), 57 deletions(-) create mode 100644 src/components/ImageUpload/index.vue create mode 100644 src/components/ImageUpload/type.ts create mode 100644 src/views/Config/Global/ImageConfig/components/UploadDialog.vue diff --git a/package.json b/package.json index 482e7f0..7c958b4 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "dexie": "^4.2.1", "github-markdown-css": "^5.8.0", "localforage": "^1.10.0", + "lucide-vue-next": "^0.555.0", "markdown-it": "^14.1.0", "pinia": "^3.0.3", "pinia-plugin-persist": "^1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8799787..69c5728 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: localforage: specifier: ^1.10.0 version: 1.10.0 + lucide-vue-next: + specifier: ^0.555.0 + version: 0.555.0(vue@3.5.13(typescript@5.5.3)) markdown-it: specifier: ^14.1.0 version: 14.1.0 @@ -3834,6 +3837,11 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} + lucide-vue-next@0.555.0: + resolution: {integrity: sha512-7hczPsiMD/y+VNLpal5Q5Wv09kQxlHS0l/cM1xagrd+MA3i5umMm+PUXqllvsbgwAl3PHv27fo59h4PN02GM5A==} + peerDependencies: + vue: '>=3.0.1' + lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -9419,6 +9427,10 @@ snapshots: dependencies: yallist: 4.0.0 + lucide-vue-next@0.555.0(vue@3.5.13(typescript@5.5.3)): + dependencies: + vue: 3.5.13(typescript@5.5.3) + lz-string@1.5.0: {} magic-string@0.30.13: diff --git a/src/components.d.ts b/src/components.d.ts index 989871e..8b96095 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -13,6 +13,7 @@ declare module 'vue' { EditSeparateDialog: typeof import('./components/NumberSeparate/EditSeparateDialog.vue')['default'] HelloWorld: typeof import('./components/HelloWorld.vue')['default'] ImageSync: typeof import('./components/ImageSync/index.vue')['default'] + ImageUpload: typeof import('./components/ImageUpload/index.vue')['default'] Loading: typeof import('./components/Loading/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PlayMusic: typeof import('./components/PlayMusic/index.vue')['default'] diff --git a/src/components/Dialog/index.vue b/src/components/Dialog/index.vue index a57bb97..4904201 100644 --- a/src/components/Dialog/index.vue +++ b/src/components/Dialog/index.vue @@ -1,13 +1,13 @@ @@ -33,12 +44,15 @@ const { title, desc, cancelText, submitText, submitFunc, cancelFunc = defaultCan