@hostlink/nuxt-light 1.60.3 → 1.60.4
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
|
@@ -484,18 +484,25 @@ const showTopRight = computed(() => {
|
|
|
484
484
|
const hidableColumns = computed(() => {
|
|
485
485
|
return props.columns?.filter((c) => !c.required) || [];
|
|
486
486
|
});
|
|
487
|
+
const hideColumnsStorageKey = computed(() => {
|
|
488
|
+
return "l-table-hide-columns-" + simpleRouteName.value + "-" + props.name;
|
|
489
|
+
});
|
|
487
490
|
const visibleColumns = computed({
|
|
488
491
|
get() {
|
|
489
492
|
if (props.name) {
|
|
490
|
-
|
|
493
|
+
const hiddenColumns = useStorage(hideColumnsStorageKey.value, []).value;
|
|
494
|
+
const allHidable = hidableColumns.value.map((c) => c.name);
|
|
495
|
+
return allHidable.filter((name) => !hiddenColumns.includes(name));
|
|
491
496
|
} else {
|
|
492
497
|
return null;
|
|
493
498
|
}
|
|
494
499
|
},
|
|
495
500
|
set(value) {
|
|
496
|
-
if (props.name) {
|
|
497
|
-
const
|
|
498
|
-
|
|
501
|
+
if (props.name && value) {
|
|
502
|
+
const allHidable = hidableColumns.value.map((c) => c.name);
|
|
503
|
+
const hiddenColumns = allHidable.filter((name) => !value.includes(name));
|
|
504
|
+
const storage = useStorage(hideColumnsStorageKey.value, []);
|
|
505
|
+
storage.value = hiddenColumns;
|
|
499
506
|
}
|
|
500
507
|
}
|
|
501
508
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useObject } from "#imports";
|
|
3
|
+
import { ref } from "vue";
|
|
3
4
|
const { data: obj } = await useObject({
|
|
4
5
|
eventlog_id: true,
|
|
5
6
|
class: true,
|
|
@@ -11,7 +12,7 @@ const { data: obj } = await useObject({
|
|
|
11
12
|
target: true,
|
|
12
13
|
different: true
|
|
13
14
|
});
|
|
14
|
-
const splitterModel = 50;
|
|
15
|
+
const splitterModel = ref(50);
|
|
15
16
|
</script>
|
|
16
17
|
|
|
17
18
|
<template>
|