Skip to content

Commit cb3c597

Browse files
author
Taois
committed
feat: 完成下载管理功能
1 parent 62cf48f commit cb3c597

File tree

17 files changed

+2515
-16
lines changed

17 files changed

+2515
-16
lines changed

dashboard/src/assets/icon_font/demo_index.html

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" targ
5454
<div class="content unicode" style="display: block;">
5555
<ul class="icon_lists dib-box">
5656

57+
<li class="dib">
58+
<span class="icon iconfont">&#xfcb9;</span>
59+
<div class="name">下载</div>
60+
<div class="code-name">&amp;#xfcb9;</div>
61+
</li>
62+
63+
<li class="dib">
64+
<span class="icon iconfont">&#xe67d;</span>
65+
<div class="name">夸克</div>
66+
<div class="code-name">&amp;#xe67d;</div>
67+
</li>
68+
5769
<li class="dib">
5870
<span class="icon iconfont">&#xe690;</span>
5971
<div class="name">folder</div>
@@ -264,9 +276,9 @@ <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</co
264276
<pre><code class="language-css"
265277
>@font-face {
266278
font-family: 'iconfont';
267-
src: url('iconfont.woff2?t=1759693018509') format('woff2'),
268-
url('iconfont.woff?t=1759693018509') format('woff'),
269-
url('iconfont.ttf?t=1759693018509') format('truetype');
279+
src: url('iconfont.woff2?t=1760257974279') format('woff2'),
280+
url('iconfont.woff?t=1760257974279') format('woff'),
281+
url('iconfont.ttf?t=1760257974279') format('truetype');
270282
}
271283
</code></pre>
272284
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -292,6 +304,24 @@ <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面
292304
<div class="content font-class">
293305
<ul class="icon_lists dib-box">
294306

307+
<li class="dib">
308+
<span class="icon iconfont icon-xiazai"></span>
309+
<div class="name">
310+
下载
311+
</div>
312+
<div class="code-name">.icon-xiazai
313+
</div>
314+
</li>
315+
316+
<li class="dib">
317+
<span class="icon iconfont icon-kuake"></span>
318+
<div class="name">
319+
夸克
320+
</div>
321+
<div class="code-name">.icon-kuake
322+
</div>
323+
</li>
324+
295325
<li class="dib">
296326
<span class="icon iconfont icon-folder"></span>
297327
<div class="name">
@@ -607,6 +637,22 @@ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h
607637
<div class="content symbol">
608638
<ul class="icon_lists dib-box">
609639

640+
<li class="dib">
641+
<svg class="icon svg-icon" aria-hidden="true">
642+
<use xlink:href="#icon-xiazai"></use>
643+
</svg>
644+
<div class="name">下载</div>
645+
<div class="code-name">#icon-xiazai</div>
646+
</li>
647+
648+
<li class="dib">
649+
<svg class="icon svg-icon" aria-hidden="true">
650+
<use xlink:href="#icon-kuake"></use>
651+
</svg>
652+
<div class="name">夸克</div>
653+
<div class="code-name">#icon-kuake</div>
654+
</li>
655+
610656
<li class="dib">
611657
<svg class="icon svg-icon" aria-hidden="true">
612658
<use xlink:href="#icon-folder"></use>

dashboard/src/assets/icon_font/iconfont.css

Lines changed: 11 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=1759693018509') format('woff2'),
4-
url('iconfont.woff?t=1759693018509') format('woff'),
5-
url('iconfont.ttf?t=1759693018509') format('truetype');
3+
src: url('iconfont.woff2?t=1760257974279') format('woff2'),
4+
url('iconfont.woff?t=1760257974279') format('woff'),
5+
url('iconfont.ttf?t=1760257974279') format('truetype');
66
}
77

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

16+
.icon-xiazai:before {
17+
content: "\fcb9";
18+
}
19+
20+
.icon-kuake:before {
21+
content: "\e67d";
22+
}
23+
1624
.icon-folder:before {
1725
content: "\e690";
1826
}

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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
"css_prefix_text": "icon-",
66
"description": "",
77
"glyphs": [
8+
{
9+
"icon_id": "24473120",
10+
"name": "下载",
11+
"font_class": "xiazai",
12+
"unicode": "fcb9",
13+
"unicode_decimal": 64697
14+
},
15+
{
16+
"icon_id": "25677250",
17+
"name": "夸克",
18+
"font_class": "kuake",
19+
"unicode": "e67d",
20+
"unicode_decimal": 59005
21+
},
822
{
923
"icon_id": "5328033",
1024
"name": "folder",
624 Bytes
Binary file not shown.
440 Bytes
Binary file not shown.
436 Bytes
Binary file not shown.

dashboard/src/components/Layout.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
<!-- 主内容区域 -->
5959
<div class="main-content" :class="{ 'sider-collapsed': siderCollapsed }">
60-
<div class="content-wrapper" :class="{ 'search-page': isSearchPage }">
60+
<div class="content-wrapper" :class="{ 'search-page': isSearchPage, 'download-manager-page': isDownloadManagerPage }">
6161
<slot></slot> <!-- 插槽,用于插入页面内容 -->
6262
</div>
6363

@@ -104,6 +104,11 @@ export default defineComponent({
104104
return route.path === '/search' || route.name === 'SearchAggregation';
105105
});
106106
107+
// 检测是否为下载管理页面
108+
const isDownloadManagerPage = computed(() => {
109+
return route.path === '/download-manager' || route.name === 'DownloadManager';
110+
});
111+
107112
const siderCollapsed = ref(false);
108113
const menuItems = ref([
109114
{id: 1, name: '主页', icon: 'icon-zhuye', route: '/'},
@@ -113,6 +118,7 @@ export default defineComponent({
113118
{id: 6, name: '解析', icon: 'icon-jiexi', route: '/parser'},
114119
{id: 7, name: '收藏', icon: 'icon-shoucang', route: '/collection'},
115120
{id: 8, name: '历史', icon: 'icon-lishi', route: '/history'},
121+
{id: 11, name: '下载', icon: 'icon-xiazai', route: '/download-manager'},
116122
{id: 10, name: '测试', icon: 'icon-ceshi', route: '/action-test'},
117123
{id: 9, name: '设置', icon: 'icon-shezhi', route: '/settings'}
118124
]);
@@ -143,7 +149,8 @@ export default defineComponent({
143149
logoDesc,
144150
onClickMenuItem,
145151
onSiderCollapse,
146-
isSearchPage
152+
isSearchPage,
153+
isDownloadManagerPage
147154
};
148155
}
149156
});
@@ -223,6 +230,12 @@ export default defineComponent({
223230
padding: 0; /* 移除padding,让搜索页面完全控制布局 */
224231
}
225232
233+
/* 下载管理页面的内容包装器 - 移除滚动和padding,让组件自己控制布局 */
234+
.content-wrapper.download-manager-page {
235+
overflow: hidden;
236+
padding: 0; /* 移除padding,让下载管理页面完全控制布局 */
237+
}
238+
226239
/* 固定的底部 */
227240
.fixed-footer {
228241
height: 48px;

0 commit comments

Comments
 (0)