feat(settings): 添加版本信息显示功能
部署开发环境 / deploy-dev (push) Successful in 2m3s

- 在 API 模块中添加获取版本信息的接口方法
- 在设置页面组件中引入 API 并调用版本获取方法
- 使用 onMounted 钩子在组件挂载时获取版本数据
- 将获取到的版本信息绑定到模板中显示
- 完成设置页面的初始功能实现
This commit is contained in:
2026-08-23 00:17:11 +08:00
parent 54a05c27ab
commit 0602f1d21d
2 changed files with 13 additions and 1 deletions
+3
View File
@@ -5,6 +5,9 @@ const axiosInstance = axios.create({
}) })
export default { export default {
getVersion:() =>
axiosInstance.get('/api/version'),
getTokenList: () => getTokenList: () =>
axiosInstance.get('/api/token'), axiosInstance.get('/api/token'),
+10 -1
View File
@@ -1,7 +1,16 @@
<script setup lang="ts"> <script setup lang="ts">
import api from "@/api.ts";
const version = ref('')
onMounted(() => {
api.getVersion().then((response) => {
version.value = response.data
})
})
</script> </script>
<template> <template>
TODO {{ version }}
</template> </template>