Skip to content

Commit b59e64c

Browse files
author
Taois
committed
feat: 底部工具条优化
显示合适的版权信息
1 parent b239b3b commit b59e64c

File tree

1 file changed

+159
-1
lines changed

1 file changed

+159
-1
lines changed

dashboard/src/components/Footer.vue

Lines changed: 159 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,62 @@
66
</div>
77
<!-- 默认底部工具条内容 -->
88
<div v-else class="default-footer">
9-
<span>底部工具条</span>
9+
<div class="footer-info">
10+
<!-- 版权信息 -->
11+
<div class="copyright-section">
12+
<icon-copyright class="footer-icon" />
13+
<span class="copyright-text">{{ currentYear }} DrPlayer</span>
14+
</div>
15+
16+
<!-- 分隔符 -->
17+
<div class="separator">|</div>
18+
19+
<!-- 项目地址 -->
20+
<div class="project-section">
21+
<icon-github class="footer-icon" />
22+
<a
23+
href="https://github.com/hjdhnx/DrPlayer"
24+
target="_blank"
25+
class="project-link"
26+
@click="handleProjectClick"
27+
>
28+
GitHub
29+
</a>
30+
</div>
31+
32+
<!-- 分隔符 -->
33+
<div class="separator">|</div>
34+
35+
<!-- 备案号 -->
36+
<div class="license-section">
37+
<icon-safe class="footer-icon" />
38+
<span class="license-text">hjdhnx</span>
39+
</div>
40+
</div>
1041
</div>
1142
</div>
1243
</template>
1344

1445
<script setup>
46+
import { computed } from 'vue';
47+
import { Message } from '@arco-design/web-vue';
48+
import {
49+
IconCopyright,
50+
IconGithub,
51+
IconSafe
52+
} from '@arco-design/web-vue/es/icon';
1553
import { usePaginationStore } from '@/stores/paginationStore';
1654
1755
// 使用翻页统计store
1856
const paginationStore = usePaginationStore();
57+
58+
// 获取当前年份
59+
const currentYear = computed(() => new Date().getFullYear());
60+
61+
// 处理项目链接点击
62+
const handleProjectClick = () => {
63+
Message.success('正在跳转到项目主页...');
64+
};
1965
</script>
2066

2167
<style scoped>
@@ -46,6 +92,118 @@ const paginationStore = usePaginationStore();
4692
justify-content: center;
4793
width: 100%;
4894
color: var(--color-text-2);
95+
font-size: 13px;
96+
}
97+
98+
.footer-info {
99+
display: flex;
100+
align-items: center;
101+
gap: 12px;
102+
padding: 0 16px;
103+
background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
104+
border-radius: 20px;
105+
border: 1px solid rgba(99, 102, 241, 0.1);
106+
transition: all 0.3s ease;
107+
}
108+
109+
.footer-info:hover {
110+
background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
111+
border-color: rgba(99, 102, 241, 0.2);
112+
transform: translateY(-1px);
113+
box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
114+
}
115+
116+
.copyright-section,
117+
.project-section,
118+
.license-section {
119+
display: flex;
120+
align-items: center;
121+
gap: 4px;
122+
}
123+
124+
.footer-icon {
49125
font-size: 14px;
126+
color: var(--color-primary-6);
127+
transition: all 0.3s ease;
128+
}
129+
130+
.copyright-text,
131+
.license-text {
132+
font-size: 13px;
133+
color: var(--color-text-2);
134+
font-weight: 500;
135+
transition: color 0.3s ease;
136+
}
137+
138+
.project-link {
139+
font-size: 13px;
140+
color: var(--color-primary-6);
141+
text-decoration: none;
142+
font-weight: 500;
143+
transition: all 0.3s ease;
144+
position: relative;
145+
}
146+
147+
.project-link:hover {
148+
color: var(--color-primary-7);
149+
transform: translateY(-1px);
150+
}
151+
152+
.project-link::after {
153+
content: '';
154+
position: absolute;
155+
bottom: -2px;
156+
left: 0;
157+
width: 0;
158+
height: 1px;
159+
background: var(--color-primary-6);
160+
transition: width 0.3s ease;
161+
}
162+
163+
.project-link:hover::after {
164+
width: 100%;
165+
}
166+
167+
.separator {
168+
color: var(--color-border-3);
169+
font-size: 12px;
170+
opacity: 0.6;
171+
}
172+
173+
/* 响应式设计 */
174+
@media (max-width: 768px) {
175+
.footer-info {
176+
gap: 8px;
177+
padding: 0 12px;
178+
font-size: 12px;
179+
}
180+
181+
.footer-icon {
182+
font-size: 12px;
183+
}
184+
185+
.copyright-text,
186+
.license-text,
187+
.project-link {
188+
font-size: 12px;
189+
}
190+
}
191+
192+
@media (max-width: 480px) {
193+
.footer-info {
194+
flex-direction: column;
195+
gap: 4px;
196+
padding: 8px 12px;
197+
}
198+
199+
.separator {
200+
display: none;
201+
}
202+
203+
.copyright-section,
204+
.project-section,
205+
.license-section {
206+
gap: 3px;
207+
}
50208
}
51209
</style>

0 commit comments

Comments
 (0)