zTree_v3 icon indicating copy to clipboard operation
zTree_v3 copied to clipboard

async.otherParam支持函数

Open yuu2lee4 opened this issue 7 years ago • 4 comments

有时候有些参数是需要请求的时候动态生成的,比如传入当前请求的时间戳,所以建议async.otherParam支持传入函数,在请求的时候,执行这个函数得到请求参数

目前倒是可以在beforeAsync去设置

yuu2lee4 avatar Nov 03 '17 08:11 yuu2lee4

你好,请下载最新版的 zTree

setting.async.autoParam / otherParam 都支持 function 了,请测试一下, 如果没问题,请关闭 issue,谢谢。

zTree avatar Jan 06 '18 14:01 zTree

请问设置了contentType : application/json以后 otherParam 不支持function是什么原因,我自己写的获取不到。

Shhuy avatar Mar 10 '20 06:03 Shhuy

@Shhuy

  1. 检查你的 ztree 版本
  2. 检查 setting 设置
  3. 使用未压缩版本的 zTree js 文件进行调试
  4. 看看不支持 function 是报的什么错误

zTree avatar Mar 11 '20 08:03 zTree

otherParam 可否支持async函数?

anrananran avatar Mar 11 '22 08:03 anrananran