重构 DirectoryCard 组件,替换 VPathField 为 PathInput;删除不再使用的 PathField 组件;更新 CronInput 组件以支持 v-model 绑定;添加 CronField 组件以简化 CRON 表达式输入

This commit is contained in:
jxxghp
2025-01-11 20:20:05 +08:00
parent 3023214072
commit 88c86f49bf
6 changed files with 77 additions and 21 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { TransferDirectoryConf } from '@/api/types'
import { VDivider, VSpacer, VTextField } from 'vuetify/lib/components/index.mjs'
import PathInput from '@/components/input/PathInput.vue'
import api from '@/api'
import { nextTick } from 'vue'
import { storageOptions } from '@/api/constants'
@@ -210,7 +210,7 @@ watch(
/>
</VCol>
<VCol cols="8">
<VPathField v-model="props.directory.download_path" :storage="props.directory.storage">
<PathInput v-model="props.directory.download_path" :storage="props.directory.storage">
<template #activator="{ menuprops }">
<VTextField
:model-value="props.directory.download_path"
@@ -219,7 +219,7 @@ watch(
label="下载目录/源目录"
/>
</template>
</VPathField>
</PathInput>
</VCol>
<VCol cols="6" v-if="!props.directory.media_type || props.directory.media_type === ''">
<VSwitch v-model="props.directory.download_type_folder" label="按类型分类"></VSwitch>
@@ -257,7 +257,7 @@ watch(
/>
</VCol>
<VCol cols="8">
<VPathField v-model="props.directory.library_path" :storage="props.directory.library_storage">
<PathInput v-model="props.directory.library_path" :storage="props.directory.library_storage">
<template #activator="{ menuprops }">
<VTextField
:modelValue="props.directory.library_path"
@@ -266,7 +266,7 @@ watch(
label="媒体库目录"
/>
</template>
</VPathField>
</PathInput>
</VCol>
<VCol cols="4">
<VSelect