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

[DatePicker]disable-date的方法被其他组件触发 #1567

Closed
LoopZhou opened this issue Sep 26, 2022 · 4 comments · Fixed by #1569
Closed

[DatePicker]disable-date的方法被其他组件触发 #1567

LoopZhou opened this issue Sep 26, 2022 · 4 comments · Fixed by #1569
Assignees

Comments

@LoopZhou
Copy link
Collaborator

tdesign-vue 版本

0.48.2

重现链接

https://codesandbox.io/s/tdesign-vue-demo-forked-sn7k24?file=/src/demo.vue

重现步骤

如示例呈现,目前只有date1的date-picker组件有disableData方法。

  1. 首先选择第一个时间组件, 控制台打印了datepicker disabled, 触发了disable-date
  2. 后续选择第二个没有disableData方法的时间组件, input组件输入操作, select选择操作,都触发了disable-date
2022-09-26.17.42.55.mov

期望结果

只有配置了disableData方法的时间组件的选择才触发该方法

实际结果

只有选择了配置disableData方法的时间组件,后续操作其他组件均会触发该方法,导致页面卡顿

框架版本

Vue(2.6.0)

浏览器版本

Chrome(99.0.4844.51)

系统版本

MacOS(10.15.7)

Node版本

12.22.0

补充说明

No response

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

♥️ 有劳 @zhwachen @xiaosansiji @HQ-Lin 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @LoopZhou

@honkinglin
Copy link
Collaborator

vue的写法问题啊,你改成这种写法他就不触发了
https://codesandbox.io/s/tdesign-vue-demo-forked-okdeor?file=/src/demo.vue
企业微信截图_06862f8e-9869-4231-8805-023728517bdb

@delenzhang
Copy link
Contributor

https://codesandbox.io/s/tdesign-vue-demo-forked-g2lpvc?file=/src/demo.vue
image
如果在 prop function里使用data 会导致循环渲染,此外为何mode:mouth 会执行365次,year 会执行120次

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.

4 participants