VTable icon indicating copy to clipboard operation
VTable copied to clipboard

[Bug] 动态将 rightFrozenColCount 改小报错

Open zhiaiing opened this issue 9 months ago • 1 comments

Version

1.17.4

Link to Minimal Reproduction

https://www.visactor.com/vtable/demo/interaction/move-row-position?version=1.17.4

Steps to Reproduce

Image

let tableInstance;
fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_data.json')
  .then(res => res.json())
  .then(data => {
    const columns = [
      {
        field: 'Order ID',
        title: 'Order ID',
        width: 'auto'
      },
      {
        field: 'Customer ID',
        title: 'Customer ID',
        width: 'auto'
      },
      {
        field: 'Product Name',
        title: 'Product Name',
        width: 'auto'
      },
      {
        field: 'Category',
        title: 'Category',
        width: 'auto'
      },
      {
        field: 'Sub-Category',
        title: 'Sub-Category',
        width: 'auto'
      },
      {
        field: 'Region',
        title: 'Region',
        width: 'auto'
      },
      {
        field: 'City',
        title: 'City',
        width: 'auto'
      },
      {
        field: 'Order Date',
        title: 'Order Date',
        width: 'auto'
      },
      {
        field: 'Quantity',
        title: 'Quantity',
        width: 'auto'
      },
      {
        field: 'Sales',
        title: 'Sales',
        width: 'auto'
      },
      {
        field: 'Profit',
        title: 'Profit',
        width: 'auto'
      }
    ];

    const option = {
      records: data,
      columns,
      widthMode: 'standard',
      rightFrozenColCount: 2,
      rowSeriesNumber: {
        title: '序号',
        dragOrder: true,
        width: 'auto',
        headerStyle: {
          color: 'black',
          bgColor: 'pink'
        },
        style: {
          color: 'red'
        }
      }
    };
    tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID), option);
    window['tableInstance'] = tableInstance;
  });

执行 window['tableInstance'].rightFrozenColCount = 1; 报错

Current Behavior

动态将 rightFrozenColCount值 改小报错

Expected Behavior

rightFrozenColCount 设置正确

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

zhiaiing avatar Apr 01 '25 11:04 zhiaiing

有frozenColCount直接修改的接口 这个可能没有吧 可以跟踪下代码 看看 修复问题提pr给我们哈 有疑问的地方可以加群交流

Image

fangsmile avatar Apr 02 '25 02:04 fangsmile