MineAdmin-Vue icon indicating copy to clipboard operation
MineAdmin-Vue copied to clipboard

关于表格隐藏和非隐藏列的bug

Open PandaJu opened this issue 1 year ago • 1 comments

在表格的设置里,把某一列隐藏再取消隐藏后,这一列还是被隐藏着的

image

PandaJu avatar Jul 22 '24 07:07 PandaJu

src/components/ma-crud/components/setting.vue

//强制刷新下columns的内容 const changeColumn = (ev, type, name) => { const column = columns.value.find(item => item.dataIndex === name) switch (type) { case 'order': if (ev === 'page') { column.sortable = { sortDirections: ['ascend', 'descend'], sorter: false } } else if (ev === 'serve') { column.sortable = { sortDirections: ['ascend', 'descend'], sorter: true } } else { column.sortable = undefined } break } // 强制刷新 columns columns.value = [...columns.value]; }

westng avatar Aug 12 '24 09:08 westng

Hi, @PandaJu. I'm Dosu, and I'm helping the MineAdmin-Vue team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a bug where a column in the table settings remains hidden despite attempts to unhide it.
  • User westng provided a code snippet from src/components/ma-crud/components/setting.vue.
  • The snippet includes a changeColumn function that updates sortable properties and refreshes the columns array.
  • The issue appears to be resolved with the provided code snippet.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the MineAdmin-Vue repository. If so, you can keep the discussion open by commenting here.
  • Otherwise, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Nov 11 '24 16:11 dosubot[bot]