Skip to content
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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

luoyimaid
Copy link

No description provided.

* @param _node 如果折叠行后一行左边获取不到行数,则寻找第一个左边有行数的行。
* @returns 返回找到的后一个同级元素节点,如果没有找到则返回null。
*/
export function findNextElement(_node: Element): Element {
Copy link
Member

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) {
Copy link
Member

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';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处的display置为none操作是用来何种作用呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants