File tree 2 files changed +28
-3
lines changed
2 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 104
104
</template >
105
105
</ve-progress >
106
106
107
- <ve-progress :progress =" progress" animation =" bounce 3000 300" :loading =" loading" >
107
+ <ve-progress :size = " 400 " : progress =" progress" animation =" bounce 3000 300" :loading =" loading" >
108
108
<template #circle-progress =" { attrs } " >
109
- <svg xmlns =" http://www.w3.org/2000/svg" width =" 200 " height =" 200 " fill =" none" viewBox =" 0 0 53 53"
109
+ <svg xmlns =" http://www.w3.org/2000/svg" : width =" attrs.size " : height =" attrs.size " fill =" none" viewBox =" 0 0 53 53"
110
110
version =" 1.1" xmlns:xlink =" http://www.w3.org/1999/xlink" xmlns:svgjs =" http://svgjs.dev/svgjs" >
111
111
<path ref =" customPath" fill =" url(" ; #SvgjsLinearGradient1660" ; )"
112
- :stroke-width =" 1"
112
+ :stroke-width =" 1.5 "
113
113
:stroke =" attrs.color"
114
114
:stroke-dashoffset =" attrs.calculateProgressOffset(163.32911682128906)"
115
115
:stroke-dasharray =" 163.32911682128906"
116
+ :stroke-linecap =" attrs.line"
116
117
:style =" attrs.baseStyles"
117
118
d =" M52.1 26.5c0 3.2-4.3 5.6-5.5 8.4-1.2 2.9.1 7.6-2.1 9.8-2.2 2.2-6.9.9-9.8 2.1-2.8 1.2-5.2 5.5-8.4 5.5s-5.6-4.3-8.4-5.5c-2.9-1.2-7.6.1-9.8-2.1-2.2-2.2-.9-6.9-2.1-9.8C4.8 32.1.5 29.7.5 26.5s4.3-5.6 5.5-8.4c1.2-2.9-.1-7.6 2.1-9.8 2.2-2.2 6.9-.9 9.8-2.1C20.7 5 23.1.7 26.3.7s5.6 4.3 8.4 5.5c2.9 1.2 7.6-.1 9.8 2.1 2.2 2.2.9 6.9 2.1 9.8 1.2 2.8 5.5 5.2 5.5 8.4Z" ></path >
118
119
<defs >
Original file line number Diff line number Diff line change @@ -174,6 +174,30 @@ describe("[ EllipseProgressContainer.vue ]", () => {
174
174
} , 100 ) ;
175
175
} ) ;
176
176
} ) ;
177
+ describe ( "#circle-progress" , ( ) => {
178
+ const wrapper = mount ( VueEllipseProgress , {
179
+ props : { progress : 35 } ,
180
+ slots : {
181
+ "circle-progress" : `
182
+ <template #default="attrs" >
183
+ <polygon
184
+ ref="polygon"
185
+ :stroke-dashoffset="attrs.strokeDashOffset"
186
+ :stroke-dasharray="582.4922485351562"
187
+ points="10,10 190,100 10,190"
188
+ style="fill: lime; stroke: purple; stroke-width: 3"
189
+ :style="attrs.styles"
190
+ />
191
+ </template>` ,
192
+ } ,
193
+ } ) ;
194
+
195
+ it ( "renders provided slot" , ( ) => expect ( wrapper . find ( "polygon" ) . exists ( ) ) . to . be . true ) ;
196
+
197
+ it ( "replaces default progress circle" , ( ) => {
198
+ expect ( wrapper . find ( ".ep-circle--progress" ) . exists ( ) ) . to . be . false ;
199
+ } ) ;
200
+ } ) ;
177
201
} ) ;
178
202
describe ( "#data" , ( ) => {
179
203
const data = [
You can’t perform that action at this time.
0 commit comments