nebulasio / wiki

This repository is out of date, please check the new wiki:
http://wiki.nebulas.io/en/latest/
GNU General Public License v3.0
421 stars 154 forks source link

传递参数时,是否支持列表传入? #134

Closed leyle closed 6 years ago

leyle commented 6 years ago

比如 ["args1", "args2", "[\"l1\", \"l2\"]", "args4"]

smartpunter commented 6 years ago

You can pass any valid javascript data. calling method testMethod with params ["args1", "args2", ["l1", "l2"], "args4"]

testMethod = function (arg1, arg2, arg3, arg4){ // Here arg3[1] === "l2" }

yupnano commented 6 years ago

the argument should be a JSON string of args array, you can use JSON.stringify to generate a string as your argument. Take your ["args1", "args2", "["l1", "l2"]", "args4"] as an example: qq 20180513024328