diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-08 11:39:06 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-08 11:39:06 +0300 |
commit | c825d7c4bcd8e6745c47d52573f731b15ff3d63a (patch) | |
tree | 4797f47c07041792f34d1de1c015ef66655a75bd /src/views/Fans/DynamicInformation/IndicatorsTable.vue | |
parent | 0d5c3c4a5992b36f1dbf187cfe4fec9433fc5728 (diff) | |
download | webui-vue-c825d7c4bcd8e6745c47d52573f731b15ff3d63a.tar.xz |
add random colors
Diffstat (limited to 'src/views/Fans/DynamicInformation/IndicatorsTable.vue')
-rw-r--r-- | src/views/Fans/DynamicInformation/IndicatorsTable.vue | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/views/Fans/DynamicInformation/IndicatorsTable.vue b/src/views/Fans/DynamicInformation/IndicatorsTable.vue index a0693f5b..ca5b33cb 100644 --- a/src/views/Fans/DynamicInformation/IndicatorsTable.vue +++ b/src/views/Fans/DynamicInformation/IndicatorsTable.vue @@ -141,6 +141,18 @@ export default { }, }, + watch: { + filteredSensors(value) { + if (value && value.length > 0) { + this.colors = this.$randomColor({ + count: value.length, + hue: 'random', + luminosity: 'random', + }); + } + }, + }, + created() { this.startLoader(); this.$store.dispatch('sensors/getFanSensors').finally(() => { |