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

n-tree中通过scrollbar-props属性设置on-scroll回调失效 #6669

Open
5 tasks done
txzh007 opened this issue Jan 2, 2025 · 1 comment · May be fixed by #6678
Open
5 tasks done

n-tree中通过scrollbar-props属性设置on-scroll回调失效 #6669

txzh007 opened this issue Jan 2, 2025 · 1 comment · May be fixed by #6678
Labels
untriaged need to sort

Comments

@txzh007
Copy link

txzh007 commented Jan 2, 2025

描述错误

tree组件无法获取滚动回调

复现步骤

给tree组件scrollbar-props属性加入on-scroll 回调,发现不生效

最小复现链接

https://codesandbox.io/p/sandbox/bold-silence-c42sg5?file=%2Fsrc%2FDemo.vue%3A9%2C16

系统信息

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz  
    Memory: 11.93 GB / 47.89 GB
  Binaries:
    Node: 20.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.11.0 - ~\AppData\Local\pnpm\pnpm.EXE
  Browsers:
    Chrome: 131.0.6778.109
    Edge: Spartan (44.19041.1266.0), Chromium (127.0.2651.74)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    naive-ui: ^2.40.4 => 2.40.4 
    vue: ^3.4.27 => 3.5.8

使用的包管理器

npm

验证

@txzh007 txzh007 added the untriaged need to sort label Jan 2, 2025
@FuYou00
Copy link

FuYou00 commented Jan 4, 2025

需要给 n-tree 加上 virtual-scroll Prop 然后给上固定高度才会有滚动条吧,不过 我看了一下 有了滚动条也没触发on-scroll 回调

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants