File tree 5 files changed +43
-4
lines changed
5 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 38
38
<input type="checkbox" v-model="circles[3].loading" />
39
39
</div>-->
40
40
<div style =" border : 1px solid red ; display : inline-block " >
41
- <ve-progress :progress =" progress" :loading =" loading" :thickness =" 10" :empty-thickness =" 20" line-mode =" center" >
41
+ <ve-progress
42
+ :progress =" progress"
43
+ :loading =" loading"
44
+ :thickness =" 10"
45
+ :empty-thickness =" 20"
46
+ line-mode =" center"
47
+ :color =" {
48
+ colors: [
49
+ { color: 'red', offset: '0' },
50
+ { color: 'green', offset: '50' },
51
+ { color: 'blue', offset: '100' },
52
+ ],
53
+ }"
54
+ :loader =" {
55
+ color: {
56
+ colors: [
57
+ { color: 'yellow', offset: '0' },
58
+ { color: 'black', offset: '50' },
59
+ { color: 'blue', offset: '100' },
60
+ ],
61
+ },
62
+ thickness: 20,
63
+ lineMode: 'in 10',
64
+ opacity: '0.6',
65
+ }"
66
+ >
42
67
</ve-progress >
43
68
</div >
44
69
<ve-progress
Original file line number Diff line number Diff line change 12
12
type =" empty-fill"
13
13
:id =" options.id"
14
14
/>
15
+ <gradient v-if =" isLoaderColorGradient" :color =" options.loader.color" type =" loader" :id =" options.id" />
15
16
</defs >
16
17
<component :is =" circleType" :options =" options" :id =" options.id" />
17
18
</g >
@@ -51,6 +52,9 @@ export default {
51
52
isEmptyColorFillGradient () {
52
53
return Array .isArray (this .options .emptyColorFill .colors );
53
54
},
55
+ isLoaderColorGradient () {
56
+ return Array .isArray (this .options .loader .color .colors );
57
+ },
54
58
},
55
59
};
56
60
</script >
Original file line number Diff line number Diff line change 6
6
:cx =" position"
7
7
:cy =" position"
8
8
fill =" transparent"
9
- :stroke =" color "
9
+ :stroke =" loaderColor "
10
10
:stroke-width =" options.thickness"
11
11
:stroke-linecap =" options.line"
12
12
:stroke-dasharray =" circumference"
@@ -37,6 +37,11 @@ export default {
37
37
opacity () {
38
38
return this .options .opacity && this .options .opacity >= 0 ? this .options .opacity : 0.55 ;
39
39
},
40
+ loaderColor () {
41
+ return Array .isArray (this .options .loader .color .colors )
42
+ ? ` url(#ep-loader-gradient-${ this .options .id } )`
43
+ : this .options .color ;
44
+ },
40
45
},
41
46
};
42
47
</script >
Original file line number Diff line number Diff line change 43
43
</path >
44
44
<fade-in-transition >
45
45
<g v-if =" isLoading" >
46
- <half-circle-loader :options =" options. loader" />
46
+ <half-circle-loader :options =" { ... options, ...options. loader } " />
47
47
</g >
48
48
</fade-in-transition >
49
49
<path
Original file line number Diff line number Diff line change 5
5
class =" ep-half-circle--loader animation__loading"
6
6
:d =" path"
7
7
fill =" transparent"
8
- :stroke =" color "
8
+ :stroke =" halfLoaderColor "
9
9
:stroke-dasharray =" circumference"
10
10
:stroke-linecap =" options.line"
11
11
:style =" {
@@ -46,6 +46,11 @@ export default {
46
46
opacity () {
47
47
return this .options .opacity && this .options .opacity >= 0 ? this .options .opacity : 0.55 ;
48
48
},
49
+ halfLoaderColor () {
50
+ return Array .isArray (this .options .loader .color .colors )
51
+ ? ` url(#ep-loader-gradient-${ this .options .id } )`
52
+ : this .options .color ;
53
+ },
49
54
},
50
55
};
51
56
</script >
You can’t perform that action at this time.
0 commit comments