style: Update grid-customrule-card to use larger minimum width for columns

This commit is contained in:
jxxghp
2024-08-15 11:45:45 +08:00
parent c129a37ccf
commit 94ba3c4514
7 changed files with 164 additions and 12 deletions

View File

@@ -42,6 +42,18 @@ const notificationTypeNames: { [key: string]: string } = {
webpush: 'WebPush',
}
// 消息类型下拉字典
const notificationTypes = [
{ value: '资源下载', title: '资源下载' },
{ value: '整理入库', title: '整理入库' },
{ value: '订阅', title: '订阅' },
{ value: '站点', title: '站点' },
{ value: '媒体服务器', title: '媒体服务器' },
{ value: '手动处理', title: '手动处理' },
{ value: '插件', title: '插件' },
{ value: '其它', title: '其它' },
]
// 打开详情弹窗
function openNotificationInfoDialog() {
notificationInfo.value = props.notification
@@ -106,6 +118,17 @@ function onClose() {
<VCol cols="12" md="6">
<VSwitch v-model="notificationInfo.enabled" label="启用通知" />
</VCol>
<VCol cols="12">
<VSelect
v-model="notificationInfo.switchs"
:items="notificationTypes"
label="消息类型"
hint="开启通知的消息类型"
multiple
chips
persistent-hint
/>
</VCol>
</VRow>
<VRow v-if="notificationInfo.type == 'wechat'">
<VCol cols="12" md="6">

View File

@@ -27,21 +27,24 @@ const treeItems = ref<FileItem[]>([
name: '/',
path: props.root,
children: [],
type: '',
type: 'dir',
basename: props.root,
extension: '',
size: 0,
modify_time: 0,
fileid: '',
parent_fileid: '',
storage: 'local',
},
])
// 拉取子目录
async function fetchDirs(item: any) {
return api
.get('/local/listdir?path=' + item.path)
.post('/storage/list', item)
.then((data: any) => {
// 只添加目录到子目录
data = data.filter((i: any) => i.type === 'dir')
item.children.push(...data)
})
.catch(err => console.warn(err))