table 组件问题
当使用了表头分组, 同时为表头设置了resizable 后。 拖拽修改列宽时失败。 控制台报错: Uncaught TypeError: Cannot read property 'width' of undefined at HTMLDocument.handleMouseUp (table-head.vue?b2a7:308) 查看源码发现const _column = table.columns.find(item => item.__id === column.__id); 这里没有考虑表头分组的情况,导致_column 为空
我也遇到这个问题,请问你解决了吗?
你好: iview 源码里没有考虑 column 存在children的情况,所以我的解决办法是, 修改源码 table-head.vue 这个文件的 300 - 310 之间的 const _column = table.columns.find(item => item.__id === column.__id); 改成一个递归find, 只要column 有children 属性,就进行递归find,直到找到符合条件的column
| | 孙文龙 | | [email protected] | 签名由网易邮箱大师定制 在2020年4月30日 13:42,d-coder[email protected] 写道:
我也遇到这个问题,请问你解决了吗?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
@sunwld 按你说的方法,我已经弄好了。多谢!
@dantelife 你好我也碰到了这个问题,我想问一下具体怎么改。可以发一下代码吗,谢谢
@codermino 不好意思,我已经忘了具体怎么改的了,因为我已经很久不用iview了。
好的,我已经改出来了,非常感谢你,谢谢。
------------------ 原始邮件 ------------------ 发件人: "view-design/ViewUI" @.>; 发送时间: 2021年7月19日(星期一) 上午9:25 @.>; @.@.>; 主题: Re: [view-design/ViewUI] table 组件问题 (#420)
@codermino 不好意思,我已经忘了具体怎么改的了,因为我已经很久不用iview了。
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.