| 客户端 | Android | iOS |
|---|---|---|
| 支持说明 | Android 4.2 以上 | iOS 8 以上 |
import { MMKV } from "@yl/super-jssdk";
MMKV.clearAll(optional);
| 参数 | 类型 | 必填 | 作用 |
|---|---|---|---|
| optional | Object | 否 | 选填参数 |
optional
| 参数 | 类型 | 必填 | 作用 |
|---|---|---|---|
| mmkvId | string | 否 | 唯一标识,如果此值为空则为默认标识 com.mysoft.appcloud |
| 参数 | 类型 | 作用 |
|---|---|---|
| resolve | Function | 删除数据成功回调 |
| reject(err) | Function | 删除数据失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"} |
MMKV.clearAll()
.then((res) => {
console.log("success", res);
})
.catch((err) => {
console.log("fail", err);
});