mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-10-14 10:44:27 +00:00
feat(web): tree batch auto-expand with depth limit and view icons
勾选文件树文件夹时自动展开并懒加载子节点,按最大深度(默认 4,勾选文件夹为第 0 层)递归收集可下载文件;触及上限时中文提示部分文件已跳过。树侧栏顶部增加显眼的批量下载入口。Home/ShowList 窗格与文件树切换增加 Font Awesome 图标。 Co-authored-by: qaiu <[email protected]>
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<el-radio-group
|
||||
:model-value="modelValue"
|
||||
size="small"
|
||||
class="view-mode-switch"
|
||||
@update:model-value="$emit('update:modelValue', $event)"
|
||||
>
|
||||
<el-radio-button label="pane" title="窗格视图">
|
||||
<i class="fas fa-th" aria-hidden="true"></i>
|
||||
<span class="view-mode-text">{{ paneLabel }}</span>
|
||||
</el-radio-button>
|
||||
<el-radio-button label="tree" title="文件树视图">
|
||||
<i class="fas fa-sitemap" aria-hidden="true"></i>
|
||||
<span class="view-mode-text">{{ treeLabel }}</span>
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ViewModeSwitch',
|
||||
props: {
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: 'pane'
|
||||
},
|
||||
paneLabel: {
|
||||
type: String,
|
||||
default: '窗格'
|
||||
},
|
||||
treeLabel: {
|
||||
type: String,
|
||||
default: '文件树'
|
||||
}
|
||||
},
|
||||
emits: ['update:modelValue']
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.view-mode-switch :deep(.el-radio-button__inner) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
min-height: 36px;
|
||||
min-width: 76px;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
.view-mode-switch i {
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
}
|
||||
.view-mode-text {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.view-mode-switch :deep(.el-radio-button__inner) {
|
||||
min-width: 68px;
|
||||
min-height: 40px;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user