-
-
Notifications
You must be signed in to change notification settings - Fork 778
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: keep tooltip align with handle when dragging #696
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/react-component/slider/5ptjlu2yu |
@zombieJ 等预览部署好了,看看 handle 那个例子。 |
Codecov Report
@@ Coverage Diff @@
## master #696 +/- ##
==========================================
+ Coverage 88.26% 88.52% +0.26%
==========================================
Files 10 11 +1
Lines 690 706 +16
Branches 178 179 +1
==========================================
+ Hits 609 625 +16
Misses 81 81
Continue to review full report at Codecov.
|
的确蛋疼…… |
加了一个 nowrap,看看如何? |
这样可以,但是觉得不太优雅😂 不能让用户去这样写吧? |
嗯,这个遇到 |
这样也会有一个问题,因为 slider 默认是没有 tooltip 包裹的,就例如 handle 的那个例子,这样就需要让用户自己去实现这个逻辑,所以可能需要我们实现 slider 的时候,默认用 tooltip 包裹。 |
|
那其实 antd 不用动,只需要更新一些 |
那就 ok 了,改 demo~~ |
a848eb7
to
819f63c
Compare
819f63c
to
b9330af
Compare
b9330af
to
8d0e3e7
Compare
@zombieJ 最后还是和 antd 一样加了个 SliderTooltip 组件,因为发现有个 而且用户如果想自定义的话可以通过 SliderTooltip 组件自定义实现。 |
@zombieJ 我改了一下,同时监听 |
0991724
to
e8df280
Compare
弄完我发个 minor 版本~ |
|
antd 也可以 bump 一下~~ |
antd 那边暂时不升级了,因为那边的 SliderTooltip 使用的 Tooltip 是 antd 里面的,这边的还不能复用呢。 |
不用这个 Tooltip,只是版本对齐一下。免得以后加新 feature 突然跳 2 个 minor 懵逼了~ |
close #693