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: carousel's pauseOnDotsHover not work #3519

Merged
merged 2 commits into from
Jan 14, 2021

Conversation

snowtreetree
Copy link
Contributor

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. Use Carousel, set autoplay, autoplaySpeed, pauseOnDotsHover.
  2. Hover on dots, it doesn't work.

API Realization (Optional if not new feature)

  1. show file changes.

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
  2. What will say in changelog?
  3. Does this PR contains potential break change or other risk?

Changelog description (Optional if not new feature)

  1. fix Carousel's prop of pauseOnDotsHover not work.
  2. 修复Carousel组件pauseOnDotsHover失效问题。

Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@ajuner
Copy link
Member

ajuner commented Jan 12, 2021

确认一下吧,试了一下pauseOnDotsHover是生效的

@snowtreetree
Copy link
Contributor Author

@snowtreetree
Copy link
Contributor Author

2021-01-12.11.39.31.mov

@ajuner
Copy link
Member

ajuner commented Jan 12, 2021

你这个demo是1.x版本的吧。。

@snowtreetree
Copy link
Contributor Author

https://codesandbox.io/s/nostalgic-water-juux5?file=/src/main.js
这个是2.0.0-rc.6版本的,你这边确认的时候是用的什么版本,😂。

@ajuner
Copy link
Member

ajuner commented Jan 12, 2021

https://codesandbox.io/s/pensive-nash-56xzn?file=/src/App.vue
神奇的问题,我这个是能停住的

@snowtreetree
Copy link
Contributor Author

snowtreetree commented Jan 12, 2021

image
@ajuner 好像单独用是可以的,再在外面多加一层就不行了。

@@ -635,7 +635,7 @@ export default {
dotProps = {
...dotProps,
clickHandler: this.changeSlide,
onMouseenter: pauseOnDotsHover ? this.onDotsLeave : noop,
onMouseenter: pauseOnDotsHover ? this.onDotsOver : noop,
Copy link
Member

Choose a reason for hiding this comment

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

I think we can delete onMouseenter event.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

确实,这块onMouseover和onMouseenter处理情况有重复的地方。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pauseOnHover 相关的 onMouseenter应该也可以删除,😂 。

@tangjinzhou
Copy link
Member

删掉那一行应该没什么问题

@tangjinzhou tangjinzhou merged commit b7943b3 into vueComponent:next Jan 14, 2021
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants