This commit is contained in:
jxxghp
2023-09-17 20:02:04 +08:00
parent a774ae87c2
commit 46b043fdc7
3 changed files with 28 additions and 14 deletions

View File

@@ -18,6 +18,8 @@ const { mdAndDown } = useDisplay()
const refNav = ref()
const menuShow = ref(false)
/*
Close overlay side when route is changed
Close overlay vertical nav when link is clicked
@@ -37,11 +39,16 @@ const updateIsVerticalNavScrolled = (val: boolean) => (isVerticalNavScrolled.val
function handleNavScroll(evt: Event) {
isVerticalNavScrolled.value = (evt.target as HTMLElement).scrollTop > 0
}
onMounted(() => {
menuShow.value = true
})
</script>
<template>
<Component
:is="props.tag"
v-show="menuShow"
ref="refNav"
class="layout-vertical-nav touch-none"
:class="[

View File

@@ -78,9 +78,8 @@ async function queryIncludeExcludeFilter() {
const result: { [key: string]: any } = await api.get(
'system/setting/DefaultIncludeExcludeFilter',
)
if (result.data?.value) {
if (result.data?.value)
defaultIncludeExcludeFilter.value = result.data?.value
}
}
catch (error) {
console.log(error)
@@ -145,9 +144,9 @@ async function saveIncludeExcludeFilter() {
defaultIncludeExcludeFilter.value,
)
if (result.success)
$toast.success("默认包含/排除规则保存成功")
$toast.success('默认包含/排除规则保存成功')
else
$toast.error("默认包含/排除规则保存失败!")
$toast.error('默认包含/排除规则保存失败!')
}
catch (error) {
console.log(error)
@@ -278,12 +277,18 @@ onMounted(() => {
<VCol cols="12">
<VCard title="下载优先规则">
<VCardText>
<VSelect
v-model="selectedTorrentPriority"
:items="TorrentPriorityItems"
label="优先规则"
outlined
/>
<VForm>
<VRow>
<VCol cols="12" md="6">
<VSelect
v-model="selectedTorrentPriority"
:items="TorrentPriorityItems"
label="优先规则"
outlined
/>
</VCol>
</VRow>
</vform>
</VCardText>
<VCardItem>
<VBtn
@@ -301,14 +306,14 @@ onMounted(() => {
<VCardText>
<VForm>
<VRow>
<VCol cols="12">
<VCol cols="12" md="6">
<VTextField
v-model="defaultIncludeExcludeFilter.include"
type="text"
label="包含(关键字、正则式)"
/>
</VCol>
<VCol cols="12">
<VCol cols="12" md="6">
<VTextField
v-model="defaultIncludeExcludeFilter.exclude"
type="text"
@@ -322,7 +327,9 @@ onMounted(() => {
<VBtn
type="submit"
@click="saveIncludeExcludeFilter"
> 保存 </VBtn>
>
保存
</VBtn>
</VCardItem>
</VCard>
</VCol>