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

[Slide] hide 之后重新渲染,值对了,但是 dot 位置不对 #3083

Closed
CrossLee opened this issue Aug 19, 2024 · 1 comment · Fixed by #3085
Closed

[Slide] hide 之后重新渲染,值对了,但是 dot 位置不对 #3083

CrossLee opened this issue Aug 19, 2024 · 1 comment · Fixed by #3085

Comments

@CrossLee
Copy link

tdesign-miniprogram 版本

1.5.1

重现链接

No response

重现步骤

wxml
<t-slider bind:change="dragendAge" id="sliderAge" slot="note" t-class-bar-active="filterSlideActive" min="18" max="100" step="2" theme="capsule" label="true" defaultValue="{{ [20, 30] }}" range />
js
/**
 * 显示过滤条件
 */
showFilter() {
  this.setData({
    popupFilterVisible: true,
  })
  const $slider1 = this.selectComponent('#sliderAge');
  const $slider2 = this.selectComponent('#sliderHeight');
  const $slider3 = this.selectComponent('#sliderWeight');
  $slider1.init();
  $slider2.init();
  $slider3.init();
},

期望结果

重新渲染之后,dot 也要显示在正确的位置

实际结果

dot 没有显示在正确的位置

iShot_2024-08-19_13.38.39.mp4

基础库版本

No response

补充说明

No response

Copy link
Contributor

👋 @CrossLee,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

jby0107 added a commit to jby0107/tdesign-miniprogram that referenced this issue Aug 19, 2024
…ually call init

each time init is called, the dots are set to the defaultValue position. Added a flag to filter
repeated inits to fix this problem

fix Tencent#3083
jby0107 added a commit to jby0107/tdesign-miniprogram that referenced this issue Aug 19, 2024
each time init is called, the dots are set to the defaultValue position. Added a flag to filter

fix Tencent#3083
jarmywang pushed a commit that referenced this issue Aug 20, 2024
* feat(slider): fix incorrect dot pos caused by repeated init

each time init is called, the dots are set to the defaultValue position. Added a flag to filter

fix #3083

* docs(slider): update readme
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 a pull request may close this issue.

1 participant