@aplus-frontend/ui 7.4.5 → 7.6.0
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/es/index.mjs +208 -202
- package/es/src/ag-grid/editable/form-item.vue.mjs +14 -14
- package/es/src/ag-grid/editable/index.vue.mjs +20 -20
- package/es/src/ag-grid/index.vue.mjs +15 -15
- package/es/src/ap-field/date/index.vue.mjs +14 -14
- package/es/src/ap-field/date/read.vue2.mjs +3 -3
- package/es/src/ap-field/date-range/index.vue.mjs +8 -8
- package/es/src/ap-field/date-range/read.vue2.mjs +3 -3
- package/es/src/ap-form/item/index.vue.mjs +20 -20
- package/es/src/ap-form/item-group/helper.mjs +8 -8
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-grid/editable/form-item.vue.mjs +7 -7
- package/es/src/ap-grid/editable/index.vue.mjs +38 -38
- package/es/src/ap-grid/index.vue.mjs +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +37 -36
- package/es/src/ap-table/constants.d.ts +5 -5
- package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +2 -2
- package/es/src/business/ap-descriptions/style/index.mjs +2 -1
- package/es/src/business/ap-label/group/ApLabelGroup.mjs +14 -14
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +6 -6
- package/es/src/business/ap-tag/ap-tag-group.vue.mjs +2 -2
- package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
- package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-delete.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-down.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-eye.vue.mjs +2 -2
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/design-token/interface.d.ts +2 -0
- package/es/src/highlight/index.d.ts +3 -0
- package/es/src/highlight/index.mjs +2 -0
- package/es/src/highlight/index.vue.d.ts +31 -0
- package/es/src/highlight/index.vue.mjs +49 -0
- package/es/src/highlight/index.vue2.mjs +4 -0
- package/es/src/highlight/interface.d.ts +14 -0
- package/es/src/highlight/interface.mjs +1 -0
- package/es/src/highlight/style/index.d.ts +8 -0
- package/es/src/highlight/style/index.mjs +23 -0
- package/es/src/index.d.ts +2 -0
- package/es/src/index.mjs +309 -301
- package/es/src/locale/lang/en.mjs +17 -0
- package/es/src/locale/lang/zh-cn.mjs +17 -0
- package/es/src/time-ago/index.d.ts +4 -0
- package/es/src/time-ago/index.mjs +6 -0
- package/es/src/time-ago/index.vue.d.ts +10 -0
- package/es/src/time-ago/index.vue.mjs +47 -0
- package/es/src/time-ago/index.vue2.mjs +4 -0
- package/es/src/time-ago/interface.d.ts +16 -0
- package/es/src/time-ago/interface.mjs +1 -0
- package/es/src/time-ago/style/index.d.ts +3 -0
- package/es/src/time-ago/style/index.mjs +12 -0
- package/es/src/time-ago/useTimeAgo.d.ts +42 -0
- package/es/src/time-ago/useTimeAgo.mjs +57 -0
- package/es/src/time-ago/utils.d.ts +4 -0
- package/es/src/time-ago/utils.mjs +23 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/helper.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +5 -5
- package/lib/src/business/ap-appendix/icons/file-icon.vue.js +1 -1
- package/lib/src/business/ap-descriptions/style/index.js +1 -1
- package/lib/src/business/ap-label/group/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-upload-file/icon/delete-icon.vue.js +1 -1
- package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
- package/lib/src/business/ap-view/icons/line-delete.vue.js +1 -1
- package/lib/src/business/ap-view/icons/line-down.vue.js +1 -1
- package/lib/src/business/ap-view/icons/line-eye.vue.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/design-token/interface.d.ts +2 -0
- package/lib/src/highlight/index.d.ts +3 -0
- package/lib/src/highlight/index.js +1 -0
- package/lib/src/highlight/index.vue.d.ts +31 -0
- package/lib/src/highlight/index.vue.js +1 -0
- package/lib/src/highlight/index.vue2.js +1 -0
- package/lib/src/highlight/interface.d.ts +14 -0
- package/lib/src/highlight/interface.js +1 -0
- package/lib/src/highlight/style/index.d.ts +8 -0
- package/lib/src/highlight/style/index.js +1 -0
- package/lib/src/index.d.ts +2 -0
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/time-ago/index.d.ts +4 -0
- package/lib/src/time-ago/index.js +1 -0
- package/lib/src/time-ago/index.vue.d.ts +10 -0
- package/lib/src/time-ago/index.vue.js +1 -0
- package/lib/src/time-ago/index.vue2.js +1 -0
- package/lib/src/time-ago/interface.d.ts +16 -0
- package/lib/src/time-ago/interface.js +1 -0
- package/lib/src/time-ago/style/index.d.ts +3 -0
- package/lib/src/time-ago/style/index.js +1 -0
- package/lib/src/time-ago/useTimeAgo.d.ts +42 -0
- package/lib/src/time-ago/useTimeAgo.js +1 -0
- package/lib/src/time-ago/utils.d.ts +4 -0
- package/lib/src/time-ago/utils.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -47,6 +47,7 @@ declare function __VLS_template(): {
|
|
|
47
47
|
readonly onMousedown?: MouseEventHandler | undefined;
|
|
48
48
|
readonly value?: string | number | undefined;
|
|
49
49
|
readonly disabled?: boolean | undefined;
|
|
50
|
+
readonly placeholder?: string | number | undefined;
|
|
50
51
|
readonly prefixCls?: string | undefined;
|
|
51
52
|
readonly name?: string | undefined;
|
|
52
53
|
readonly loading?: boolean | undefined;
|
|
@@ -57,7 +58,6 @@ declare function __VLS_template(): {
|
|
|
57
58
|
readonly focused?: boolean | undefined;
|
|
58
59
|
readonly readonly?: boolean | undefined;
|
|
59
60
|
readonly autocomplete?: string | undefined;
|
|
60
|
-
readonly placeholder?: string | number | undefined;
|
|
61
61
|
readonly maxlength?: number | undefined;
|
|
62
62
|
readonly showCount?: boolean | ShowCountProps | undefined;
|
|
63
63
|
readonly htmlSize?: number | undefined;
|
|
@@ -210,6 +210,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTextPasswordProps, {
|
|
|
210
210
|
readonly onMousedown?: MouseEventHandler | undefined;
|
|
211
211
|
readonly value?: string | number | undefined;
|
|
212
212
|
readonly disabled?: boolean | undefined;
|
|
213
|
+
readonly placeholder?: string | number | undefined;
|
|
213
214
|
readonly prefixCls?: string | undefined;
|
|
214
215
|
readonly name?: string | undefined;
|
|
215
216
|
readonly loading?: boolean | undefined;
|
|
@@ -220,7 +221,6 @@ declare const __VLS_component: DefineComponent<ApFormItemTextPasswordProps, {
|
|
|
220
221
|
readonly focused?: boolean | undefined;
|
|
221
222
|
readonly readonly?: boolean | undefined;
|
|
222
223
|
readonly autocomplete?: string | undefined;
|
|
223
|
-
readonly placeholder?: string | number | undefined;
|
|
224
224
|
readonly maxlength?: number | undefined;
|
|
225
225
|
readonly showCount?: boolean | ShowCountProps | undefined;
|
|
226
226
|
readonly htmlSize?: number | undefined;
|
|
@@ -70,6 +70,7 @@ declare function __VLS_template(): {
|
|
|
70
70
|
readonly direction?: "ltr" | "rtl" | undefined;
|
|
71
71
|
readonly animation?: string | undefined;
|
|
72
72
|
readonly children?: VueNode[] | undefined;
|
|
73
|
+
readonly placeholder?: any;
|
|
73
74
|
readonly prefixCls?: string | undefined;
|
|
74
75
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
75
76
|
readonly loading?: boolean | undefined;
|
|
@@ -81,7 +82,6 @@ declare function __VLS_template(): {
|
|
|
81
82
|
readonly getPopupContainer?: RenderDOMFunc | undefined;
|
|
82
83
|
readonly virtual?: boolean | undefined;
|
|
83
84
|
readonly dropdownMatchSelectWidth?: number | boolean | undefined;
|
|
84
|
-
readonly placeholder?: any;
|
|
85
85
|
readonly status?: "" | "error" | "warning" | undefined;
|
|
86
86
|
readonly defaultValue?: unknown;
|
|
87
87
|
readonly prefix?: any;
|
|
@@ -861,6 +861,7 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
|
|
|
861
861
|
readonly direction?: "ltr" | "rtl" | undefined;
|
|
862
862
|
readonly animation?: string | undefined;
|
|
863
863
|
readonly children?: VueNode[] | undefined;
|
|
864
|
+
readonly placeholder?: any;
|
|
864
865
|
readonly prefixCls?: string | undefined;
|
|
865
866
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
866
867
|
readonly loading?: boolean | undefined;
|
|
@@ -872,7 +873,6 @@ declare const __VLS_component: DefineComponent<ApFormItemTreeSelectProps, {
|
|
|
872
873
|
readonly getPopupContainer?: RenderDOMFunc | undefined;
|
|
873
874
|
readonly virtual?: boolean | undefined;
|
|
874
875
|
readonly dropdownMatchSelectWidth?: number | boolean | undefined;
|
|
875
|
-
readonly placeholder?: any;
|
|
876
876
|
readonly status?: "" | "error" | "warning" | undefined;
|
|
877
877
|
readonly defaultValue?: unknown;
|
|
878
878
|
readonly prefix?: any;
|
|
@@ -115,7 +115,7 @@ const Se = /* @__PURE__ */ z({
|
|
|
115
115
|
type: Boolean
|
|
116
116
|
},
|
|
117
117
|
rowSelection: {
|
|
118
|
-
type: Boolean,
|
|
118
|
+
type: [Boolean, Object],
|
|
119
119
|
default: void 0
|
|
120
120
|
},
|
|
121
121
|
onLoadingChange: {},
|
|
@@ -242,14 +242,14 @@ const Se = /* @__PURE__ */ z({
|
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function j(e) {
|
|
246
246
|
i?.setFieldValue(o.name, e);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function O(e) {
|
|
249
249
|
const n = e === "end" ? f.value.length - 1 : e;
|
|
250
250
|
p.value?.scrollToRow(n);
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function _() {
|
|
253
253
|
i?.setFieldValue?.(o.name, []);
|
|
254
254
|
}
|
|
255
255
|
return b({
|
|
@@ -259,9 +259,9 @@ const Se = /* @__PURE__ */ z({
|
|
|
259
259
|
getRowsData: L,
|
|
260
260
|
setRowData: T,
|
|
261
261
|
addMultiple: D,
|
|
262
|
-
scrollTo:
|
|
263
|
-
setTableData:
|
|
264
|
-
clear:
|
|
262
|
+
scrollTo: O,
|
|
263
|
+
setTableData: j,
|
|
264
|
+
clear: _,
|
|
265
265
|
removeByKey: k
|
|
266
266
|
}), (e, n) => (W(), H(s(y).FormItem, g(e.formItem, {
|
|
267
267
|
name: e.name,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as W, useSlots as U, ref as y, watch as C, unref as s, createBlock as $, openBlock as q, withCtx as p, createVNode as w, mergeProps as J, createSlots as Q, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as M } from "vue";
|
|
2
2
|
import { ApForm as m } from "../../ap-form/index.mjs";
|
|
3
|
-
import { isEqual as ee, isArray as c, isUndefined as
|
|
3
|
+
import { isEqual as ee, isArray as c, isUndefined as te, isNumber as g, cloneDeep as ae, omit as oe } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
6
|
import { isDef as b } from "../../utils/index.mjs";
|
|
@@ -115,7 +115,7 @@ const Fe = /* @__PURE__ */ W({
|
|
|
115
115
|
type: Boolean
|
|
116
116
|
},
|
|
117
117
|
rowSelection: {
|
|
118
|
-
type: Boolean,
|
|
118
|
+
type: [Boolean, Object],
|
|
119
119
|
default: void 0
|
|
120
120
|
},
|
|
121
121
|
onLoadingChange: {},
|
|
@@ -168,55 +168,55 @@ const Fe = /* @__PURE__ */ W({
|
|
|
168
168
|
expose: x,
|
|
169
169
|
emit: R
|
|
170
170
|
}) {
|
|
171
|
-
const B = U(),
|
|
171
|
+
const B = U(), t = v, {
|
|
172
172
|
b: S
|
|
173
173
|
} = re("editable-grid"), F = se("editable-grid"), E = R;
|
|
174
174
|
le("EditableGrid")(!1, "breaking", "EditableGrid has been EOL, Please use EditableAgGrid(https://aplus.aplnk.com/aplus-ui/components/ag-grid/editable/) instead.");
|
|
175
175
|
const h = y(), {
|
|
176
176
|
value: u,
|
|
177
177
|
updateValue: N
|
|
178
|
-
} = ie(
|
|
178
|
+
} = ie(t, E), i = y(), V = ue("valueTypeMap"), f = m.useWatch(t.name, i);
|
|
179
179
|
C(() => f.value, (e) => {
|
|
180
|
-
N(e),
|
|
180
|
+
N(e), t.onChange?.(e);
|
|
181
181
|
}, {
|
|
182
182
|
deep: !0,
|
|
183
183
|
flush: "post"
|
|
184
184
|
}), C(u, (e) => {
|
|
185
|
-
e !== s(f) && (ee(e, s(f)) || i.value?.setFieldValue(
|
|
185
|
+
e !== s(f) && (ee(e, s(f)) || i.value?.setFieldValue(t.name, e));
|
|
186
186
|
}, {
|
|
187
187
|
deep: !0
|
|
188
188
|
});
|
|
189
|
-
const k = ne(
|
|
189
|
+
const k = ne(t, V);
|
|
190
190
|
function L() {
|
|
191
191
|
i.value?.resetFields();
|
|
192
192
|
}
|
|
193
193
|
function _(e) {
|
|
194
|
-
return e ? (c(e) ? e : [e]).map((l) => c(l) ? [
|
|
194
|
+
return e ? (c(e) ? e : [e]).map((l) => c(l) ? [t.name, ...l] : [t.name, l]) : void 0;
|
|
195
195
|
}
|
|
196
196
|
async function D(e, n) {
|
|
197
|
-
return (await i.value?.validateFields(_(e), n))?.[
|
|
197
|
+
return (await i.value?.validateFields(_(e), n))?.[t.name];
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function O(e, n) {
|
|
200
200
|
const l = s(u)?.length || 0;
|
|
201
|
-
if (b(
|
|
201
|
+
if (b(t.maxLength) && l >= t.maxLength)
|
|
202
202
|
return;
|
|
203
|
-
const
|
|
203
|
+
const a = {
|
|
204
204
|
...e || {}
|
|
205
205
|
};
|
|
206
|
-
i.value?.setFieldValue?.(
|
|
206
|
+
i.value?.setFieldValue?.(t.name, a, !0, (o, r) => {
|
|
207
207
|
if (!o[r]) {
|
|
208
|
-
o[r] = [
|
|
208
|
+
o[r] = [a];
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
|
|
211
|
+
te(n) ? o[r].push(a) : o[r].splice(n, 0, a);
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const l = s(u)?.length || 0,
|
|
216
|
-
if (b(
|
|
214
|
+
function T(e, n = "suffix") {
|
|
215
|
+
const l = s(u)?.length || 0, a = g(e) ? e : e.length;
|
|
216
|
+
if (b(t.maxLength) && l + a > t.maxLength)
|
|
217
217
|
return;
|
|
218
|
-
const o = g(e) ? new Array(e).fill(0).map(() => ({})) :
|
|
219
|
-
i.value?.setFieldValue?.(
|
|
218
|
+
const o = g(e) ? new Array(e).fill(0).map(() => ({})) : ae(e);
|
|
219
|
+
i.value?.setFieldValue?.(t.name, o, !0, (r, d) => {
|
|
220
220
|
if (!r[d]) {
|
|
221
221
|
r[d] = [...o];
|
|
222
222
|
return;
|
|
@@ -226,34 +226,34 @@ const Fe = /* @__PURE__ */ W({
|
|
|
226
226
|
}
|
|
227
227
|
function j(e) {
|
|
228
228
|
const n = new Set(g(e) ? [e] : e);
|
|
229
|
-
i.value?.setFieldValue?.(
|
|
230
|
-
l[
|
|
229
|
+
i.value?.setFieldValue?.(t.name, void 0, !0, (l, a) => {
|
|
230
|
+
l[a] = l[a].filter((o, r) => !n.has(r));
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
function A(e) {
|
|
234
234
|
const n = new Set(c(e) ? e : [e]);
|
|
235
|
-
n.size !== 0 && i.value?.setFieldValue?.(
|
|
236
|
-
l[
|
|
235
|
+
n.size !== 0 && i.value?.setFieldValue?.(t.name, void 0, !0, (l, a) => {
|
|
236
|
+
l[a] = l[a].filter((o) => !n.has(o[t.rowKey]));
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
function z() {
|
|
240
240
|
return s(u);
|
|
241
241
|
}
|
|
242
242
|
function G(e) {
|
|
243
|
-
i.value?.setFieldValue(
|
|
243
|
+
i.value?.setFieldValue(t.name, e);
|
|
244
244
|
}
|
|
245
245
|
function I(e) {
|
|
246
246
|
return s(u)?.[e];
|
|
247
247
|
}
|
|
248
248
|
function K(e, n, l = !0) {
|
|
249
|
-
i.value?.setFieldValue?.(
|
|
250
|
-
if (!(!
|
|
249
|
+
i.value?.setFieldValue?.(t.name, void 0, !0, (a, o) => {
|
|
250
|
+
if (!(!a[o] || !a[o][e])) {
|
|
251
251
|
if (!l) {
|
|
252
|
-
const r = Object.keys(
|
|
252
|
+
const r = Object.keys(a[o][e]);
|
|
253
253
|
for (const d of r)
|
|
254
|
-
d !==
|
|
254
|
+
d !== t.rowKey && delete a[o][e][d];
|
|
255
255
|
}
|
|
256
|
-
Object.assign(
|
|
256
|
+
Object.assign(a[o][e], {
|
|
257
257
|
...n
|
|
258
258
|
});
|
|
259
259
|
}
|
|
@@ -264,17 +264,17 @@ const Fe = /* @__PURE__ */ W({
|
|
|
264
264
|
h.value?.scrollToRow(n);
|
|
265
265
|
}
|
|
266
266
|
function H() {
|
|
267
|
-
i.value?.setFieldValue?.(
|
|
267
|
+
i.value?.setFieldValue?.(t.name, []);
|
|
268
268
|
}
|
|
269
269
|
return x({
|
|
270
270
|
resetFields: L,
|
|
271
271
|
validateFields: D,
|
|
272
|
-
add:
|
|
272
|
+
add: O,
|
|
273
273
|
remove: j,
|
|
274
274
|
getRowData: I,
|
|
275
275
|
getRowsData: z,
|
|
276
276
|
setRowData: K,
|
|
277
|
-
addMultiple:
|
|
277
|
+
addMultiple: T,
|
|
278
278
|
scrollTo: P,
|
|
279
279
|
clear: H,
|
|
280
280
|
setTableData: G,
|
|
@@ -283,7 +283,7 @@ const Fe = /* @__PURE__ */ W({
|
|
|
283
283
|
ref_key: "formRef",
|
|
284
284
|
ref: i,
|
|
285
285
|
"initial-values": {
|
|
286
|
-
[
|
|
286
|
+
[t.name]: s(u)
|
|
287
287
|
},
|
|
288
288
|
style: {
|
|
289
289
|
height: "100%"
|
|
@@ -293,7 +293,7 @@ const Fe = /* @__PURE__ */ W({
|
|
|
293
293
|
name: e.name,
|
|
294
294
|
"no-style": ""
|
|
295
295
|
}, {
|
|
296
|
-
default: p(() => [w(de, J(s(oe)(
|
|
296
|
+
default: p(() => [w(de, J(s(oe)(t, ["name", "value", "onUpdate:value", "maxLength", "onChange", "defaultValue"]), {
|
|
297
297
|
ref_key: "tableRef",
|
|
298
298
|
ref: h,
|
|
299
299
|
class: [s(S)(), s(F)],
|
|
@@ -302,9 +302,9 @@ const Fe = /* @__PURE__ */ W({
|
|
|
302
302
|
"search-form": !1
|
|
303
303
|
}), Q({
|
|
304
304
|
_: 2
|
|
305
|
-
}, [X(B, (l,
|
|
306
|
-
name:
|
|
307
|
-
fn: p((o) => [Y(e.$slots,
|
|
305
|
+
}, [X(B, (l, a) => ({
|
|
306
|
+
name: a,
|
|
307
|
+
fn: p((o) => [Y(e.$slots, a, Z(M(o || {})))])
|
|
308
308
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
309
309
|
_: 3
|
|
310
310
|
}, 8, ["name"])]),
|
|
@@ -90,7 +90,7 @@ const so = /* @__PURE__ */ Qe({
|
|
|
90
90
|
footerCellConfig: {},
|
|
91
91
|
round: { type: Boolean, default: void 0 },
|
|
92
92
|
columns: {},
|
|
93
|
-
rowSelection: { type: Boolean },
|
|
93
|
+
rowSelection: { type: [Boolean, Object] },
|
|
94
94
|
card: { type: Boolean, default: !1 },
|
|
95
95
|
params: {},
|
|
96
96
|
request: {},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $e, useSlots as je, ref as c, computed as n, unref as o, toRef as He, createVNode as p, Fragment as ae, watch as
|
|
1
|
+
import { defineComponent as $e, useSlots as je, ref as c, computed as n, unref as o, toRef as He, createVNode as p, Fragment as ae, watch as B, createElementBlock as k, openBlock as f, normalizeStyle as E, normalizeClass as m, createCommentVNode as le, createElementVNode as K, mergeProps as z, createSlots as ne, withCtx as w, renderList as se, createBlock as ue, resolveDynamicComponent as _e, renderSlot as v, normalizeProps as Ue, guardReactiveProps as qe } from "vue";
|
|
2
2
|
import { Divider as Me, Table as Ge } from "@aplus-frontend/antdv";
|
|
3
3
|
import { useToken as Je } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
4
|
import { ApForm as Qe } from "../ap-form/index.mjs";
|
|
@@ -167,7 +167,7 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
167
167
|
} = dr(), D = c(), $ = c(), {
|
|
168
168
|
isStickyMode: j,
|
|
169
169
|
scrollBarRef: R
|
|
170
|
-
} = fr(D),
|
|
170
|
+
} = fr(D), C = c(r.size), s = c([]), H = c([]), _ = cr(), P = c(!0), U = n(() => (L++, r.columns?.filter((e) => !e.hideInSearch && e.dataIndex && (e.valueType || e.customRenderFormItem) && !de.includes(e.valueType))?.sort((e, a) => {
|
|
171
171
|
let t = ce(e.order);
|
|
172
172
|
return ce(a.order) - t;
|
|
173
173
|
})?.map((e) => {
|
|
@@ -191,9 +191,9 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
191
191
|
if (e.filters && !e.onFilter)
|
|
192
192
|
return e.key || e?.dataIndex;
|
|
193
193
|
}).filter(Boolean)), Te = n(() => g(r.dataSource) ? y.records : r.dataSource), Fe = n(() => fe(r.manual) ? r.manual : mr(b.searchFormExtra?.() || []).some((a) => a.type?.name === "ApView")), {
|
|
194
|
-
rowSelection:
|
|
195
|
-
selectedRows:
|
|
196
|
-
...
|
|
194
|
+
rowSelection: T,
|
|
195
|
+
selectedRows: F,
|
|
196
|
+
...x
|
|
197
197
|
} = ir({
|
|
198
198
|
fixed: !0,
|
|
199
199
|
...r.rowSelection === !0 ? {} : r.rowSelection,
|
|
@@ -210,12 +210,12 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
210
210
|
getColumnSFConfig: G,
|
|
211
211
|
sortedInfo: Be,
|
|
212
212
|
filteredInfo: ke,
|
|
213
|
-
setPaging:
|
|
214
|
-
getPaging:
|
|
213
|
+
setPaging: ze,
|
|
214
|
+
getPaging: Ie,
|
|
215
215
|
submitWith: J
|
|
216
216
|
} = Xe({
|
|
217
217
|
async request(e) {
|
|
218
|
-
if (!
|
|
218
|
+
if (!T.value.preserveSelectedRowKeys && g(r.dataSource) && !P.value && x.clearAll(), P.value && (P.value = !1), !g(r.dataSource))
|
|
219
219
|
return {
|
|
220
220
|
data: r.dataSource || [],
|
|
221
221
|
total: r.dataSource.length || 0
|
|
@@ -237,12 +237,12 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
237
237
|
pr({
|
|
238
238
|
columns: n(() => s.value),
|
|
239
239
|
columnsBackup: n(() => H.value),
|
|
240
|
-
size: n(() =>
|
|
240
|
+
size: n(() => C.value),
|
|
241
241
|
updateColumns(e) {
|
|
242
242
|
s.value = e;
|
|
243
243
|
},
|
|
244
244
|
updateSize(e) {
|
|
245
|
-
|
|
245
|
+
C.value = e;
|
|
246
246
|
},
|
|
247
247
|
dataSource: n(() => o(y).records),
|
|
248
248
|
getSearchFormValues: Y,
|
|
@@ -302,13 +302,13 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
302
302
|
}
|
|
303
303
|
e(s.value);
|
|
304
304
|
};
|
|
305
|
-
|
|
305
|
+
B(() => [r.columns, r.columnResizable], () => {
|
|
306
306
|
const e = Pe();
|
|
307
307
|
s.value = e, H.value = e;
|
|
308
308
|
}, {
|
|
309
309
|
deep: !0,
|
|
310
310
|
immediate: !0
|
|
311
|
-
}),
|
|
311
|
+
}), B(() => [Be.value, ke.value], () => {
|
|
312
312
|
Ne();
|
|
313
313
|
}, {
|
|
314
314
|
deep: !0
|
|
@@ -327,7 +327,7 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
327
327
|
if (r.columns?.some((e) => e.ellipsis))
|
|
328
328
|
return "fixed";
|
|
329
329
|
}), Q = n(() => {
|
|
330
|
-
const e = o(q), a = o(
|
|
330
|
+
const e = o(q), a = o(T);
|
|
331
331
|
return {
|
|
332
332
|
...r,
|
|
333
333
|
...e,
|
|
@@ -358,9 +358,9 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
358
358
|
content: t
|
|
359
359
|
}, null) : t;
|
|
360
360
|
}
|
|
361
|
-
|
|
361
|
+
B(() => o(y).loading, (e) => {
|
|
362
362
|
r.onLoadingChange?.(e);
|
|
363
|
-
}),
|
|
363
|
+
}), B(() => r.dataSource, (e) => {
|
|
364
364
|
xe(e);
|
|
365
365
|
}, {
|
|
366
366
|
immediate: !0
|
|
@@ -391,13 +391,13 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
391
391
|
submitWith: () => J(),
|
|
392
392
|
setSearchFormValues: X,
|
|
393
393
|
getSearchFormValues: Y,
|
|
394
|
-
setPaging:
|
|
395
|
-
getPaging:
|
|
394
|
+
setPaging: ze,
|
|
395
|
+
getPaging: Ie,
|
|
396
396
|
getShownColumns: Le,
|
|
397
397
|
dataSource: n(() => o(y).records),
|
|
398
398
|
rowSelection: {
|
|
399
|
-
selectedRows: n(() => o(
|
|
400
|
-
...
|
|
399
|
+
selectedRows: n(() => o(F)),
|
|
400
|
+
...x
|
|
401
401
|
},
|
|
402
402
|
scrollBar: {
|
|
403
403
|
x: {
|
|
@@ -409,18 +409,18 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
409
409
|
getSearchFormSorterItems: Z,
|
|
410
410
|
setSearchFormSorterItems: ee,
|
|
411
411
|
resetSearchFormSorterItems: re
|
|
412
|
-
}), (e, a) => (f(),
|
|
412
|
+
}), (e, a) => (f(), k("div", {
|
|
413
413
|
ref_key: "tableWrapperRef",
|
|
414
414
|
ref: D,
|
|
415
415
|
class: m(Ee.value),
|
|
416
416
|
style: E(o(Se)({
|
|
417
417
|
"scroll-bar-width": `${o(_)}px`
|
|
418
418
|
}))
|
|
419
|
-
}, [o(g)(e.dataSource) && e.searchForm !== !1 && U.value.length > 0 ? (f(),
|
|
419
|
+
}, [o(g)(e.dataSource) && e.searchForm !== !1 && U.value.length > 0 ? (f(), k("div", {
|
|
420
420
|
key: 0,
|
|
421
421
|
class: m(e.card ? o(I)("search-wrapper") : null),
|
|
422
422
|
style: E(e.searchFormWrapperStyle)
|
|
423
|
-
}, [p(o(Qe).SearchForm,
|
|
423
|
+
}, [p(o(Qe).SearchForm, z(e.searchForm || {}, {
|
|
424
424
|
ref_key: "formRef",
|
|
425
425
|
ref: i,
|
|
426
426
|
"custom-reset": "",
|
|
@@ -428,7 +428,7 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
428
428
|
onSubmit: o(N),
|
|
429
429
|
onReset: o(V)
|
|
430
430
|
}), ne({
|
|
431
|
-
default: w(() => [(f(!0),
|
|
431
|
+
default: w(() => [(f(!0), k(ae, null, se(U.value, (t) => (f(), ue(_e(t.renderNode), {
|
|
432
432
|
key: t.dataIndex
|
|
433
433
|
}))), 128))]),
|
|
434
434
|
_: 2
|
|
@@ -443,31 +443,31 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
443
443
|
style: E(e.tableWrapperStyle)
|
|
444
444
|
}, [K("div", {
|
|
445
445
|
class: m(o(d)("header-wrapper"))
|
|
446
|
-
}, [e.settings ? (f(),
|
|
446
|
+
}, [e.settings ? (f(), k("div", {
|
|
447
447
|
key: 0,
|
|
448
448
|
class: m(o(d)("header"))
|
|
449
449
|
}, [K("div", {
|
|
450
450
|
class: m(o(O)("header", "title"))
|
|
451
|
-
}, [v(e.$slots, "title",
|
|
452
|
-
selectedRows: o(
|
|
453
|
-
selectedRowKeys: o(
|
|
451
|
+
}, [v(e.$slots, "title", z({
|
|
452
|
+
selectedRows: o(F),
|
|
453
|
+
selectedRowKeys: o(T).selectedRowKeys,
|
|
454
454
|
shownColumns: s.value
|
|
455
|
-
},
|
|
455
|
+
}, x))], 2), b.title ? (f(), ue(o(Me), {
|
|
456
456
|
key: 0,
|
|
457
457
|
type: "vertical"
|
|
458
458
|
})) : le("", !0), p(wr, {
|
|
459
459
|
config: e.settings === !0 ? {} : e.settings
|
|
460
|
-
}, null, 8, ["config"])], 2)) : v(e.$slots, "title",
|
|
460
|
+
}, null, 8, ["config"])], 2)) : v(e.$slots, "title", z({
|
|
461
461
|
key: 1,
|
|
462
|
-
selectedRows: o(
|
|
463
|
-
selectedRowKeys: o(
|
|
462
|
+
selectedRows: o(F),
|
|
463
|
+
selectedRowKeys: o(T).selectedRowKeys,
|
|
464
464
|
shownColumns: s.value
|
|
465
|
-
},
|
|
465
|
+
}, x))], 2), p(o(Ge), z({
|
|
466
466
|
ref_key: "antdTableRef",
|
|
467
467
|
ref: $,
|
|
468
468
|
class: o(d)("table")
|
|
469
469
|
}, Q.value, {
|
|
470
|
-
size:
|
|
470
|
+
size: C.value,
|
|
471
471
|
"table-layout": Ae.value,
|
|
472
472
|
columns: s.value,
|
|
473
473
|
onResizeColumn: a[0] || (a[0] = (t, u) => u.width = t)
|
|
@@ -475,7 +475,7 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
475
475
|
summary: w(() => [v(e.$slots, "summary", {
|
|
476
476
|
columns: s.value,
|
|
477
477
|
records: Q.value.dataSource,
|
|
478
|
-
selectedRows: o(
|
|
478
|
+
selectedRows: o(F)
|
|
479
479
|
})]),
|
|
480
480
|
_: 2
|
|
481
481
|
}, [o(j) ? {
|
|
@@ -486,8 +486,9 @@ const Gr = /* @__PURE__ */ $e({
|
|
|
486
486
|
"scroll-container": $.value?.table?.scrollBodyRef,
|
|
487
487
|
direction: "horizontal",
|
|
488
488
|
"bar-color": "var(--scrollbar-thumb-color-base)",
|
|
489
|
-
"track-color": "var(--table-header-bg, #f2f6f9)"
|
|
490
|
-
|
|
489
|
+
"track-color": "var(--table-header-bg, #f2f6f9)",
|
|
490
|
+
"extra-size": C.value === "middle" ? 13 : 10
|
|
491
|
+
}, null, 8, ["scroll-container", "extra-size"])]),
|
|
491
492
|
key: "0"
|
|
492
493
|
} : void 0, se(o(ie)(b, ["title", "searchFormExtra", "headerCell", "summary"]), (t, u) => ({
|
|
493
494
|
name: u,
|
|
@@ -209,9 +209,9 @@ export declare const apTableFormItemMap: {
|
|
|
209
209
|
type: "up" | "down";
|
|
210
210
|
}) => void) | undefined;
|
|
211
211
|
readonly type?: string | undefined;
|
|
212
|
+
readonly placeholder?: string | undefined;
|
|
212
213
|
readonly name?: string | undefined;
|
|
213
214
|
readonly id?: string | undefined;
|
|
214
|
-
readonly placeholder?: string | undefined;
|
|
215
215
|
readonly valueModifiers?: Record<string, any> | undefined;
|
|
216
216
|
readonly addonBefore?: any;
|
|
217
217
|
readonly addonAfter?: any;
|
|
@@ -918,6 +918,7 @@ export declare const apTableFormItemMap: {
|
|
|
918
918
|
readonly direction?: "ltr" | "rtl" | undefined;
|
|
919
919
|
readonly animation?: string | undefined;
|
|
920
920
|
readonly children?: VueNode[] | undefined;
|
|
921
|
+
readonly placeholder?: any;
|
|
921
922
|
readonly prefixCls?: string | undefined;
|
|
922
923
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
923
924
|
readonly loading?: boolean | undefined;
|
|
@@ -928,7 +929,6 @@ export declare const apTableFormItemMap: {
|
|
|
928
929
|
readonly getPopupContainer?: RenderDOMFunc | undefined;
|
|
929
930
|
readonly virtual?: boolean | undefined;
|
|
930
931
|
readonly dropdownMatchSelectWidth?: number | boolean | undefined;
|
|
931
|
-
readonly placeholder?: any;
|
|
932
932
|
readonly status?: "" | "error" | "warning" | undefined;
|
|
933
933
|
readonly defaultValue?: (string | number) | LabeledValue | (string | number)[] | LabeledValue[] | undefined;
|
|
934
934
|
readonly prefix?: any;
|
|
@@ -1679,6 +1679,7 @@ export declare const apTableFormItemMap: {
|
|
|
1679
1679
|
readonly onMousedown?: MouseEventHandler | undefined;
|
|
1680
1680
|
readonly value?: string | number | undefined;
|
|
1681
1681
|
readonly disabled?: boolean | undefined;
|
|
1682
|
+
readonly placeholder?: string | number | undefined;
|
|
1682
1683
|
readonly prefixCls?: string | undefined;
|
|
1683
1684
|
readonly name?: string | undefined;
|
|
1684
1685
|
readonly loading?: boolean | undefined;
|
|
@@ -1689,7 +1690,6 @@ export declare const apTableFormItemMap: {
|
|
|
1689
1690
|
readonly focused?: boolean | undefined;
|
|
1690
1691
|
readonly readonly?: boolean | undefined;
|
|
1691
1692
|
readonly autocomplete?: string | undefined;
|
|
1692
|
-
readonly placeholder?: string | number | undefined;
|
|
1693
1693
|
readonly maxlength?: number | undefined;
|
|
1694
1694
|
readonly showCount?: boolean | ShowCountProps | undefined;
|
|
1695
1695
|
readonly htmlSize?: number | undefined;
|
|
@@ -2301,6 +2301,7 @@ export declare const apTableFormItemMap: {
|
|
|
2301
2301
|
readonly onMousedown?: MouseEventHandler | undefined;
|
|
2302
2302
|
readonly value?: string | number | undefined;
|
|
2303
2303
|
readonly disabled?: boolean | undefined;
|
|
2304
|
+
readonly placeholder?: string | number | undefined;
|
|
2304
2305
|
readonly prefixCls?: string | undefined;
|
|
2305
2306
|
readonly name?: string | undefined;
|
|
2306
2307
|
readonly loading?: boolean | undefined;
|
|
@@ -2311,7 +2312,6 @@ export declare const apTableFormItemMap: {
|
|
|
2311
2312
|
readonly focused?: boolean | undefined;
|
|
2312
2313
|
readonly readonly?: boolean | undefined;
|
|
2313
2314
|
readonly autocomplete?: string | undefined;
|
|
2314
|
-
readonly placeholder?: string | number | undefined;
|
|
2315
2315
|
readonly maxlength?: number | undefined;
|
|
2316
2316
|
readonly showCount?: boolean | ShowCountProps | undefined;
|
|
2317
2317
|
readonly htmlSize?: number | undefined;
|
|
@@ -2515,6 +2515,7 @@ export declare const apTableFormItemMap: {
|
|
|
2515
2515
|
readonly direction?: "ltr" | "rtl" | undefined;
|
|
2516
2516
|
readonly animation?: string | undefined;
|
|
2517
2517
|
readonly children?: VueNode[] | undefined;
|
|
2518
|
+
readonly placeholder?: any;
|
|
2518
2519
|
readonly prefixCls?: string | undefined;
|
|
2519
2520
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
2520
2521
|
readonly loading?: boolean | undefined;
|
|
@@ -2526,7 +2527,6 @@ export declare const apTableFormItemMap: {
|
|
|
2526
2527
|
readonly getPopupContainer?: RenderDOMFunc | undefined;
|
|
2527
2528
|
readonly virtual?: boolean | undefined;
|
|
2528
2529
|
readonly dropdownMatchSelectWidth?: number | boolean | undefined;
|
|
2529
|
-
readonly placeholder?: any;
|
|
2530
2530
|
readonly status?: "" | "error" | "warning" | undefined;
|
|
2531
2531
|
readonly defaultValue?: unknown;
|
|
2532
2532
|
readonly prefix?: any;
|
|
@@ -8,9 +8,9 @@ const i = {}, o = {
|
|
|
8
8
|
viewBox: "0 0 16 16"
|
|
9
9
|
};
|
|
10
10
|
function c(n, Q) {
|
|
11
|
-
return e(), t("svg", o, Q[0] || (Q[0] = [
|
|
11
|
+
return e(), t("svg", o, [...Q[0] || (Q[0] = [
|
|
12
12
|
r('<defs><clipPath id="master_svg0_183_82058/183_76208"><rect x="0" y="0" width="16" height="16" rx="0"></rect></clipPath></defs><g clip-path="url(#master_svg0_183_82058/183_76208)"><g><rect x="0" y="0" width="16" height="16" rx="0" fill="#FFFFFF" fill-opacity="0.009999999776482582" style="mix-blend-mode:passthrough;"></rect></g><g><path d="M6.4678965625,11.32002357421875L11.4176265625,6.37025357421875Q11.4879565625,6.29993357421875,11.5260165625,6.20804357421875Q11.5640765625,6.11616357421875,11.5640765625,6.0167035742187505Q11.5640765625,5.967463574218749,11.5544665625,5.91916357421875Q11.5448565625,5.87086357421875,11.5260165625,5.82536357421875Q11.5071665625,5.77986357421875,11.4798065625,5.7389235742187505Q11.4524465625,5.69797357421875,11.4176265625,5.66315357421875Q11.3828065625,5.62833357421875,11.3418565625,5.6009735742187505Q11.3009165625,5.57361357421875,11.2554165625,5.55476357421875Q11.2099165625,5.535923574218749,11.1616165625,5.52631357421875Q11.1133165625,5.5167035742187505,11.0640765625,5.5167035742187505Q10.9646165625,5.5167035742187505,10.8727365625,5.55476357421875Q10.7808465625,5.59282357421875,10.7105265625,5.66315357421875L10.7102665625,5.66341357421875L5.7607865625,10.612923574218751Q5.4072265625,10.96648357421875,5.0536665625,10.612923574218751Q4.7001265624999995,10.25935357421875,5.0536765625,9.905773574218749L10.9462265625,4.01326057421875Q11.3855665625,3.57391357421875,12.0068765625,3.57391357421875Q12.6282265625,3.57391357421875,13.0675265625,4.01326157421875Q13.5069265625,4.45258357421875,13.5069265625,5.07391357421875Q13.5069265625,5.69523357421875,13.0675265625,6.13459357421875L7.1749865625,12.02712357421875Q6.4427665625,12.75934357421875,5.4072265625,12.75934357421875Q4.3716865625,12.75934357421875,3.6394565625,12.02712357421875Q2.9072265625,11.29489357421875,2.9072265625,10.25935357421875Q2.9072265625,9.22382357421875,3.6394565625,8.49159357421875L8.5891965625,3.5418455742187502Q8.6595265625,3.47151957421875,8.6975865625,3.37963357421875Q8.735646562500001,3.28774857421875,8.735646562500001,3.18829257421875Q8.735646562500001,3.13904677421875,8.7260365625,3.09074737421875Q8.7164265625,3.04244787421875,8.6975865625,2.99695077421875Q8.6787365625,2.95145357421875,8.651376562500001,2.91050757421875Q8.6240165625,2.86956157421875,8.5891965625,2.83473957421875Q8.5543765625,2.79991757421875,8.513426562500001,2.77255757421875Q8.472476562499999,2.74519857421875,8.4269865625,2.72635257421875Q8.381486562500001,2.70750757421875,8.3331865625,2.69789957421875Q8.284886562499999,2.68829257421875,8.235646562500001,2.68829257421875Q8.1361865625,2.68829257421875,8.0442965625,2.72635257421875Q7.9524165625,2.76441257421875,7.8820865625,2.83473957421875L7.8816965625,2.83512857421875L2.9323545625,7.78448357421875Q1.9072265625,8.80960357421875,1.9072265625,10.25935357421875Q1.9072265625,11.70910357421875,2.9323525625,12.73422357421875Q3.9574765625,13.75931357421875,5.4072265625,13.75931357421875Q6.8569765625,13.75931357421875,7.8820965625,12.73422357421875L13.7746265625,6.8416835742187505Q14.5069265625,6.10944357421875,14.5069265625,5.07391357421875Q14.5069265625,4.03837257421875,13.7746265625,3.30615057421875Q13.0424265625,2.57391357421875,12.0068765625,2.57391357421875Q10.9713365625,2.57391357421875,10.239126562500001,3.30615157421875L4.3465365625,9.19870357421875Q3.9072365625,9.638043574218749,3.9072365625,10.25935357421875Q3.9072365625,10.880663574218751,4.3465565625,11.32002357421875Q4.7859065625,11.75937357421875,5.4072265625,11.75937357421875Q6.0285465625,11.75937357421875,6.4678965625,11.32002357421875Z" fill-rule="evenodd" fill="currentColor" fill-opacity="1"></path></g></g>', 2)
|
|
13
|
-
]));
|
|
13
|
+
])]);
|
|
14
14
|
}
|
|
15
15
|
const _ = /* @__PURE__ */ l(i, [["render", c]]);
|
|
16
16
|
export {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, createVNode as o, mergeProps as t, createTextVNode as s } from "vue";
|
|
2
2
|
import "../../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
3
|
+
import i from "../ApLabel.mjs";
|
|
4
4
|
import { omit as n } from "lodash-unified";
|
|
5
|
-
import { ApLabelGroupProps as
|
|
5
|
+
import { ApLabelGroupProps as p } from "../constans.mjs";
|
|
6
6
|
import "../../ap-tag/index.mjs";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import
|
|
9
|
-
const {
|
|
10
|
-
b: f
|
|
11
|
-
} = p("ap-label-group"), _ = /* @__PURE__ */ l({
|
|
7
|
+
import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import f from "../../ap-tag/ap-tag.vue.mjs";
|
|
9
|
+
const _ = /* @__PURE__ */ m({
|
|
12
10
|
name: "ApLabelGroup",
|
|
13
|
-
props:
|
|
11
|
+
props: p(),
|
|
14
12
|
setup(r) {
|
|
15
|
-
const
|
|
13
|
+
const {
|
|
14
|
+
b: a
|
|
15
|
+
} = c("ap-label-group"), l = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(f, t(n(u, ["type", "size"]), {
|
|
16
16
|
size: "small",
|
|
17
17
|
type: "border"
|
|
18
18
|
}), null)) : e.customRender ? () => o("div", null, [e.customRender(r.record)]) : null;
|
|
19
19
|
return () => o("div", {
|
|
20
|
-
class:
|
|
21
|
-
}, [r.columns ? r.columns.map((e, u) => o(
|
|
20
|
+
class: a()
|
|
21
|
+
}, [r.columns ? r.columns.map((e, u) => o(i, t({
|
|
22
22
|
key: u,
|
|
23
23
|
show: r.value === e.value
|
|
24
24
|
}, n(e, ["value", "tagConfig", "customRender"])), {
|
|
25
|
-
custom:
|
|
26
|
-
})) : o("div", null, [
|
|
25
|
+
custom: l(e)
|
|
26
|
+
})) : o("div", null, [s("columns数组不能为空")])]);
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
export {
|