Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
f1c8a261
Commit
f1c8a261
authored
Nov 14, 2022
by
liangmiao
Committed by
GitHub
Nov 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Progress: add color prop (#22089)
* el-select添加selected选中颜色配置 * fix: issues #22065, el-progress添加底色,文字颜色的属性
parent
bd56221e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
packages/progress/src/progress.vue
packages/progress/src/progress.vue
+12
-4
packages/select/src/option.vue
packages/select/src/option.vue
+23
-0
No files found.
packages/progress/src/progress.vue
View file @
f1c8a261
...
...
@@ -15,9 +15,9 @@
aria-valuemax="100"
>
<div
class=
"el-progress-bar"
v-if=
"type === 'line'"
>
<div
class=
"el-progress-bar__outer"
:style=
"
{height: strokeWidth + 'px'}">
<div
class=
"el-progress-bar__outer"
:style=
"
{height: strokeWidth + 'px'
, backgroundColor:defineBackColor
}">
<div
class=
"el-progress-bar__inner"
:style=
"barStyle"
>
<div
class=
"el-progress-bar__innerText"
v-if=
"showText && textInside"
>
{{
content
}}
</div>
<div
class=
"el-progress-bar__innerText"
:style=
"
{color:textColor}"
v-if="showText
&&
textInside">
{{
content
}}
</div>
</div>
</div>
</div>
...
...
@@ -26,7 +26,7 @@
<path
class=
"el-progress-circle__track"
:d=
"trackPath"
stroke=
"#e5e9f2
"
:stroke=
"defineBackColor
"
:stroke-width=
"relativeStrokeWidth"
fill=
"none"
:style=
"trailPathStyle"
></path>
...
...
@@ -43,7 +43,7 @@
<div
class=
"el-progress__text"
v-if=
"showText && !textInside"
:style=
"
{fontSize: progressTextSize + 'px'}"
:style=
"
{fontSize: progressTextSize + 'px'
, color:textColor
}"
>
<template
v-if=
"!status"
>
{{
content
}}
</
template
>
<i
v-else
:class=
"iconClass"
></i>
...
...
@@ -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
:
{
...
...
packages/select/src/option.vue
View file @
f1c8a261
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment