mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-09-21 06:00:11 +08:00
fix: 处理 PR 评审意见(副作用清理、滚动条分层与变量化)
- SubmitterWindow: onMounted 修改 body/html 背景后,在 onUnmounted 中恢复原始值,避免副作用泄漏。 - appstyle.css: 全局滚动条基础几何/颜色移至 @layer base,使 .scrollbar-muted/.scrollbar-nowidth 工具类优先级更高; 暗色 thumb 改用专用变量 --color-scrollbar-thumb-dark (#15203b),保留比 surface 略亮的可辨识反差(未改用 --color-surface-dark)。 - 评审建议"margin 改 padding"与"改用 .scrollbar-muted"经分析不成立:padding 不会内移滚动条、无法避开圆角,margin 才能把容器连同滚动条推离圆角; .scrollbar-muted 为 0.4rem 细条,与其他页面 0.75rem 全局不一致,故保持 mr-4 mb-4 全局样式。
This commit is contained in:
@@ -1866,7 +1866,7 @@ const closeWindow = () => {
|
||||
window.ipcRenderer.send("close-submitter-window");
|
||||
};
|
||||
|
||||
import { onMounted, nextTick } from "vue";
|
||||
import { onMounted, onUnmounted, nextTick } from "vue";
|
||||
|
||||
const getGitInfo = async () => {
|
||||
try {
|
||||
@@ -1910,9 +1910,16 @@ const getGitInfo = async () => {
|
||||
|
||||
onMounted(async () => {
|
||||
console.log("[Submitter] Component mounted, loading categories and tags");
|
||||
// 透明窗口:让 body/html 背景透明,圆角才能透出,否则四角是方角
|
||||
// 透明窗口:让 body/html 背景透明,圆角才能透出,否则四角是方角。
|
||||
// 保存原始值,在 onUnmounted 中恢复,避免副作用泄漏到其它视图。
|
||||
const prevHtmlBg = document.documentElement.style.backgroundColor;
|
||||
const prevBodyBg = document.body.style.backgroundColor;
|
||||
document.documentElement.style.backgroundColor = "transparent";
|
||||
document.body.style.backgroundColor = "transparent";
|
||||
onUnmounted(() => {
|
||||
document.documentElement.style.backgroundColor = prevHtmlBg;
|
||||
document.body.style.backgroundColor = prevBodyBg;
|
||||
});
|
||||
// 先等待分类列表加载完成,避免后续竞态
|
||||
await Promise.all([loadCategoriesList(), loadTagsList()]);
|
||||
// 尝试从 git 配置读取 name 和 email,填入 contributor 和 mail
|
||||
|
||||
Reference in New Issue
Block a user