@hostlink/nuxt-light 1.10.14 → 1.10.15
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
|
@@ -54,7 +54,7 @@ const props = withDefaults(defineProps<LTableProps>(), {
|
|
|
54
54
|
minimizable: false,
|
|
55
55
|
selected: () => [],
|
|
56
56
|
loadingLabel: "Loading...",
|
|
57
|
-
noDataLabel: "No data available",
|
|
57
|
+
noDataLabel: "No data available",
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
const light = useLight();
|
|
@@ -337,8 +337,18 @@ const onRequest = async (p: any) => {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
loading.value = true;
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
try {
|
|
341
|
+
const allData = await getData(operation, localFilters, sort, this.offset, this.limit, builder.get());
|
|
342
|
+
this.setData(allData);
|
|
343
|
+
} catch (e: any) {
|
|
344
|
+
quasar.dialog({
|
|
345
|
+
message: e,
|
|
346
|
+
color: "negative"
|
|
347
|
+
})
|
|
348
|
+
this.setData({ data: [], meta: { total: 0, key: "", name: "" } });
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
|
|
342
352
|
|
|
343
353
|
}
|
|
344
354
|
}
|
|
@@ -399,14 +409,14 @@ const ss = Object.entries(slots).map(([key, value]) => {
|
|
|
399
409
|
return key;
|
|
400
410
|
});
|
|
401
411
|
|
|
402
|
-
const
|
|
412
|
+
const quasar = useQuasar();
|
|
403
413
|
const onDelete = async (id: any) => {
|
|
404
414
|
if (modelName.value == null) return;
|
|
405
415
|
|
|
406
416
|
try {
|
|
407
417
|
await model(modelName.value).delete(id);
|
|
408
418
|
} catch (e: any) {
|
|
409
|
-
|
|
419
|
+
quasar.notify({
|
|
410
420
|
message: e.message,
|
|
411
421
|
color: "negative"
|
|
412
422
|
})
|
|
@@ -518,8 +528,8 @@ const localSelected = computed({
|
|
|
518
528
|
</div>
|
|
519
529
|
</template>
|
|
520
530
|
|
|
521
|
-
<q-table v-bind="attrs" :loading="loading" :rows="rows??[]" ref="table" @request="onRequest"
|
|
522
|
-
v-model:pagination="pagination" :filter="filter" v-model:selected="localSelected">
|
|
531
|
+
<q-table v-bind="attrs" :loading="loading" :rows="rows ?? []" ref="table" @request="onRequest"
|
|
532
|
+
:columns="columns" v-model:pagination="pagination" :filter="filter" v-model:selected="localSelected">
|
|
523
533
|
|
|
524
534
|
<template #header="props">
|
|
525
535
|
<q-tr :props="props">
|