@aplus-frontend/ui 0.2.0-beta.2 → 0.2.0-beta.4
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 +59 -52
- package/es/src/ap-field/interface.d.ts +6 -0
- package/es/src/ap-field/select/index.vue.mjs +14 -13
- package/es/src/ap-form/item/index.vue.mjs +58 -58
- package/es/src/ap-form/item-text/style/css.d.ts +0 -1
- package/es/src/ap-form/item-text/style/css.js +1 -1
- package/es/src/ap-form/item-text/style/index.d.ts +0 -1
- package/es/src/ap-form/item-text/style/index.js +1 -1
- package/es/src/ap-form/item-text-group/style/css.d.ts +0 -0
- package/es/src/ap-form/item-text-group/style/css.js +1 -0
- package/es/src/ap-form/item-text-group/style/index.d.ts +0 -0
- package/es/src/ap-form/item-text-group/style/index.js +1 -0
- package/es/src/ap-form/items/interface.d.ts +11 -0
- package/es/src/ap-form/items/text/group.vue.d.ts +42 -0
- package/es/src/ap-form/items/text/group.vue.mjs +4 -0
- package/es/src/ap-form/items/text/group.vue2.mjs +26 -0
- package/es/src/ap-form/items/text/index.d.ts +3 -1
- package/es/src/ap-form/items/text/index.mjs +10 -6
- package/es/src/ap-table/ap-table.vue.d.ts +2 -0
- package/es/src/ap-table/ap-table.vue.mjs +28 -27
- package/es/src/ap-table/constants.d.ts +20 -30
- package/es/src/ap-table/utils.d.ts +35 -3
- package/es/src/ap-table/utils.mjs +69 -69
- package/es/src/ap-upload/apUpload.vue.d.ts +17 -1
- package/es/src/ap-upload/apUpload.vue.mjs +54 -42
- package/es/src/ap-upload/apUploadTypes.d.ts +6 -1
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +4 -1
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +98 -90
- package/es/src/ap-upload/components/Picture.vue.d.ts +4 -1
- package/es/src/ap-upload/components/Picture.vue2.mjs +146 -138
- package/es/src/ap-upload/components/SingleFile.vue.d.ts +4 -1
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +84 -86
- package/es/src/business/ap-label/constans.d.ts +1 -1
- package/es/src/business/ap-label/interface.d.ts +2 -2
- package/es/src/business/ap-summary/ap-summary.vue.d.ts +30 -0
- package/es/src/business/ap-summary/ap-summary.vue.mjs +4 -0
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +68 -0
- package/es/src/business/ap-summary/index.d.ts +95 -0
- package/es/src/business/ap-summary/index.mjs +13 -0
- package/es/src/business/ap-summary/interface.d.ts +41 -0
- package/es/src/business/ap-summary/interface.mjs +1 -0
- package/es/src/business/ap-summary/style/css.d.ts +0 -0
- package/es/src/business/ap-summary/style/css.js +1 -0
- package/es/src/business/ap-summary/style/index.d.ts +0 -0
- package/es/src/business/ap-summary/style/index.js +1 -0
- package/es/src/business/ap-summary/utils.d.ts +12 -0
- package/es/src/business/ap-summary/utils.mjs +36 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +16 -14
- package/es/src/editable-table/utils.mjs +51 -51
- package/es/src/hooks/useControllableValue.d.ts +8 -3
- package/es/src/hooks/useControllableValue.mjs +18 -13
- package/es/src/index.mjs +59 -52
- package/es/src/path-map.mjs +3 -1
- package/es/src/utils/slot.d.ts +9 -1
- package/es/src/utils/slot.mjs +10 -6
- package/lib/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +6 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-text/style/css.d.ts +0 -1
- package/lib/src/ap-form/item-text/style/css.js +1 -1
- package/lib/src/ap-form/item-text/style/index.d.ts +0 -1
- package/lib/src/ap-form/item-text/style/index.js +1 -1
- package/lib/src/ap-form/item-text-group/style/css.d.ts +0 -0
- package/lib/src/ap-form/item-text-group/style/css.js +1 -0
- package/lib/src/ap-form/item-text-group/style/index.d.ts +0 -0
- package/lib/src/ap-form/item-text-group/style/index.js +1 -0
- package/lib/src/ap-form/items/interface.d.ts +11 -0
- package/lib/src/ap-form/items/text/group.vue.d.ts +42 -0
- package/lib/src/ap-form/items/text/group.vue.js +1 -0
- package/lib/src/ap-form/items/text/group.vue2.js +1 -0
- package/lib/src/ap-form/items/text/index.d.ts +3 -1
- package/lib/src/ap-form/items/text/index.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +20 -30
- package/lib/src/ap-table/utils.d.ts +35 -3
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +17 -1
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/apUploadTypes.d.ts +6 -1
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +4 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue.d.ts +4 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue.d.ts +4 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +1 -1
- package/lib/src/business/ap-label/interface.d.ts +2 -2
- package/lib/src/business/ap-summary/ap-summary.vue.d.ts +30 -0
- package/lib/src/business/ap-summary/ap-summary.vue.js +1 -0
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -0
- package/lib/src/business/ap-summary/index.d.ts +95 -0
- package/lib/src/business/ap-summary/index.js +1 -0
- package/lib/src/business/ap-summary/interface.d.ts +41 -0
- package/lib/src/business/ap-summary/interface.js +1 -0
- package/lib/src/business/ap-summary/style/css.d.ts +0 -0
- package/lib/src/business/ap-summary/style/css.js +1 -0
- package/lib/src/business/ap-summary/style/index.d.ts +0 -0
- package/lib/src/business/ap-summary/style/index.js +1 -0
- package/lib/src/business/ap-summary/utils.d.ts +12 -0
- package/lib/src/business/ap-summary/utils.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/hooks/useControllableValue.d.ts +8 -3
- package/lib/src/hooks/useControllableValue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/utils/slot.d.ts +9 -1
- package/lib/src/utils/slot.js +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { default as _ApFormItemText } from './index.vue';
|
|
2
2
|
import { default as ApFormItemTextPassword } from './password.vue';
|
|
3
|
+
import { default as ApFormItemTextGroup } from './group.vue';
|
|
3
4
|
type ApFormItemTextType = typeof _ApFormItemText & {
|
|
4
5
|
Password: typeof ApFormItemTextPassword;
|
|
6
|
+
Group: typeof ApFormItemTextGroup;
|
|
5
7
|
};
|
|
6
8
|
declare const ApFormItemText: ApFormItemTextType;
|
|
7
|
-
export { ApFormItemText, ApFormItemTextPassword };
|
|
9
|
+
export { ApFormItemText, ApFormItemTextPassword, ApFormItemTextGroup };
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import "./index.vue.mjs";
|
|
2
2
|
import "./password.vue2.mjs";
|
|
3
|
-
import
|
|
4
|
-
import o from "./
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import "./group.vue.mjs";
|
|
4
|
+
import o from "./index.vue2.mjs";
|
|
5
|
+
import r from "./password.vue.mjs";
|
|
6
|
+
import t from "./group.vue2.mjs";
|
|
7
|
+
const m = o;
|
|
8
|
+
m.Password = r;
|
|
9
|
+
m.Group = t;
|
|
7
10
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
m as ApFormItemText,
|
|
12
|
+
t as ApFormItemTextGroup,
|
|
13
|
+
r as ApFormItemTextPassword
|
|
10
14
|
};
|
|
@@ -37,6 +37,7 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
37
37
|
summary?: (params: {
|
|
38
38
|
columns: ColumnType<RecordType>[];
|
|
39
39
|
records: RecordType[];
|
|
40
|
+
selectedRows: RecordType[];
|
|
40
41
|
}) => any;
|
|
41
42
|
expandedRowRender?: any;
|
|
42
43
|
expandColumnTitle?: any;
|
|
@@ -60,6 +61,7 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
60
61
|
summary?: (params: {
|
|
61
62
|
columns: ColumnType<RecordType>[];
|
|
62
63
|
records: RecordType[];
|
|
64
|
+
selectedRows: RecordType[];
|
|
63
65
|
}) => any;
|
|
64
66
|
expandedRowRender?: any;
|
|
65
67
|
expandColumnTitle?: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as
|
|
1
|
+
import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as F, normalizeClass as c, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as xe, renderSlot as S, createCommentVNode as Y, createElementVNode as I, h as Be, normalizeProps as ke, guardReactiveProps as ze } from "vue";
|
|
2
2
|
import { Typography as Pe, Divider as Ie, Button as Ne, Table as Le } from "ant-design-vue";
|
|
3
3
|
import { useToken as Ee } from "ant-design-vue/es/theme/internal";
|
|
4
4
|
import { ApForm as Ke } from "../ap-form/index.mjs";
|
|
@@ -150,22 +150,22 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
150
150
|
const b = Te(), [, te] = Ee(), {
|
|
151
151
|
t: re
|
|
152
152
|
} = ea(), {
|
|
153
|
-
e:
|
|
153
|
+
e: x,
|
|
154
154
|
b: i,
|
|
155
155
|
be: L
|
|
156
156
|
} = aa("ap-table"), E = oa("valueTypeMap"), {
|
|
157
157
|
height: le,
|
|
158
158
|
contentRef: ne
|
|
159
|
-
} = Je(),
|
|
159
|
+
} = Je(), B = P(a.size), u = P([]), K = P([]);
|
|
160
160
|
_e({
|
|
161
161
|
columns: s(() => u.value),
|
|
162
162
|
columnsBackup: s(() => K.value),
|
|
163
|
-
size: s(() =>
|
|
163
|
+
size: s(() => B.value),
|
|
164
164
|
updateColumns(e) {
|
|
165
165
|
u.value = e;
|
|
166
166
|
},
|
|
167
167
|
updateSize(e) {
|
|
168
|
-
|
|
168
|
+
B.value = e;
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
171
|
const se = () => {
|
|
@@ -233,10 +233,10 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
233
233
|
};
|
|
234
234
|
return n.renderNode = Ge(n, t(E)), n;
|
|
235
235
|
})) || [];
|
|
236
|
-
}), de = s(() => t(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => t(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ?
|
|
236
|
+
}), de = s(() => t(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => t(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ? T.value.records : a.dataSource), {
|
|
237
237
|
rowSelection: R,
|
|
238
|
-
selectedRows:
|
|
239
|
-
...
|
|
238
|
+
selectedRows: v,
|
|
239
|
+
...C
|
|
240
240
|
} = Xe({
|
|
241
241
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
242
242
|
rowKey: a.rowKey,
|
|
@@ -247,12 +247,12 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
247
247
|
reset: D,
|
|
248
248
|
tableProps: j,
|
|
249
249
|
refresh: ce,
|
|
250
|
-
data:
|
|
250
|
+
data: T,
|
|
251
251
|
setDataSource: pe
|
|
252
252
|
} = Oe({
|
|
253
253
|
async request(e) {
|
|
254
254
|
var r, l;
|
|
255
|
-
if (!R.value.preserveSelectedRowKeys && g(a.dataSource) &&
|
|
255
|
+
if (!R.value.preserveSelectedRowKeys && g(a.dataSource) && C.clearAll(), !g(a.dataSource))
|
|
256
256
|
return {
|
|
257
257
|
data: a.dataSource || [],
|
|
258
258
|
total: a.dataSource.length || 0
|
|
@@ -275,7 +275,7 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
275
275
|
showTotal: a.pagination ? a.pagination.showTotal : void 0
|
|
276
276
|
}), fe = s(() => {
|
|
277
277
|
var o, r;
|
|
278
|
-
if (a.adaptive && (
|
|
278
|
+
if (a.adaptive && (T.value.total > 0 || ((o = a.dataSource) == null ? void 0 : o.length)))
|
|
279
279
|
return {
|
|
280
280
|
y: t(le),
|
|
281
281
|
x: ((r = a.scroll) == null ? void 0 : r.x) || "100%"
|
|
@@ -322,7 +322,7 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
322
322
|
content: e.ellipsis ? Qe(e, o) : r
|
|
323
323
|
}, null) : r;
|
|
324
324
|
}
|
|
325
|
-
G(() => t(
|
|
325
|
+
G(() => t(T).loading, (e) => {
|
|
326
326
|
var o;
|
|
327
327
|
(o = a.onLoadingChange) == null || o.call(a, e);
|
|
328
328
|
}), G(() => a.dataSource, (e) => {
|
|
@@ -348,16 +348,16 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
348
348
|
setSearchFormValues: he,
|
|
349
349
|
getSearchFormValues: we,
|
|
350
350
|
getShownColumns: Se,
|
|
351
|
-
dataSource: s(() => t(
|
|
351
|
+
dataSource: s(() => t(T).records),
|
|
352
352
|
rowSelection: {
|
|
353
|
-
selectedRows: s(() => t(
|
|
354
|
-
...
|
|
353
|
+
selectedRows: s(() => t(v)),
|
|
354
|
+
...C
|
|
355
355
|
}
|
|
356
|
-
}), (e, o) => (m(),
|
|
356
|
+
}), (e, o) => (m(), F("div", {
|
|
357
357
|
class: c(ge.value)
|
|
358
|
-
}, [t(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (m(),
|
|
358
|
+
}, [t(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (m(), F("div", {
|
|
359
359
|
key: 0,
|
|
360
|
-
class: c(e.card ? t(
|
|
360
|
+
class: c(e.card ? t(x)("search-wrapper") : null),
|
|
361
361
|
style: M(e.searchFormWrapperStyle)
|
|
362
362
|
}, [f(t(Ke).SearchForm, h(e.searchForm || {}, {
|
|
363
363
|
ref_key: "formRef",
|
|
@@ -367,7 +367,7 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
367
367
|
onReset: t(D),
|
|
368
368
|
"submit-loading": t(j).loading
|
|
369
369
|
}), J({
|
|
370
|
-
default: w(() => [(m(!0),
|
|
370
|
+
default: w(() => [(m(!0), F(U, null, Q(O.value, (r) => (m(), X(xe(r.renderNode), h({
|
|
371
371
|
key: r.dataIndex,
|
|
372
372
|
ref_for: !0
|
|
373
373
|
}, r.fieldProps || {}, {
|
|
@@ -381,20 +381,20 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
381
381
|
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
|
|
382
382
|
ref_key: "contentRef",
|
|
383
383
|
ref: ne,
|
|
384
|
-
class: c([t(
|
|
384
|
+
class: c([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
|
|
385
385
|
style: M(e.tableWrapperStyle)
|
|
386
386
|
}, [I("div", {
|
|
387
387
|
class: c(t(i)("header-wrapper"))
|
|
388
|
-
}, [e.settings ? (m(),
|
|
388
|
+
}, [e.settings ? (m(), F("div", {
|
|
389
389
|
key: 0,
|
|
390
390
|
class: c(t(i)("header"))
|
|
391
391
|
}, [I("div", {
|
|
392
392
|
class: c(t(L)("header", "title"))
|
|
393
393
|
}, [S(e.$slots, "title", h({
|
|
394
|
-
selectedRows: t(
|
|
394
|
+
selectedRows: t(v),
|
|
395
395
|
selectedRowKeys: t(R).selectedRowKeys,
|
|
396
396
|
shownColumns: u.value
|
|
397
|
-
},
|
|
397
|
+
}, C))], 2), b.title ? (m(), X(t(Ie), {
|
|
398
398
|
key: 0,
|
|
399
399
|
type: "vertical"
|
|
400
400
|
})) : Y("", !0), f(ta, {
|
|
@@ -407,20 +407,21 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
407
407
|
_: 1
|
|
408
408
|
}, 8, ["config"])], 2)) : S(e.$slots, "title", h({
|
|
409
409
|
key: 1,
|
|
410
|
-
selectedRows: t(
|
|
410
|
+
selectedRows: t(v),
|
|
411
411
|
selectedRowKeys: t(R).selectedRowKeys,
|
|
412
412
|
shownColumns: u.value
|
|
413
|
-
},
|
|
413
|
+
}, C))], 2), f(t(Le), h({
|
|
414
414
|
class: t(i)("table")
|
|
415
415
|
}, A.value, {
|
|
416
|
-
size:
|
|
416
|
+
size: B.value,
|
|
417
417
|
"table-layout": me.value,
|
|
418
418
|
columns: u.value,
|
|
419
419
|
onResizeColumn: o[0] || (o[0] = (r, l) => l.width = r)
|
|
420
420
|
}), J({
|
|
421
421
|
summary: w(() => [S(e.$slots, "summary", {
|
|
422
422
|
columns: u.value,
|
|
423
|
-
records: A.value.dataSource
|
|
423
|
+
records: A.value.dataSource,
|
|
424
|
+
selectedRows: t(v)
|
|
424
425
|
})]),
|
|
425
426
|
_: 2
|
|
426
427
|
}, [Q(t(_)(b, ["title", "searchFormExtra", "headerCell", "summary"]), (r, l) => ({
|
|
@@ -6,6 +6,7 @@ import { ColSize } from 'ant-design-vue/es/grid';
|
|
|
6
6
|
import { FormLabelAlign } from 'ant-design-vue/es/form/interface';
|
|
7
7
|
import { RuleObject } from 'ant-design-vue/es/form';
|
|
8
8
|
import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
|
|
9
|
+
import { ApFormItemTextGroup } from '../ap-form/items/text';
|
|
9
10
|
import { FocusEventHandler, MouseEventHandler, KeyboardEventHandler, ChangeEventHandler, CompositionEventHandler } from 'ant-design-vue/es/_util/EventInterface';
|
|
10
11
|
import { Dayjs } from 'dayjs';
|
|
11
12
|
import { PickerLocale } from 'ant-design-vue/es/date-picker/generatePicker';
|
|
@@ -5317,11 +5318,7 @@ export declare const apTableFormItemMap: {
|
|
|
5317
5318
|
focus: (options?: InputFocusOptions) => void;
|
|
5318
5319
|
blur: () => void;
|
|
5319
5320
|
input: any;
|
|
5320
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5321
|
-
/**
|
|
5322
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5323
|
-
*/
|
|
5324
|
-
?: "forward" | "backward" | "none") => void;
|
|
5321
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5325
5322
|
select: () => void;
|
|
5326
5323
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
5327
5324
|
label: {
|
|
@@ -5738,11 +5735,7 @@ export declare const apTableFormItemMap: {
|
|
|
5738
5735
|
focus: (options?: InputFocusOptions) => void;
|
|
5739
5736
|
blur: () => void;
|
|
5740
5737
|
input: any;
|
|
5741
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5742
|
-
/**
|
|
5743
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5744
|
-
*/
|
|
5745
|
-
?: "forward" | "backward" | "none") => void;
|
|
5738
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5746
5739
|
select: () => void;
|
|
5747
5740
|
}, {}, {}, {}, {
|
|
5748
5741
|
disabled: boolean;
|
|
@@ -5958,11 +5951,7 @@ export declare const apTableFormItemMap: {
|
|
|
5958
5951
|
focus: (options?: InputFocusOptions) => void;
|
|
5959
5952
|
blur: () => void;
|
|
5960
5953
|
input: any;
|
|
5961
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5962
|
-
/**
|
|
5963
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5964
|
-
*/
|
|
5965
|
-
?: "forward" | "backward" | "none") => void;
|
|
5954
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5966
5955
|
select: () => void;
|
|
5967
5956
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
5968
5957
|
disabled: boolean;
|
|
@@ -5988,6 +5977,7 @@ export declare const apTableFormItemMap: {
|
|
|
5988
5977
|
} & Omit< ApFormItemSlots, "default">;
|
|
5989
5978
|
}) & {
|
|
5990
5979
|
Password: ApFormItemTextPassword;
|
|
5980
|
+
Group: ApFormItemTextGroup;
|
|
5991
5981
|
};
|
|
5992
5982
|
textArea: {
|
|
5993
5983
|
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
@@ -11451,6 +11441,9 @@ export declare const apTableRenderItemMap: {
|
|
|
11451
11441
|
type: PropType<boolean>;
|
|
11452
11442
|
default: boolean;
|
|
11453
11443
|
};
|
|
11444
|
+
onBeforeSelect: {
|
|
11445
|
+
type: PropType<(newVal: SelectValue) => boolean | Promise<boolean>>;
|
|
11446
|
+
};
|
|
11454
11447
|
}>> & {
|
|
11455
11448
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
11456
11449
|
}, {
|
|
@@ -11725,6 +11718,9 @@ export declare const apTableRenderItemMap: {
|
|
|
11725
11718
|
type: PropType<boolean>;
|
|
11726
11719
|
default: boolean;
|
|
11727
11720
|
};
|
|
11721
|
+
onBeforeSelect: {
|
|
11722
|
+
type: PropType<(newVal: SelectValue) => boolean | Promise<boolean>>;
|
|
11723
|
+
};
|
|
11728
11724
|
}>> & {
|
|
11729
11725
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
11730
11726
|
}, {
|
|
@@ -12020,6 +12016,9 @@ export declare const apTableRenderItemMap: {
|
|
|
12020
12016
|
type: PropType<boolean>;
|
|
12021
12017
|
default: boolean;
|
|
12022
12018
|
};
|
|
12019
|
+
onBeforeSelect: {
|
|
12020
|
+
type: PropType<(newVal: SelectValue) => boolean | Promise<boolean>>;
|
|
12021
|
+
};
|
|
12023
12022
|
}>> & {
|
|
12024
12023
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
12025
12024
|
}, {
|
|
@@ -12316,6 +12315,9 @@ export declare const apTableRenderItemMap: {
|
|
|
12316
12315
|
type: PropType<boolean>;
|
|
12317
12316
|
default: boolean;
|
|
12318
12317
|
};
|
|
12318
|
+
onBeforeSelect: {
|
|
12319
|
+
type: PropType<(newVal: SelectValue) => boolean | Promise<boolean>>;
|
|
12320
|
+
};
|
|
12319
12321
|
}>> & {
|
|
12320
12322
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
12321
12323
|
}, {
|
|
@@ -14063,11 +14065,7 @@ export declare const apTableRenderItemMap: {
|
|
|
14063
14065
|
focus: (options?: InputFocusOptions) => void;
|
|
14064
14066
|
blur: () => void;
|
|
14065
14067
|
input: any;
|
|
14066
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14067
|
-
/**
|
|
14068
|
-
* 不需要渲染到Form表单的valueType字段
|
|
14069
|
-
*/
|
|
14070
|
-
?: "forward" | "backward" | "none") => void;
|
|
14068
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
14071
14069
|
select: () => void;
|
|
14072
14070
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14073
14071
|
"update:value": (...args: any[]) => void;
|
|
@@ -14377,11 +14375,7 @@ export declare const apTableRenderItemMap: {
|
|
|
14377
14375
|
focus: (options?: InputFocusOptions) => void;
|
|
14378
14376
|
blur: () => void;
|
|
14379
14377
|
input: any;
|
|
14380
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14381
|
-
/**
|
|
14382
|
-
* 不需要渲染到Form表单的valueType字段
|
|
14383
|
-
*/
|
|
14384
|
-
?: "forward" | "backward" | "none") => void;
|
|
14378
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
14385
14379
|
select: () => void;
|
|
14386
14380
|
}, {}, {}, {}, {
|
|
14387
14381
|
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "tel" | "url" | "email" | "image" | "datetime-local" | "file" | "password";
|
|
@@ -14542,11 +14536,7 @@ export declare const apTableRenderItemMap: {
|
|
|
14542
14536
|
focus: (options?: InputFocusOptions) => void;
|
|
14543
14537
|
blur: () => void;
|
|
14544
14538
|
input: any;
|
|
14545
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14546
|
-
/**
|
|
14547
|
-
* 不需要渲染到Form表单的valueType字段
|
|
14548
|
-
*/
|
|
14549
|
-
?: "forward" | "backward" | "none") => void;
|
|
14539
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
14550
14540
|
select: () => void;
|
|
14551
14541
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14552
14542
|
"update:value": (...args: any[]) => void;
|
|
@@ -7,6 +7,7 @@ import { ColSize } from 'ant-design-vue/es/grid';
|
|
|
7
7
|
import { FormLabelAlign } from 'ant-design-vue/es/form/interface';
|
|
8
8
|
import { RuleObject } from 'ant-design-vue/es/form';
|
|
9
9
|
import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
|
|
10
|
+
import { ApFormItemTextGroup } from '../ap-form/items/text';
|
|
10
11
|
import { ColumnTitleProps } from 'ant-design-vue/es/table/interface';
|
|
11
12
|
import { VueNode } from 'ant-design-vue/es/_util/type';
|
|
12
13
|
export type FieldValueType = 'multiple' | 'multipleNumber' | 'dayjs' | 'dayjsRange' | 'dayjsDayRange' | 'number' | 'boolean' | 'object';
|
|
@@ -1132,7 +1133,17 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
1132
1133
|
default: () => {};
|
|
1133
1134
|
};
|
|
1134
1135
|
}>>, {
|
|
1135
|
-
focus: (options
|
|
1136
|
+
focus: (options
|
|
1137
|
+
/**
|
|
1138
|
+
* 解析数值
|
|
1139
|
+
* @param t 值类型
|
|
1140
|
+
* @param value 值
|
|
1141
|
+
*/
|
|
1142
|
+
? /**
|
|
1143
|
+
* 解析数值
|
|
1144
|
+
* @param t 值类型
|
|
1145
|
+
* @param value 值
|
|
1146
|
+
*/: InputFocusOptions) => void;
|
|
1136
1147
|
blur: () => void;
|
|
1137
1148
|
input: any;
|
|
1138
1149
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
@@ -1549,7 +1560,17 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
1549
1560
|
default: () => {};
|
|
1550
1561
|
};
|
|
1551
1562
|
}>>, {
|
|
1552
|
-
focus: (options
|
|
1563
|
+
focus: (options
|
|
1564
|
+
/**
|
|
1565
|
+
* 解析数值
|
|
1566
|
+
* @param t 值类型
|
|
1567
|
+
* @param value 值
|
|
1568
|
+
*/
|
|
1569
|
+
? /**
|
|
1570
|
+
* 解析数值
|
|
1571
|
+
* @param t 值类型
|
|
1572
|
+
* @param value 值
|
|
1573
|
+
*/: InputFocusOptions) => void;
|
|
1553
1574
|
blur: () => void;
|
|
1554
1575
|
input: any;
|
|
1555
1576
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
@@ -1765,7 +1786,17 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
1765
1786
|
default: () => {};
|
|
1766
1787
|
};
|
|
1767
1788
|
}>>, {
|
|
1768
|
-
focus: (options
|
|
1789
|
+
focus: (options
|
|
1790
|
+
/**
|
|
1791
|
+
* 解析数值
|
|
1792
|
+
* @param t 值类型
|
|
1793
|
+
* @param value 值
|
|
1794
|
+
*/
|
|
1795
|
+
? /**
|
|
1796
|
+
* 解析数值
|
|
1797
|
+
* @param t 值类型
|
|
1798
|
+
* @param value 值
|
|
1799
|
+
*/: InputFocusOptions) => void;
|
|
1769
1800
|
blur: () => void;
|
|
1770
1801
|
input: any;
|
|
1771
1802
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
@@ -1794,6 +1825,7 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
1794
1825
|
} & Omit< ApFormItemSlots, "default">;
|
|
1795
1826
|
}) & {
|
|
1796
1827
|
Password: ApFormItemTextPassword;
|
|
1828
|
+
Group: ApFormItemTextGroup;
|
|
1797
1829
|
}) | ({
|
|
1798
1830
|
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
1799
1831
|
label: {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isObject as
|
|
3
|
-
import { apTableRenderItemMap as
|
|
4
|
-
import { isType as
|
|
1
|
+
import { isVNode as b, createVNode as s, mergeProps as a, cloneVNode as y, Fragment as g } from "vue";
|
|
2
|
+
import { isObject as f, isArray as p, isUndefined as h, isFunction as d, omit as j, isBoolean as F, isString as O } from "lodash-unified";
|
|
3
|
+
import { apTableRenderItemMap as E, apTableFormItemMap as x } from "./constants.mjs";
|
|
4
|
+
import { isType as N } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { QuestionCircleOutlined as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
10
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
6
|
+
import { Tooltip as S } from "ant-design-vue";
|
|
7
|
+
import { QuestionCircleOutlined as I } from "@ant-design/icons-vue";
|
|
8
|
+
import v from "../ap-form/item/index.vue.mjs";
|
|
9
|
+
function P(t) {
|
|
10
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !b(t);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const V = (t, e, n) => {
|
|
13
13
|
let r = {};
|
|
14
|
-
return
|
|
15
|
-
|
|
14
|
+
return f(t) ? Object.keys(t).forEach((o) => {
|
|
15
|
+
f(t[o]) ? r[o] = V(t[o], e[o], n) : r[o] = n(t[o], e);
|
|
16
16
|
}) : r = n(t, e), r;
|
|
17
|
-
},
|
|
17
|
+
}, Q = (t, e) => {
|
|
18
18
|
switch (t) {
|
|
19
19
|
case "dayjs":
|
|
20
20
|
return e.valueOf();
|
|
@@ -26,7 +26,7 @@ const v = (t, e, n) => {
|
|
|
26
26
|
}
|
|
27
27
|
case "multiple":
|
|
28
28
|
case "multipleNumber":
|
|
29
|
-
return
|
|
29
|
+
return p(e) ? e : [e];
|
|
30
30
|
case "boolean":
|
|
31
31
|
return e;
|
|
32
32
|
case "object":
|
|
@@ -35,15 +35,15 @@ const v = (t, e, n) => {
|
|
|
35
35
|
return e;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function U(t) {
|
|
39
|
+
return p(t) ? t.join(".") : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function w(t) {
|
|
42
42
|
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
43
43
|
return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
const e = [], n =
|
|
45
|
+
const A = (t) => w(t) === "map" ? t : new Map(Object.entries(t || {})), m = (t) => {
|
|
46
|
+
const e = [], n = A(t);
|
|
47
47
|
return n.forEach((r, o) => {
|
|
48
48
|
const i = n.get(o) || n.get(`${o}`);
|
|
49
49
|
if (i) {
|
|
@@ -63,7 +63,7 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}), e;
|
|
66
|
-
},
|
|
66
|
+
}, z = (t) => h(t) || t < 0 ? 0 : t, G = (t, e, n) => {
|
|
67
67
|
if (n)
|
|
68
68
|
return n;
|
|
69
69
|
const r = ["select", "date"], o = ["text", "textArea", "number"];
|
|
@@ -74,74 +74,74 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
74
74
|
if (o.includes(e))
|
|
75
75
|
return t("ap.common.inputText");
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
return !t || !
|
|
77
|
+
function C(t, e) {
|
|
78
|
+
return !t || !d(t) ? t : t(e);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function K(t) {
|
|
81
81
|
let e = t.valueType || "text";
|
|
82
82
|
return t.valueEnum && (e = "status"), e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
var
|
|
86
|
-
const o =
|
|
84
|
+
function X(t, e, n, r) {
|
|
85
|
+
var u;
|
|
86
|
+
const o = E[t];
|
|
87
87
|
if (o)
|
|
88
|
-
return
|
|
88
|
+
return s(o, a(e, {
|
|
89
89
|
mode: "read"
|
|
90
90
|
}), null);
|
|
91
91
|
const i = r == null ? void 0 : r[t];
|
|
92
|
-
return ((
|
|
92
|
+
return ((u = i == null ? void 0 : i.render) == null ? void 0 : u.call(i, e.value, n, e)) || e.value;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Y(t, e) {
|
|
95
95
|
if (t.customRenderFormItem)
|
|
96
96
|
return () => {
|
|
97
97
|
const o = t.customRenderFormItem(t);
|
|
98
|
-
return
|
|
98
|
+
return y(o, {
|
|
99
99
|
...t.fieldProps,
|
|
100
100
|
span: t.span,
|
|
101
101
|
...o.props || {}
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
const n =
|
|
104
|
+
const n = x[t.valueType];
|
|
105
105
|
if (n)
|
|
106
106
|
return n;
|
|
107
107
|
const r = e == null ? void 0 : e[t.valueType];
|
|
108
108
|
return () => {
|
|
109
109
|
var i;
|
|
110
110
|
const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
|
|
111
|
-
return o ?
|
|
111
|
+
return o ? s(v, a(t.fieldProps, {
|
|
112
112
|
span: t.span
|
|
113
|
-
}),
|
|
113
|
+
}), P(o) ? o : {
|
|
114
114
|
default: () => [o]
|
|
115
115
|
}) : null;
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
const n =
|
|
118
|
+
function Z(t, e) {
|
|
119
|
+
const n = C(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", i = t.valueType === "index", u = o ? {
|
|
120
120
|
checked: e.value
|
|
121
121
|
} : {
|
|
122
122
|
value: i ? e.index + 1 : e.value
|
|
123
123
|
};
|
|
124
124
|
return t.valueEnum && (r.valueEnum = t.valueEnum), {
|
|
125
|
-
...
|
|
126
|
-
...
|
|
125
|
+
...j(r, ["request"]),
|
|
126
|
+
...u
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function k(t) {
|
|
130
130
|
const e = {
|
|
131
131
|
...t
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return F(t.filters) && t.filters && t.valueEnum && (e.filters = m(t.valueEnum)), e;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function H(t, e) {
|
|
136
136
|
var r;
|
|
137
137
|
const n = e || {};
|
|
138
138
|
return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
|
|
139
139
|
...n.field,
|
|
140
|
-
options:
|
|
140
|
+
options: m(t.valueEnum)
|
|
141
141
|
}), n;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
if (!
|
|
143
|
+
function M(t) {
|
|
144
|
+
if (!N("Object")(t))
|
|
145
145
|
return t;
|
|
146
146
|
try {
|
|
147
147
|
return JSON.stringify(t);
|
|
@@ -149,51 +149,51 @@ function Z(t) {
|
|
|
149
149
|
return t;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function tt(t, e, n, r) {
|
|
153
153
|
const o = n == null ? void 0 : n({
|
|
154
154
|
title: t.title,
|
|
155
155
|
column: t
|
|
156
|
-
});
|
|
157
|
-
if (o &&
|
|
156
|
+
}), i = (o == null ? void 0 : o.filter((T) => T.type !== Symbol.for("v-cmt"))) || [];
|
|
157
|
+
if (o && i.length > 0)
|
|
158
158
|
return o;
|
|
159
|
-
const
|
|
159
|
+
const l = O(t.title) ? s("span", {
|
|
160
160
|
class: e,
|
|
161
161
|
title: t.title
|
|
162
|
-
}, [t.title]) : t.title,
|
|
163
|
-
return
|
|
162
|
+
}, [t.title]) : t.title, c = t.tooltip ? d(t.tooltip) ? t.tooltip(t) : s(g, null, [t.tooltip]) : null;
|
|
163
|
+
return c ? s("span", {
|
|
164
164
|
style: {
|
|
165
165
|
display: "inline-flex",
|
|
166
166
|
alignItems: "center",
|
|
167
167
|
maxWidth: "100%"
|
|
168
168
|
}
|
|
169
|
-
}, [
|
|
170
|
-
title:
|
|
169
|
+
}, [l, s(S, {
|
|
170
|
+
title: c,
|
|
171
171
|
placement: "bottom"
|
|
172
172
|
}, {
|
|
173
|
-
default: () => [
|
|
173
|
+
default: () => [s(I, {
|
|
174
174
|
style: {
|
|
175
175
|
padding: "4px",
|
|
176
176
|
color: r,
|
|
177
177
|
verticalAlign: "middle"
|
|
178
178
|
}
|
|
179
179
|
}, null)]
|
|
180
|
-
})]) :
|
|
180
|
+
})]) : l;
|
|
181
181
|
}
|
|
182
182
|
export {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
183
|
+
k as apColumnToColumn,
|
|
184
|
+
U as dataIndexToStr,
|
|
185
|
+
V as formatParamsValueType,
|
|
186
|
+
z as getColumnOrder,
|
|
187
|
+
C as getFieldProps,
|
|
188
|
+
G as getPlaceholder,
|
|
189
|
+
Y as getSearchFormItemRenderNode,
|
|
190
|
+
X as getTableCellRenderNode,
|
|
191
|
+
Z as getTableRenderProps,
|
|
192
|
+
K as getTableRenderType,
|
|
193
|
+
tt as getTableTitle,
|
|
194
|
+
A as objectToMap,
|
|
195
|
+
M as objectToString,
|
|
196
|
+
Q as parseFieldValue,
|
|
197
|
+
H as updateFormProps,
|
|
198
|
+
m as valueEnumToArray
|
|
199
199
|
};
|