From d3a66ffa8c116b270801bc5319ca0c811aa8cf04 Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Wed, 27 Nov 2024 05:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4`=E8=87=AA=E5=8A=A8`=E9=80=89?= =?UTF-8?q?=E9=A1=B9=20-=20=E4=BB=85=E5=BD=93`=E7=9B=AE=E7=9A=84=E8=B7=AF?= =?UTF-8?q?=E5=BE=84`=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E6=89=8D?= =?UTF-8?q?=E4=BC=9A=E8=AE=BE=E4=B8=BA`=E8=87=AA=E5=8A=A8`=20-=20=E5=B7=B2?= =?UTF-8?q?=E9=80=89=E6=8B=A9`=E6=95=B4=E7=90=86=E6=96=B9=E5=BC=8F`?= =?UTF-8?q?=E5=90=8E,=20=E5=86=8D=E9=80=89=E6=8B=A9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84`=E5=AA=92=E4=BD=93=E5=BA=93=E7=9B=AE=E5=BD=95`?= =?UTF-8?q?=E6=95=B4=E7=90=86=E6=96=B9=E5=BC=8F=E4=B8=8D=E5=86=8D=E6=94=B9?= =?UTF-8?q?=E5=8F=98=20-=20`=E8=87=AA=E5=AE=9A=E4=B9=89=E8=B7=AF=E5=BE=84`?= =?UTF-8?q?=E6=97=B6:=20-=20-=20`=E6=95=B4=E7=90=86=E6=96=B9=E5=BC=8F`?= =?UTF-8?q?=E4=B8=BA=E8=87=AA=E5=8A=A8=E6=97=B6=EF=BC=8C=E4=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA`=E5=A4=8D=E5=88=B6`,=E8=AF=B7=E6=B3=A8?= =?UTF-8?q?=E6=84=8F=20-=20-=20`=E6=95=B4=E7=90=86=E6=96=B9=E5=BC=8F`?= =?UTF-8?q?=E4=B8=8D=E4=B8=BA=E8=87=AA=E5=8A=A8=E6=97=B6,=20=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E6=94=B9=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/constants.ts | 1 - src/components/dialog/ReorganizeDialog.vue | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/api/constants.ts b/src/api/constants.ts index a3f361b3..7149a66e 100644 --- a/src/api/constants.ts +++ b/src/api/constants.ts @@ -73,7 +73,6 @@ export const storageDict = storageOptions.reduce((dict, item) => { }, {} as Record) export const transferTypeOptions = [ - { title: '自动', value: '' }, { title: '复制', value: 'copy' }, { title: '移动', value: 'move' }, { title: '硬链接', value: 'link' }, diff --git a/src/components/dialog/ReorganizeDialog.vue b/src/components/dialog/ReorganizeDialog.vue index 67b05141..b7c2767e 100644 --- a/src/components/dialog/ReorganizeDialog.vue +++ b/src/components/dialog/ReorganizeDialog.vue @@ -114,11 +114,19 @@ watch( const directory = directories.value.find(item => item.library_path === newPath) if (directory) { transferForm.target_storage = directory.library_storage ?? 'local' - transferForm.transfer_type = directory.transfer_type ?? '' + transferForm.transfer_type = transferForm.transfer_type || directory.transfer_type transferForm.scrape = directory.scraping ?? false transferForm.library_category_folder = directory.library_category_folder ?? false transferForm.library_type_folder = directory.library_type_folder ?? false + } else { + transferForm.transfer_type = transferForm.transfer_type || 'copy' + transferForm.scrape = false + transferForm.library_category_folder = false + transferForm.library_type_folder = false } + } else { + // 路径为空时, 整理方式留空(自动) + transferForm.transfer_type = '' } } ) @@ -225,8 +233,11 @@ onMounted(() => { label="整理方式" :items="transferTypeOptions" hint="文件操作整理方式" - persistent-hint - /> + persistent-hint> + +