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

多个BasicTable组件 列参数互相影响的问题 #564

Closed
bhxf opened this issue May 6, 2021 · 1 comment
Closed

多个BasicTable组件 列参数互相影响的问题 #564

bhxf opened this issue May 6, 2021 · 1 comment

Comments

@bhxf
Copy link

bhxf commented May 6, 2021

列参数使用同一个变量 columns

先加载register的BasicTable组件

 <BasicTable @register="registerTable">
const [registerTable, {reload, getSelectRowKeys, getSelectRows, clearSelectedRowKeys}] = useTable({
      api: page,
      title: `${unref(title)}列表`,
      columns,
      rowKey: 'id',
      bordered: true,
      showTableSetting: true,
      rowSelection: {type: 'checkbox'},
      actionColumn: {
        width: 100,
        title: '操作',
        dataIndex: 'action',
        slots: {customRender: 'action'},
      },
    });

再加载props的BasicTable组件

 <BasicTable
        ref="members"
        row-key="memberId"
        :columns="memberColumns"
        :dataSource="members"
        :pagination="false"
      >

正确
截屏2021-05-06 上午10 31 45
错误
截屏2021-05-06 上午10 32 07

@bhxf
Copy link
Author

bhxf commented May 19, 2021

可以了多谢

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

2 participants