1
This commit is contained in:
37
uview-plus/components/u-tabbar-item/props.js
Normal file
37
uview-plus/components/u-tabbar-item/props.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// item标签的名称,作为与u-tabbar的value参数匹配的标识符
|
||||
name: {
|
||||
type: [String, Number, null],
|
||||
default: () => defProps.tabbarItem.name
|
||||
},
|
||||
// uView内置图标或者绝对路径的图片
|
||||
icon: {
|
||||
icon: String,
|
||||
default: () => defProps.tabbarItem.icon
|
||||
},
|
||||
// 右上角的角标提示信息
|
||||
badge: {
|
||||
type: [String, Number, null],
|
||||
default: () => defProps.tabbarItem.badge
|
||||
},
|
||||
// 是否显示圆点,将会覆盖badge参数
|
||||
dot: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tabbarItem.dot
|
||||
},
|
||||
// 描述文本
|
||||
text: {
|
||||
type: String,
|
||||
default: () => defProps.tabbarItem.text
|
||||
},
|
||||
// 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
|
||||
badgeStyle: {
|
||||
type: [Object, String],
|
||||
default: () => defProps.tabbarItem.badgeStyle
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
20
uview-plus/components/u-tabbar-item/tabbarItem.js
Normal file
20
uview-plus/components/u-tabbar-item/tabbarItem.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:22:55
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbarItem.js
|
||||
*/
|
||||
export default {
|
||||
//
|
||||
tabbarItem: {
|
||||
name: null,
|
||||
icon: '',
|
||||
badge: null,
|
||||
dot: false,
|
||||
text: '',
|
||||
badgeStyle: 'top: 6px;right:2px;'
|
||||
}
|
||||
}
|
||||
158
uview-plus/components/u-tabbar-item/u-tabbar-item.vue
Normal file
158
uview-plus/components/u-tabbar-item/u-tabbar-item.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user