diff --git a/src/components/dialog/ReorganizeDialog.vue b/src/components/dialog/ReorganizeDialog.vue index a81bbda1..b7c2767e 100644 --- a/src/components/dialog/ReorganizeDialog.vue +++ b/src/components/dialog/ReorganizeDialog.vue @@ -75,7 +75,7 @@ const transferForm = reactive({ doubanid: null, season: null, type_name: '', - transfer_type: 'copy', + transfer_type: '', episode_format: '', episode_detail: '', episode_part: '', @@ -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> + + import api from '@/api' import { FileItem } from '@/api/types' -import { VTreeview } from 'vuetify/labs/VTreeview' const props = defineProps({ root: { diff --git a/src/main.ts b/src/main.ts index 9972e04c..aedde3a1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,7 +12,6 @@ import { isPWA } from './@core/utils/navigator' import './ace-config' import { VAceEditor } from 'vue3-ace-editor' import { PerfectScrollbarPlugin } from 'vue3-perfect-scrollbar' -import { VTreeview } from 'vuetify/labs/VTreeview' import ToastPlugin from 'vue-toast-notification' import VuetifyUseDialog from 'vuetify-use-dialog' import VueApexCharts from 'vue3-apexcharts' @@ -49,6 +48,11 @@ async function initializeApp() { // 注册全局组件 initializeApp().then(() => { + // 优先注册框架 + app + .use(vuetify) + + // 注册全局组件 app .component('VAceEditor', VAceEditor) .component('VApexChart', VueApexCharts) @@ -60,12 +64,10 @@ initializeApp().then(() => { .component('VMediaInfoCard', MediaInfoCard) .component('VTorrentCard', TorrentCard) .component('VMediaIdSelector', MediaIdSelector) - .component('VTreeview', VTreeview) .component('VPathField', PathField) // 注册插件 app - .use(vuetify) .use(router) .use(store) .use(ToastPlugin, {