mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[improvement] Switch: add active-color prop (#2013)
This commit is contained in:
@@ -23,6 +23,8 @@ export default create({
|
||||
value: Boolean,
|
||||
loading: Boolean,
|
||||
disabled: Boolean,
|
||||
activeColor: String,
|
||||
inactiveColor: String,
|
||||
size: {
|
||||
type: String,
|
||||
default: '30px'
|
||||
@@ -32,7 +34,8 @@ export default create({
|
||||
computed: {
|
||||
style() {
|
||||
return {
|
||||
fontSize: this.size
|
||||
fontSize: this.size,
|
||||
backgroundColor: this.value ? this.activeColor : this.inactiveColor
|
||||
};
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user