@v1nt1248/3nclient-lib 0.2.72 → 0.2.74
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/components/ui3n-table/composables/useTable.d.ts +5 -0
- package/dist/components/ui3n-table/types.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +2473 -2468
- package/package.json +1 -1
- package/src/components/ui3n-table/composables/useTable.ts +12 -1
- package/src/components/ui3n-table/types.ts +1 -0
- package/src/components/ui3n-table/ui3n-table.vue +5 -1
package/package.json
CHANGED
|
@@ -49,6 +49,16 @@ export function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<
|
|
|
49
49
|
}, '');
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
+
const unusedPlaceCssStyle = computed(() => {
|
|
53
|
+
if (!props.config?.minHeightUnusedPlace || isNaN(Number(props.config?.minHeightUnusedPlace))) {
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
minHeight: `${Number(props.config?.minHeightUnusedPlace || 0)}px`,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
|
|
52
62
|
function setFieldAsRowKey() {
|
|
53
63
|
const { config = {}, body } = props;
|
|
54
64
|
const { fieldAsRowKey } = config;
|
|
@@ -193,7 +203,7 @@ export function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<
|
|
|
193
203
|
}
|
|
194
204
|
}, {
|
|
195
205
|
immediate: true,
|
|
196
|
-
}
|
|
206
|
+
},
|
|
197
207
|
);
|
|
198
208
|
|
|
199
209
|
watch(
|
|
@@ -207,6 +217,7 @@ export function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<
|
|
|
207
217
|
|
|
208
218
|
return {
|
|
209
219
|
tableEl,
|
|
220
|
+
unusedPlaceCssStyle,
|
|
210
221
|
currentConfig,
|
|
211
222
|
visibleColumns,
|
|
212
223
|
hasGroupActionsRow,
|
|
@@ -18,6 +18,7 @@ export type Ui3nTableConfig<T extends Ui3nTableBodyBaseItem, K extends keyof T =
|
|
|
18
18
|
columnStyle?: { [P in Omit<K, 'id'> as string | number]: Record<string, string> };
|
|
19
19
|
fieldAsRowKey?: keyof T;
|
|
20
20
|
showNoDataMessage?: boolean;
|
|
21
|
+
minHeightUnusedPlace?: number | string;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export type Ui3nTableHeadProps<T extends Ui3nTableBodyBaseItem> = {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
const {
|
|
14
14
|
tableEl,
|
|
15
|
+
unusedPlaceCssStyle,
|
|
15
16
|
currentConfig,
|
|
16
17
|
visibleColumns,
|
|
17
18
|
hasGroupActionsRow,
|
|
@@ -183,7 +184,10 @@
|
|
|
183
184
|
</div>
|
|
184
185
|
|
|
185
186
|
<!-- table: unused space-->
|
|
186
|
-
<div
|
|
187
|
+
<div
|
|
188
|
+
:class="$style.unusedPlace"
|
|
189
|
+
:style="unusedPlaceCssStyle"
|
|
190
|
+
>
|
|
187
191
|
<slot name="unused-place" />
|
|
188
192
|
</div>
|
|
189
193
|
</div>
|