fix: ui version commitid

This commit is contained in:
jialin
2024-07-12 12:13:00 +08:00
parent 320db56fbe
commit d839464a05
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -6,7 +6,9 @@ export default (api: IApi) => {
const env = process.env.NODE_ENV;
$('html').attr(
'data-version',
env === 'production' ? info.version : `${info.version}-${info.commitId}`
env === 'production'
? info.version || info.commitId
: `dev-${info.commitId}`
);
return $;
});