HomeDocs
Skip to main content

dlt.removeStorage

Introduction

Removes a specified key from the local cache.

Parameters

Object object

PropertyTypeDefaultRequiredDescription
keystringYesThe key of the item to be removed from the local cache.
successfunctionNoCallback function for a successful API call.
failfunctionNoCallback function for a failed API call.
completefunctionNoCallback function that will be executed when the API call is complete (both successful and failed calls).

object.success Callback Function

Parameters

Object res

PropertyTypeDescription
successstringtrue - successful

object.fail Callback Function

Parameters

Object res

PropertyTypeDescription
successstringfalse - failed

Example Code

// pages/index/index.js
Page({
removeStorage() {
dlt.removeStorage({
key: "key",
success: function (res) {
console.log(res);
},
});
},
});
Privacy agreementDeveloper agreementcontact us: developer_service.mi@transsion.com © 2024 MiniApp. All Rights Reserved.