File tree 2 files changed +10
-26
lines changed
2 files changed +10
-26
lines changed Original file line number Diff line number Diff line change 36
36
37
37
<script >
38
38
import { getNumberIfValid , isValidNumber } from " ../utils" ;
39
- import { props } from " ./interface" ;
39
+ import props from " ./interface" ;
40
40
import CircleContainer from " ./Circle/CircleContainer.vue" ;
41
41
import Counter from " ./Counter.vue" ;
42
42
import parseOptions from " ./optionsParser" ;
43
43
44
44
export default {
45
45
name: " VueEllipseProgress" ,
46
46
components: { Counter, CircleContainer },
47
- props: {
48
- ... props,
49
- legendFormatter: {
50
- type: Function ,
51
- required: false ,
52
- },
53
- },
47
+ props,
54
48
data : () => ({
55
49
counterTick: {},
56
50
}),
@@ -75,10 +69,10 @@ export default {
75
69
},
76
70
circlesData () {
77
71
if (this .isMultiple ) {
78
- return this .data .map ((data ) => ({
72
+ return this .data .map ((options ) => ({
79
73
... this .$props ,
80
- ... data ,
81
- emptyThickness: isValidNumber (data .thickness ) ? data .thickness : this .$props .thickness ,
74
+ ... options ,
75
+ emptyThickness: isValidNumber (options .thickness ) ? options .thickness : this .$props .thickness ,
82
76
data: undefined , // do not pass data prop
83
77
}));
84
78
}
@@ -107,9 +101,6 @@ export default {
107
101
return normalizedCircles;
108
102
},
109
103
},
110
- beforeCreate () {
111
- console .log (this );
112
- },
113
104
};
114
105
</script >
115
106
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const colorConfig = (defaultColor = "transparent") => ({
13
13
} ,
14
14
} ) ;
15
15
16
- const props = {
16
+ export default {
17
17
data : {
18
18
type : Array ,
19
19
required : false ,
@@ -160,15 +160,8 @@ const props = {
160
160
required : false ,
161
161
default : false ,
162
162
} ,
163
+ legendFormatter : {
164
+ type : Function ,
165
+ required : false ,
166
+ } ,
163
167
} ;
164
-
165
- const simplifiedProps = { } ;
166
-
167
- for ( const p in props ) {
168
- simplifiedProps [ p ] = {
169
- type : props [ p ] . type ,
170
- default : props [ p ] . default ,
171
- } ;
172
- }
173
-
174
- export { props , simplifiedProps } ;
You can’t perform that action at this time.
0 commit comments