uniapp open-type
时间: 2023-10-03 13:09:51 浏览: 78
open-type is a property in Uniapp that allows you to define the behavior of a component when it is clicked or tapped. The open-type property is commonly used for buttons and links.
There are several values that can be assigned to the open-type property:
- navigate: opens a new page within the app when clicked
- redirect: replaces the current page with a new page when clicked
- switchTab: switches to a different tab within the app when clicked
- reLaunch: replaces all pages with a new page when clicked
- navigateBack: goes back to the previous page when clicked
- exit: closes the app when clicked (only available on certain platforms)
For example, if you have a button that you want to use to navigate to a new page within your app, you would set the open-type property to "navigate". When the button is clicked, Uniapp will open the designated page.