chore: show pkg version in footer

This commit is contained in:
YunYouJun
2023-07-30 18:37:21 +08:00
parent 492513098a
commit fffd6e398c
2 changed files with 3 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
- 网站链接:[cook.yunyoujun.cn](https://cook.yunyoujun.cn) - 网站链接:[cook.yunyoujun.cn](https://cook.yunyoujun.cn)
- 备用:[cook.yyj.moe](https://cook.yyj.moe) - 备用:[cook.yyj.moe](https://cook.yyj.moe)
- 开发版:[cook.yunle.app](https://cook.yunle.app)
### 小程序版本 ### 小程序版本

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { isClient } from '@vueuse/core' import { isClient } from '@vueuse/core'
import pkg from '~/package.json'
const displayICP = ref(true) const displayICP = ref(true)
@@ -17,7 +18,7 @@ const buildDate = (new Date(Number.parseInt(now) * 1000)).toLocaleDateString()
<div p="4 t-2" class="flex flex-col items-center justify-center" text="sm"> <div p="4 t-2" class="flex flex-col items-center justify-center" text="sm">
<div v-if="commitSha && buildDate" mb-2> <div v-if="commitSha && buildDate" mb-2>
<span> <span>
当前版本{{ buildDate }}: 当前版本 v{{ pkg.version }}{{ buildDate }}:
</span> </span>
<span> <span>
<a border="b-1 dashed" :href="`https://github.com/YunYouJun/cook/commit/${commitSha}`" target="_blank" alt="Cook | GitHub Commit"> <a border="b-1 dashed" :href="`https://github.com/YunYouJun/cook/commit/${commitSha}`" target="_blank" alt="Cook | GitHub Commit">