HomeDocs
Skip to main content

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

PropertyTypeDescription
successstring"true" - Listener removal successful
"false" - Listener removal failed
errMsgstringReturned 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.

Privacy agreementDeveloper agreementcontact us: developer_service.mi@transsion.com © 2024 MiniApp. All Rights Reserved.