@tekkare/auriga 0.1.142 → 0.1.144
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/dist/module.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
class="oip_hybrid_chart__bar"
|
|
26
26
|
:style="{
|
|
27
27
|
background: barColor + '1a',
|
|
28
|
-
width: `${getPercentage(row.values[1]
|
|
28
|
+
width: `${getPercentage(row.values[1])}%`,
|
|
29
29
|
}"
|
|
30
30
|
></div>
|
|
31
31
|
<arg-tooltip
|
|
@@ -47,7 +47,9 @@
|
|
|
47
47
|
.format(val.value)
|
|
48
48
|
.replace(",", ".")
|
|
49
49
|
}}
|
|
50
|
-
<span
|
|
50
|
+
<span
|
|
51
|
+
class="oip_hybrid_chart__bar_percentage"
|
|
52
|
+
v-if="val.percentage"
|
|
51
53
|
>({{ val.percentage }} %)</span
|
|
52
54
|
>
|
|
53
55
|
</p>
|
|
@@ -165,14 +167,19 @@ export default defineComponent({
|
|
|
165
167
|
emit("showState", val);
|
|
166
168
|
}
|
|
167
169
|
function getPercentage(value) {
|
|
168
|
-
if (
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (value === maxValue.value) {
|
|
172
|
-
return 100;
|
|
170
|
+
if (value.percentage) {
|
|
171
|
+
if (maxValue.value === 100) {
|
|
172
|
+
return value.percentage;
|
|
173
173
|
} else {
|
|
174
|
-
|
|
174
|
+
if (value.percentage === maxValue.value) {
|
|
175
|
+
return 100;
|
|
176
|
+
} else {
|
|
177
|
+
return value.percentage * 100 / maxValue.value;
|
|
178
|
+
}
|
|
175
179
|
}
|
|
180
|
+
} else {
|
|
181
|
+
const all = props.contents.map((a) => a.values[1].value).reduce((acc, current) => acc + current, 0);
|
|
182
|
+
return value.value * 100 / all;
|
|
176
183
|
}
|
|
177
184
|
}
|
|
178
185
|
return {
|
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
showAll: import("vue").Ref<boolean>;
|
|
21
21
|
getMaxValue: () => void;
|
|
22
22
|
changeShowState: (val: boolean) => void;
|
|
23
|
-
getPercentage: (value:
|
|
23
|
+
getPercentage: (value: any) => any;
|
|
24
24
|
tableBody: import("vue").ComputedRef<never[]>;
|
|
25
25
|
isEllipsisActive: (value: string) => boolean | undefined;
|
|
26
26
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "showState"[], "showState", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:class="['oip_source_card_collapse', sourceOpen ? 'open' : 'close']"
|
|
4
|
-
@click="sourceOpen = !sourceOpen"
|
|
4
|
+
@click.stop="sourceOpen = !sourceOpen"
|
|
5
5
|
>
|
|
6
6
|
<div class="source_card_header">
|
|
7
7
|
<div class="oip_row v-start gap-8 header">
|
|
@@ -118,12 +118,20 @@ export default defineComponent({
|
|
|
118
118
|
watch(
|
|
119
119
|
() => sourceOpen.value,
|
|
120
120
|
(new_source_open) => {
|
|
121
|
+
const sourceContainers = document.getElementsByClassName(
|
|
122
|
+
"oip_source_card_collapse"
|
|
123
|
+
);
|
|
121
124
|
if (new_source_open === true) {
|
|
122
125
|
setTimeout(() => {
|
|
123
|
-
|
|
126
|
+
for (let i = 0; i < sourceContainers.length; i++) {
|
|
127
|
+
sourceContainers[i].addEventListener("click", closeSource);
|
|
128
|
+
}
|
|
124
129
|
});
|
|
125
|
-
} else
|
|
126
|
-
|
|
130
|
+
} else {
|
|
131
|
+
for (let i = 0; i < sourceContainers.length; i++) {
|
|
132
|
+
sourceContainers[i].removeEventListener("click", closeSource);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
127
135
|
}
|
|
128
136
|
);
|
|
129
137
|
function copy() {
|