fix(ui): 主题与脑图浅色适配、标签配色及静态资源缓存
- 浅色模式下用例脑图区域改为浅色样式 - 恢复 el-tag 按 success/warning/info 等类型的颜色 - 启动时应用主题,Home 内容区深色样式兜底 - nginx 禁止缓存 index.html,hash 静态资源长期缓存 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
27
index.html
27
index.html
@@ -6,18 +6,37 @@
|
||||
<title>效能平台</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/wangeditor@4.7.15/dist/css/style.css" />
|
||||
<style>
|
||||
body{
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: #070b16;
|
||||
color: #dbeafe;
|
||||
}
|
||||
html{
|
||||
height: 100%;
|
||||
body.theme-light {
|
||||
background: #eef4ff;
|
||||
color: #1f2937;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
(function () {
|
||||
var theme = 'dark';
|
||||
try {
|
||||
theme = localStorage.getItem('uiTheme') || 'dark';
|
||||
} catch (e) {}
|
||||
document.documentElement.className = theme === 'light' ? 'theme-light' : 'theme-dark';
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.body.classList.remove('theme-dark', 'theme-light');
|
||||
document.body.classList.add(theme === 'light' ? 'theme-light' : 'theme-dark');
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body class="theme-dark">
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user