v-nuxt-ui 0.1.17 → 0.1.18
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
|
@@ -48,7 +48,7 @@ watch(
|
|
|
48
48
|
}"
|
|
49
49
|
>
|
|
50
50
|
<template #header="{ collapsed }">
|
|
51
|
-
<LayoutModuleMenu :collapsed="collapsed" />
|
|
51
|
+
<LayoutModuleMenu :collapsed="collapsed" class="w-full" />
|
|
52
52
|
<LayoutThemePicker v-if="!collapsed" class="ml-auto" />
|
|
53
53
|
</template>
|
|
54
54
|
<template #default="{ collapsed }">
|
|
@@ -26,7 +26,6 @@ const props = defineProps({
|
|
|
26
26
|
});
|
|
27
27
|
const whereQueryItem = defineModel("whereQueryItem", { type: Object, ...{ required: true } });
|
|
28
28
|
const { fetching, startFetching, endFetching } = useFetching();
|
|
29
|
-
const searchTerm = ref("");
|
|
30
29
|
const searchedData = ref([]);
|
|
31
30
|
const currentSelectedData = computed(() => [...whereQueryItem.value.extraData ?? []].flat());
|
|
32
31
|
const allData = computed(() => {
|
|
@@ -88,16 +87,16 @@ const commandPaletteGroups = computed(() => {
|
|
|
88
87
|
];
|
|
89
88
|
return options;
|
|
90
89
|
});
|
|
91
|
-
const onFetchItems = async () => {
|
|
90
|
+
const onFetchItems = async (searchTerm) => {
|
|
92
91
|
try {
|
|
93
92
|
startFetching();
|
|
94
93
|
const query = {
|
|
95
94
|
pagination: { pageNum: 1, pageSize: 10 },
|
|
96
95
|
whereQuery: { items: [] }
|
|
97
96
|
};
|
|
98
|
-
if (!isEmptyString(searchTerm
|
|
97
|
+
if (!isEmptyString(searchTerm)) {
|
|
99
98
|
props.searchFields.forEach((field) => {
|
|
100
|
-
query.whereQuery?.items?.push({ field, opr: "like", value: searchTerm
|
|
99
|
+
query.whereQuery?.items?.push({ field, opr: "like", value: searchTerm, andOr: "or" });
|
|
101
100
|
});
|
|
102
101
|
}
|
|
103
102
|
const result = await props.listApi(defu(query, props.extraQuery));
|
|
@@ -124,7 +123,7 @@ defineExpose({
|
|
|
124
123
|
:groups="commandPaletteGroups"
|
|
125
124
|
multiple
|
|
126
125
|
enable-footer-toolbar
|
|
127
|
-
@open="onFetchItems"
|
|
126
|
+
@open="() => onFetchItems('')"
|
|
128
127
|
@search="onDebounceFetchItems"
|
|
129
128
|
>
|
|
130
129
|
<UButton
|
package/package.json
CHANGED