diff --git a/docs/api/event-bus.md b/docs/api/event-bus.md index 732e40e54db95923c9a3a2f7c45ada9daf41aa53..4e608c3fc1b1f85e9edaec5146fb8c47976a2096 100644 --- a/docs/api/event-bus.md +++ b/docs/api/event-bus.md @@ -48,6 +48,14 @@ + +:::warning +参数 `args` 为对象字面量时,需要通过 `as UTSJSONObject` 明确类型,例如: +```js +uni.$emit('fn', {"a": 1} as UTSJSONObject) +``` +::: + diff --git a/docs/api/storage.md b/docs/api/storage.md index c6e9ce4f426aaa1e0985ceb9c49c60a4ecb5cc49..ec1bbe527dcee9f786fc63ff06a7e24885d98b8f 100644 --- a/docs/api/storage.md +++ b/docs/api/storage.md @@ -37,6 +37,13 @@ uni-app的Storage在不同端的实现不同: +:::warning +参数 `data` 为对象字面量时,需要通过 `as UTSJSONObject` 明确类型,例如: +```js +uni.setStorageSync('obj', {"a": 1} as UTSJSONObject) +``` +::: +