@policystudio/policy-studio-ui-vue 1.0.18 → 1.0.22
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/.eslintrc.js +67 -0
- package/.storybook/main.js +11 -2
- package/.storybook/preview.js +1 -1
- package/README.md +8 -0
- package/babel.config.js +3 -0
- package/backup-package-lock.json +37194 -0
- package/{src/assets/scss/tailwind.css → dist/css/psui_styles.css} +16720 -17120
- package/package.json +32 -19
- package/postcss.config.js +2 -0
- package/src/assets/images/check-checkbox-button.svg +1 -0
- package/src/assets/images/radio-checked-button.svg +1 -0
- package/src/assets/scss/base.scss +6 -5
- package/src/assets/scss/components/PsInput.scss +89 -0
- package/src/components/accordion/PsAccordion.vue +40 -0
- package/src/components/accordion/PsAccordionItem.vue +102 -0
- package/src/components/badges-and-tags/PsChartLegend.vue +128 -0
- package/src/components/badges-and-tags/PsClimateZoneBadge.vue +18 -0
- package/src/components/badges-and-tags/PsCostEffectBar.vue +114 -0
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +78 -0
- package/src/components/badges-and-tags/PsMiniTag.vue +46 -0
- package/src/components/badges-and-tags/PsProgressBar.vue +0 -0
- package/src/components/buttons/PsButton.vue +36 -13
- package/src/components/chips/PsChips.vue +154 -0
- package/src/components/controls/PsCheckbox.vue +30 -17
- package/src/components/controls/PsDraggable.vue +174 -3
- package/src/components/controls/PsRadioButton.vue +67 -60
- package/src/components/controls/PsSlider.vue +13 -12
- package/src/components/controls/PsSwitch.vue +76 -76
- package/src/components/datatable/PsDataTable.vue +89 -0
- package/src/components/datatable/PsDataTableItem.vue +57 -0
- package/src/components/forms/PsDropdown.vue +196 -0
- package/src/components/forms/PsInput.vue +122 -99
- package/src/components/notifications/PsDialog.vue +37 -18
- package/src/components/tabs/PsTabHeader.vue +20 -21
- package/src/components/tooltip/PsDialogTooltip.vue +79 -0
- package/src/components/tooltip/PsRichTooltip.vue +44 -0
- package/src/components/tooltip/PsTooltip.vue +118 -0
- package/src/components/ui/PsIcon.vue +128 -0
- package/src/index.js +53 -24
- package/src/stories/Accordion.stories.js +41 -0
- package/src/stories/Button.stories.js +11 -11
- package/src/stories/ChartLegend.stories.js +16 -0
- package/src/stories/Checkbox.stories.js +21 -14
- package/src/stories/Chips.stories.js +55 -0
- package/src/stories/ClimateZoneBadge.stories.js +24 -0
- package/src/stories/Colors.stories.mdx +35 -35
- package/src/stories/CostEffectBar.stories.js +23 -0
- package/src/stories/Datatable.stories.js +50 -0
- package/src/stories/Dialog.stories.js +150 -17
- package/src/stories/Draggable.stories.js +22 -0
- package/src/stories/Dropdown.stories.js +32 -0
- package/src/stories/HighlightRippleDot.stories.js +16 -0
- package/src/stories/Input.stories.js +46 -15
- package/src/stories/MiniTag.stories.js +46 -0
- package/src/stories/ProgressBar.stories.js +23 -0
- package/src/stories/RadioButton.stories.js +25 -9
- package/src/stories/Slider.stories.js +9 -9
- package/src/stories/Swith.stories.js +10 -10
- package/src/stories/TabHeader.stories.js +9 -9
- package/src/stories/Toast.stories.js +13 -13
- package/src/stories/Toggle.stories.js +12 -13
- package/src/stories/Tooltip.stories.js +114 -0
- package/src/util/GeneralFunctions.js +22 -0
- package/src/util/imageLoader.js +50 -0
- package/tailwind.config.js +82 -45
- package/src/assets/scss/tailwind.scss +0 -61088
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</label>
|
|
14
|
-
</div>
|
|
2
|
+
<label class="wrapper flex items-center">
|
|
3
|
+
{{ label }}
|
|
4
|
+
<input
|
|
5
|
+
class="checkbox"
|
|
6
|
+
type="radio"
|
|
7
|
+
:checked="isChecked"
|
|
8
|
+
:value="value"
|
|
9
|
+
@change="$emit('change', $event.target.value)"
|
|
10
|
+
/>
|
|
11
|
+
<span class="checkmark" :class="{ 'checkmark-small': small }"></span>
|
|
12
|
+
</label>
|
|
15
13
|
</template>
|
|
16
14
|
|
|
17
15
|
<script>
|
|
@@ -20,84 +18,93 @@ export default {
|
|
|
20
18
|
props: {
|
|
21
19
|
label: {
|
|
22
20
|
type: String,
|
|
23
|
-
|
|
21
|
+
default: '',
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
modelValue: {
|
|
25
|
+
default: '',
|
|
24
26
|
},
|
|
25
27
|
value: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
type: String,
|
|
29
|
+
default: undefined,
|
|
30
|
+
},
|
|
31
|
+
small: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
28
35
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
36
|
+
model: {
|
|
37
|
+
prop: 'modelValue',
|
|
38
|
+
event: 'change',
|
|
33
39
|
},
|
|
34
40
|
computed: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
set (newValue) {
|
|
40
|
-
this.$emit('input', newValue )
|
|
41
|
-
}
|
|
42
|
-
}
|
|
41
|
+
isChecked() {
|
|
42
|
+
return this.modelValue == this.value
|
|
43
|
+
},
|
|
43
44
|
},
|
|
44
|
-
mounted() {
|
|
45
|
-
this.id = 'teste'
|
|
46
|
-
}
|
|
47
45
|
}
|
|
48
46
|
</script>
|
|
49
47
|
|
|
50
48
|
<style scoped>
|
|
51
|
-
.
|
|
49
|
+
.wrapper {
|
|
52
50
|
display: block;
|
|
53
51
|
position: relative;
|
|
54
|
-
padding-left:
|
|
52
|
+
padding-left: 32px;
|
|
55
53
|
cursor: pointer;
|
|
56
54
|
-webkit-user-select: none;
|
|
57
55
|
-moz-user-select: none;
|
|
58
56
|
-ms-user-select: none;
|
|
59
57
|
user-select: none;
|
|
60
58
|
}
|
|
61
|
-
|
|
62
|
-
.form-control input {
|
|
59
|
+
.wrapper input {
|
|
63
60
|
position: absolute;
|
|
64
61
|
opacity: 0;
|
|
65
62
|
cursor: pointer;
|
|
63
|
+
height: 0;
|
|
64
|
+
width: 0;
|
|
66
65
|
}
|
|
67
|
-
|
|
68
|
-
.radio-button {
|
|
66
|
+
.checkmark {
|
|
69
67
|
position: absolute;
|
|
70
68
|
top: 0;
|
|
71
69
|
left: 0;
|
|
72
|
-
height:
|
|
73
|
-
width:
|
|
74
|
-
background-color: #FFF;
|
|
75
|
-
border: 2px solid #A2ACB7;
|
|
70
|
+
height: 24px;
|
|
71
|
+
width: 24px;
|
|
76
72
|
border-radius: 50%;
|
|
73
|
+
background-color: white;
|
|
74
|
+
border: 2px solid #a2acb7;
|
|
77
75
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
.checkmark-small {
|
|
77
|
+
top: 3px;
|
|
78
|
+
height: 18px !important;
|
|
79
|
+
width: 18px !important;
|
|
82
80
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
.wrapper input:checked ~ .checkmark {
|
|
82
|
+
background-color: white;
|
|
83
|
+
border-color: #64b5ce;
|
|
84
|
+
border-width: 2px;
|
|
85
|
+
}
|
|
86
|
+
.checkmark:after {
|
|
87
|
+
content: '';
|
|
86
88
|
position: absolute;
|
|
87
89
|
display: none;
|
|
88
90
|
}
|
|
89
|
-
|
|
90
|
-
.form-control input:checked ~ .radio-button:after {
|
|
91
|
+
.wrapper input:checked ~ .checkmark:after {
|
|
91
92
|
display: block;
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
.wrapper .checkmark:after {
|
|
95
|
+
top: 4px;
|
|
96
|
+
left: 4px;
|
|
97
|
+
width: 12px;
|
|
98
|
+
height: 12px;
|
|
99
|
+
border-radius: 50%;
|
|
100
|
+
background: #64b5ce;
|
|
101
|
+
}
|
|
102
|
+
.wrapper .checkmark-small:after {
|
|
103
|
+
top: 3px;
|
|
104
|
+
left: 3px;
|
|
105
|
+
width: 8px;
|
|
106
|
+
height: 8px;
|
|
107
|
+
border-radius: 50%;
|
|
108
|
+
background: #64b5ce;
|
|
101
109
|
}
|
|
102
|
-
|
|
103
|
-
</style>
|
|
110
|
+
</style>
|
|
@@ -29,18 +29,6 @@
|
|
|
29
29
|
<script>
|
|
30
30
|
export default {
|
|
31
31
|
name: 'PsSlider',
|
|
32
|
-
computed: {
|
|
33
|
-
positionBubble() {
|
|
34
|
-
if (this.bubble && this.isMounted) {
|
|
35
|
-
return (this.$refs.slider.offsetWidth / this.max) * this.value - 15
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
getValueToScale(value) {
|
|
41
|
-
return 100 * value / this.rangeDistanceMax
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
32
|
props: {
|
|
45
33
|
min: {
|
|
46
34
|
type: Number,
|
|
@@ -75,8 +63,21 @@ export default {
|
|
|
75
63
|
isMounted: false
|
|
76
64
|
}
|
|
77
65
|
},
|
|
66
|
+
computed: {
|
|
67
|
+
positionBubble() {
|
|
68
|
+
if (this.bubble && this.isMounted) {
|
|
69
|
+
return (this.$refs.slider.offsetWidth / this.max) * this.value - 15
|
|
70
|
+
}
|
|
71
|
+
return 0
|
|
72
|
+
}
|
|
73
|
+
},
|
|
78
74
|
mounted() {
|
|
79
75
|
this.isMounted = true
|
|
76
|
+
},
|
|
77
|
+
methods: {
|
|
78
|
+
getValueToScale(value) {
|
|
79
|
+
return 100 * value / this.rangeDistanceMax
|
|
80
|
+
}
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
</script>
|
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<div class="switch-button-control">
|
|
3
|
+
<div
|
|
4
|
+
:class="{ enabled: active, 'switch-button': !small, 'switch-button-small': small }"
|
|
5
|
+
@click="toggle"
|
|
6
|
+
:style="{'--color': color}"
|
|
7
|
+
>
|
|
8
|
+
<div class="button"></div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="switch-button-label">
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
10
14
|
</template>
|
|
11
15
|
|
|
12
16
|
<script>
|
|
13
|
-
export const sizes = ['big', 'small']
|
|
14
17
|
export default {
|
|
15
18
|
name: 'PsSwitch',
|
|
16
|
-
computed: {
|
|
17
|
-
text() {
|
|
18
|
-
if (this.label && this.labelActived) {
|
|
19
|
-
return this.active ? this.labelActived : this.label
|
|
20
|
-
} else if (this.label) {
|
|
21
|
-
return this.label
|
|
22
|
-
} else {
|
|
23
|
-
return false
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
classes() {
|
|
27
|
-
if (this.size === 'small') {
|
|
28
|
-
return 'toggle-bg psui-bg-gray-40 psui-border-gray-40 psui-border-2 psui-h-4 ps-switch-small psui-rounded-full'
|
|
29
|
-
}
|
|
30
|
-
return 'toggle-bg psui-bg-gray-40 psui-border-gray-40 psui-border-2 psui-h-6 ps-switch psui-rounded-full'
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
19
|
props: {
|
|
34
|
-
|
|
35
|
-
active:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
default: 'big',
|
|
46
|
-
validator: (value) => sizes.indexOf(value) !== -1
|
|
47
|
-
}
|
|
20
|
+
small: Boolean,
|
|
21
|
+
active: Boolean,
|
|
22
|
+
color: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: false,
|
|
25
|
+
default: '#5DB883'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
model: {
|
|
29
|
+
prop: "active",
|
|
30
|
+
event: "toggle"
|
|
48
31
|
},
|
|
49
32
|
methods: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
this.$emit('update:active', !this.active)
|
|
53
|
-
this.$emit('change', !this.active)
|
|
54
|
-
}
|
|
33
|
+
toggle: function() {
|
|
34
|
+
this.$emit('toggle', !this.active)
|
|
55
35
|
}
|
|
56
36
|
}
|
|
57
37
|
}
|
|
58
38
|
</script>
|
|
59
39
|
|
|
60
40
|
<style scoped>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
.ps-switch {
|
|
66
|
-
width: 46px;
|
|
41
|
+
.switch-button-control {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: row;
|
|
44
|
+
align-items: center;
|
|
67
45
|
}
|
|
68
|
-
.
|
|
69
|
-
|
|
46
|
+
.switch-button-control .switch-button {
|
|
47
|
+
height: 24px;
|
|
48
|
+
width: calc(24px * 2);
|
|
49
|
+
background-color: #A2ACB7;
|
|
50
|
+
border: 2px solid #A2ACB7;
|
|
51
|
+
border-radius: 24px;
|
|
52
|
+
transition: all 0.3s ease-in-out;
|
|
53
|
+
cursor: pointer;
|
|
70
54
|
}
|
|
71
|
-
.
|
|
72
|
-
|
|
73
|
-
|
|
55
|
+
.switch-button-control .switch-button-small {
|
|
56
|
+
height: 16px;
|
|
57
|
+
width: calc(16px * 2);
|
|
58
|
+
background-color: #A2ACB7;
|
|
59
|
+
border: 2px solid #A2ACB7;
|
|
60
|
+
border-radius: 16px;
|
|
61
|
+
transition: all 0.3s ease-in-out;
|
|
62
|
+
cursor: pointer;
|
|
74
63
|
}
|
|
75
|
-
.
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
.switch-button-control .switch-button .button {
|
|
65
|
+
height: calc(24px - (2 * 2px));
|
|
66
|
+
width: calc(24px - (2 * 2px));
|
|
67
|
+
border-radius: calc(24px - (2 * 2px));
|
|
68
|
+
background:#F3F6F9;
|
|
69
|
+
transition: all 0.3s ease-in-out;
|
|
78
70
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
71
|
+
.switch-button-control .switch-button-small .button {
|
|
72
|
+
height: calc(16px - (2 * 2px));
|
|
73
|
+
width: calc(16px - (2 * 2px));
|
|
74
|
+
border-radius: calc(16px - (2 * 2px));
|
|
75
|
+
background:#F3F6F9;
|
|
76
|
+
transition: all 0.3s ease-in-out;
|
|
85
77
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
position: absolute;
|
|
90
|
-
left: 4px;
|
|
91
|
-
@apply border-white;
|
|
78
|
+
.switch-button-control .switch-button.enabled {
|
|
79
|
+
background-color: var(--color);
|
|
80
|
+
border: 2px solid var(--color);
|
|
92
81
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
82
|
+
.switch-button-control .switch-button-small.enabled {
|
|
83
|
+
background-color: var(--color);
|
|
84
|
+
border: 2px solid var(--color);
|
|
85
|
+
}
|
|
86
|
+
.switch-button-control .switch-button.enabled .button {
|
|
87
|
+
background: white;
|
|
88
|
+
transform: translateX(calc(calc(24px - (2 * 2px)) + (2 *2px)));
|
|
89
|
+
}
|
|
90
|
+
.switch-button-control .switch-button-small.enabled .button {
|
|
91
|
+
background: white;
|
|
92
|
+
transform: translateX(calc(calc(16px - (2 * 2px)) + (2 *2px)));
|
|
93
|
+
}
|
|
94
|
+
.switch-button-control .switch-button-label {
|
|
95
|
+
margin-left: 10px;
|
|
96
|
+
}
|
|
97
|
+
</style>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<table :class='cssAlign' class='table psui-w-full psui-border-2 psui-border-gray-10' >
|
|
3
|
+
<thead v-if="header">
|
|
4
|
+
<th
|
|
5
|
+
v-for="head in header"
|
|
6
|
+
:key="head"
|
|
7
|
+
class='psui-bg-gray-10 psui-text-gray-80 psui-capitalize psui-font-bold'
|
|
8
|
+
>
|
|
9
|
+
{{ head }}
|
|
10
|
+
</th>
|
|
11
|
+
</thead>
|
|
12
|
+
<tbody v-if="type === 'simple'">
|
|
13
|
+
<tr v-for="(dt, index) in data" :key="index">
|
|
14
|
+
<td v-for="(head, cellRow) in header" :key="cellRow">
|
|
15
|
+
{{ data[index][head] }}
|
|
16
|
+
</td>
|
|
17
|
+
</tr>
|
|
18
|
+
</tbody>
|
|
19
|
+
<slot v-else></slot>
|
|
20
|
+
<tfoot v-if="footer">
|
|
21
|
+
<th
|
|
22
|
+
v-for="ft in footer"
|
|
23
|
+
:key="ft"
|
|
24
|
+
class='psui-bg-gray-10 psui-text-gray-80'
|
|
25
|
+
>
|
|
26
|
+
{{ ft }}
|
|
27
|
+
</th>
|
|
28
|
+
</tfoot>
|
|
29
|
+
</table>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
export const type = ['simple', 'rich']
|
|
34
|
+
export const alignment = ['center', 'right', 'left']
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'PsDataTable',
|
|
38
|
+
props: {
|
|
39
|
+
type: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true,
|
|
42
|
+
validator: (value) => {
|
|
43
|
+
return ['simple', 'rich'].indexOf(value) !== -1
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
header: {
|
|
47
|
+
type: Array,
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
50
|
+
data: {
|
|
51
|
+
type: Array,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
54
|
+
footer: {
|
|
55
|
+
type: Array,
|
|
56
|
+
},
|
|
57
|
+
align: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: 'left',
|
|
60
|
+
validator: (value) => {
|
|
61
|
+
return ['center', 'right', 'left'].indexOf(value) !== -1
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
cssStyle: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: 'psui-text-gray-60'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
computed: {
|
|
70
|
+
cssAlign() {
|
|
71
|
+
if (this.align === 'right') return `psui-text-right ${this.cssStyle}`
|
|
72
|
+
if (this.align === 'center') return `psui-text-center ${this.cssStyle}`
|
|
73
|
+
return `psui-text-left ${this.cssStyle}`
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style scoped>
|
|
80
|
+
|
|
81
|
+
.table th,
|
|
82
|
+
.table td,
|
|
83
|
+
.table tr {
|
|
84
|
+
height: 40px;
|
|
85
|
+
border: 1px solid #e6ecf2;
|
|
86
|
+
padding: 11px 16px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tbody v-if="data">
|
|
3
|
+
<tr v-for="(dt, index) in data" :key="index" >
|
|
4
|
+
<td v-for="(el, elIndex) in dt" :key="elIndex" class="psui-px-4 psui-py-2">
|
|
5
|
+
<div class="psui-flex psui-gap-1 psui-items-center">
|
|
6
|
+
<span class="psui-text-gray-80">
|
|
7
|
+
{{ el[Object.keys(el)[1]].toFixed(3) }}
|
|
8
|
+
</span>
|
|
9
|
+
<div
|
|
10
|
+
class="psui-flex psui-items-center"
|
|
11
|
+
:class="
|
|
12
|
+
el[Object.keys(el)[1]] >= 0
|
|
13
|
+
? 'psui-text-green-70'
|
|
14
|
+
: 'psui-text-red-70'
|
|
15
|
+
"
|
|
16
|
+
>
|
|
17
|
+
<i v-if="el[Object.keys(el)[1]] >= 0" class="material-icons">arrow_upward</i>
|
|
18
|
+
<i v-else class="material-icons">arrow_downward</i>
|
|
19
|
+
<span>
|
|
20
|
+
{{
|
|
21
|
+
(
|
|
22
|
+
(el[Object.keys(el)[1]] / el[Object.keys(el)[0]]) *
|
|
23
|
+
100
|
|
24
|
+
).toFixed(2)
|
|
25
|
+
}}%
|
|
26
|
+
</span>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<span class="psui-text-gray-50">{{
|
|
30
|
+
el[Object.keys(el)[0]].toFixed(6)
|
|
31
|
+
}}</span>
|
|
32
|
+
</td>
|
|
33
|
+
</tr>
|
|
34
|
+
</tbody>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
export default {
|
|
39
|
+
name: "PsDataTableItem",
|
|
40
|
+
props: {
|
|
41
|
+
data: {
|
|
42
|
+
type: Array,
|
|
43
|
+
required: true,
|
|
44
|
+
default: () => {
|
|
45
|
+
return []
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style scoped>
|
|
53
|
+
.material-icons {
|
|
54
|
+
font-size: 15px;
|
|
55
|
+
margin-bottom: 2px;
|
|
56
|
+
}
|
|
57
|
+
</style>
|