Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #489 from huanghao1234/hhao
Browse files Browse the repository at this point in the history
修改wxc-slider-bar组件中间滑块背景颜色可以自定义修改
  • Loading branch information
tw93 authored Feb 9, 2020
2 parents 19f03f4 + 954c3d7 commit 75f89be
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/wxc-slider-bar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ under the License.
disabledColor: {
type: String,
default: '#AAA'
},
blockColor: {
type: String,
default: '#ffffff'
}
},
watch: {
Expand Down Expand Up @@ -247,12 +251,14 @@ under the License.
blockStyle1() {
let left = this.diffX1;
return {
transform: `translateX(${left}px)`
transform: `translateX(${left}px)`,
backgroundColor: this.blockColor
};
},
blockStyle2() {
return {
transform: `translateX(${this.diffX2}px)`
transform: `translateX(${this.diffX2}px)`,
backgroundColor: this.blockColor
}
}
},
Expand Down Expand Up @@ -615,7 +621,6 @@ under the License.
.slide-block {
width: 56px;
height: 56px;
background-color: #ffffff;
border-radius: 28px;
border-width: 1px;
border-color: rgba(0, 0, 0, 0.1);
Expand Down

0 comments on commit 75f89be

Please sign in to comment.