adminforth 2.4.0-next.100 → 2.4.0-next.102
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.
|
@@ -15,11 +15,20 @@
|
|
|
15
15
|
class="z-20 hidden bg-lightThreeDotsMenuBodyBackground divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-darkThreeDotsMenuBodyBackground dark:divide-gray-600">
|
|
16
16
|
<ul class="py-2 text-sm text-lightThreeDotsMenuBodyText dark:text-darkThreeDotsMenuBodyText" aria-labelledby="dropdownMenuIconButton">
|
|
17
17
|
<li v-for="item in threeDotsDropdownItems" :key="`dropdown-item-${item.label}`">
|
|
18
|
-
<a
|
|
18
|
+
<a href="#"
|
|
19
|
+
class="block px-4 py-2 hover:bg-lightThreeDotsMenuBodyBackgroundHover hover:text-lightThreeDotsMenuBodyTextHover dark:hover:bg-darkThreeDotsMenuBodyBackgroundHover dark:hover:text-darkThreeDotsMenuBodyTextHover"
|
|
20
|
+
:class="{
|
|
21
|
+
'pointer-events-none': !checkboxes.length,
|
|
22
|
+
'opacity-50': !checkboxes.length,
|
|
23
|
+
'cursor-not-allowed': !checkboxes.length,
|
|
24
|
+
}">
|
|
19
25
|
<component :is="getCustomComponent(item)"
|
|
20
26
|
:meta="item.meta"
|
|
21
27
|
:resource="coreStore.resource"
|
|
22
28
|
:adminUser="coreStore.adminUser"
|
|
29
|
+
:checkboxes="checkboxes"
|
|
30
|
+
:updateList="props.updateList"
|
|
31
|
+
:clearCheckboxes="clearCheckboxes"
|
|
23
32
|
/>
|
|
24
33
|
</a>
|
|
25
34
|
</li>
|
|
@@ -74,7 +83,13 @@ const props = defineProps({
|
|
|
74
83
|
threeDotsDropdownItems: Array,
|
|
75
84
|
customActions: Array,
|
|
76
85
|
bulkActions: Array,
|
|
77
|
-
checkboxes: Array
|
|
86
|
+
checkboxes: Array,
|
|
87
|
+
updateList: {
|
|
88
|
+
type: Function,
|
|
89
|
+
},
|
|
90
|
+
clearCheckboxes: {
|
|
91
|
+
type: Function
|
|
92
|
+
}
|
|
78
93
|
});
|
|
79
94
|
|
|
80
95
|
const emit = defineEmits(['startBulkAction']);
|
|
@@ -97,6 +97,8 @@
|
|
|
97
97
|
:bulkActions="coreStore.resource?.options?.bulkActions"
|
|
98
98
|
:checkboxes="checkboxes"
|
|
99
99
|
@startBulkAction="startBulkAction"
|
|
100
|
+
:updateList="getList"
|
|
101
|
+
:clearCheckboxes="clearCheckboxes"
|
|
100
102
|
></ThreeDotsMenu>
|
|
101
103
|
</BreadcrumbsWithButtons>
|
|
102
104
|
|
|
@@ -247,6 +249,10 @@ async function getList() {
|
|
|
247
249
|
return {}
|
|
248
250
|
}
|
|
249
251
|
|
|
252
|
+
function clearCheckboxes() {
|
|
253
|
+
checkboxes.value = [];
|
|
254
|
+
}
|
|
255
|
+
|
|
250
256
|
async function refreshExistingList(pk?: any) {
|
|
251
257
|
const currentData = rows.value;
|
|
252
258
|
if (!currentData) {
|