feat:设备使用记录
This commit is contained in:
@@ -18,6 +18,11 @@ export const props = defineMixin({
|
||||
type: Boolean,
|
||||
default: () => defProps.tabbar.border
|
||||
},
|
||||
// 上方边框颜色
|
||||
borderColor: {
|
||||
type: String,
|
||||
default: () => defProps.tabbar.borderColor
|
||||
},
|
||||
// 元素层级z-index
|
||||
zIndex: {
|
||||
type: [String, Number],
|
||||
@@ -42,6 +47,11 @@ export const props = defineMixin({
|
||||
placeholder: {
|
||||
type: Boolean,
|
||||
default: () => defProps.tabbar.placeholder
|
||||
},
|
||||
// 背景色
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: () => defProps.tabbar.backgroundColor
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @version : 3.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:22:40
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbar.js
|
||||
* @LastAuthor : jry
|
||||
* @lastTime : 2025-12-19 08:55:21
|
||||
* @FilePath : /uview-plus/libs/config/props/tabbar.js
|
||||
*/
|
||||
export default {
|
||||
// tabbar
|
||||
@@ -17,6 +17,8 @@ export default {
|
||||
activeColor: '#1989fa',
|
||||
inactiveColor: '#7d7e80',
|
||||
fixed: true,
|
||||
placeholder: true
|
||||
placeholder: true,
|
||||
borderColor: '',
|
||||
backgroundColor: ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/**
|
||||
* Tabbar 底部导航栏
|
||||
* @description 此组件提供了自定义tabbar的能力。
|
||||
* @tutorial https://ijry.github.io/uview-plus/components/tabbar.html
|
||||
* @tutorial https://uview-plus.jiangruyi.com/components/tabbar.html
|
||||
* @property {String | Number} value 当前匹配项的name
|
||||
* @property {Boolean} safeAreaInsetBottom 是否为iPhoneX留出底部安全距离(默认 true )
|
||||
* @property {Boolean} border 是否显示上方边框(默认 true )
|
||||
@@ -42,6 +42,7 @@
|
||||
* @property {String} inactiveColor 未选中标签的颜色(默认 '#7d7e80' )
|
||||
* @property {Boolean} fixed 是否固定在底部(默认 true )
|
||||
* @property {Boolean} placeholder fixed定位固定在底部时,是否生成一个等高元素防止塌陷(默认 true )
|
||||
* @property {String} backgroundColor 背景色(默认 '#ffffff' )
|
||||
* @property {Object} customStyle 定义需要用到的外部样式
|
||||
*
|
||||
* @example <u-tabbar :value="value2" :placeholder="false" @change="name => value2 = name" :fixed="false" :safeAreaInsetBottom="false"><u-tabbar-item text="首页" icon="home" dot ></u-tabbar-item></u-tabbar>
|
||||
@@ -59,6 +60,12 @@
|
||||
const style = {
|
||||
zIndex: this.zIndex
|
||||
}
|
||||
if (this.borderColor) {
|
||||
style.borderColor = this.borderColor + ' !important'
|
||||
}
|
||||
if (this.backgroundColor) {
|
||||
style.backgroundColor = this.backgroundColor
|
||||
}
|
||||
// 合并来自父组件的customStyle样式
|
||||
return deepMerge(style, addStyle(this.customStyle))
|
||||
},
|
||||
@@ -117,7 +124,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../libs/css/components.scss";
|
||||
|
||||
.u-tabbar {
|
||||
@include flex(column);
|
||||
|
||||
Reference in New Issue
Block a user