-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: #1772 code review 组件,代码展开按钮与评论相邻时,点击展开按钮会报错 #1773
base: dev
Are you sure you want to change the base?
Conversation
* @param _node 如果折叠行后一行左边获取不到行数,则寻找第一个左边有行数的行。 | ||
* @returns 返回找到的后一个同级元素节点,如果没有找到则返回null。 | ||
*/ | ||
export function findNextElement(_node: Element): Element { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在单栏模式也存在此问题,针对该问题修复可以尝试两种模式考虑
* @returns 返回找到的后一个同级元素节点,如果没有找到则返回null。 | ||
*/ | ||
export function findNextElement(_node: Element): Element { | ||
if (_node.children[0]?.innerText) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处以及下文代码一些地方会存在TS错误
@@ -243,6 +270,7 @@ export function updateLineNumberInDatasetForDoubleColumn( | |||
nextR = parseInt((nextLineNode.children[2] as HTMLElement).innerText) - 1; | |||
const isExpandAll = nextLineNumber - prevLineNumber <= expandThreshold; | |||
if (isExpandAll && updateExpandButton) { | |||
trNode.style.display = 'none'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处的display置为none操作是用来何种作用呢
No description provided.