feat: 样式统一 + 月份下拉框扩展
- 品牌色统一为天机阁标准 #4A6CF7,tailwind.config 扩展完整色阶 - styles.css 新增 :root CSS 变量层(brand 色阶、语义色、圆角/阴影 token) - 全项目 hex/Tailwind 类统一替换为 brand-* CSS 变量(115 处引用) - border-radius/box-shadow 统一使用 token 变量 - 预留 :root[data-theme="dark"] 暗色主题变量占位 - 所有月份下拉框范围从 3 年/15 月扩展至 2020-2027(8 年 96 月)
This commit is contained in:
@@ -61,9 +61,8 @@ function toast(message, type = "info", duration = 3000) {
|
||||
window.toast = toast;
|
||||
|
||||
function monthOptions(selected = '') {
|
||||
const now = new Date();
|
||||
const startYear = now.getFullYear() - 1;
|
||||
const endYear = now.getFullYear() + 1;
|
||||
const startYear = 2020;
|
||||
const endYear = 2027;
|
||||
let options = selected ? '' : '<option value="">选择月份</option>';
|
||||
for (let y = startYear; y <= endYear; y++) {
|
||||
for (const m of ["01","02","03","04","05","06","07","08","09","10","11","12"]) {
|
||||
@@ -136,7 +135,7 @@ function showLoadingOverlay(steps) {
|
||||
var existing = document.getElementById('_loadingOverlay');
|
||||
if (existing) existing.remove();
|
||||
var stepsHtml = steps.map(function(s, i) {
|
||||
return '<div id="_loadingStep_' + i + '" class="flex items-center gap-3 py-1.5 text-sm ' + (i === 0 ? 'text-blue-600 font-medium' : 'text-slate-400') + '">' +
|
||||
return '<div id="_loadingStep_' + i + '" class="flex items-center gap-3 py-1.5 text-sm ' + (i === 0 ? 'text-brand-600 font-medium' : 'text-slate-400') + '">' +
|
||||
'<span class="w-4 h-4 flex items-center justify-center">' + (i === 0 ? '<svg class="animate-spin" width="14" height="14" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="3" opacity="0.25"/><path d="M12 2a10 10 0 0 1 10 10" stroke="currentColor" stroke-width="3" stroke-linecap="round"/></svg>' : '<span class="w-2 h-2 rounded-full bg-slate-300"></span>') + '</span>' +
|
||||
'<span>' + s.label + '</span>' +
|
||||
'</div>';
|
||||
@@ -148,7 +147,7 @@ function showLoadingOverlay(steps) {
|
||||
'<h3 class="text-base font-bold text-slate-800 mb-1">正在加载工作台</h3>' +
|
||||
'<p class="text-xs text-slate-400 mb-4">共 ' + steps.length + ' 个模块,请稍候…</p>' +
|
||||
'<div id="_loadingSteps">' + stepsHtml + '</div>' +
|
||||
'<div class="mt-4 h-1 bg-slate-100 rounded-full overflow-hidden"><div id="_loadingProgress" class="h-full bg-blue-600 transition-all duration-300" style="width:0%"></div></div>' +
|
||||
'<div class="mt-4 h-1 bg-slate-100 rounded-full overflow-hidden"><div id="_loadingProgress" class="h-full bg-brand-600 transition-all duration-300" style="width:0%"></div></div>' +
|
||||
'</div>';
|
||||
document.body.appendChild(overlay);
|
||||
}
|
||||
@@ -161,7 +160,7 @@ function updateLoadingStep(idx, total) {
|
||||
}
|
||||
var nextEl = document.getElementById('_loadingStep_' + (idx + 1));
|
||||
if (nextEl) {
|
||||
nextEl.className = 'flex items-center gap-3 py-1.5 text-sm text-blue-600 font-medium';
|
||||
nextEl.className = 'flex items-center gap-3 py-1.5 text-sm text-brand-600 font-medium';
|
||||
nextEl.querySelector('span:first-child').innerHTML = '<svg class="animate-spin" width="14" height="14" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="3" opacity="0.25"/><path d="M12 2a10 10 0 0 1 10 10" stroke="currentColor" stroke-width="3" stroke-linecap="round"/></svg>';
|
||||
}
|
||||
var progress = document.getElementById('_loadingProgress');
|
||||
|
||||
Reference in New Issue
Block a user