Skip to content

Commit

Permalink
样式优化。
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed May 18, 2024
1 parent 12cd1ea commit d63a112
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions p/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
.mobile #imgs img:last-child{margin-bottom:70px}

#configs{position:fixed;left:0;bottom:0;z-index:2;background-color:#efefef;border:1px solid #aaa;padding:5px;width:100%;display:none}
#saveConfigPanel{text-align:center}
.mobile #configs{top:0;bottom:auto}
</style>
</head>
Expand Down
10 changes: 7 additions & 3 deletions p/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,12 @@ let inFocus = false; // 输入框是否获取到了焦点

// “配置” 按钮点击事件
openConfigBtn.addEventListener("click", function () {
saveConfig.style.width = (windowWidth - 10) + "px";
saveConfig.value = localStorage.getItem("savePidList") || '';
configs.style.display = 'block';
if (configs.style.display === 'block') {
configs.style.display = 'none';
} else {
saveConfig.value = localStorage.getItem("savePidList") || '';
configs.style.display = 'block';
}
});

// “取消” 按钮点击事件
Expand Down Expand Up @@ -215,6 +218,7 @@ let inFocus = false; // 输入框是否获取到了焦点
if (isMobileBrowser()) {
document.body.classList.add("mobile");
tools.style.width = windowWidth + "px";
saveConfig.style.width = (windowWidth - 10) + "px";
}
setTimeout(function () {
let needSavePid = true;
Expand Down

0 comments on commit d63a112

Please sign in to comment.