更新记录
1.0.1(2023-07-28) 下载此版本
调整未传ownStyle带来的报错:Invalid default value for prop "ownStyle": Props with type Object/Array must use a factory function to return the default value.
1.0.0(2022-05-31) 下载此版本
- 首次更新
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | √ | √ | √ | √ | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
√ | √ | √ | √ | √ | √ | - | √ | √ | √ | √ |
其他
多语言 | 暗黑模式 | 宽屏模式 |
---|---|---|
× | × | √ |
yile-breadcrumb 面包屑
说明
面包屑导航,目的是为了帮助你追溯来路,让用户了解当前所处位置,以及当前页面在整个网站中的位置。
属性
参数 | 作用 | 类型 | 默认值 |
---|---|---|---|
nav | 内容数组 | Array | '' |
separator | 分隔符 | String | / |
size | 字体大小 | String, Number | 默认14px,支持rpx等格式,值为数字类型时格式默认px |
color | 字体颜色 | String | #6a6a6a |
actColor | 选中字体颜色 | String | #2979ff |
marginTop | 距离上一元素距离 | String, Number | 无默认值,支持rpx等格式,值为数字类型时格式默认px |
ownStyle | 自定义样式 | Object | 无默认值,格式{'font-weight':'bold'} |
nav格式如下
nav: [{
value: '首页', //名称
url: '', //链接
type: 'navigateTo', //跳转方式
isActive: true //选中状态
}, {
value: '在线客服',
url: '',
type: 'redirectTo'
}, {
value: '反馈中心',
url: '',
type: 'reLaunch'
}, {
value: '个人中心',
url: '',
type: 'switchTab'
}]
调用
-
基础
<template> <yile-breadcrumb :nav="nav"></yile-breadcrumb> </template>
-
颜色
<template> <yile-breadcrumb :nav="nav" color="#999999"></yile-breadcrumb> </template>
-
自定义分隔符
<template> <yile-breadcrumb :nav="nav" separator=">"></yile-breadcrumb> </template>
-
选中字体颜色
<template> <yile-breadcrumb :nav="nav" actColor="#ff0000"></yile-breadcrumb> </template>
-
字体大小
<template> <yile-breadcrumb :nav="nav" size="16"></yile-breadcrumb> </template>
-
距离上一元素距离
<template> <yile-breadcrumb :nav="nav" marginTop="20"></yile-breadcrumb> </template>