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

feat(Rate): add clearable prop #11969

Merged
merged 5 commits into from
Jun 18, 2023
Merged

feat(Rate): add clearable prop #11969

merged 5 commits into from
Jun 18, 2023

Conversation

inottn
Copy link
Collaborator

@inottn inottn commented Jun 12, 2023

resolve #11968

@inottn inottn changed the title Feat/rate 11968 feat(Rate): add clearable prop Jun 12, 2023
@@ -197,6 +200,16 @@ export default defineComponent({
preventDefault(event);
select(getScoreByPosition(clientX, clientY));
}

const TAP_THRESHOLD_DISTANCE = 3;
Copy link
Member

Choose a reason for hiding this comment

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

src/image-preview/ImagePreviewItem.tsx 里有一个类似作用的常量,const TAP_OFFSET = 5;,可以考虑统一放到 src/utils/constant.ts 里维护。

这里阈值 3px 小了一点,我看了下社区里比较常用的是设置为 5px~10px,Vant 里可以统一用 5px

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done~

@chenjiahan chenjiahan merged commit ba6a0e9 into youzan:main Jun 18, 2023
5 checks passed
@chenjiahan
Copy link
Member

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] vate希望能允许0分
2 participants