修改项目版本号从package.json中读取

This commit is contained in:
dushixiang
2021-01-06 01:48:00 +08:00
parent cb1d7fd318
commit fbac4c7c2b
3 changed files with 16 additions and 4 deletions

View File

@ -144,6 +144,16 @@ export function differTime(start, end) {
return show;
}
export const isEmpty = (text) =>{
export const isEmpty = (text) => {
return text === undefined || text == null || text.length === 0;
}
export const NT_PACKAGE = () => {
const _package = require("../../package.json");
const name = _package.name;
const version = _package.version;
return {
name: name,
version: version
}
}