增加版本号

This commit is contained in:
2026-08-11 17:28:51 +08:00 Unverified
parent 3ea529ea76
commit 44b7941737
3 changed files with 37 additions and 12 deletions
+9 -9
View File
@@ -19,7 +19,7 @@
"ckeditor5": "^48.3.1",
"dompurify": "^3.4.12",
"echarts": "^6.1.0",
"element-plus": "^2.14.3",
"element-plus": "2.14.3",
"html2canvas": "^1.4.1",
"jspdf": "^4.2.1",
"pinia": "^4.0.2",
@@ -2936,14 +2936,14 @@
"license": "0BSD"
},
"node_modules/element-plus": {
"version": "2.14.4",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.14.4.tgz",
"integrity": "sha512-vMKR9tFcLeNrJgFXA3zhUn6YuRKUQW9d0btakBR8U1Iq8MfzkjMOGcgs5de2VgiLldHt69brmuBHpxc3bK4ZgQ==",
"version": "2.14.3",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.14.3.tgz",
"integrity": "sha512-pJcvxcpZjYruNzuJhAeVwnbYjfNgzBKnWHwSVEhwzM2/kcLI3brzmtIBxtPqd4hQWJfD1PRnjoc1WipLw2eBGg==",
"license": "MIT",
"dependencies": {
"@ctrl/tinycolor": "^4.2.0",
"@element-plus/icons-vue": "^2.3.2",
"@floating-ui/dom": "^1.8.0",
"@floating-ui/dom": "^1.7.6",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.8",
"@types/lodash": "^4.17.24",
"@types/lodash-es": "^4.17.12",
@@ -2955,7 +2955,7 @@
"lodash-unified": "^1.0.3",
"memoize-one": "^6.0.0",
"normalize-wheel-es": "^1.2.0",
"vue-component-type-helpers": "^3.3.9"
"vue-component-type-helpers": "^3.3.5"
},
"peerDependencies": {
"vue": "^3.3.7"
@@ -4188,9 +4188,9 @@
"license": "MIT"
},
"node_modules/lodash-es": {
"version": "4.18.1",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",
"integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
"license": "MIT"
},
"node_modules/lodash-unified": {
+4 -1
View File
@@ -28,7 +28,7 @@
"ckeditor5": "^48.3.1",
"dompurify": "^3.4.12",
"echarts": "^6.1.0",
"element-plus": "^2.14.3",
"element-plus": "2.14.3",
"html2canvas": "^1.4.1",
"jspdf": "^4.2.1",
"pinia": "^4.0.2",
@@ -48,5 +48,8 @@
"unplugin-vue-components": "^32.1.0",
"vite": "^8.1.1",
"vue-tsc": "^3.3.5"
},
"overrides": {
"lodash-es": "4.17.21"
}
}
+24 -2
View File
@@ -1,12 +1,31 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import http from '../api/http'
const currentYear = new Date().getFullYear()
const frontendVersion = __APP_VERSION__
const backendVersion = ref<string>()
onMounted(async () => {
try {
const { data } = await http.get<{ version?: string }>('/system/version')
backendVersion.value = data.version?.trim() || undefined
} catch {
// 页脚版本信息不应影响业务页面,也不应为暂时的网络异常额外弹出提示。
}
})
</script>
<template>
<footer class="site-footer" aria-label="网站版权信息">
<div class="site-footer-inner">
<p>© {{ currentYear }} 明序教务 · 版权所有</p>
<span class="footer-note">教务管理与学业服务平台</span>
<div class="footer-meta">
<span class="footer-note">教务管理与学业服务平台</span>
<span class="footer-versions" aria-live="polite">
前端 v{{ frontendVersion }} · 后端 v{{ backendVersion ?? '—' }}
</span>
</div>
</div>
</footer>
</template>
@@ -40,7 +59,9 @@ const currentYear = new Date().getFullYear()
letter-spacing: .04em;
}
.footer-meta { display: flex; align-items: center; gap: 14px; }
.footer-note { color: #aeb9d8; font-size: 11px; }
.footer-versions { color: #c3cce5; font-size: 11px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
.site-footer-inner {
@@ -52,6 +73,7 @@ const currentYear = new Date().getFullYear()
gap: 7px;
}
.footer-note { font-size: 10px; }
.footer-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
.footer-note, .footer-versions { font-size: 10px; }
}
</style>