@unsource/ui 2.7.1 → 2.7.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 +1 -1
- package/dist/runtime/components/UnTable.d.vue.ts +13 -11
- package/dist/runtime/components/UnTable.vue +1 -2
- package/dist/runtime/components/UnTable.vue.d.ts +13 -11
- package/dist/runtime/components/UnTableRow.d.vue.ts +2 -1
- package/dist/runtime/components/UnTableRow.vue +1 -1
- package/dist/runtime/components/UnTableRow.vue.d.ts +2 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
export type TableCol = {
|
|
2
|
+
title: string;
|
|
3
|
+
handler: () => string;
|
|
4
|
+
name: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
key?: string | string[];
|
|
7
|
+
subKey?: string | string[];
|
|
8
|
+
class?: string;
|
|
9
|
+
dir?: string;
|
|
10
|
+
isDesktop?: boolean;
|
|
11
|
+
isMobile?: boolean;
|
|
12
|
+
};
|
|
1
13
|
type __VLS_Props = {
|
|
2
|
-
cols?:
|
|
3
|
-
title: string;
|
|
4
|
-
name: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
key?: string | string[];
|
|
7
|
-
subKey?: string | string[];
|
|
8
|
-
class?: string;
|
|
9
|
-
dir?: string;
|
|
10
|
-
isDesktop?: boolean;
|
|
11
|
-
isMobile?: boolean;
|
|
12
|
-
}[];
|
|
14
|
+
cols?: TableCol[];
|
|
13
15
|
items?: Record<string, unknown>[];
|
|
14
16
|
thClass?: string;
|
|
15
17
|
tdClass?: string;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
</template>
|
|
88
88
|
|
|
89
89
|
<script setup>
|
|
90
|
-
import { _at
|
|
90
|
+
import { _at } from "#imports";
|
|
91
91
|
const { cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass = "bg-gray-250", textClass = "text-gray-800 font-700 text-xs" } = defineProps({
|
|
92
92
|
cols: { type: Array, required: false },
|
|
93
93
|
items: { type: Array, required: false },
|
|
@@ -99,6 +99,5 @@ const { cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass
|
|
|
99
99
|
idKey: { type: String, required: false },
|
|
100
100
|
selectable: { type: Boolean, required: false }
|
|
101
101
|
});
|
|
102
|
-
const { isDesktop, isMobile } = useDevice();
|
|
103
102
|
const selected = defineModel();
|
|
104
103
|
</script>
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
export type TableCol = {
|
|
2
|
+
title: string;
|
|
3
|
+
handler: () => string;
|
|
4
|
+
name: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
key?: string | string[];
|
|
7
|
+
subKey?: string | string[];
|
|
8
|
+
class?: string;
|
|
9
|
+
dir?: string;
|
|
10
|
+
isDesktop?: boolean;
|
|
11
|
+
isMobile?: boolean;
|
|
12
|
+
};
|
|
1
13
|
type __VLS_Props = {
|
|
2
|
-
cols?:
|
|
3
|
-
title: string;
|
|
4
|
-
name: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
key?: string | string[];
|
|
7
|
-
subKey?: string | string[];
|
|
8
|
-
class?: string;
|
|
9
|
-
dir?: string;
|
|
10
|
-
isDesktop?: boolean;
|
|
11
|
-
isMobile?: boolean;
|
|
12
|
-
}[];
|
|
14
|
+
cols?: TableCol[];
|
|
13
15
|
items?: Record<string, unknown>[];
|
|
14
16
|
thClass?: string;
|
|
15
17
|
tdClass?: string;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
>
|
|
34
34
|
<div class="flex flex-col gap-0.5">
|
|
35
35
|
<p :class="textClass">
|
|
36
|
-
{{ _at(item, col.key).join(" ") }}
|
|
36
|
+
{{ col.handler ? col.handler(_at(item, col.key), item, col, items, cols) : _at(item, col.key).join(" ") }}
|
|
37
37
|
</p>
|
|
38
38
|
<small
|
|
39
39
|
v-if="col.subKey?.length"
|