Feat/hel 529 datahub v12 three pages #2
@@ -1021,7 +1021,11 @@ function updateClock() {
|
||||
}
|
||||
function applyCalm(on) {
|
||||
state.calm = on;
|
||||
$('appRoot').classList.toggle('reduce-motion', on);
|
||||
// 挂在 #app(覆盖 appRoot 及其兄弟 drawer/modal/toast),不能只挂 #appRoot:
|
||||
// 否则 .reduce-motion * 与 .reduce-motion .drawer/.toast 选不中旁路层过渡。
|
||||
document.body.classList.toggle('reduce-motion', on);
|
||||
const app = $('app');
|
||||
if (app) app.classList.toggle('reduce-motion', on);
|
||||
$('calmBtn').textContent = on ? '恢复动态' : '减少动态';
|
||||
$('calmBtn').classList.toggle('on', on);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user