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

How to listen for scroll events?(n-layout-content) #1232

Closed
mzl1988 opened this issue Sep 24, 2021 · 2 comments · Fixed by #1296
Closed

How to listen for scroll events?(n-layout-content) #1232

mzl1988 opened this issue Sep 24, 2021 · 2 comments · Fixed by #1296
Assignees
Labels
feature request New feature or request priority: high

Comments

@mzl1988
Copy link

mzl1988 commented Sep 24, 2021

This function solves the problem (这个功能解决的问题)

How to listen for scroll events?

Expected API (期望的 API)

<n-layout-content @scroll="scrollChange"/>

@github-actions github-actions bot added the feature request New feature or request label Sep 24, 2021
@Volankey
Copy link
Collaborator

Volankey commented Sep 24, 2021

Because n-scrollbar is an internal components, we don't expose the api. It is recommended that you use ref to obtain dom to monitor scroll events.
Of course, if you find it troublesome, you can do it this way, See https://codesandbox.io/s/7djjy?file=/src/Demo.vue:1103-1117.

@07akioni
Copy link
Collaborator

07akioni commented Sep 24, 2021

Because n-scrollbar is an internal components, we don't expose the api. It is recommended that you use ref to obtain dom to monitor scroll events.
Of course, if you find it troublesome, you can do it this way, See https://codesandbox.io/s/7djjy?file=/src/Demo.vue:1103-1117.

We should expose scroll event. It's useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request priority: high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants