平台兼容性
uni-app button组件
作者:jason-guo
说明
此组件基于官方button组件,主要增加了router方面的功能(具体参考官方路由接口)
组件使用
// template 使用
<j-button>按钮测试</j-button>
// 引入组件
import jasonButton from '@/components/jason-button/jason-button.vue'
// 注册组件
components: {
jasonButton
},
属性
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| url | String | 应用内的跳转链接,值为相对路径或绝对路径,如:"../first/first","/pages/first/first",注意不能加 .vue 后缀 | |
| router-type | String | navigate | 跳转方式 |
| delta | Number | 当 router-type 为 'navigateBack' 时有效,表示回退的层数 |
其它属性参考官方button组件
router-type 有效值:
| 值 | 说明 |
|---|---|
| navigate | 对应 uni.navigateTo 的功能 |
| redirect | 对应 uni.redirectTo 的功能 |
| switchTab | 对应 uni.switchTab 的功能 |
| reLaunch | 对应 uni.reLaunch 的功能 |
| navigateBack | 对应 uni.navigateBack 的功能 |
感谢
uni-app

收藏人数:
下载插件并导入HBuilderX
下载 143
赞赏 0
下载 10634968
赞赏 1792
赞赏
京公网安备:11010802035340号