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

feat(n-layout): add scroll event #1296

Merged
merged 2 commits into from
Oct 9, 2021
Merged

feat(n-layout): add scroll event #1296

merged 2 commits into from
Oct 9, 2021

Conversation

Volankey
Copy link
Collaborator

@Volankey Volankey commented Oct 8, 2021

Close #1232

@vercel
Copy link

vercel bot commented Oct 8, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tusimple/naive-ui/4vNTEC6csxJaifUY2RHxGmGWeYwa
✅ Preview: https://naive-ui-git-fork-volankey-1232-tusimple.vercel.app

@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #1296 (5200e0e) into main (3363200) will not change coverage.
The diff coverage is n/a.

❗ Current head 5200e0e differs from pull request most recent head 92690af. Consider uploading reports for the commit 92690af to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1296   +/-   ##
=======================================
  Coverage   51.90%   51.90%           
=======================================
  Files         529      529           
  Lines       13109    13109           
  Branches     3737     3737           
=======================================
  Hits         6804     6804           
  Misses       5179     5179           
  Partials     1126     1126           
Impacted Files Coverage Δ
src/layout/src/Layout.tsx 66.66% <ø> (ø)
src/layout/src/LayoutSider.tsx 39.70% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3363200...92690af. Read the comment docs.

@@ -72,6 +73,7 @@ scroll-to
| trigger-style | `string \| Object` | `undefined` | Trigger style. |
| width | `number \| string` | `272` | Width CSS value. When it is number, px will be added. |
| on-update:collapsed | `(collapsed: boolean) => void` | `undefined` | Callback function when the folding state changes. |
| on-scroll | `(e: Event) => void` | `undefined` | Callback function when the content scroll. |
Copy link
Collaborator

Choose a reason for hiding this comment

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

u > s

@@ -34,6 +34,7 @@ scroll-to
| embedded | `boolean` | `false` | Use darker background to show a embedded effect. Only work for light theme. |
| has-sider | `boolean` | `false` | Whether the component has sider inside. If so it must be `true`. |
| native-scrollbar | `boolean` | `true` | Whether to use native scrollbar on itself. If set to `false`, layout will use a naive-ui style scrollbar for content. |
| on-scroll | `(e: Event) => void` | `undefined` | Callback function when the content scroll. |
Copy link
Collaborator

Choose a reason for hiding this comment

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

事件放在最后面

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 this pull request may close these issues.

How to listen for scroll events?(n-layout-content)
3 participants