@aplus-frontend/ui 0.1.14 → 0.1.16
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 +56 -54
- package/es/src/ap-table/ap-table.vue.mjs +132 -129
- package/es/src/ap-table/interface.d.ts +20 -13
- package/es/src/ap-table/utils.d.ts +8340 -1
- package/es/src/ap-table/utils.mjs +135 -79
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +31 -28
- package/es/src/business/ap-input-radio/interface.d.ts +1 -1
- package/es/src/business/ap-label/style.css +3 -0
- package/es/src/business/ap-status/ApStatusGroup.vue2.mjs +12 -14
- package/es/src/business/index.d.ts +2 -2
- package/es/src/business/index.mjs +20 -18
- package/es/src/config-provider/config-provider-props.d.ts +5 -1
- package/es/src/config-provider/config-provider-props.mjs +4 -0
- package/es/src/config-provider/config-provider.d.ts +10 -1
- package/es/src/config-provider/config-provider.mjs +18 -17
- package/es/src/config-provider/constants.d.ts +6 -2
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/es/src/config-provider/index.d.ts +20 -1
- package/es/src/editable-table/form-item.vue.mjs +85 -72
- package/es/src/editable-table/index.vue.d.ts +1 -0
- package/es/src/editable-table/index.vue.mjs +118 -95
- package/es/src/editable-table/interface.d.ts +6 -1
- package/es/src/editable-table/utils.mjs +31 -30
- package/es/src/hooks/useControllableValue.mjs +3 -0
- package/es/src/index.mjs +45 -43
- package/es/src/theme/antd-global-overwrite/admin/form.css +10 -12
- package/es/src/theme/antd-global-overwrite/admin/index.css +117 -45
- package/es/src/theme/antd-global-overwrite/admin/pagination.css +54 -16
- package/es/src/theme/antd-global-overwrite/admin/table.css +53 -17
- package/es/src/theme/antd-global-overwrite/aplus/form.css +28 -21
- package/es/src/theme/antd-global-overwrite/aplus/index.css +159 -74
- package/es/src/theme/antd-global-overwrite/aplus/pagination.css +66 -20
- package/es/src/theme/antd-global-overwrite/aplus/table.css +65 -33
- package/es/src/theme/ap-label/ap-label.css +3 -0
- package/es/src/utils/ap-trans-data/index.d.ts +11 -0
- package/es/src/utils/ap-trans-data/index.mjs +20 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/interface.d.ts +20 -13
- package/lib/src/ap-table/utils.d.ts +8340 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/interface.d.ts +1 -1
- package/lib/src/business/ap-label/style.css +3 -0
- package/lib/src/business/ap-status/ApStatusGroup.vue2.js +1 -1
- package/lib/src/business/index.d.ts +2 -2
- package/lib/src/business/index.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +5 -1
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +10 -1
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/constants.d.ts +6 -2
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
- package/lib/src/config-provider/index.d.ts +20 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +1 -0
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +6 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/hooks/useControllableValue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/form.css +10 -12
- package/lib/src/theme/antd-global-overwrite/admin/index.css +117 -45
- package/lib/src/theme/antd-global-overwrite/admin/pagination.css +54 -16
- package/lib/src/theme/antd-global-overwrite/admin/table.css +53 -17
- package/lib/src/theme/antd-global-overwrite/aplus/form.css +28 -21
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +159 -74
- package/lib/src/theme/antd-global-overwrite/aplus/pagination.css +66 -20
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +65 -33
- package/lib/src/theme/ap-label/ap-label.css +3 -0
- package/lib/src/utils/ap-trans-data/index.d.ts +11 -0
- package/lib/src/utils/ap-trans-data/index.js +1 -0
- package/package.json +3 -3
|
@@ -1,110 +1,166 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { isVNode as m, createVNode as c, mergeProps as i, cloneVNode as p } from "vue";
|
|
2
|
+
import { isObject as s, isArray as l, isUndefined as d, isFunction as b, omit as T, isBoolean as y } from "lodash-unified";
|
|
3
|
+
import { apTableRenderItemMap as j, apTableFormItemMap as h } from "./constants.mjs";
|
|
4
|
+
import { isType as g } from "@fruits-chain/utils";
|
|
5
|
+
import "../ap-form/index.mjs";
|
|
6
|
+
import E from "../ap-form/ap-form-item.vue.mjs";
|
|
7
|
+
function F(t) {
|
|
8
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !m(t);
|
|
9
|
+
}
|
|
10
|
+
const O = (t, e, n) => {
|
|
11
|
+
let r = {};
|
|
12
|
+
return s(t) ? Object.keys(t).forEach((o) => {
|
|
13
|
+
s(t[o]) ? r[o] = O(t[o], e[o], n) : r[o] = n(t[o], e);
|
|
14
|
+
}) : r = n(t, e), r;
|
|
15
|
+
}, _ = (t, e) => {
|
|
16
|
+
switch (t) {
|
|
9
17
|
case "dayjs":
|
|
10
|
-
return
|
|
18
|
+
return e.valueOf();
|
|
11
19
|
case "dayjsRange":
|
|
12
|
-
return
|
|
20
|
+
return e.map((n) => n.valueOf());
|
|
13
21
|
case "dayjsDayRange": {
|
|
14
|
-
const [n,
|
|
15
|
-
return [n.startOf("day").valueOf(),
|
|
22
|
+
const [n, r] = e;
|
|
23
|
+
return [n.startOf("day").valueOf(), r.endOf("day").valueOf()];
|
|
16
24
|
}
|
|
17
25
|
case "multiple":
|
|
18
26
|
case "multipleNumber":
|
|
19
|
-
return
|
|
27
|
+
return l(e) ? e : [e];
|
|
20
28
|
case "boolean":
|
|
21
|
-
return
|
|
29
|
+
return e;
|
|
22
30
|
case "object":
|
|
23
|
-
return
|
|
31
|
+
return e;
|
|
24
32
|
default:
|
|
25
|
-
return
|
|
33
|
+
return e;
|
|
26
34
|
}
|
|
27
35
|
};
|
|
28
|
-
function
|
|
29
|
-
return
|
|
36
|
+
function C(t) {
|
|
37
|
+
return l(t) ? t.join(".") : t;
|
|
30
38
|
}
|
|
31
|
-
function
|
|
32
|
-
const
|
|
33
|
-
return
|
|
39
|
+
function N(t) {
|
|
40
|
+
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
41
|
+
return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
|
|
34
42
|
}
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
return n.forEach((
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
if (typeof
|
|
41
|
-
|
|
42
|
-
text:
|
|
43
|
-
value:
|
|
44
|
-
label:
|
|
45
|
-
disabled:
|
|
43
|
+
const S = (t) => N(t) === "map" ? t : new Map(Object.entries(t || {})), f = (t) => {
|
|
44
|
+
const e = [], n = S(t);
|
|
45
|
+
return n.forEach((r, o) => {
|
|
46
|
+
const u = n.get(o) || n.get(`${o}`);
|
|
47
|
+
if (u) {
|
|
48
|
+
if (typeof u == "object" && (u != null && u.text)) {
|
|
49
|
+
e.push({
|
|
50
|
+
text: u == null ? void 0 : u.text,
|
|
51
|
+
value: o,
|
|
52
|
+
label: u == null ? void 0 : u.text,
|
|
53
|
+
disabled: u.disabled
|
|
46
54
|
});
|
|
47
55
|
return;
|
|
48
56
|
}
|
|
49
|
-
|
|
50
|
-
text:
|
|
51
|
-
label:
|
|
52
|
-
value:
|
|
57
|
+
e.push({
|
|
58
|
+
text: u,
|
|
59
|
+
label: u,
|
|
60
|
+
value: o
|
|
53
61
|
});
|
|
54
62
|
}
|
|
55
|
-
}),
|
|
56
|
-
},
|
|
63
|
+
}), e;
|
|
64
|
+
}, R = (t) => d(t) || t < 0 ? 0 : t, $ = (t, e, n) => {
|
|
57
65
|
if (n)
|
|
58
66
|
return n;
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
66
|
-
if (o.includes(t))
|
|
67
|
-
return e("ap.common.chooseText");
|
|
68
|
-
if (u.includes(t))
|
|
69
|
-
return e("ap.common.inputText");
|
|
67
|
+
const r = ["select", "date"], o = ["text", "textArea", "number"];
|
|
68
|
+
if (e === "dateRange")
|
|
69
|
+
return [t("ap.common.chooseText"), t("ap.common.chooseText")];
|
|
70
|
+
if (r.includes(e))
|
|
71
|
+
return t("ap.common.chooseText");
|
|
72
|
+
if (o.includes(e))
|
|
73
|
+
return t("ap.common.inputText");
|
|
70
74
|
};
|
|
71
|
-
function
|
|
72
|
-
return !
|
|
75
|
+
function x(t, e) {
|
|
76
|
+
return !t || !b(t) ? t : t(e);
|
|
77
|
+
}
|
|
78
|
+
function q(t) {
|
|
79
|
+
let e = t.valueType || "text";
|
|
80
|
+
return t.valueEnum && (e = "status"), e;
|
|
73
81
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
function B(t, e, n) {
|
|
83
|
+
var u;
|
|
84
|
+
const r = j[t];
|
|
85
|
+
if (r)
|
|
86
|
+
return c(r, i(e, {
|
|
87
|
+
mode: "read"
|
|
88
|
+
}), null);
|
|
89
|
+
const o = n == null ? void 0 : n[t];
|
|
90
|
+
return ((u = o == null ? void 0 : o.render) == null ? void 0 : u.call(o, e.value, e)) || e.value;
|
|
77
91
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
function D(t, e) {
|
|
93
|
+
if (t.customRenderFormItem)
|
|
94
|
+
return () => {
|
|
95
|
+
const o = t.customRenderFormItem(t);
|
|
96
|
+
return p(o, {
|
|
97
|
+
...t.fieldProps,
|
|
98
|
+
span: t.span,
|
|
99
|
+
...o.props || {}
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
const n = h[t.valueType];
|
|
103
|
+
if (n)
|
|
104
|
+
return n;
|
|
105
|
+
const r = e == null ? void 0 : e[t.valueType];
|
|
106
|
+
return () => {
|
|
107
|
+
var u;
|
|
108
|
+
const o = (u = r == null ? void 0 : r.renderFormItem) == null ? void 0 : u.call(r, t.fieldProps.field);
|
|
109
|
+
return o ? c(E, i(t.fieldProps, {
|
|
110
|
+
span: t.span
|
|
111
|
+
}), F(o) ? o : {
|
|
112
|
+
default: () => [o]
|
|
113
|
+
}) : null;
|
|
83
114
|
};
|
|
84
115
|
}
|
|
85
|
-
function
|
|
86
|
-
const t = {
|
|
87
|
-
|
|
116
|
+
function J(t, e) {
|
|
117
|
+
const n = x(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", u = t.valueType === "index", a = o ? {
|
|
118
|
+
checked: e.value
|
|
119
|
+
} : {
|
|
120
|
+
value: u ? e.index + 1 : e.value
|
|
121
|
+
};
|
|
122
|
+
return t.valueEnum && (r.valueEnum = t.valueEnum), {
|
|
123
|
+
...T(r, ["request"]),
|
|
124
|
+
...a
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function L(t) {
|
|
128
|
+
const e = {
|
|
129
|
+
...t
|
|
130
|
+
};
|
|
131
|
+
return y(t.filters) && t.filters && t.valueEnum && (e.filters = f(t.valueEnum)), e;
|
|
88
132
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
-
const n =
|
|
92
|
-
return
|
|
133
|
+
function U(t, e) {
|
|
134
|
+
var r;
|
|
135
|
+
const n = e || {};
|
|
136
|
+
return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
|
|
93
137
|
...n.field,
|
|
94
|
-
options:
|
|
138
|
+
options: f(t.valueEnum)
|
|
95
139
|
}), n;
|
|
96
140
|
}
|
|
141
|
+
function z(t) {
|
|
142
|
+
if (!g("Object")(t))
|
|
143
|
+
return t;
|
|
144
|
+
try {
|
|
145
|
+
return JSON.stringify(t);
|
|
146
|
+
} catch {
|
|
147
|
+
return t;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
97
150
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
151
|
+
L as apColumnToColumn,
|
|
152
|
+
C as dataIndexToStr,
|
|
153
|
+
O as formatParamsValueType,
|
|
154
|
+
R as getColumnOrder,
|
|
155
|
+
x as getFieldProps,
|
|
156
|
+
$ as getPlaceholder,
|
|
157
|
+
D as getSearchFormItemRenderNode,
|
|
158
|
+
B as getTableCellRenderNode,
|
|
159
|
+
J as getTableRenderProps,
|
|
160
|
+
q as getTableRenderType,
|
|
161
|
+
S as objectToMap,
|
|
162
|
+
z as objectToString,
|
|
163
|
+
_ as parseFieldValue,
|
|
164
|
+
U as updateFormProps,
|
|
165
|
+
f as valueEnumToArray
|
|
110
166
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, openBlock as g, createElementBlock as C, normalizeClass as h, unref as t, createVNode as u, mergeProps as B } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { Form as
|
|
4
|
-
import { omit as
|
|
3
|
+
import { Form as I, InputNumber as b, RadioGroup as _ } from "ant-design-vue";
|
|
4
|
+
import { omit as x } from "lodash-unified";
|
|
5
5
|
import "./style.css";
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
const
|
|
6
|
+
import { useNamespace as y } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const G = /* @__PURE__ */ f({
|
|
8
8
|
name: "ApInputRadio",
|
|
9
9
|
__name: "ApInputRadio",
|
|
10
10
|
props: {
|
|
@@ -29,31 +29,34 @@ const A = /* @__PURE__ */ d({
|
|
|
29
29
|
options: {}
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:value"],
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
n({ inputval:
|
|
37
|
-
},
|
|
38
|
-
n({ radioVal:
|
|
32
|
+
setup(p, { emit: l }) {
|
|
33
|
+
const s = I.useInjectFormItemContext(), e = p, { b: i, e: m } = y("ap-input-radio"), c = l, n = (o) => {
|
|
34
|
+
c("update:value", { ...e.value, ...o }), s.onFieldChange();
|
|
35
|
+
}, d = (o) => {
|
|
36
|
+
n({ inputval: o });
|
|
37
|
+
}, v = (o) => {
|
|
38
|
+
n({ radioVal: o.target.value });
|
|
39
|
+
};
|
|
40
|
+
return (o, F) => {
|
|
41
|
+
var a, r;
|
|
42
|
+
return g(), C("div", {
|
|
43
|
+
class: h([t(i)()])
|
|
44
|
+
}, [
|
|
45
|
+
u(t(b), B({
|
|
46
|
+
class: t(m)("input-number")
|
|
47
|
+
}, t(x)(e, ["value", "options"]), {
|
|
48
|
+
value: e.value ? (a = e.value) == null ? void 0 : a.inputval : "",
|
|
49
|
+
onChange: d
|
|
50
|
+
}), null, 16, ["class", "value"]),
|
|
51
|
+
u(t(_), {
|
|
52
|
+
value: e.value ? (r = e.value) == null ? void 0 : r.radioVal : "",
|
|
53
|
+
options: e.options,
|
|
54
|
+
onChange: v
|
|
55
|
+
}, null, 8, ["value", "options"])
|
|
56
|
+
], 2);
|
|
39
57
|
};
|
|
40
|
-
return (e, x) => (f(), v("div", {
|
|
41
|
-
class: g([t(l)()])
|
|
42
|
-
}, [
|
|
43
|
-
a(t(B), C({
|
|
44
|
-
class: t(s)("input-number")
|
|
45
|
-
}, t(b)(o, ["value", "options"]), {
|
|
46
|
-
value: o.value.inputval,
|
|
47
|
-
onChange: m
|
|
48
|
-
}), null, 16, ["class", "value"]),
|
|
49
|
-
a(t(I), {
|
|
50
|
-
value: o.value.radioVal,
|
|
51
|
-
options: o.options,
|
|
52
|
-
onChange: c
|
|
53
|
-
}, null, 8, ["value", "options"])
|
|
54
|
-
], 2));
|
|
55
58
|
}
|
|
56
59
|
});
|
|
57
60
|
export {
|
|
58
|
-
|
|
61
|
+
G as default
|
|
59
62
|
};
|
|
@@ -2,7 +2,7 @@ import { InputNumberProps } from 'ant-design-vue/es/input-number';
|
|
|
2
2
|
type ApInputProps = Pick<InputNumberProps, 'disabled' | 'stringMode' | 'precision' | 'max' | 'min' | 'step' | 'bordered' | 'autofocus' | 'decimalSeparator' | 'controls' | 'formatter' | 'onInput' | 'onChange' | 'onPressEnter' | 'onStep' | 'onBlur' | 'onFocus'>;
|
|
3
3
|
type ApInputValyeName = 'inputval' | 'radioVal';
|
|
4
4
|
export type ApInputValType = {
|
|
5
|
-
value
|
|
5
|
+
value?: Record<ApInputValyeName, string | number>;
|
|
6
6
|
};
|
|
7
7
|
export type ApInputRadioOptions = Array<{
|
|
8
8
|
value: string | number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as p, computed as
|
|
1
|
+
import { defineComponent as p, computed as c, openBlock as r, createElementBlock as o, normalizeClass as d, unref as m, normalizeStyle as a, Fragment as i, renderList as f, createBlock as y, createCommentVNode as _ } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import "./ApStatus.vue.mjs";
|
|
4
|
-
import { useNamespace as
|
|
5
|
-
import
|
|
4
|
+
import { useNamespace as g } from "../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
import k from "./ApStatus.vue2.mjs";
|
|
6
6
|
const w = /* @__PURE__ */ p({
|
|
7
7
|
name: "ApStatusGroup",
|
|
8
8
|
__name: "ApStatusGroup",
|
|
@@ -14,25 +14,23 @@ const w = /* @__PURE__ */ p({
|
|
|
14
14
|
show: { type: Boolean, default: !0 }
|
|
15
15
|
},
|
|
16
16
|
setup(s) {
|
|
17
|
-
const t = s,
|
|
18
|
-
"padding-left": t.padding + "px",
|
|
19
|
-
"padding-right": t.padding + "px",
|
|
17
|
+
const t = s, u = c(() => ({
|
|
20
18
|
...t.style
|
|
21
|
-
})), { b:
|
|
22
|
-
return (
|
|
19
|
+
})), { b: l } = g("ap-status-group");
|
|
20
|
+
return (n, S) => t.statusList ? (r(), o("div", {
|
|
23
21
|
key: 0,
|
|
24
|
-
class:
|
|
25
|
-
style:
|
|
22
|
+
class: d([m(l)()]),
|
|
23
|
+
style: a(u.value)
|
|
26
24
|
}, [
|
|
27
|
-
(
|
|
25
|
+
(r(!0), o(i, null, f(t.statusList, (e) => (r(), y(k, {
|
|
28
26
|
key: e.value,
|
|
29
|
-
show: e.value ===
|
|
27
|
+
show: e.value === n.currentValue,
|
|
30
28
|
color: e.color,
|
|
31
29
|
text: e.text,
|
|
32
30
|
padding: t.padding,
|
|
33
|
-
style:
|
|
31
|
+
style: a(t.style)
|
|
34
32
|
}, null, 8, ["show", "color", "text", "padding", "style"]))), 128))
|
|
35
|
-
], 6)) :
|
|
33
|
+
], 6)) : _("", !0);
|
|
36
34
|
}
|
|
37
35
|
});
|
|
38
36
|
export {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApTransformDataHelper } from '../utils/ap-trans-data';
|
|
1
2
|
import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin, CSSProperties, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement, DefineComponent } from 'vue';
|
|
2
3
|
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
3
4
|
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
@@ -1095,7 +1096,6 @@ export declare const ApInputRadio: DefineComponent<{
|
|
|
1095
1096
|
};
|
|
1096
1097
|
value: {
|
|
1097
1098
|
type: PropType<Record<"inputval" | "radioVal", string | number>>;
|
|
1098
|
-
required: true;
|
|
1099
1099
|
};
|
|
1100
1100
|
options: {
|
|
1101
1101
|
type: PropType<ApInputRadioOptions>;
|
|
@@ -1166,7 +1166,6 @@ export declare const ApInputRadio: DefineComponent<{
|
|
|
1166
1166
|
};
|
|
1167
1167
|
value: {
|
|
1168
1168
|
type: PropType<Record<"inputval" | "radioVal", string | number>>;
|
|
1169
|
-
required: true;
|
|
1170
1169
|
};
|
|
1171
1170
|
options: {
|
|
1172
1171
|
type: PropType<ApInputRadioOptions>;
|
|
@@ -1313,3 +1312,4 @@ export declare const ApLabelGroup: DefineComponent<{
|
|
|
1313
1312
|
record: any;
|
|
1314
1313
|
tagValue: string | number | undefined;
|
|
1315
1314
|
}, {}>;
|
|
1315
|
+
export { ApTransformDataHelper };
|
|
@@ -9,25 +9,27 @@ import "./ap-select-layout/select-layout.vue.mjs";
|
|
|
9
9
|
import "./ap-export-group/ApExportGroup.vue.mjs";
|
|
10
10
|
import "./ap-input-radio/ApInputRadio.vue.mjs";
|
|
11
11
|
import "./ap-batch-action/ApBatchAction.vue.mjs";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { ApTransformDataHelper as M } from "../utils/ap-trans-data/index.mjs";
|
|
13
|
+
import r from "./title/ApTitle.vue2.mjs";
|
|
14
|
+
import m from "./expandAlert/ApExpandAlert.vue2.mjs";
|
|
15
|
+
import p from "./ap-label/ApLabel.vue2.mjs";
|
|
15
16
|
import i from "./ap-status/ApStatus.vue2.mjs";
|
|
16
17
|
import n from "./ap-status/ApStatusGroup.vue2.mjs";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
const
|
|
18
|
+
import s from "./ap-select-layout/select-layout.vue2.mjs";
|
|
19
|
+
import a from "./ap-export-group/ApExportGroup.vue2.mjs";
|
|
20
|
+
import c from "./ap-input-radio/ApInputRadio.vue2.mjs";
|
|
21
|
+
import f from "./ap-batch-action/ApBatchAction.vue2.mjs";
|
|
22
|
+
const H = o(r), R = m, g = o(p), j = o(i), k = o(n), q = o(s), v = o(a), z = c, C = f, F = t;
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
C as ApBatchAction,
|
|
25
|
+
R as ApExpandAlert,
|
|
26
|
+
v as ApExportGroup,
|
|
27
|
+
z as ApInputRadio,
|
|
28
|
+
g as ApLabel,
|
|
29
|
+
F as ApLabelGroup,
|
|
30
|
+
q as ApSelectLayout,
|
|
31
|
+
j as ApStatus,
|
|
32
|
+
k as ApStatusGroup,
|
|
33
|
+
H as ApTitle,
|
|
34
|
+
M as ApTransformDataHelper
|
|
33
35
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import { LocaleType } from '../locale/interface';
|
|
3
|
-
import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig, ApDescriptionsConfig } from './constants';
|
|
3
|
+
import { ApiType, ScrollbarGlobalConfig, TableDefaultConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from './constants';
|
|
4
4
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
5
5
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
6
6
|
import { CSPConfig, SizeType, ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
@@ -155,5 +155,9 @@ export declare const configProviderProps: () => {
|
|
|
155
155
|
type: PropType<ApDescriptionsConfig>;
|
|
156
156
|
default: () => {};
|
|
157
157
|
};
|
|
158
|
+
valueTypeMap: {
|
|
159
|
+
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
160
|
+
default: () => {};
|
|
161
|
+
};
|
|
158
162
|
};
|
|
159
163
|
export type ConfigProviderProps = Partial<ExtractPropTypes<ReturnType<typeof configProviderProps>>>;
|
|
@@ -9,7 +9,7 @@ import { ValidateMessages } from 'ant-design-vue/es/form/interface';
|
|
|
9
9
|
import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
10
10
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
11
11
|
import { LocaleType } from '..';
|
|
12
|
-
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig } from './constants';
|
|
12
|
+
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from './constants';
|
|
13
13
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
14
14
|
export declare const ConfigProvider: DefineComponent<{
|
|
15
15
|
iconPrefixCls: StringConstructor;
|
|
@@ -156,6 +156,10 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
156
156
|
type: PropType<ApDescriptionsConfig>;
|
|
157
157
|
default: () => {};
|
|
158
158
|
};
|
|
159
|
+
valueTypeMap: {
|
|
160
|
+
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
161
|
+
default: () => {};
|
|
162
|
+
};
|
|
159
163
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
160
164
|
iconPrefixCls: StringConstructor;
|
|
161
165
|
getTargetContainer: {
|
|
@@ -301,6 +305,10 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
301
305
|
type: PropType<ApDescriptionsConfig>;
|
|
302
306
|
default: () => {};
|
|
303
307
|
};
|
|
308
|
+
valueTypeMap: {
|
|
309
|
+
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
310
|
+
default: () => {};
|
|
311
|
+
};
|
|
304
312
|
}>>, {
|
|
305
313
|
input: {
|
|
306
314
|
autocomplete?: string;
|
|
@@ -339,5 +347,6 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
339
347
|
uiMode: "aplus" | "admin";
|
|
340
348
|
apUpload: ApUploadConfig;
|
|
341
349
|
apDescriptions: ApDescriptionsConfig;
|
|
350
|
+
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
342
351
|
}, {}>;
|
|
343
352
|
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isVNode as n, ref as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { provideGlobalConfig as
|
|
1
|
+
import { isVNode as n, ref as u, defineComponent as d, computed as f, watch as a, createVNode as m, renderSlot as c } from "vue";
|
|
2
|
+
import { ConfigProvider as p } from "ant-design-vue";
|
|
3
|
+
import { provideGlobalConfig as s } from "./hooks/use-global-config.mjs";
|
|
4
4
|
import { configProviderProps as g } from "./config-provider-props.mjs";
|
|
5
5
|
import { tableDefaultConfig as C } from "./constants.mjs";
|
|
6
|
-
import { mergeAntdProvideConfig as
|
|
7
|
-
import { setCSSVariables as
|
|
8
|
-
function
|
|
6
|
+
import { mergeAntdProvideConfig as v } from "../utils/config-provider-preset.mjs";
|
|
7
|
+
import { setCSSVariables as b, aplusCssVar as P, adminCssVar as M } from "../theme/css-var/index.mjs";
|
|
8
|
+
function S(e) {
|
|
9
9
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !n(e);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const i = u({}), N = /* @__PURE__ */ d({
|
|
12
12
|
name: "AplusConfigProvider",
|
|
13
13
|
props: g(),
|
|
14
14
|
setup(e, {
|
|
15
|
-
slots:
|
|
15
|
+
slots: r
|
|
16
16
|
}) {
|
|
17
|
-
const l =
|
|
17
|
+
const l = f(() => ({
|
|
18
18
|
namespace: e.namespace,
|
|
19
19
|
aplusLocale: e.aplusLocale,
|
|
20
20
|
api: e.api,
|
|
@@ -25,20 +25,21 @@ const a = d({}), N = /* @__PURE__ */ f({
|
|
|
25
25
|
scrollbar: e.scrollbar,
|
|
26
26
|
uiMode: e.uiMode,
|
|
27
27
|
apUpload: e.apUpload,
|
|
28
|
-
apDescriptions: e.apDescriptions
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
apDescriptions: e.apDescriptions,
|
|
29
|
+
valueTypeMap: e.valueTypeMap
|
|
30
|
+
})), t = s(l);
|
|
31
|
+
return a(() => e, (o) => {
|
|
32
|
+
i.value = v(o);
|
|
32
33
|
}, {
|
|
33
34
|
deep: !0,
|
|
34
35
|
immediate: !0
|
|
35
|
-
}),
|
|
36
|
-
|
|
36
|
+
}), a(() => e.uiMode, (o) => {
|
|
37
|
+
b(o === "aplus" ? P : M);
|
|
37
38
|
}, {
|
|
38
39
|
immediate: !0
|
|
39
40
|
}), () => {
|
|
40
41
|
let o;
|
|
41
|
-
return
|
|
42
|
+
return m(p, i.value, S(o = c(r, "default", {
|
|
42
43
|
config: t == null ? void 0 : t.value
|
|
43
44
|
})) ? o : {
|
|
44
45
|
default: () => [o]
|
|
@@ -48,5 +49,5 @@ const a = d({}), N = /* @__PURE__ */ f({
|
|
|
48
49
|
});
|
|
49
50
|
export {
|
|
50
51
|
N as ConfigProvider,
|
|
51
|
-
|
|
52
|
+
i as globalConfigCached
|
|
52
53
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfigProviderProps } from './config-provider-props';
|
|
2
|
-
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { InjectionKey, Ref, VNode } from 'vue';
|
|
3
3
|
import { SizeType, SorterResult } from '../pro-table/types/table';
|
|
4
|
-
import { Fn } from '../type';
|
|
4
|
+
import { Fn, Recordable } from '../type';
|
|
5
5
|
import { CommonOptionItem, ApiSelectOption } from '../pro-form/components/interface';
|
|
6
6
|
import { client } from '@aplus-frontend/oss';
|
|
7
7
|
export type ConfigProviderContext = Partial<ConfigProviderProps>;
|
|
@@ -38,6 +38,10 @@ export type ApUploadConfig = {
|
|
|
38
38
|
};
|
|
39
39
|
accept?: string;
|
|
40
40
|
};
|
|
41
|
+
export type ValueTypeRenderConfig = {
|
|
42
|
+
render?: (text: any, renderProps: Recordable) => VNode;
|
|
43
|
+
renderFormItem?: (fieldProps: Recordable) => VNode;
|
|
44
|
+
};
|
|
41
45
|
export type ApDescriptionsConfig = {
|
|
42
46
|
downloadFile?: (url: string, name: string) => void;
|
|
43
47
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MaybeRef } from '@aplus-frontend/utils';
|
|
2
2
|
import { App, Ref, ComputedRef, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
-
import { ConfigProviderContext, ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig } from '../constants';
|
|
3
|
+
import { ConfigProviderContext, ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig } from '../constants';
|
|
4
4
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
5
5
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
6
6
|
import { CSPConfig } from 'ant-design-vue/es/config-provider';
|
|
@@ -158,4 +158,8 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
158
158
|
type: PropType<ApDescriptionsConfig>;
|
|
159
159
|
default: () => {};
|
|
160
160
|
};
|
|
161
|
+
valueTypeMap: {
|
|
162
|
+
type: PropType<Record<string, ValueTypeRenderConfig>>;
|
|
163
|
+
default: () => {};
|
|
164
|
+
};
|
|
161
165
|
}>>>> | undefined;
|