style: add divider to DirectoryCard.vue for monitor type

This commit is contained in:
jxxghp
2024-07-25 08:09:30 +08:00
parent 64d8e3b1e1
commit ea77d7e76d
2 changed files with 13 additions and 3 deletions

View File

@@ -153,6 +153,7 @@ const getCategories = computed(() => {
<VSwitch v-model="props.directory.download_category_folder" label="按类别分类"></VSwitch> <VSwitch v-model="props.directory.download_category_folder" label="按类别分类"></VSwitch>
</VCol> </VCol>
</VRow> </VRow>
<VDivider v-if="$props.directory.monitor_type" class="my-3 bg-primary" />
<VRow> <VRow>
<VCol> <VCol>
<VSelect <VSelect
@@ -163,7 +164,6 @@ const getCategories = computed(() => {
/> />
</VCol> </VCol>
</VRow> </VRow>
<VDivider v-if="$props.directory.monitor_type" class="my-3 bg-primary" />
<VRow v-if="$props.directory.monitor_type"> <VRow v-if="$props.directory.monitor_type">
<VCol cols="4"> <VCol cols="4">
<VSelect <VSelect

View File

@@ -75,12 +75,21 @@ async function saveDirectories() {
// 添加媒体库目录 // 添加媒体库目录
function addDirectory() { function addDirectory() {
directories.value.push({ directories.value.push({
name: '新目录', name: `目录${directories.value.length + 1}`,
storage: 'local', storage: 'local',
download_path: '', download_path: '',
priority: -1, priority: -1,
monitor_type: '', monitor_type: '',
}) })
orderDirectoryCards()
}
// 移除媒体库目录
function removeDirectory(directory: TransferDirectoryConf) {
const index = directories.value.indexOf(directory)
if (index > -1) {
directories.value.splice(index, 1)
}
} }
// 调用API查询自动分类配置 // 调用API查询自动分类配置
@@ -145,7 +154,8 @@ onMounted(() => {
<DirectoryCard <DirectoryCard
:directory="element" :directory="element"
:categories="mediaCategories" :categories="mediaCategories"
@update:modelValue="(value: string) => (element.path = value)" @update:modelValue="(value: any) => {element.download_path = value?.download; element.library_path = value?.library}"
@close="removeDirectory(element)"
/> />
</template> </template>
</draggable> </draggable>