feat(sj_1.0.0): 优化关于业务的链接404问题
This commit is contained in:
parent
2f9033c933
commit
6f4cde6ba3
2
.env
2
.env
@ -2,7 +2,7 @@ VITE_APP_TITLE=Snail Job
|
||||
|
||||
VITE_APP_DESC=A flexible, reliable, and fast platform for distributed task retry and distributed task scheduling.
|
||||
|
||||
VITE_APP_VERSION=3.1.0
|
||||
VITE_APP_VERSION=1.0.0-beta2
|
||||
|
||||
# the prefix of the icon name
|
||||
VITE_ICON_PREFIX=icon
|
||||
|
@ -112,5 +112,5 @@
|
||||
"*": "eslint --fix"
|
||||
},
|
||||
"officialWebsite": "https://snailjob.opensnail.com",
|
||||
"website": "https://snailjob.opensnail.com/pages/78ba75/"
|
||||
"website": "https://snailjob.opensnail.com/docs/preview.html"
|
||||
}
|
||||
|
@ -1,41 +1,44 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { $t } from '@/locales';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import pkg from '~/package.json';
|
||||
import { localStg } from '@/utils/storage';
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
const column = computed(() => (appStore.isMobile ? 1 : 2));
|
||||
|
||||
interface PkgJson {
|
||||
name: string;
|
||||
version: string;
|
||||
dependencies: PkgVersionInfo[];
|
||||
devDependencies: PkgVersionInfo[];
|
||||
}
|
||||
// interface PkgJson {
|
||||
// name: string;
|
||||
// dependencies: PkgVersionInfo[];
|
||||
// devDependencies: PkgVersionInfo[];
|
||||
// }
|
||||
|
||||
interface PkgVersionInfo {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
||||
// interface PkgVersionInfo {
|
||||
// name: string;
|
||||
// version: string;
|
||||
// }
|
||||
|
||||
const { name, version, dependencies, devDependencies } = pkg;
|
||||
const { VITE_APP_VERSION } = import.meta.env;
|
||||
|
||||
function transformVersionData(tuple: [string, string]): PkgVersionInfo {
|
||||
const [$name, $version] = tuple;
|
||||
return {
|
||||
name: $name,
|
||||
version: $version
|
||||
};
|
||||
}
|
||||
// const { name, dependencies, devDependencies } = pkg;
|
||||
//
|
||||
// function transformVersionData(tuple: [string, string]): PkgVersionInfo {
|
||||
// const [$name, $version] = tuple;
|
||||
// return {
|
||||
// name: $name,
|
||||
// version: $version
|
||||
// };
|
||||
// }
|
||||
|
||||
const pkgJson: PkgJson = {
|
||||
name,
|
||||
version,
|
||||
dependencies: Object.entries(dependencies).map(item => transformVersionData(item)),
|
||||
devDependencies: Object.entries(devDependencies).map(item => transformVersionData(item))
|
||||
};
|
||||
const version = ref<string>(`${localStg.get('version') || VITE_APP_VERSION}`);
|
||||
|
||||
// const pkgJson: PkgJson = {
|
||||
// name,
|
||||
// dependencies: Object.entries(dependencies).map(item => transformVersionData(item)),
|
||||
// devDependencies: Object.entries(devDependencies).map(item => transformVersionData(item))
|
||||
// };
|
||||
|
||||
const latestBuildTime = BUILD_TIME;
|
||||
</script>
|
||||
@ -53,7 +56,7 @@ const latestBuildTime = BUILD_TIME;
|
||||
</a>
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.about.projectInfo.version')">
|
||||
<NTag type="primary">{{ pkgJson.version }}</NTag>
|
||||
<NTag type="primary">{{ version }}</NTag>
|
||||
</NDescriptionsItem>
|
||||
<NDescriptionsItem :label="$t('page.about.projectInfo.githubLink')">
|
||||
<a class="text-primary" :href="pkg.repository.githubUrl" target="_blank" rel="noopener noreferrer">
|
||||
|
Loading…
Reference in New Issue
Block a user