dlt.offTabReselected(function listener)
Introduction
Removes the event listener for tab button re-click events.
Usage Restrictions
Supported in the basic library version 4.0.0 or higher.
Parameters
function listener A function to set the result of removing the listener.
Parameters for the function listener
Object res
Property | Type | Description |
---|---|---|
success | string | "true" - Listener removal successful "false" - Listener removal failed |
errMsg | string | Returned when the removal fails; errMsg enumeration values: 1. Parameter error: T10001 2. set tab item failed, it's not a tab page: T10002 |
Example
// pages/index/index.js
Page({
onReady() {
dlt.onTabReselected(function (res) {
console.log('Listener setting result:', res);
});
},
});
In this example, the dlt.offTabReselected
function is used to remove the listener for the tab button re-click event.