Skip to content

Commit 6ab0bad

Browse files
author
Taois
committed
feat:多级目录模式
1 parent 1555190 commit 6ab0bad

File tree

13 files changed

+1108
-12
lines changed

13 files changed

+1108
-12
lines changed

dashboard/src/assets/icon_font/demo_index.html

Lines changed: 509 additions & 3 deletions
Large diffs are not rendered by default.

dashboard/src/assets/icon_font/iconfont.css

Lines changed: 91 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@font-face {
22
font-family: "iconfont"; /* Project id 5032989 */
3-
src: url('iconfont.woff2?t=1759104954321') format('woff2'),
4-
url('iconfont.woff?t=1759104954321') format('woff'),
5-
url('iconfont.ttf?t=1759104954321') format('truetype');
3+
src: url('iconfont.woff2?t=1759684524679') format('woff2'),
4+
url('iconfont.woff?t=1759684524679') format('woff'),
5+
url('iconfont.ttf?t=1759684524679') format('truetype');
66
}
77

88
.iconfont {
@@ -13,6 +13,94 @@
1313
-moz-osx-font-smoothing: grayscale;
1414
}
1515

16+
.icon-folder:before {
17+
content: "\e690";
18+
}
19+
20+
.icon-file:before {
21+
content: "\e692";
22+
}
23+
24+
.icon-file_zip:before {
25+
content: "\e698";
26+
}
27+
28+
.icon-file_excel:before {
29+
content: "\e699";
30+
}
31+
32+
.icon-file_ppt:before {
33+
content: "\e69a";
34+
}
35+
36+
.icon-file_word:before {
37+
content: "\e69b";
38+
}
39+
40+
.icon-file_pdf:before {
41+
content: "\e69c";
42+
}
43+
44+
.icon-file_music:before {
45+
content: "\e69d";
46+
}
47+
48+
.icon-file_video:before {
49+
content: "\e69e";
50+
}
51+
52+
.icon-file_img:before {
53+
content: "\e69f";
54+
}
55+
56+
.icon-file_ai:before {
57+
content: "\e6a1";
58+
}
59+
60+
.icon-file_psd:before {
61+
content: "\e6a2";
62+
}
63+
64+
.icon-file_bt:before {
65+
content: "\e6a3";
66+
}
67+
68+
.icon-file_txt:before {
69+
content: "\e6a4";
70+
}
71+
72+
.icon-file_exe:before {
73+
content: "\e6a5";
74+
}
75+
76+
.icon-file_html:before {
77+
content: "\e6a7";
78+
}
79+
80+
.icon-file_cad:before {
81+
content: "\e6a8";
82+
}
83+
84+
.icon-file_code:before {
85+
content: "\e6a9";
86+
}
87+
88+
.icon-file_flash:before {
89+
content: "\e6aa";
90+
}
91+
92+
.icon-file_iso:before {
93+
content: "\e6ab";
94+
}
95+
96+
.icon-file_cloud:before {
97+
content: "\e6ac";
98+
}
99+
100+
.icon-wenjianjia:before {
101+
content: "\e80c";
102+
}
103+
16104
.icon-zhuye:before {
17105
content: "\e71f";
18106
}

