You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by tw...@apache.org on 2020/02/09 13:25:57 UTC
[incubator-weex-ui] branch master updated: 修改wxc-slider-bar组件中间滑块背景颜色可以自定义修改
This is an automated email from the ASF dual-hosted git repository.
tw93 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex-ui.git
The following commit(s) were added to refs/heads/master by this push:
new 954c3d7 修改wxc-slider-bar组件中间滑块背景颜色可以自定义修改
new 75f89be Merge pull request #489 from huanghao1234/hhao
954c3d7 is described below
commit 954c3d70de6f3ab866392773d0b18d772b54e65d
Author: huanghao1234 <18...@163.com>
AuthorDate: Wed Jan 15 15:49:24 2020 +0800
修改wxc-slider-bar组件中间滑块背景颜色可以自定义修改
---
packages/wxc-slider-bar/index.vue | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/packages/wxc-slider-bar/index.vue b/packages/wxc-slider-bar/index.vue
index 3065af7..88546b6 100644
--- a/packages/wxc-slider-bar/index.vue
+++ b/packages/wxc-slider-bar/index.vue
@@ -145,6 +145,10 @@ under the License.
disabledColor: {
type: String,
default: '#AAA'
+ },
+ blockColor: {
+ type: String,
+ default: '#ffffff'
}
},
watch: {
@@ -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
}
}
},
@@ -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);