@unsource/ui 2.7.4 → 2.7.5
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
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</thead>
|
|
68
68
|
<tbody>
|
|
69
69
|
<UnTableRow
|
|
70
|
-
v-for="(item, index) in items?.filter((e) => !parentKey ||
|
|
70
|
+
v-for="(item, index) in items?.filter((e) => !parentKey || parentNotExist(e))"
|
|
71
71
|
:key="index"
|
|
72
72
|
v-model="selected"
|
|
73
73
|
:item="item"
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
|
|
95
95
|
<script setup>
|
|
96
96
|
import { _at } from "#imports";
|
|
97
|
-
const { cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass = "bg-gray-250", textClass = "text-gray-800 font-700 text-xs" } = defineProps({
|
|
97
|
+
const { parentKey, idKey, cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass = "bg-gray-250", textClass = "text-gray-800 font-700 text-xs" } = defineProps({
|
|
98
98
|
cols: { type: Array, required: false },
|
|
99
99
|
items: { type: Array, required: false },
|
|
100
100
|
thClass: { type: String, required: false },
|
|
@@ -106,4 +106,5 @@ const { cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass
|
|
|
106
106
|
selectable: { type: Boolean, required: false }
|
|
107
107
|
});
|
|
108
108
|
const selected = defineModel();
|
|
109
|
+
const parentNotExist = (item) => !item[parentKey] || !items.find((e) => e[idKey || "id"] === item[parentKey]);
|
|
109
110
|
</script>
|