mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-08 21:27:57 +00:00
fix(build): fix build error
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
name: 'AboutPage',
|
name: 'AboutPage',
|
||||||
components: { Description, PageWrapper },
|
components: { Description, PageWrapper },
|
||||||
setup() {
|
setup() {
|
||||||
const { pkg, lastBuildTime } = window.__APP_INFO__;
|
const { pkg, lastBuildTime } = __APP_INFO__;
|
||||||
|
|
||||||
const { dependencies, devDependencies, name, version } = pkg;
|
const { dependencies, devDependencies, name, version } = pkg;
|
||||||
|
|
||||||
|
19
types/global.d.ts
vendored
19
types/global.d.ts
vendored
@@ -7,19 +7,18 @@ import type {
|
|||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
declare interface __APP_INFO__ {
|
||||||
|
pkg: {
|
||||||
|
name: string;
|
||||||
|
version: string;
|
||||||
|
dependencies: Recordable<string>;
|
||||||
|
devDependencies: Recordable<string>;
|
||||||
|
};
|
||||||
|
lastBuildTime: string;
|
||||||
|
}
|
||||||
declare interface Window {
|
declare interface Window {
|
||||||
// Global vue app instance
|
// Global vue app instance
|
||||||
__APP__: App<Element>;
|
__APP__: App<Element>;
|
||||||
|
|
||||||
__APP_INFO__: {
|
|
||||||
pkg: {
|
|
||||||
name: string;
|
|
||||||
version: string;
|
|
||||||
dependencies: Recordable<string>;
|
|
||||||
devDependencies: Recordable<string>;
|
|
||||||
};
|
|
||||||
lastBuildTime: string;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// vue
|
// vue
|
||||||
|
@@ -12,8 +12,9 @@ import { OUTPUT_DIR } from './build/constant';
|
|||||||
import pkg from './package.json';
|
import pkg from './package.json';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
|
const { dependencies, devDependencies, name, version } = pkg;
|
||||||
const APP_INFO = {
|
const APP_INFO = {
|
||||||
pkg,
|
pkg: { dependencies, devDependencies, name, version },
|
||||||
lastBuildTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
lastBuildTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user