glib-web 0.5.78 → 0.5.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/component.vue
CHANGED
|
@@ -45,6 +45,8 @@ import Html from "./html";
|
|
|
45
45
|
import Chip from "./chip";
|
|
46
46
|
import Datetime from "./datetime";
|
|
47
47
|
|
|
48
|
+
import ProgressBar from "./progressbar";
|
|
49
|
+
|
|
48
50
|
import Image from "./image";
|
|
49
51
|
import Avatar from "./avatar";
|
|
50
52
|
import Icon from "./icon";
|
|
@@ -123,6 +125,7 @@ export default {
|
|
|
123
125
|
"views-html": Html,
|
|
124
126
|
"views-chip": Chip,
|
|
125
127
|
"views-datetime": Datetime,
|
|
128
|
+
"views-progressBar": ProgressBar,
|
|
126
129
|
|
|
127
130
|
"views-image": Image,
|
|
128
131
|
"views-avatar": Avatar,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-progress-linear
|
|
3
|
+
:class="$classes()"
|
|
4
|
+
:height="spec.height || 25"
|
|
5
|
+
:color="spec.color"
|
|
6
|
+
:background-color="spec.backgroundColor"
|
|
7
|
+
:disabled="true"
|
|
8
|
+
:value="value_in_percentage"
|
|
9
|
+
:striped="$classes().includes('striped')"
|
|
10
|
+
:reverse="spec.reversed || false"
|
|
11
|
+
rounded
|
|
12
|
+
>
|
|
13
|
+
<strong v-if="!$classes().includes('no-text')"
|
|
14
|
+
>{{ Math.ceil(value_in_percentage) }}%</strong
|
|
15
|
+
>
|
|
16
|
+
</v-progress-linear>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
props: {
|
|
22
|
+
spec: { type: Object, required: true }
|
|
23
|
+
},
|
|
24
|
+
computed: {
|
|
25
|
+
value_in_percentage() {
|
|
26
|
+
return this.spec.value * 100;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style scoped>
|
|
33
|
+
.light strong {
|
|
34
|
+
color: #ffffff;
|
|
35
|
+
}
|
|
36
|
+
</style>
|