diff --git a/packages/progress/src/progress.vue b/packages/progress/src/progress.vue index 182f310a81..d19976e594 100644 --- a/packages/progress/src/progress.vue +++ b/packages/progress/src/progress.vue @@ -15,9 +15,9 @@ aria-valuemax="100" >
-
+
-
{{content}}
+
{{content}}
@@ -26,7 +26,7 @@ @@ -43,7 +43,7 @@
@@ -93,6 +93,14 @@ type: [String, Array, Function], default: '' }, + defineBackColor: { + type: [String, Array, Function], + default: '#ebeef5' + }, + textColor: { + type: [String, Array, Function], + default: '#606266' + }, format: Function }, computed: { diff --git a/packages/select/src/option.vue b/packages/select/src/option.vue index a343b5b94f..36ad58e615 100644 --- a/packages/select/src/option.vue +++ b/packages/select/src/option.vue @@ -37,6 +37,10 @@ disabled: { type: Boolean, default: false + }, + selectedColor: { + type: String, + default: '#409EFF' } }, @@ -131,6 +135,24 @@ selectOptionClick() { if (this.disabled !== true && this.groupDisabled !== true) { this.dispatch('ElSelect', 'handleOptionClick', [this, true]); + if (this.selectedColor !== '#409EFF') { + // 如果不是默认的颜色 + if (this.$el.className === 'el-select-dropdown__item selected hover' || + this.$el.className === 'el-select-dropdown__item hover' + ) { + let siblingsNode = this.$parent.$children; + siblingsNode.forEach(item=>{ + if (item.$el.className === 'el-select-dropdown__item' || + item.$el.className === 'el-select-dropdown__item selected') { + item.$el.style.color = '#606266'; + } + }); + this.$el.style.color = this.selectedColor; + } else { + this.$el.style.color = '#606266'; + } + + } } }, @@ -150,6 +172,7 @@ this.$on('queryChange', this.queryChange); this.$on('handleGroupDisabled', this.handleGroupDisabled); + }, beforeDestroy() {