mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-13 20:23:42 +08:00
refactor(projects): 注入全局常量:PROJECT_BUILD_TIME - 构建时间
This commit is contained in:
2
src/typings/global.d.ts
vendored
Normal file
2
src/typings/global.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** 构建时间 */
|
||||
declare const PROJECT_BUILD_TIME: string;
|
||||
5
src/typings/makeit-captcha.d.ts
vendored
5
src/typings/makeit-captcha.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
declare module 'makeit-captcha' {
|
||||
import _default from 'makeit-captcha/es/src';
|
||||
|
||||
export default _default;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { VersionInfo } from '@/interface';
|
||||
import version from './version.json';
|
||||
import packageJson from '../../../package.json';
|
||||
|
||||
interface Version {
|
||||
dependencies: {
|
||||
@@ -8,6 +8,7 @@ interface Version {
|
||||
devDependencies: {
|
||||
[key: string]: string;
|
||||
};
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface PackageVersion {
|
||||
@@ -15,7 +16,7 @@ interface PackageVersion {
|
||||
devDependencies: VersionInfo[];
|
||||
}
|
||||
|
||||
const versionWithType = version as Version;
|
||||
const versionWithType = packageJson as Version;
|
||||
|
||||
function transformVersionData(tuple: [string, string]): VersionInfo {
|
||||
const [name, version] = tuple;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<n-tag type="primary">1.0.0</n-tag>
|
||||
</n-descriptions-item>
|
||||
<n-descriptions-item label="最后编译时间">
|
||||
<n-tag type="primary">2021-11-05</n-tag>
|
||||
<n-tag type="primary">{{ lastestBuildTime }}</n-tag>
|
||||
</n-descriptions-item>
|
||||
<n-descriptions-item label="Github地址">
|
||||
<a class="g_text-primary" href="https://github.com/honghuangdc/soybean-admin" target="_blank">Github地址</a>
|
||||
@@ -20,5 +20,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NDescriptions, NDescriptionsItem, NTag } from 'naive-ui';
|
||||
|
||||
const lastestBuildTime = PROJECT_BUILD_TIME;
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user