Skip to content

Commit

Permalink
Merge commit '76570e2f1b72de50cb54c36229447eea69c59940' into pro
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Feb 29, 2024
2 parents 60e6003 + 76570e2 commit 86214b1
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/site/css/log.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@
.logs-sticky{
position: sticky;
top: 80px;
height: calc(100vh - 136px);
}
#help-l-ul{
overflow-y: auto;
height: calc(100% - 36px);
}
.footer-layut{
border-top: var(--border-color) solid 1px;
Expand Down
12 changes: 12 additions & 0 deletions public/site/en/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -2440,6 +2440,18 @@ <h6 class="txt-4001624 help-h6">
"[data-id='" + `section-${i}` + "']"
);
elementsWithDataId[0]?.classList?.add("active");
//滚动设置
const liHight = elementsWithDataId[0]?.offsetTop;
const pHihtt = elementsWithDataId[0]?.parentNode.parentNode.offsetHeight;
const ulElement = document.getElementById('help-l-ul'); // 替换为你的 <div> 元素的 id
const scrollHeight = ulElement.scrollTop;
const ulHeight = ulElement.offsetHeight;
if (liHight > scrollHeight + ulHeight) {
ulElement.scrollTop += (pHihtt + 24);
}
if (liHight < scrollHeight) {
ulElement.scrollTop -= (pHihtt + 24);
}
return;
}
}
Expand Down
12 changes: 12 additions & 0 deletions public/site/en/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,18 @@ <h1 class="txt-6003645 logs-h1 mb-36">DooTask Update Log </h1>
rm()
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
elementsWithDataId[1]?.classList?.add("active");
//滚动设置
const liHight = elementsWithDataId[1]?.offsetTop;
const pHihtt = elementsWithDataId[1]?.offsetHeight;
const ulElement = document.getElementById('help-l-ul'); // 替换为你的 <div> 元素的 id
const scrollHeight = ulElement.scrollTop;
const ulHeight = ulElement.offsetHeight;
if (liHight > scrollHeight + ulHeight) {
ulElement.scrollTop += (pHihtt + pHihtt);
}
if (liHight < scrollHeight) {
ulElement.scrollTop -= (pHihtt + pHihtt);
}
return;
}
}
Expand Down
12 changes: 12 additions & 0 deletions public/site/zh/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,18 @@ <h6 class="txt-4001624 help-h6">在DooTask页面左侧点击【文件】,勾
if (arrOffsetTop[i] > window.scrollY){
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
elementsWithDataId[0]?.classList?.add("active");
//滚动设置
const liHight = elementsWithDataId[0]?.offsetTop;
const pHihtt = elementsWithDataId[0]?.parentNode.parentNode.offsetHeight;
const ulElement = document.getElementById('help-l-ul'); // 替换为你的 <div> 元素的 id
const scrollHeight = ulElement.scrollTop;
const ulHeight = ulElement.offsetHeight;
if (liHight > scrollHeight + ulHeight) {
ulElement.scrollTop += (pHihtt + 24);
}
if (liHight < scrollHeight) {
ulElement.scrollTop -= (pHihtt + 24);
}
return;
}
}
Expand Down
12 changes: 12 additions & 0 deletions public/site/zh/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,18 @@ <h1 class="txt-6003645 logs-h1 mb-36">DooTask更新日志</h1>
rm()
let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']");
elementsWithDataId[1]?.classList?.add("active");
//滚动设置
const liHight = elementsWithDataId[1]?.offsetTop;
const pHihtt = elementsWithDataId[1]?.offsetHeight;
const ulElement = document.getElementById('help-l-ul'); // 替换为你的 <div> 元素的 id
const scrollHeight = ulElement.scrollTop;
const ulHeight = ulElement.offsetHeight;
if (liHight > scrollHeight + ulHeight) {
ulElement.scrollTop += (pHihtt + pHihtt);
}
if (liHight < scrollHeight) {
ulElement.scrollTop -= (pHihtt + pHihtt);
}
return;
}
}
Expand Down

0 comments on commit 86214b1

Please sign in to comment.