dlt.clearStorage
Introduction
Clears the local data cache.
Parameters
Object object
Property | Type | Default | Required | Description |
---|---|---|---|---|
success | function | No | Callback function for a successful API call. | |
fail | function | No | Callback function for a failed API call. | |
complete | function | No | Callback function that will be executed when the API call ends (both success and failure). |
object.success Callback Function
Parameters
Object res
Property | Type | Description |
---|---|---|
success | string | true-Set successfully. |
object.fail Callback Function
Parameters
Object res
Property | Type | Description |
---|---|---|
success | string | false-Set failed. |
Sample Code
// pages/index/index.js
Page({
clearStorage() {
dlt.clearStorage();
},
});