erp-blocks 1.1.1 → 1.1.3
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
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableProps } from '@nuxt/ui';
|
|
2
2
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<({
|
|
4
|
-
|
|
5
|
-
columns: TableColumn<T>[];
|
|
6
|
-
loading?: boolean;
|
|
4
|
+
tableProps: TableProps<T>;
|
|
7
5
|
totalRows?: number | undefined;
|
|
8
6
|
itemsPerPage?: number;
|
|
9
7
|
} & {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
defineProps({
|
|
3
|
-
|
|
4
|
-
columns: { type: Array, required: true },
|
|
5
|
-
loading: { type: Boolean, required: false },
|
|
3
|
+
tableProps: { type: Object, required: true },
|
|
6
4
|
totalRows: { type: null, required: false },
|
|
7
5
|
itemsPerPage: { type: Number, required: false, default: 5 }
|
|
8
6
|
});
|
|
@@ -12,9 +10,7 @@ const page = defineModel("page", { type: Number });
|
|
|
12
10
|
<template>
|
|
13
11
|
<div class="flex flex-col size-full space-y-4 py-4">
|
|
14
12
|
<UTable
|
|
15
|
-
|
|
16
|
-
:data="data"
|
|
17
|
-
:columns="columns"
|
|
13
|
+
v-bind="tableProps"
|
|
18
14
|
class="flex-1 border border-default rounded-lg grow"
|
|
19
15
|
>
|
|
20
16
|
<template
|
|
@@ -28,13 +24,13 @@ const page = defineModel("page", { type: Number });
|
|
|
28
24
|
</template>
|
|
29
25
|
</UTable>
|
|
30
26
|
<div
|
|
31
|
-
v-if="data && totalRows"
|
|
27
|
+
v-if="tableProps.data && totalRows"
|
|
32
28
|
class="flex items-center justify-between"
|
|
33
29
|
>
|
|
34
30
|
<span
|
|
35
31
|
class="text-base text-dimmed"
|
|
36
32
|
>
|
|
37
|
-
{{ data?.length || itemsPerPage }} of {{ totalRows || itemsPerPage }} rows
|
|
33
|
+
{{ tableProps.data?.length || itemsPerPage }} of {{ totalRows || itemsPerPage }} rows
|
|
38
34
|
</span>
|
|
39
35
|
<UPagination
|
|
40
36
|
v-model:page="page"
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableProps } from '@nuxt/ui';
|
|
2
2
|
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<({
|
|
4
|
-
|
|
5
|
-
columns: TableColumn<T>[];
|
|
6
|
-
loading?: boolean;
|
|
4
|
+
tableProps: TableProps<T>;
|
|
7
5
|
totalRows?: number | undefined;
|
|
8
6
|
itemsPerPage?: number;
|
|
9
7
|
} & {
|