dashboard/src/assets/icon_font/iconfont.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashboard/src/assets/icon_font/iconfont.json

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,160 @@
55
"css_prefix_text": "icon-",
66
"description": "",
77
"glyphs": [
8+
{
9+
"icon_id": "5328033",
10+
"name": "folder",
11+
"font_class": "folder",
12+
"unicode": "e690",
13+
"unicode_decimal": 59024
14+
},
15+
{
16+
"icon_id": "5328329",
17+
"name": "file_blank",
18+
"font_class": "file",
19+
"unicode": "e692",
20+
"unicode_decimal": 59026
21+
},
22+
{
23+
"icon_id": "5330223",
24+
"name": "file_zip",
25+
"font_class": "file_zip",
26+
"unicode": "e698",
27+
"unicode_decimal": 59032
28+
},
29+
{
30+
"icon_id": "5330370",
31+
"name": "file_excel",
32+
"font_class": "file_excel",
33+
"unicode": "e699",
34+
"unicode_decimal": 59033
35+
},
36+
{
37+
"icon_id": "5330447",
38+
"name": "file_ppt",
39+
"font_class": "file_ppt",
40+
"unicode": "e69a",
41+
"unicode_decimal": 59034
42+
},
43+
{
44+
"icon_id": "5330482",
45+
"name": "file_word",
46+
"font_class": "file_word",
47+
"unicode": "e69b",
48+
"unicode_decimal": 59035
49+
},
50+
{
51+
"icon_id": "5330697",
52+
"name": "file_pdf",
53+
"font_class": "file_pdf",
54+
"unicode": "e69c",
55+
"unicode_decimal": 59036
56+
},
57+
{
58+
"icon_id": "5331557",
59+
"name": "file_music",
60+
"font_class": "file_music",
61+
"unicode": "e69d",
62+
"unicode_decimal": 59037
63+
},
64+
{
65+
"icon_id": "5331606",
66+
"name": "file_video",
67+
"font_class": "file_video",
68+
"unicode": "e69e",
69+
"unicode_decimal": 59038
70+
},
71+
{
72+
"icon_id": "5332026",
73+
"name": "file_img",
74+
"font_class": "file_img",
75+
"unicode": "e69f",
76+
"unicode_decimal": 59039
77+
},
78+
{
79+
"icon_id": "5332223",
80+
"name": "file_ai",
81+
"font_class": "file_ai",
82+
"unicode": "e6a1",
83+
"unicode_decimal": 59041
84+
},
85+
{
86+
"icon_id": "5332227",
87+
"name": "file_psd",
88+
"font_class": "file_psd",
89+
"unicode": "e6a2",
90+
"unicode_decimal": 59042
91+
},
92+
{
93+
"icon_id": "5332236",
94+
"name": "file_bt",
95+
"font_class": "file_bt",
96+
"unicode": "e6a3",
97+
"unicode_decimal": 59043
98+
},
99+
{
100+
"icon_id": "5332262",
101+
"name": "file_txt",
102+
"font_class": "file_txt",
103+
"unicode": "e6a4",
104+
"unicode_decimal": 59044
105+
},
106+
{
107+
"icon_id": "5332305",
108+
"name": "file_exe",
109+
"font_class": "file_exe",
110+
"unicode": "e6a5",
111+
"unicode_decimal": 59045
112+
},
113+
{
114+
"icon_id": "5332367",
115+
"name": "file_html",
116+
"font_class": "file_html",
117+
"unicode": "e6a7",
118+
"unicode_decimal": 59047
119+
},
120+
{
121+
"icon_id": "5332434",
122+
"name": "file_cad",
123+
"font_class": "file_cad",
124+
"unicode": "e6a8",
125+
"unicode_decimal": 59048
126+
},
127+
{
128+
"icon_id": "5332517",
129+
"name": "file_code",
130+
"font_class": "file_code",
131+
"unicode": "e6a9",
132+
"unicode_decimal": 59049
133+
},
134+
{
135+
"icon_id": "5332600",
136+
"name": "file_flash",
137+
"font_class": "file_flash",
138+
"unicode": "e6aa",
139+
"unicode_decimal": 59050
140+
},
141+
{
142+
"icon_id": "5332645",
143+
"name": "file_iso",
144+
"font_class": "file_iso",
145+
"unicode": "e6ab",
146+
"unicode_decimal": 59051
147+
},
148+
{
149+
"icon_id": "5332706",
150+
"name": "file_cloud",
151+
"font_class": "file_cloud",
152+
"unicode": "e6ac",
153+
"unicode_decimal": 59052
154+
},
155+
{
156+
"icon_id": "11448884",
157+
"name": "文件夹",
158+
"font_class": "wenjianjia",
159+
"unicode": "e80c",
160+
"unicode_decimal": 59404
161+
},
8162
{
9163
"icon_id": "3819795",
10164
"name": "主页",
4.09 KB
Binary file not shown.
2.28 KB
Binary file not shown.
1.9 KB
Binary file not shown.

dashboard/src/components/Layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ import { Icon } from '@arco-design/web-vue';
8484
import { usePaginationStore } from '@/stores/paginationStore';
8585
import logo from '@/assets/logo.png';
8686
87-
const IconFont = Icon.addFromIconFontCn({src: '//at.alicdn.com/t/c/font_5032989_t69caiom2lh.js'});
87+
const IconFont = Icon.addFromIconFontCn({src: '//at.alicdn.com/t/c/font_5032989_8fdfro7017b.js'});
8888
8989
export default defineComponent({
9090
components: {

dashboard/src/components/SearchResults.vue

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,17 @@
5454
>
5555
<div class="video_list_item" @click="handleVideoClick(video)">
5656
<div class="video_list_item_img">
57+
<!-- 文件夹图标 -->
58+
<div v-if="isFolder(video)" class="folder-icon-container">
59+
<i class="iconfont icon-wenjianjia folder-icon"></i>
60+
</div>
61+
<!-- 文件类型图标 (目录模式下的非文件夹项目) -->
62+
<div v-else-if="isDirectoryFile(video)" class="file-icon-container">
63+
<i class="iconfont file-type-icon" :class="getFileTypeIcon(video.vod_name)"></i>
64+
</div>
65+
<!-- 普通视频图片 -->
5766
<a-image
67+
v-else
5868
:preview="false"
5969
class="video_list_item_img_cover"
6070
fit="cover"
@@ -117,6 +127,7 @@ import { usePaginationStore } from '@/stores/paginationStore'
117127
import { usePageStateStore } from '@/stores/pageStateStore'
118128
import { useVisitedStore } from '@/stores/visitedStore'
119129
import ActionRenderer from '@/components/actions/ActionRenderer.vue'
130+
import { getFileTypeIcon, isFolder, isDirectoryFile } from '@/utils/fileTypeUtils'
120131
121132
const router = useRouter()
122133
const paginationStore = usePaginationStore()
@@ -587,6 +598,52 @@ const handleSpecialAction = (actionType, actionData) => {
587598
transform: scale(1.05);
588599
}
589600
601+
/* 文件夹图标样式 */
602+
.folder-icon-container {
603+
width: 100%;
604+
height: 300px;
605+
display: flex;
606+
align-items: center;
607+
justify-content: center;
608+
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
609+
border-top-left-radius: 8px;
610+
border-top-right-radius: 8px;
611+
}
612+
613+
.folder-icon {
614+
font-size: 60px;
615+
color: #ffa940;
616+
transition: all 0.3s ease;
617+
}
618+
619+
.video_list_item:hover .folder-icon {
620+
color: #ff7a00;
621+
transform: scale(1.1);
622+
}
623+
624+
/* 文件类型图标样式 */
625+
.file-icon-container {
626+
width: 100%;
627+
height: 300px;
628+
display: flex;
629+
align-items: center;
630+
justify-content: center;
631+
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
632+
border-top-left-radius: 8px;
633+
border-top-right-radius: 8px;
634+
}
635+
636+
.file-type-icon {
637+
font-size: 60px;
638+
color: #6c757d;
639+
transition: all 0.3s ease;
640+
}
641+
642+
.video_list_item:hover .file-type-icon {
643+
color: #495057;
644+
transform: scale(1.1);
645+
}
646+
590647
.video_remarks_overlay {
591648
position: absolute;
592649
top: 4px;

0 commit comments

Comments
 (0)