summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorMaksim Zakharov <m.zakharov@IBS.RU>2022-08-08 17:27:36 +0300
committerMaksim Zakharov <m.zakharov@IBS.RU>2022-08-08 17:27:36 +0300
commit0332cf97422e5989f466373ace45fee9babd2fb3 (patch)
tree3a48602947fd0f79145c5ae842190529b6f9b503 /src/components
parent1f71e4f7800c0db4d639b42bfc0b5efa9ecc87a2 (diff)
downloadwebui-vue-0332cf97422e5989f466373ace45fee9babd2fb3.tar.xz
fix dymamic collapse
Diffstat (limited to 'src/components')
-rw-r--r--src/components/_sila/Global/Chart.vue22
-rw-r--r--src/components/_sila/Global/Collapse.vue8
2 files changed, 24 insertions, 6 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue
index 0b639252..63f1f0a9 100644
--- a/src/components/_sila/Global/Chart.vue
+++ b/src/components/_sila/Global/Chart.vue
@@ -363,6 +363,28 @@ export default {
},
});
break;
+ case 'psu-power':
+ this.categories = this.setCategories(126, 'Вт');
+ this.yMax = 125;
+ this.minTickInterval = 25;
+ this.plotLines.push({
+ color: '#1A3E5B',
+ dashStyle: 'solid',
+ value: this.shutdown,
+ width: 2,
+ label: {
+ text: this.$t('chart.thresholdWarning'),
+ align: 'right',
+ style: {
+ fontFamily: 'Inter',
+ fontSize: '12px',
+ fontStyle: 'normal',
+ fontWeight: '400',
+ lineHeight: '16px',
+ color: '#0C1C2999',
+ },
+ },
+ });
}
},
setCategories(count, desc) {
diff --git a/src/components/_sila/Global/Collapse.vue b/src/components/_sila/Global/Collapse.vue
index da2b74c8..36778571 100644
--- a/src/components/_sila/Global/Collapse.vue
+++ b/src/components/_sila/Global/Collapse.vue
@@ -10,7 +10,7 @@
{{ title }}
<component :is="iconChevronUp" class="icon-expand" />
</b-button>
- <b-collapse :id="id" :visible="defaultOpen">
+ <b-collapse :id="id" visible>
<slot></slot>
</b-collapse>
</div>
@@ -29,14 +29,10 @@ export default {
type: String,
default: null,
},
- defaultOpen: {
- type: Boolean,
- default: false,
- },
},
data() {
return {
- opened: false,
+ opened: true,
iconChevronUp: iconChevronUp,
};
},