@finema/core 3.16.0 → 3.16.1
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/module.mjs +1 -1
- package/dist/runtime/components/Table/Base.d.vue.ts +1 -0
- package/dist/runtime/components/Table/Base.vue +12 -1
- package/dist/runtime/components/Table/Base.vue.d.ts +1 -0
- package/dist/runtime/components/Table/index.d.vue.ts +1 -0
- package/dist/runtime/components/Table/index.vue +3 -1
- package/dist/runtime/components/Table/index.vue.d.ts +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
options: ITableOptions<any> & ISimpleTableOptions<any>;
|
|
5
5
|
ui?: (typeof tableTheme)['slots'];
|
|
6
6
|
to?: string | ((row: any) => any);
|
|
7
|
+
target?: string | ((row: any) => string | undefined);
|
|
7
8
|
};
|
|
8
9
|
declare var __VLS_25: {}, __VLS_32: {}, __VLS_34: {}, __VLS_53: any, __VLS_54: any;
|
|
9
10
|
type __VLS_Slots = {} & {
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
<NuxtLink
|
|
62
62
|
v-if="to && column.accessorKey !== 'actions'"
|
|
63
63
|
:to="resolveTo(row.original)"
|
|
64
|
+
:target="resolveTarget(row.original)"
|
|
65
|
+
:rel="
|
|
66
|
+
resolveTarget(row.original) === '_blank' ? 'noopener noreferrer' : void 0
|
|
67
|
+
"
|
|
64
68
|
class="absolute inset-0"
|
|
65
69
|
tabindex="-1"
|
|
66
70
|
aria-hidden="true"
|
|
@@ -135,7 +139,8 @@ const emits = defineEmits(["pageChange", "search", "select"]);
|
|
|
135
139
|
const props = defineProps({
|
|
136
140
|
options: { type: Object, required: true },
|
|
137
141
|
ui: { type: null, required: false },
|
|
138
|
-
to: { type: [String, Function], required: false }
|
|
142
|
+
to: { type: [String, Function], required: false },
|
|
143
|
+
target: { type: [String, Function], required: false }
|
|
139
144
|
});
|
|
140
145
|
const columnTypeComponents = {
|
|
141
146
|
[COLUMN_TYPES.NUMBER]: ColumnNumber,
|
|
@@ -171,6 +176,12 @@ const resolveTo = (rowOriginal) => {
|
|
|
171
176
|
}
|
|
172
177
|
return props.to;
|
|
173
178
|
};
|
|
179
|
+
const resolveTarget = (rowOriginal) => {
|
|
180
|
+
if (typeof props.target === "function") {
|
|
181
|
+
return props.target(rowOriginal);
|
|
182
|
+
}
|
|
183
|
+
return props.target;
|
|
184
|
+
};
|
|
174
185
|
useWatchChange(
|
|
175
186
|
() => props.options.pageOptions?.currentPage,
|
|
176
187
|
(value) => {
|
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
options: ITableOptions<any> & ISimpleTableOptions<any>;
|
|
5
5
|
ui?: (typeof tableTheme)['slots'];
|
|
6
6
|
to?: string | ((row: any) => any);
|
|
7
|
+
target?: string | ((row: any) => string | undefined);
|
|
7
8
|
};
|
|
8
9
|
declare var __VLS_25: {}, __VLS_32: {}, __VLS_34: {}, __VLS_53: any, __VLS_54: any;
|
|
9
10
|
type __VLS_Slots = {} & {
|
|
@@ -13,6 +13,7 @@ type __VLS_Props = {
|
|
|
13
13
|
right: string[];
|
|
14
14
|
};
|
|
15
15
|
to?: string | ((row: any) => any);
|
|
16
|
+
target?: string | ((row: any) => string | undefined);
|
|
16
17
|
};
|
|
17
18
|
type __VLS_Slots = Slot;
|
|
18
19
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:ui="computedUi"
|
|
21
21
|
:column-pinning="computedColumnPinning"
|
|
22
22
|
:to="to"
|
|
23
|
+
:target="target"
|
|
23
24
|
@page-change="onPageChange"
|
|
24
25
|
@search="emits('search', q)"
|
|
25
26
|
@select="emits('select', $event)"
|
|
@@ -51,7 +52,8 @@ const props = defineProps({
|
|
|
51
52
|
left: [],
|
|
52
53
|
right: []
|
|
53
54
|
}) },
|
|
54
|
-
to: { type: [String, Function], required: false }
|
|
55
|
+
to: { type: [String, Function], required: false },
|
|
56
|
+
target: { type: [String, Function], required: false }
|
|
55
57
|
});
|
|
56
58
|
defineSlots();
|
|
57
59
|
const tableContainer = ref();
|
|
@@ -13,6 +13,7 @@ type __VLS_Props = {
|
|
|
13
13
|
right: string[];
|
|
14
14
|
};
|
|
15
15
|
to?: string | ((row: any) => any);
|
|
16
|
+
target?: string | ((row: any) => string | undefined);
|
|
16
17
|
};
|
|
17
18
|
type __VLS_Slots = Slot;
|
|
18
19
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|