-
Notifications
You must be signed in to change notification settings - Fork 199
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: 解决移动端下,树形结构展开、收起交互失效的问题 #3038
Changes from all commits
ed8473a
d3aca12
b6526eb
2074881
f32d977
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,28 +155,28 @@ export class RowCell extends HeaderCell<RowHeaderConfig> { | |
|
||
const iconX = x + contentIndent; | ||
const iconY = this.getIconPosition().y; | ||
const { offsetXY, offsetWH } = this.getActionIconOffset(size); | ||
|
||
this.treeIcon = renderTreeIcon({ | ||
group: this, | ||
iconCfg: { | ||
x: iconX, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 不建议增大 icon 的尺寸, 和 pc 表现不一致有一点奇怪 |
||
y: iconY, | ||
width: size!, | ||
height: size!, | ||
x: iconX - offsetXY, | ||
y: iconY - offsetXY, | ||
width: size + offsetWH, | ||
height: size + offsetWH, | ||
fill, | ||
}, | ||
isCollapsed, | ||
onClick: () => { | ||
this.onTreeIconClick(); | ||
}, | ||
}); | ||
|
||
// 移动端, 点击热区为整个单元格 | ||
if (isMobile()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 移动端热区还是不变, 把 click 改成
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个方案不妥,如果把整个单元格做为热区的话,单元格上的Tooltip就无法触发。所以我才考虑把icon放大 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 之前也考虑过这个方案 |
||
this.addEventListener('click', () => { | ||
onTouchEnd: () => { | ||
/** | ||
* 移动端时,绑定展开、收起事件 | ||
*/ | ||
this.emitCollapseEvent(); | ||
}); | ||
} | ||
}, | ||
}); | ||
} | ||
|
||
protected drawTreeLeafNodeAlignDot() { | ||
|
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.
角头这里还是热区绑定单元格即可, 和 row-cell 一致