style: body and side menu scrollbar style

This commit is contained in:
jialin
2024-10-21 11:36:54 +08:00
parent 33a21f2aaa
commit 57386eeb55
5 changed files with 66 additions and 14 deletions
+5 -4
View File
@@ -3,12 +3,13 @@ import { IApi } from '@umijs/max';
export default (api: IApi) => {
api.modifyHTML(($) => {
const info = JSON.parse(process.env.VERSION || '{}');
const env = process.env.NODE_ENV;
const env = info.version ? 'production' : 'development';
$('html').attr('data-env', env);
$('html').attr(
'data-version',
env === 'production'
? info.version || info.commitId
: `dev-${info.commitId}`
env === 'production' ? info.version || info.commitId : `${info.commitId}`
);
if (env === 'production') {
$('script[src^="/js/umi"]').first?.().remove?.();