summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-07-08 11:39:06 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-07-08 11:39:06 +0300
commitc825d7c4bcd8e6745c47d52573f731b15ff3d63a (patch)
tree4797f47c07041792f34d1de1c015ef66655a75bd /src/components
parent0d5c3c4a5992b36f1dbf187cfe4fec9433fc5728 (diff)
downloadwebui-vue-c825d7c4bcd8e6745c47d52573f731b15ff3d63a.tar.xz
add random colors
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Global/SilaComponents/Tables/AccessoryTableWithLabel.vue15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/components/Global/SilaComponents/Tables/AccessoryTableWithLabel.vue b/src/components/Global/SilaComponents/Tables/AccessoryTableWithLabel.vue
index 4974750a..dffb7b1f 100644
--- a/src/components/Global/SilaComponents/Tables/AccessoryTableWithLabel.vue
+++ b/src/components/Global/SilaComponents/Tables/AccessoryTableWithLabel.vue
@@ -54,8 +54,6 @@
</template>
<script>
-import { colors } from '../../../../views/MemoryModules/DynamicInfo/helpers';
-
export default {
props: {
records: {
@@ -65,9 +63,20 @@ export default {
},
data() {
return {
- colors,
+ colors: [],
};
},
+ watch: {
+ 'records.items'(value) {
+ if (value && value.length > 0) {
+ this.colors = this.$randomColor({
+ count: value.length,
+ hue: 'random',
+ luminosity: 'random',
+ });
+ }
+ },
+ },
};
</script>
<style lang="scss">