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
疑是 BUG
v2.9.9
加载树形表格后,第一次点开任意节点及下级节点时,都是正常展开的,点击哪个就展开哪个,当展开第二个或者第三个...第N个节点时,会自动展开下级节点,不是展开所有下级节点,是随机展开其中一个节点。树形表格数据是异步加载的。 一开始使用的是v2.9.0版本,升级到v2.9.9后问题同样存在。不确定是我使用问题还是bug问题,请指导,感谢!
var inst = treeTable.render({ elem: '#list', id: 'list', // url: HOST + '/tree/data', url: HOST + '/tree/data' + (category ? '?category=' + category : ''), tree: { // 异步加载子节点 async: { enable: true, url: HOST + '/tree/data', autoParam: ["pid","id","type"] }, customName: { isParent: 'isparent', pid: 'pid', }, view: { showIcon: false }, }, height: 'full-35', // 最大高度减去其他容器已占有的高度差 cols: [[ {field: 'name', title: '标题', minWidth:500, templet: function(row) { var title = row.name; var tmpTitle = title.replace(/【加急】/g, "<span style='color: red;'>【加急】</span>"); tmpTitle = tmpTitle.replace(/【特急】/g, "<span style='color: red;'>【特急】</span>"); if (row.type === '3'){ return '<span style="color:#4D83AA;" lay-event="openProcess" href="javascript:void(0);">' + tmpTitle + '</span>' }else { return '<span style="color:#4D83AA;" href="javascript:void(0);">' + tmpTitle + '</span>' } }}, {field: 'todo_time', title: '转发时间', align: 'center', width: 200}, {title: '操作', width: 200, align: 'center', toolbar: '#barDemo'}, ]], }); //监听单击展开事件 treeTable.on('row(list)', function (obj) { console.log(obj.data) //得到当前行数据 console.log('index: obj.data.LAY_DATA_INDEX', obj.data.LAY_DATA_INDEX) //得到当前行数据 if (obj.data.LAY_EXPAND){ //收缩 treeTable.expandNode('list',{ inherit: false, index: obj.data.LAY_DATA_INDEX, expandFlag: !obj.data.LAY_EXPAND // 展开or收缩 }) }else { treeTable.expandNode('list',{ inherit: false, //展开 index: obj.data.LAY_DATA_INDEX, expandFlag: !obj.data.LAY_EXPAND // 展开or收缩 }) } });
版本 124.0.6367.202(正式版本) (x86_64)
No response
The text was updated successfully, but these errors were encountered:
@airujingye 你好,请提供一个最小化的重现,以便我们为你协助排查问题。良好的重现应当包括但不仅限于:
详见:🍀 Layui Issue 贡献指南 延伸:👉 为什么要提供最小化重现?
Sorry, something went wrong.
由于超过 3 天仍未收到相关重现或其他更多信息,该 issue 已被自动关闭。
No branches or pull requests
议题条件
议题类型
疑是 BUG
使用版本
v2.9.9
问题描述
加载树形表格后,第一次点开任意节点及下级节点时,都是正常展开的,点击哪个就展开哪个,当展开第二个或者第三个...第N个节点时,会自动展开下级节点,不是展开所有下级节点,是随机展开其中一个节点。树形表格数据是异步加载的。
一开始使用的是v2.9.0版本,升级到v2.9.9后问题同样存在。不确定是我使用问题还是bug问题,请指导,感谢!
业务代码
截图补充
浏览器
版本 124.0.6367.202(正式版本) (x86_64)
演示地址
No response
友好承诺
The text was updated successfully, but these errors were encountered: