You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/components/progress/CProgress.vue
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,8 @@
1
1
<template>
2
-
<divclass="progress":style="{ height }">
2
+
<div
3
+
:class="['progress', size && `progress-${size}`]"
4
+
:style="{ height }"
5
+
>
3
6
<slot>
4
7
<CProgressBar:value="value"/>
5
8
</slot>
@@ -8,12 +11,27 @@
8
11
9
12
<script>
10
13
importCProgressBarfrom'./CProgressBar'
11
-
importpropsfrom'./progress-props'
14
+
importsharedfrom'./shared-props'
15
+
16
+
constprops= {
17
+
...shared,
18
+
height:String,
19
+
size: {
20
+
type:String,
21
+
validator:val=> ['', 'xs', 'sm'].includes(val)
22
+
},
23
+
}
12
24
13
25
exportdefault {
14
26
name:'CProgress',
15
27
components: { CProgressBar },
16
28
props,
29
+
mounted () {
30
+
/* istanbul ignore next */
31
+
if (this.height&&process&&process.env&&process.env.NODE_ENV==='development') {
32
+
console.error("CProgress component: 'height' prop is deprecated and will be removed in the next version. Use 'size' prop instead or pass custom height in 'style' attribute.")
0 commit comments