From 4b4096acdc27f939c34b37ca267ef9afe1b7cf1f Mon Sep 17 00:00:00 2001 From: xiaoyucoding Date: Mon, 17 Dec 2018 15:07:52 +0800 Subject: [PATCH] feat: radio color --- src/core/view/components/radio/index.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/core/view/components/radio/index.vue b/src/core/view/components/radio/index.vue index 24e83ad4..63e65ca6 100644 --- a/src/core/view/components/radio/index.vue +++ b/src/core/view/components/radio/index.vue @@ -4,8 +4,8 @@ @click="_onClick">
@@ -34,7 +34,7 @@ export default { }, color: { type: String, - default: '#007aff' + default: '#007AFF' }, value: { type: String, @@ -47,6 +47,11 @@ export default { radioValue: this.value } }, + computed: { + checkedStyle () { + return `background-color: ${this.color};border-color: ${this.color};` + } + }, watch: { checked (val) { this.radioChecked = val @@ -124,10 +129,10 @@ export default { position: relative; } - uni-radio .uni-radio-input.uni-radio-input-checked { + /* uni-radio .uni-radio-input.uni-radio-input-checked { background-color: #007aff; border-color: #007aff; - } + } */ uni-radio .uni-radio-input.uni-radio-input-checked:before { font: normal normal normal 14px/1 "uni"; -- GitLab