dlt.setNavigationBarTransparent
Introduction
Sets the navigation bar to be transparent.
Parameters
Object object
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| enable | boolean | false | No | Set the navigation bar to be transparent. Possible values: true, false. |
| 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 is complete (both successful and failed calls). |
Example Code
// pages/index/index.js
Page({
onLoad() {
dlt.setNavigationBarTransparent({
enable: true,
success: function () {
console.log("成功");
},
fail: function () {
console.log("失败");
},
});
},
});