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> + +