tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
https://www.naiveui.com
MIT License
16.3k stars 1.68k forks source link

DataTable的scrollbar-props属性设置不生效 #6456

Open Lee-shung opened 1 month ago

Lee-shung commented 1 month ago

描述错误

DataTable的scrollbar-props属性设置不生效

复现步骤

<n-data-table :columns="columns" :data="data" :pagination="pagination" :max-height="250" :scroll-x="1800" :scrollbar-props="{ size: 20, 'x-scrollable': true }" />

最小复现链接

https://codesandbox.io/p/sandbox/angry-swanson-qxzrpx?file=%2Fsrc%2FDemo.vue%3A11%2C7

系统信息

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 AMD Ryzen 5 4600H with Radeon Graphics
    Memory: 4.99 GB / 15.87 GB
  Binaries:
    Node: 18.20.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.3.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74), ChromiumDev (127.0.2610.3)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    naive-ui: ^2.40.1 => 2.40.1
    vue: ^3.4.21 => 3.4.21

使用的包管理器

pnpm

验证

jahnli commented 1 month ago

size 被移除了

Lee-shung commented 1 month ago

我该如何设置某一个滚动条的高度或者宽度

jahnli commented 1 month ago

通过主题或 https://www.naiveui.com/zh-CN/os-theme/components/scrollbar#custom.vue