Home  >  Article  >  Web Front-end  >  How to remove the three dots in the upper right corner in uniapp

How to remove the three dots in the upper right corner in uniapp

PHPz
PHPzOriginal
2023-04-27 09:03:112280browse

With the rapid development of Uniapp, more and more developers choose to use this tool to develop their own applications. However, when using Uniapp to develop applications, many developers will encounter a common problem, which is how to remove the three dots in the upper right corner of the application.

There are different solutions to this problem. Below we will introduce several methods to remove the three dots in the upper right corner.

Method 1: Configure in the manifest.json file

You can configure it in the manifest.json file and remove the three dots in the upper right corner. The specific steps are as follows:

1. In manifest.json, find the "h5" node and add the following configuration:

"custom": {

"titleNView": false

}

The function of this code is to disable the native navigation bar of the current page. After adding the above configuration, the three dots in the upper right corner will disappear.

2. If you need to enable the native navigation bar, you can use the following code:

"custom": {

"titleNView": {
    "buttons":[],
    "titleColor":"#fff",
    "titleText":"标题"
}

}

The above code will be customized Title bar, title color is white, title is "Title".

Method 2: Using mui style

When using mui style, you can directly use the following code to remove the three dots in the upper right corner:

/Remove the three dots in the upper right corner Point/
.mui-action-menu {

display: none!important;

}

The function of this code is to hide the element with the class name "mui-action-menu". The class name is the style class name with three dots in the upper right corner.

Method 3: Use css style

Use the following code in css to remove the three dots in the upper right corner:

/Remove the three dots in the upper right corner/
.plus-header .uni-page-head {

padding-right: 0!important;

}

The function of the above code is to change the right side of the head style provided by uni-app itself. The padding value is set to 0, causing the three points in the upper right corner to disappear.

Summary

The above are the three methods to remove the three points in the upper right corner. Each method has its own characteristics, and the specific use depends on the situation. It should be noted that before performing any operation, the original code should be backed up to avoid losses during operation.

The above is the detailed content of How to remove the three dots in the upper right corner in uniapp. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn