zTree_v3 icon indicating copy to clipboard operation
zTree_v3 copied to clipboard

调用reAsyncChildNodes函数有时不起作用啊

Open DylanXu2018 opened this issue 6 years ago • 5 comments

type = "refresh";
silent = false;
var purviewNode = zTree.getNodeByParam("id", parentId); zTree.setting.async.otherParam = {"parentId": parentId}; zTree.reAsyncChildNodes(purviewNode, type, silent);

DylanXu2018 avatar Jun 19 '19 03:06 DylanXu2018

请准确描述不起作用的具体现象,是代码出错? 不触发异步请求?还是其他什么的?请自己先单步调试,仔细检查一下

zTree avatar Jun 27 '19 01:06 zTree

我根据父节点查询子节点后,子节点没有刷新

------------------ 原始邮件 ------------------ 发件人: "zTree"[email protected]; 发送时间: 2019年6月27日(星期四) 上午9:06 收件人: "zTree/zTree_v3"[email protected]; 抄送: "漂流者"[email protected];"Author"[email protected]; 主题: Re: [zTree/zTree_v3] 调用reAsyncChildNodes函数有时不起作用啊 (#411)

请准确描述不起作用的具体现象,是代码出错? 不触发异步请求?还是其他什么的?请自己先单步调试,仔细检查一下

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

DylanXu2018 avatar Jun 27 '19 02:06 DylanXu2018

对照 Demo (http://www.treejs.cn/v3/demo.php#_109) 比较一下,看看你返回的数据是否有问题,代码使用上有没有什么问题

zTree avatar Jul 09 '19 10:07 zTree

reAsyncChildNodes的回调函数没有执行,试了好多次。但全局回调执行了

hhzhaoheng avatar Nov 22 '19 09:11 hhzhaoheng

@hhzhaoheng 1、检查 zTree 版本 2、检查 setting 配置是否正确 3、检查异步加载是否正常 4、检查是否有 js 报错 5、学习使用调试工具进行单步调式(使用 zTree 未压缩代码 )

zTree avatar Nov 22 '19 10:11 zTree