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: slider #732

Merged
merged 1 commit into from
May 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Slider/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

.@{collapsePrefix} {
user-select: none;
touch-action: none;
width: 100%;

&-track {
Expand Down Expand Up @@ -51,6 +50,7 @@

&-handler {
position: absolute;
touch-action: none;
left: 0;
transform: translate(-50%, -50%);
top: 3*@rpx;
Copy link
Contributor

Choose a reason for hiding this comment

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

这是一小段 CSS 代码。代码通过 "@@" 表示代码发生变化的地方。在第四行,"touch-action: none" 被移除了,可能是因为该属性被滥用而导致性能问题。在第六行,"&-track" 中的样式被更改,将 "user-select" 设置为 "none" 可以禁止用户选择轨道,提高交互体验。在第九行,"&-handler" 中添加了 "touch-action: none" 属性以防止手势触摸冲突,同时可以提高性能。建议在审查代码后进行测试以确保所做的更改不会影响应用的其他部分。

Expand Down