关于加载项自定义函数,互相调用出错的问题
function test1(a,b){
return a+b
}
wps.AddCustomFunction("y", "test1", test1 , {
description: `调用测试`,
result: { type: "any" },
parameters: [
{ name: "a", type: "any", description: "" },
{ name: "b", type: "any", description: "" },
]
})
function test2(a,b){
return a-b
}
wps.AddCustomFunction("y", "test2", test2 , {
description: `调用测试`,
result: { type: "any" },
parameters: [
{ name: "a", type: "any", description: "" },
{ name: "b", type: "any", description: "" },
]
})
我在加载项里定义2个函数,当函数输入为另一个函数的计算值时,经常会报错,这怎么解决?需要手动重新计算。

