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

NDataTable同时设置 flex-height virtual-scroll 时,进行列宽拖拽超出可视区时没有显示滚动条 #6775

Open
zhangjiemiss opened this issue Feb 23, 2025 · 0 comments

Comments

@zhangjiemiss
Copy link

以下是我的操作:

  1. 先拖到 Length 列到可视区边界
  2. 其次在拖 Title 列,让 Length列超出可视区

以下是我的代码:

<script setup lang="ts">
import type { DataTableColumns } from 'naive-ui';

const columns = shallowRef<DataTableColumns<any>>([
  {
    title: 'No',
    key: 'no',
    width: 50
  },
  {
    title: 'Title',
    key: 'title',
    resizable: true
  },
  {
    title: 'Length',
    key: 'length',
    resizable: true
  },
  {
    title: 'Action',
    key: 'actions'
  }
]);

const data = shallowRef<any[]>([
  { no: 3, title: 'Wonderwall', length: '4:18' },
  { no: 4, title: "Don't Look Back in Anger", length: '4:48' },
  { no: 12, title: 'Champagne Supernova', length: '7:27' }
]);
</script>

<template>
  <NDataTable
    virtual-scroll
    flex-height
    :virtual-scroll-x="false"
    :columns="columns"
    :data="data"
    :pagination="false"
    :bordered="false" />
</template>

<style lang="scss" scoped></style>

出现的问题:

  1. Length 列 超出可视区没有出现滚动条,Length 列就看不到了
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

No branches or pull requests

1 participant