diff --git a/docs/plugin/uts-plugin.md b/docs/plugin/uts-plugin.md index ed2ae5bb87620b2fafb5038e79a96b5d4417a126..add24f943ffd09e31acca83a83a1c7723e7813d6 100644 --- a/docs/plugin/uts-plugin.md +++ b/docs/plugin/uts-plugin.md @@ -688,6 +688,16 @@ export function postUserInfo(user:UTSJSONObject){ } ``` +需要注意的是,如果声明为any, vue环境中的Object 在UTS环境中也会被 UTSJSONObjct. 也就是说上面的代码同样可以写作 + +```ts +// UTSJSONObjct 数据类型示例-2 +export function postUserInfo(user:any){ + console.log(user); +} +``` + + ```js // uni-app 调用代码 postUserInfo({ @@ -701,6 +711,7 @@ postUserInfo({ ``` + 更多UTSJSONObject的用法,[详见](../uts/data-type.md#UTSJSONObject) 遗留问题: