We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用reloadColumn加载列配置时,如果配置了拖动列宽保存,会导致reloadColumn无法修改列顺序。如示例代码,我使用reverse反转列时如果开启 :custom-config="{ storage: { resizable: true, }, }"这个配置会导致无法将列反转
reloadColumn能正常修改列顺序
window11
最新Chrome
3.3.29
4.2.34
4.7.97
The text was updated successfully, but these errors were encountered:
<template> <div> <vxe-table ref="tableRef" :data="tableData" :cell-style="cellStyle" id="hdisubfdsbf" border :column-config="{ resizable: true }" :custom-config="{ storage: { resizable: true, }, }" > <vxe-column type="seq" width="70" /> <vxe-column field="name" title="Name" /> <vxe-column field="sex" title="Sex" /> <vxe-column field="age" title="Age" /> </vxe-table> <button @click="rever">反转</button> </div> </template> <script lang="ts" setup> import { ref, onMounted, nextTick } from "vue"; interface RowVO { id: number; name: string; role: string; sex: string; age: number; address: string; } const cloumn = ref([]); const tableRef = ref(); const cellStyle = (vals) => { // console.log(vals); }; const rever = () => { const cloumnData = cloumn.value.fullColumn.reverse(); tableRef.value.reloadColumn(cloumnData); }; const tableData = ref<RowVO[]>([ { id: 10001, name: "Test1", role: "Develop", sex: "Man", age: 28, address: "test abc", }, { id: 10002, name: "Test2", role: "Test", sex: "Women", age: 22, address: "Guangzhou", }, { id: 10003, name: "Test3", role: "PM", sex: "Man", age: 32, address: "Shanghai", }, { id: 10004, name: "Test4", role: "Designer", sex: "Women", age: 24, address: "Shanghai", }, ]); onMounted(() => { nextTick(() => { cloumn.value = tableRef.value.getTableColumn(); }); }); </script>
没有外链,贴一个简易demo
Sorry, something went wrong.
可以调用 resetColumn(true) 重置自定义数据
但是调用这个会导致列宽保存失效
No branches or pull requests
可复现的链接(包含复现链接与示例代码):
问题描述与截图:
使用reloadColumn加载列配置时,如果配置了拖动列宽保存,会导致reloadColumn无法修改列顺序。如示例代码,我使用reverse反转列时如果开启 :custom-config="{
storage: {
resizable: true,
},
}"这个配置会导致无法将列反转
期望的结果:
reloadColumn能正常修改列顺序
操作系统:
window11
浏览器版本:
最新Chrome
vue 版本:
3.3.29
vxe-pc-ui 版本:
4.2.34
vxe-table 版本:
4.7.97
是否使用当前最新版本?
The text was updated successfully, but these errors were encountered: