diff --git a/dist/tab-bar/index.js b/dist/tab-bar/index.js index b2bcaf66..3b41594a 100644 --- a/dist/tab-bar/index.js +++ b/dist/tab-bar/index.js @@ -1 +1 @@ -import eventUtil from"../core/utils/event-util";Component({properties:{bgColor:{type:String,value:null},bgImg:{type:String,value:null},selectedIndex:{type:Number,value:0},list:{type:Array,value:[]},textSelectedColor:{type:String,value:"#3963bc"},textColor:{type:String,value:"#666"}},pageLifetimes:{show:function(){this.parseCurrentPage()}},methods:{parseCurrentPage(){const t="/"+getCurrentPages()[0].route,e=this.data.list;let i;for(let a=0;a - + {{item.text}} diff --git a/dist/tab-bar/index.wxss b/dist/tab-bar/index.wxss index fd9dedca..e7ef8e47 100644 --- a/dist/tab-bar/index.wxss +++ b/dist/tab-bar/index.wxss @@ -1 +1 @@ -.lu-tab-bar{left:0;right:0;bottom:0;position:fixed;z-index:9999;width:750rpx;height:106rpx;display:flex;background-color:#fff;background-size:100% 100%;background-repeat:no-repeat;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-wrapper{display:flex;height:100%;justify-content:center;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.lu-tab-bar__item-image{display:block;width:52rpx;height:52rpx}.lu-tab-bar__item-text{margin-top:4rpx;font-size:24rpx;line-height:1} \ No newline at end of file +.lu-tab-bar{left:0;right:0;bottom:0;position:fixed;z-index:9999;width:750rpx;height:106rpx;display:flex;background-color:#fff;background-size:100% 100%;background-repeat:no-repeat;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-wrapper{display:flex;height:100%;justify-content:center;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.lu-tab-bar__item-image{display:block;width:52rpx;height:52rpx}.lu-tab-bar__item-text{margin-top:4rpx;font-size:24rpx;line-height:1}.lu-tab-bar__item-text--selected{color:#3963bc} \ No newline at end of file diff --git a/examples/dist/tab-bar/index.js b/examples/dist/tab-bar/index.js index 42e76e8d..03641fea 100644 --- a/examples/dist/tab-bar/index.js +++ b/examples/dist/tab-bar/index.js @@ -24,7 +24,7 @@ Component({ // 文字选中颜色 textSelectedColor: { type: String, - value: '#3963bc' + value: '' }, // 文字未选中颜色 textColor: { diff --git a/examples/dist/tab-bar/index.wxml b/examples/dist/tab-bar/index.wxml index 3869b1ff..1d4a8102 100644 --- a/examples/dist/tab-bar/index.wxml +++ b/examples/dist/tab-bar/index.wxml @@ -7,7 +7,7 @@ - + {{item.text}} diff --git a/examples/dist/tab-bar/index.wxss b/examples/dist/tab-bar/index.wxss index fd9dedca..e7ef8e47 100644 --- a/examples/dist/tab-bar/index.wxss +++ b/examples/dist/tab-bar/index.wxss @@ -1 +1 @@ -.lu-tab-bar{left:0;right:0;bottom:0;position:fixed;z-index:9999;width:750rpx;height:106rpx;display:flex;background-color:#fff;background-size:100% 100%;background-repeat:no-repeat;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-wrapper{display:flex;height:100%;justify-content:center;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.lu-tab-bar__item-image{display:block;width:52rpx;height:52rpx}.lu-tab-bar__item-text{margin-top:4rpx;font-size:24rpx;line-height:1} \ No newline at end of file +.lu-tab-bar{left:0;right:0;bottom:0;position:fixed;z-index:9999;width:750rpx;height:106rpx;display:flex;background-color:#fff;background-size:100% 100%;background-repeat:no-repeat;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-wrapper{display:flex;height:100%;justify-content:center;padding-bottom:constant(safe-area-inset-bottom)!important;padding-bottom:env(safe-area-inset-bottom)!important}.lu-tab-bar__item-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.lu-tab-bar__item-image{display:block;width:52rpx;height:52rpx}.lu-tab-bar__item-text{margin-top:4rpx;font-size:24rpx;line-height:1}.lu-tab-bar__item-text--selected{color:#3963bc} \ No newline at end of file diff --git a/package.json b/package.json index f564b1f6..5202beab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lin-ui", - "version": "0.9.11", + "version": "0.9.12", "description": "A high quality UI components library with MiniProgram", "main": "app.js", "directories": { diff --git a/src/tab-bar/index.js b/src/tab-bar/index.js index 42e76e8d..03641fea 100644 --- a/src/tab-bar/index.js +++ b/src/tab-bar/index.js @@ -24,7 +24,7 @@ Component({ // 文字选中颜色 textSelectedColor: { type: String, - value: '#3963bc' + value: '' }, // 文字未选中颜色 textColor: { diff --git a/src/tab-bar/index.less b/src/tab-bar/index.less index 0b825958..bb106e42 100644 --- a/src/tab-bar/index.less +++ b/src/tab-bar/index.less @@ -45,3 +45,7 @@ font-size: 24rpx; line-height: 1; } + +.@{component}__item-text--selected { + color: @theme-color; +} \ No newline at end of file diff --git a/src/tab-bar/index.wxml b/src/tab-bar/index.wxml index 3869b1ff..1d4a8102 100644 --- a/src/tab-bar/index.wxml +++ b/src/tab-bar/index.wxml @@ -7,7 +7,7 @@ - + {{item.text}}