@aplus-frontend/ui 0.0.1-beta.28 → 0.0.1-beta.30
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 +146 -142
- package/es/src/ap-field/text/index.vue.d.ts +1 -1
- package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/es/src/components.d.ts +2 -0
- package/es/src/config-provider/config-provider-props.d.ts +1 -1
- package/es/src/config-provider/config-provider.d.ts +11 -11
- package/es/src/config-provider/hooks/use-global-config.d.ts +1 -1
- package/es/src/description/description.vue.d.ts +1 -1
- package/es/src/icon-picker/icon-picker.vue.d.ts +2 -2
- package/es/src/index.mjs +113 -109
- package/es/src/modal/basic.vue.d.ts +1 -1
- package/es/src/modal/components/modal-footer.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-cascader.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-select.vue.d.ts +2 -2
- package/es/src/pro-form/components/api-transfer.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-tree-select.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-tree.vue.d.ts +1 -1
- package/es/src/pro-form/hooks/use-label-width.d.ts +6 -6
- package/es/src/pro-form/index.d.ts +4 -1
- package/es/src/pro-form/index.mjs +12 -9
- package/es/src/pro-form/pro-form.vue.d.ts +1 -1
- package/es/src/pro-form/style/table-form.css +101 -0
- package/es/src/pro-form/table-form-inner.vue.d.ts +44 -0
- package/es/src/pro-form/table-form-inner.vue.mjs +176 -0
- package/es/src/pro-form/table-form-inner.vue2.mjs +4 -0
- package/es/src/pro-form/table-form.vue.d.ts +42 -0
- package/es/src/pro-form/table-form.vue.mjs +41 -0
- package/es/src/pro-form/table-form.vue2.mjs +4 -0
- package/es/src/pro-form/types/table-form.d.ts +37 -0
- package/es/src/pro-form/types/table-form.mjs +1 -0
- package/es/src/pro-table/components/editable/editable-cell.vue.d.ts +1 -1
- package/es/src/pro-table/pro-table.vue.d.ts +1 -1
- package/es/src/theme/antd-global-overwrite/admin/index.css +6 -6
- package/es/src/theme/antd-global-overwrite/admin/steps.css +6 -6
- package/es/src/theme/antd-global-overwrite/aplus/index.css +3 -3
- package/es/src/theme/antd-global-overwrite/aplus/steps.css +3 -3
- package/es/src/theme/pro-form/table-form-inner.css +101 -0
- package/es/src/utils/config-provider-preset.d.ts +12 -12
- package/lib/index.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/lib/src/components.d.ts +2 -0
- package/lib/src/config-provider/config-provider-props.d.ts +1 -1
- package/lib/src/config-provider/config-provider.d.ts +11 -11
- package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -1
- package/lib/src/description/description.vue.d.ts +1 -1
- package/lib/src/icon-picker/icon-picker.vue.d.ts +2 -2
- package/lib/src/index.js +1 -1
- package/lib/src/modal/basic.vue.d.ts +1 -1
- package/lib/src/modal/components/modal-footer.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-cascader.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-select.vue.d.ts +2 -2
- package/lib/src/pro-form/components/api-transfer.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-tree-select.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-tree.vue.d.ts +1 -1
- package/lib/src/pro-form/hooks/use-label-width.d.ts +6 -6
- package/lib/src/pro-form/index.d.ts +4 -1
- package/lib/src/pro-form/index.js +1 -1
- package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
- package/lib/src/pro-form/style/table-form.css +101 -0
- package/lib/src/pro-form/table-form-inner.vue.d.ts +44 -0
- package/lib/src/pro-form/table-form-inner.vue.js +1 -0
- package/lib/src/pro-form/table-form-inner.vue2.js +1 -0
- package/lib/src/pro-form/table-form.vue.d.ts +42 -0
- package/lib/src/pro-form/table-form.vue.js +1 -0
- package/lib/src/pro-form/table-form.vue2.js +1 -0
- package/lib/src/pro-form/types/table-form.d.ts +37 -0
- package/lib/src/pro-form/types/table-form.js +1 -0
- package/lib/src/pro-table/components/editable/editable-cell.vue.d.ts +1 -1
- package/lib/src/pro-table/pro-table.vue.d.ts +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/index.css +6 -6
- package/lib/src/theme/antd-global-overwrite/admin/steps.css +6 -6
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +3 -3
- package/lib/src/theme/antd-global-overwrite/aplus/steps.css +3 -3
- package/lib/src/theme/pro-form/table-form-inner.css +101 -0
- package/lib/src/utils/config-provider-preset.d.ts +12 -12
- package/package.json +1 -1
- package/es/src/base-button/index.d.ts +0 -137
- package/es/src/basic/index.d.ts +0 -278
- package/es/src/button/index.d.ts +0 -51
- package/es/src/config-provider/index.d.ts +0 -691
- package/es/src/container/index.d.ts +0 -178
- package/es/src/count-down/index.d.ts +0 -150
- package/es/src/cropper/index.d.ts +0 -369
- package/es/src/description/index.d.ts +0 -214
- package/es/src/dropdown/index.d.ts +0 -113
- package/es/src/icon/index.d.ts +0 -208
- package/es/src/icon-picker/index.d.ts +0 -190
- package/es/src/modal/index.d.ts +0 -963
- package/es/src/scroll-bar/index.d.ts +0 -176
- package/es/src/strength-meter/index.d.ts +0 -89
- package/es/src/transition/index.d.ts +0 -369
- package/lib/src/base-button/index.d.ts +0 -137
- package/lib/src/basic/index.d.ts +0 -278
- package/lib/src/button/index.d.ts +0 -51
- package/lib/src/config-provider/index.d.ts +0 -691
- package/lib/src/container/index.d.ts +0 -178
- package/lib/src/count-down/index.d.ts +0 -150
- package/lib/src/cropper/index.d.ts +0 -369
- package/lib/src/description/index.d.ts +0 -214
- package/lib/src/dropdown/index.d.ts +0 -113
- package/lib/src/icon/index.d.ts +0 -208
- package/lib/src/icon-picker/index.d.ts +0 -190
- package/lib/src/modal/index.d.ts +0 -963
- package/lib/src/scroll-bar/index.d.ts +0 -176
- package/lib/src/strength-meter/index.d.ts +0 -89
- package/lib/src/transition/index.d.ts +0 -369
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { EditColumn, Recordable, ProTableFormInnerProps, TableActionTypes } from './types/table-form';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ProTableFormInnerProps>, {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
dataPath: () => never[];
|
|
7
|
+
actions: () => never[];
|
|
8
|
+
bordered: boolean;
|
|
9
|
+
editableFunc: () => true;
|
|
10
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
11
|
+
editChange: (...args: any[]) => void;
|
|
12
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ProTableFormInnerProps>, {
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
dataPath: () => never[];
|
|
15
|
+
actions: () => never[];
|
|
16
|
+
bordered: boolean;
|
|
17
|
+
editableFunc: () => true;
|
|
18
|
+
}>>> & {
|
|
19
|
+
onEditChange?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
bordered: boolean;
|
|
23
|
+
actions: TableActionTypes;
|
|
24
|
+
dataPath: string[];
|
|
25
|
+
editableFunc: (column: EditColumn<any>, record: Recordable) => boolean;
|
|
26
|
+
}, {}>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
30
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
+
} : {
|
|
33
|
+
type: PropType<T[K]>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
type __VLS_WithDefaults<P, D> = {
|
|
38
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
39
|
+
default: D[K];
|
|
40
|
+
}> : P[K];
|
|
41
|
+
};
|
|
42
|
+
type __VLS_Prettify<T> = {
|
|
43
|
+
[K in keyof T]: T[K];
|
|
44
|
+
} & {};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { defineComponent as V, computed as j, openBlock as l, createElementBlock as c, normalizeClass as i, unref as r, createVNode as m, withCtx as d, normalizeStyle as P, createCommentVNode as p, createElementVNode as u, toDisplayString as g, createBlock as f, resolveDynamicComponent as O, mergeProps as z, createTextVNode as L } from "vue";
|
|
2
|
+
import { componentMap as R } from "./component-map.mjs";
|
|
3
|
+
import { createPlaceholderMessage as U } from "./helper.mjs";
|
|
4
|
+
import { QuestionCircleOutlined as $, ExclamationCircleOutlined as C } from "@ant-design/icons-vue";
|
|
5
|
+
import { Table as A, Tooltip as h, FormItem as G } from "ant-design-vue";
|
|
6
|
+
import "../ap-action/index.mjs";
|
|
7
|
+
import { isFunction as H } from "lodash-unified";
|
|
8
|
+
import { useLocale as Q } from "../config-provider/hooks/use-locale.mjs";
|
|
9
|
+
import "../config-provider/index.mjs";
|
|
10
|
+
import "./style/table-form.css";
|
|
11
|
+
import { useNamespace as J } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import { useGlobalConfig as K } from "../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import W from "../ap-action/group/index.vue.mjs";
|
|
14
|
+
const pe = /* @__PURE__ */ V({
|
|
15
|
+
__name: "table-form-inner",
|
|
16
|
+
props: {
|
|
17
|
+
columns: {},
|
|
18
|
+
dataSource: {},
|
|
19
|
+
disabled: { type: Boolean, default: !1 },
|
|
20
|
+
dataPath: { default: () => [] },
|
|
21
|
+
actions: { type: Function, default: () => [] },
|
|
22
|
+
editableFunc: { type: Function, default: () => !0 },
|
|
23
|
+
bordered: { type: Boolean, default: !0 }
|
|
24
|
+
},
|
|
25
|
+
emits: ["editChange"],
|
|
26
|
+
setup(x, { emit: I }) {
|
|
27
|
+
const { b: v, m: o } = J("pro-table-form"), k = K("uiMode"), { t: E } = Q(), F = I, y = x, _ = j(() => y.dataSource), w = () => y.columns, M = (t, n) => {
|
|
28
|
+
if (!t.editProps)
|
|
29
|
+
return console.warn("column has No editProps"), [];
|
|
30
|
+
const e = t.editProps.rules || [];
|
|
31
|
+
return typeof e == "function" ? e(n) : e == null ? void 0 : e.map((a) => (a.required && !a.message && (typeof t.editProps.component == "string" && t.editProps.component.indexOf("Input") >= 0 ? a.message = t.title + "不能为空" : a.message = "请选择" + t.title), a));
|
|
32
|
+
}, N = (t) => {
|
|
33
|
+
var n;
|
|
34
|
+
return ((n = t.editProps.componentProps) == null ? void 0 : n.placeholder) || U(
|
|
35
|
+
t.editProps.component,
|
|
36
|
+
t.title,
|
|
37
|
+
E
|
|
38
|
+
);
|
|
39
|
+
}, S = (t, n, e) => {
|
|
40
|
+
F("editChange", { record: t, index: n, dataIndex: e });
|
|
41
|
+
}, B = (t, n) => {
|
|
42
|
+
var a, s;
|
|
43
|
+
const e = (s = (a = t.editProps) == null ? void 0 : a.componentProps) == null ? void 0 : s.disabled;
|
|
44
|
+
return y.disabled || (H(e) ? e(n) : e);
|
|
45
|
+
}, q = (t) => {
|
|
46
|
+
const n = t.align == "center" ? t.align : t.align == "right" ? "flex-end" : "flex-start";
|
|
47
|
+
return {
|
|
48
|
+
width: t.width + "px",
|
|
49
|
+
display: "flex",
|
|
50
|
+
justifyContent: n,
|
|
51
|
+
alignItems: "center"
|
|
52
|
+
};
|
|
53
|
+
}, D = (t) => ({
|
|
54
|
+
// width: column.width + 'px',
|
|
55
|
+
display: "flex",
|
|
56
|
+
justifyContent: t.align == "center" ? t.align : t.align == "right" ? "flex-end" : "flex-start",
|
|
57
|
+
alignItems: "center"
|
|
58
|
+
}), T = () => {
|
|
59
|
+
};
|
|
60
|
+
return (t, n) => (l(), c("div", {
|
|
61
|
+
class: i(r(v)())
|
|
62
|
+
}, [
|
|
63
|
+
m(r(A), {
|
|
64
|
+
class: i("table-form-" + (r(k) || "admin")),
|
|
65
|
+
bordered: t.bordered,
|
|
66
|
+
columns: w(),
|
|
67
|
+
pagination: !1,
|
|
68
|
+
"data-source": _.value,
|
|
69
|
+
onChange: T
|
|
70
|
+
}, {
|
|
71
|
+
headerCell: d(({ title: e, column: a }) => [
|
|
72
|
+
a.editProps && a.editProps.required || a.helpMessage || a.width ? (l(), c("div", {
|
|
73
|
+
key: 0,
|
|
74
|
+
style: P(q(a))
|
|
75
|
+
}, [
|
|
76
|
+
a.editProps && a.editProps.required ? (l(), c("span", {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: i(r(o)("required"))
|
|
79
|
+
}, "*", 2)) : p("", !0),
|
|
80
|
+
u("span", null, g(e), 1),
|
|
81
|
+
a.helpMessage ? (l(), f(r(h), {
|
|
82
|
+
key: 1,
|
|
83
|
+
placement: "top"
|
|
84
|
+
}, {
|
|
85
|
+
title: d(() => [
|
|
86
|
+
u("span", null, g(a.helpMessage), 1)
|
|
87
|
+
]),
|
|
88
|
+
default: d(() => [
|
|
89
|
+
m(r($), { style: { color: "#0070ff" } })
|
|
90
|
+
]),
|
|
91
|
+
_: 2
|
|
92
|
+
}, 1024)) : p("", !0)
|
|
93
|
+
], 4)) : p("", !0)
|
|
94
|
+
]),
|
|
95
|
+
bodyCell: d(({
|
|
96
|
+
column: e,
|
|
97
|
+
index: a,
|
|
98
|
+
record: s
|
|
99
|
+
}) => [
|
|
100
|
+
t.editableFunc && t.editableFunc(e, s) && !e.customRender ? (l(), c("div", {
|
|
101
|
+
key: 0,
|
|
102
|
+
class: i(r(o)("edit-cell")),
|
|
103
|
+
style: P(D(e))
|
|
104
|
+
}, [
|
|
105
|
+
e.editProps ? (l(), f(r(G), {
|
|
106
|
+
key: 0,
|
|
107
|
+
class: i(r(o)("form-item")),
|
|
108
|
+
label: "",
|
|
109
|
+
labelAlign: "left",
|
|
110
|
+
name: [
|
|
111
|
+
...t.dataPath,
|
|
112
|
+
a,
|
|
113
|
+
e.dataIndex
|
|
114
|
+
],
|
|
115
|
+
rules: M(e, s)
|
|
116
|
+
}, {
|
|
117
|
+
default: d(() => [
|
|
118
|
+
u("div", {
|
|
119
|
+
class: i({
|
|
120
|
+
[r(o)("edit-wraper")]: !0,
|
|
121
|
+
[r(o)("field-error")]: !!s[e.dataIndex + "Error"]
|
|
122
|
+
})
|
|
123
|
+
}, [
|
|
124
|
+
(l(), f(O(r(R).get(e.editProps.component)), z({
|
|
125
|
+
value: s[e.dataIndex],
|
|
126
|
+
"onUpdate:value": (b) => s[e.dataIndex] = b
|
|
127
|
+
}, e.editProps.componentProps || {}, {
|
|
128
|
+
placeholder: N(e),
|
|
129
|
+
disabled: B(e, s),
|
|
130
|
+
onChange: (b) => S(s, a, e.dataIndex)
|
|
131
|
+
}), null, 16, ["value", "onUpdate:value", "placeholder", "disabled", "onChange"])),
|
|
132
|
+
s[e.dataIndex + "Error"] ? (l(), f(r(h), { key: 0 }, {
|
|
133
|
+
title: d(() => [
|
|
134
|
+
u("div", null, g(s[e.dataIndex + "Error"]), 1)
|
|
135
|
+
]),
|
|
136
|
+
default: d(() => [
|
|
137
|
+
m(r(C), {
|
|
138
|
+
class: i(r(o)("error-tip"))
|
|
139
|
+
}, null, 8, ["class"])
|
|
140
|
+
]),
|
|
141
|
+
_: 2
|
|
142
|
+
}, 1024)) : p("", !0)
|
|
143
|
+
], 2)
|
|
144
|
+
]),
|
|
145
|
+
_: 2
|
|
146
|
+
}, 1032, ["class", "name", "rules"])) : e.dataIndex !== "action" ? (l(), c("div", {
|
|
147
|
+
key: 1,
|
|
148
|
+
class: i(r(o)("text-cell"))
|
|
149
|
+
}, [
|
|
150
|
+
L(g(s[e.dataIndex] || "--") + " ", 1),
|
|
151
|
+
s[e.dataIndex + "Error"] ? (l(), f(r(h), { key: 0 }, {
|
|
152
|
+
title: d(() => [
|
|
153
|
+
u("div", null, g(s[e.dataIndex + "Error"]), 1)
|
|
154
|
+
]),
|
|
155
|
+
default: d(() => [
|
|
156
|
+
m(r(C), {
|
|
157
|
+
class: i(r(o)("error-tip"))
|
|
158
|
+
}, null, 8, ["class"])
|
|
159
|
+
]),
|
|
160
|
+
_: 2
|
|
161
|
+
}, 1024)) : p("", !0)
|
|
162
|
+
], 2)) : (l(), f(r(W), {
|
|
163
|
+
key: 2,
|
|
164
|
+
class: i(r(o)("action-cell")),
|
|
165
|
+
actions: t.actions(s, a)
|
|
166
|
+
}, null, 8, ["class", "actions"]))
|
|
167
|
+
], 6)) : p("", !0)
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["class", "bordered", "columns", "data-source"])
|
|
171
|
+
], 2));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
export {
|
|
175
|
+
pe as default
|
|
176
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ProTableFormProps, TableActionTypes } from './types/table-form';
|
|
2
|
+
import { ValidateOptions } from 'ant-design-vue/lib/form/interface';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
4
|
+
|
|
5
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ProTableFormProps>, {
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
actions: () => never[];
|
|
8
|
+
bordered: boolean;
|
|
9
|
+
}>, {
|
|
10
|
+
validate: () => Promise<{
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
} | undefined>;
|
|
13
|
+
validateFields: (fields: (string | string[])[], options?: ValidateOptions) => Promise<{
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ProTableFormProps>, {
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
actions: () => never[];
|
|
19
|
+
bordered: boolean;
|
|
20
|
+
}>>>, {
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
bordered: boolean;
|
|
23
|
+
actions: TableActionTypes;
|
|
24
|
+
}, {}>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
28
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
+
} : {
|
|
31
|
+
type: PropType<T[K]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type __VLS_WithDefaults<P, D> = {
|
|
36
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
37
|
+
default: D[K];
|
|
38
|
+
}> : P[K];
|
|
39
|
+
};
|
|
40
|
+
type __VLS_Prettify<T> = {
|
|
41
|
+
[K in keyof T]: T[K];
|
|
42
|
+
} & {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineComponent as u, ref as m, computed as f, unref as r, openBlock as p, createElementBlock as v, createVNode as n, withCtx as _, mergeProps as F } from "vue";
|
|
2
|
+
import "./table-form-inner.vue2.mjs";
|
|
3
|
+
import { Form as b } from "ant-design-vue";
|
|
4
|
+
import { useAttrs as y } from "@aplus-frontend/hooks";
|
|
5
|
+
import B from "./table-form-inner.vue.mjs";
|
|
6
|
+
const P = /* @__PURE__ */ u({
|
|
7
|
+
__name: "table-form",
|
|
8
|
+
props: {
|
|
9
|
+
columns: {},
|
|
10
|
+
dataSource: {},
|
|
11
|
+
disabled: { type: Boolean, default: !1 },
|
|
12
|
+
actions: { type: Function, default: () => [] },
|
|
13
|
+
editableFunc: {},
|
|
14
|
+
bordered: { type: Boolean, default: !0 }
|
|
15
|
+
},
|
|
16
|
+
setup(l, { expose: s }) {
|
|
17
|
+
const i = y(), c = l, t = m(), d = f(() => Object.assign({ ...c, ...r(i) }));
|
|
18
|
+
return s({ validate: async () => {
|
|
19
|
+
var e;
|
|
20
|
+
return await ((e = t.value) == null ? void 0 : e.validate());
|
|
21
|
+
}, validateFields: async (e, o = {}) => {
|
|
22
|
+
var a;
|
|
23
|
+
return await ((a = t.value) == null ? void 0 : a.validateFields(e, o));
|
|
24
|
+
} }), (e, o) => (p(), v("div", null, [
|
|
25
|
+
n(r(b), {
|
|
26
|
+
ref_key: "formRef",
|
|
27
|
+
ref: t,
|
|
28
|
+
model: e.dataSource,
|
|
29
|
+
scrollToFirstError: !0
|
|
30
|
+
}, {
|
|
31
|
+
default: _(() => [
|
|
32
|
+
n(B, F({ actions: e.actions }, d.value), null, 16, ["actions"])
|
|
33
|
+
]),
|
|
34
|
+
_: 1
|
|
35
|
+
}, 8, ["model"])
|
|
36
|
+
]));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
P as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FormSchema } from './form';
|
|
2
|
+
import { ComponentType } from './';
|
|
3
|
+
import { Rule } from 'ant-design-vue/es/form';
|
|
4
|
+
import { GroupActionTypes } from '../../ap-action';
|
|
5
|
+
import { ColumnProps } from 'ant-design-vue/es/table';
|
|
6
|
+
|
|
7
|
+
export type Recordable = {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
export type EditAblePorps<T> = {
|
|
11
|
+
editProps?: Omit<FormSchema<T>, 'field' | 'component' | 'rules'> & {
|
|
12
|
+
style?: string;
|
|
13
|
+
field?: string;
|
|
14
|
+
component: ComponentType | keyof T;
|
|
15
|
+
rules?: Rule[] | ((values: Recordable) => Rule[]);
|
|
16
|
+
};
|
|
17
|
+
helpMessage?: string;
|
|
18
|
+
ifShow?: (record: Recordable) => boolean;
|
|
19
|
+
};
|
|
20
|
+
export interface EditColumn<T = any> extends ColumnProps<Recordable>, EditAblePorps<T> {
|
|
21
|
+
}
|
|
22
|
+
export type tableChangeParams = {
|
|
23
|
+
record: Recordable;
|
|
24
|
+
index: number;
|
|
25
|
+
dataIndex: string;
|
|
26
|
+
};
|
|
27
|
+
export type TableActionTypes = (record: Recordable, index: number) => GroupActionTypes[];
|
|
28
|
+
export type ProTableFormInnerProps = {
|
|
29
|
+
columns: EditColumn[];
|
|
30
|
+
dataSource: Array<Recordable>;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
dataPath?: Array<string>;
|
|
33
|
+
actions?: TableActionTypes;
|
|
34
|
+
editableFunc?: (column: EditColumn, record: Recordable) => boolean;
|
|
35
|
+
bordered?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export type ProTableFormProps = Omit<ProTableFormInnerProps, 'dataPath'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -116,10 +116,10 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
116
116
|
"onRow-mouseleave"?: ((...args: any[]) => any) | undefined;
|
|
117
117
|
"onExpanded-rows-change"?: ((...args: any[]) => any) | undefined;
|
|
118
118
|
}, {
|
|
119
|
-
ellipsis: boolean;
|
|
120
119
|
pagination: boolean | PaginationProps | null;
|
|
121
120
|
immediate: boolean;
|
|
122
121
|
columns: BasicColumn[];
|
|
122
|
+
ellipsis: boolean;
|
|
123
123
|
rowKey: string | GetRowKey<any>;
|
|
124
124
|
indentSize: number;
|
|
125
125
|
showIndexColumn: boolean;
|
|
@@ -309,12 +309,12 @@
|
|
|
309
309
|
display: flex;
|
|
310
310
|
}
|
|
311
311
|
.ant-steps .ant-steps-item-icon {
|
|
312
|
+
display: flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
justify-content: center;
|
|
312
315
|
width: 28px;
|
|
313
316
|
height: 28px;
|
|
314
317
|
margin-top: 4px;
|
|
315
|
-
display: flex;
|
|
316
|
-
justify-content: center;
|
|
317
|
-
align-items: center;
|
|
318
318
|
}
|
|
319
319
|
.ant-steps .ant-steps-item-finish .ant-steps-item-container .ant-steps-item-icon {
|
|
320
320
|
background-color: #ffffff;
|
|
@@ -387,12 +387,12 @@
|
|
|
387
387
|
margin-inline-end: 8px;
|
|
388
388
|
}
|
|
389
389
|
.ant-steps.ant-steps-vertical .ant-steps-item-icon {
|
|
390
|
+
display: flex;
|
|
391
|
+
align-items: center;
|
|
392
|
+
justify-content: center;
|
|
390
393
|
width: 28px;
|
|
391
394
|
height: 28px;
|
|
392
395
|
margin-top: 4px;
|
|
393
|
-
display: flex;
|
|
394
|
-
justify-content: center;
|
|
395
|
-
align-items: center;
|
|
396
396
|
}
|
|
397
397
|
.ant-table-wrapper {
|
|
398
398
|
padding: 12px 16px 16px;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
display: flex;
|
|
6
6
|
}
|
|
7
7
|
.ant-steps .ant-steps-item-icon {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
8
11
|
width: 28px;
|
|
9
12
|
height: 28px;
|
|
10
13
|
margin-top: 4px;
|
|
11
|
-
display: flex;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
align-items: center;
|
|
14
14
|
}
|
|
15
15
|
.ant-steps .ant-steps-item-finish .ant-steps-item-container .ant-steps-item-icon {
|
|
16
16
|
background-color: #ffffff;
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
margin-inline-end: 8px;
|
|
84
84
|
}
|
|
85
85
|
.ant-steps.ant-steps-vertical .ant-steps-item-icon {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
86
89
|
width: 28px;
|
|
87
90
|
height: 28px;
|
|
88
91
|
margin-top: 4px;
|
|
89
|
-
display: flex;
|
|
90
|
-
justify-content: center;
|
|
91
|
-
align-items: center;
|
|
92
92
|
}
|
|
@@ -388,12 +388,12 @@
|
|
|
388
388
|
margin-inline-end: 8px;
|
|
389
389
|
}
|
|
390
390
|
.ant-steps.ant-steps-vertical .ant-steps-item-icon {
|
|
391
|
+
display: flex;
|
|
392
|
+
align-items: center;
|
|
393
|
+
justify-content: center;
|
|
391
394
|
width: 28px;
|
|
392
395
|
height: 28px;
|
|
393
396
|
margin-top: 4px;
|
|
394
|
-
display: flex;
|
|
395
|
-
justify-content: center;
|
|
396
|
-
align-items: center;
|
|
397
397
|
}
|
|
398
398
|
.ant-table-wrapper .ant-table.ant-table.ant-table-small .ant-table-title,
|
|
399
399
|
.ant-table-wrapper .ant-table.ant-table.ant-table-middle .ant-table-title {
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
margin-inline-end: 8px;
|
|
78
78
|
}
|
|
79
79
|
.ant-steps.ant-steps-vertical .ant-steps-item-icon {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
80
83
|
width: 28px;
|
|
81
84
|
height: 28px;
|
|
82
85
|
margin-top: 4px;
|
|
83
|
-
display: flex;
|
|
84
|
-
justify-content: center;
|
|
85
|
-
align-items: center;
|
|
86
86
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
.aplus-pro-table-form .table-form-admin .ant-table .ant-table-tbody > tr > td,
|
|
2
|
+
.aplus-pro-table-form .table-form-admin .ant-table .ant-table-body .ant-table-tbody > tr.ant-table-row > td {
|
|
3
|
+
padding: 18px 16px 0px ;
|
|
4
|
+
}
|
|
5
|
+
.aplus-pro-table-form .table-form-admin .ant-table .ant-table-body .ant-table-tbody > tr.ant-table-row > td:first-child {
|
|
6
|
+
padding: 18px 16px 0 ;
|
|
7
|
+
}
|
|
8
|
+
.aplus-pro-table-form .table-form-admin .ant-table .ant-form-item {
|
|
9
|
+
margin-bottom: 18px;
|
|
10
|
+
}
|
|
11
|
+
.aplus-pro-table-form .table-form-admin .ant-table .ant-form-item .ant-form-item-explain {
|
|
12
|
+
line-height: 18px;
|
|
13
|
+
}
|
|
14
|
+
.aplus-pro-table-form .table-form-admin .ant-table .ant-form-item .ant-form-item-explain + div {
|
|
15
|
+
height: 18px ;
|
|
16
|
+
}
|
|
17
|
+
.aplus-pro-table-form .table-form-admin .ant-table .ant-table-thead > tr > th {
|
|
18
|
+
padding: 10.5px 16px !important;
|
|
19
|
+
background: #fafafa;
|
|
20
|
+
color: #182948;
|
|
21
|
+
}
|
|
22
|
+
.aplus-pro-table-form .table-form-aplus .ant-form-item {
|
|
23
|
+
margin-bottom: 0;
|
|
24
|
+
}
|
|
25
|
+
.aplus-pro-table-form .table-form-aplus .ant-form-item-has-error.ant-form-item {
|
|
26
|
+
margin-bottom: 24px;
|
|
27
|
+
}
|
|
28
|
+
.aplus-pro-table-form .table-form-aplus .ant-table-tbody > tr > td,
|
|
29
|
+
.aplus-pro-table-form .table-form-aplus .ant-table-body .ant-table-tbody > tr.ant-table-row > td {
|
|
30
|
+
padding: 16px 8px ;
|
|
31
|
+
}
|
|
32
|
+
.aplus-pro-table-form .table-form-aplus .ant-table-body .ant-table-tbody > tr.ant-table-row > td:first-child {
|
|
33
|
+
padding: 16px 8px ;
|
|
34
|
+
}
|
|
35
|
+
.aplus-pro-table-form .ant-table {
|
|
36
|
+
border-radius: 0 !important;
|
|
37
|
+
}
|
|
38
|
+
.aplus-pro-table-form .ant-table .ant-table-container table > thead > tr:first-child > *:first-child {
|
|
39
|
+
border-start-start-radius: 0;
|
|
40
|
+
}
|
|
41
|
+
.aplus-pro-table-form .ant-table .ant-table-container table > thead > tr:first-child > *:last-child {
|
|
42
|
+
border-start-end-radius: 0;
|
|
43
|
+
}
|
|
44
|
+
.aplus-pro-table-form .ant-table .ant-table-container,
|
|
45
|
+
.aplus-pro-table-form .ant-table .ant-table-thead {
|
|
46
|
+
border-start-start-radius: 0;
|
|
47
|
+
border-start-end-radius: 0;
|
|
48
|
+
}
|
|
49
|
+
.aplus-pro-table-form .ant-table .ant-table-thead > tr > th {
|
|
50
|
+
padding: 15.5px 8px !important;
|
|
51
|
+
background: #f2f6f9;
|
|
52
|
+
color: #182948;
|
|
53
|
+
text-align: left !important;
|
|
54
|
+
}
|
|
55
|
+
.aplus-pro-table-form .ant-table .ant-table-thead > tr > th::before {
|
|
56
|
+
display: none;
|
|
57
|
+
visibility: hidden;
|
|
58
|
+
width: 0;
|
|
59
|
+
}
|
|
60
|
+
.aplus-pro-table-form .ant-table .ant-table-content {
|
|
61
|
+
overflow-x: scroll;
|
|
62
|
+
}
|
|
63
|
+
.aplus-pro-table-form .ant-table-row.ant-table-row-level-0 .ant-table-cell {
|
|
64
|
+
vertical-align: top;
|
|
65
|
+
}
|
|
66
|
+
.aplus-pro-table-form--required {
|
|
67
|
+
color: #FF4D4F;
|
|
68
|
+
margin-top: 4px;
|
|
69
|
+
}
|
|
70
|
+
.aplus-pro-table-form--edit-cell {
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
justify-content: flex-start;
|
|
76
|
+
}
|
|
77
|
+
.aplus-pro-table-form--form-item {
|
|
78
|
+
width: 100%;
|
|
79
|
+
}
|
|
80
|
+
.aplus-pro-table-form--edit-wraper {
|
|
81
|
+
display: flex;
|
|
82
|
+
}
|
|
83
|
+
.aplus-pro-table-form--field-error .ant-input-number,
|
|
84
|
+
.aplus-pro-table-form--field-error .ant-input {
|
|
85
|
+
border-color: #ff4d4f;
|
|
86
|
+
}
|
|
87
|
+
.aplus-pro-table-form--text-cell {
|
|
88
|
+
margin-top: 5px;
|
|
89
|
+
}
|
|
90
|
+
.aplus-pro-table-form--action-cell {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
margin-top: 5px;
|
|
94
|
+
}
|
|
95
|
+
.aplus-pro-table-form--error-tip {
|
|
96
|
+
margin-left: 8px;
|
|
97
|
+
color: #FF4D4F;
|
|
98
|
+
}
|
|
99
|
+
.aplus-pro-table-form .ant-input-number {
|
|
100
|
+
width: 100% !important;
|
|
101
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TransformCellTextProps } from 'ant-design-vue/lib/table/interface';
|
|
2
2
|
import { ConfigProviderProps } from 'ant-design-vue';
|
|
3
3
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
4
|
-
import { ValidateMessages } from 'ant-design-vue/es/form/interface';
|
|
5
|
-
import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
6
4
|
import { CSPConfig } from 'ant-design-vue/es/config-provider';
|
|
7
5
|
import { Locale } from 'ant-design-vue/es/locale';
|
|
8
6
|
import { ButtonSize } from 'ant-design-vue/es/button';
|
|
7
|
+
import { ValidateMessages } from 'ant-design-vue/es/form/interface';
|
|
8
|
+
import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
9
9
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
10
10
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
11
11
|
|
|
@@ -39,18 +39,10 @@ export declare const antdConfigProviderPresets: Partial<ConfigProviderProps>;
|
|
|
39
39
|
export declare function mergeAntdProvideConfig(config: ConfigProviderProps): {
|
|
40
40
|
theme?: ThemeConfig | undefined;
|
|
41
41
|
direction?: "ltr" | "rtl" | undefined;
|
|
42
|
+
csp?: CSPConfig | undefined;
|
|
42
43
|
input?: {
|
|
43
44
|
autocomplete?: string | undefined;
|
|
44
45
|
} | undefined;
|
|
45
|
-
select?: {
|
|
46
|
-
showSearch?: boolean | undefined;
|
|
47
|
-
} | undefined;
|
|
48
|
-
form?: {
|
|
49
|
-
validateMessages?: ValidateMessages | undefined;
|
|
50
|
-
requiredMark?: RequiredMark | undefined;
|
|
51
|
-
colon?: boolean | undefined;
|
|
52
|
-
} | undefined;
|
|
53
|
-
csp?: CSPConfig | undefined;
|
|
54
46
|
locale?: Locale | undefined;
|
|
55
47
|
pageHeader?: {
|
|
56
48
|
ghost?: boolean | undefined;
|
|
@@ -59,16 +51,24 @@ export declare function mergeAntdProvideConfig(config: ConfigProviderProps): {
|
|
|
59
51
|
size?: number | ButtonSize;
|
|
60
52
|
} | undefined;
|
|
61
53
|
dropdownMatchSelectWidth?: number | boolean | undefined;
|
|
54
|
+
form?: {
|
|
55
|
+
validateMessages?: ValidateMessages | undefined;
|
|
56
|
+
requiredMark?: RequiredMark | undefined;
|
|
57
|
+
colon?: boolean | undefined;
|
|
58
|
+
} | undefined;
|
|
62
59
|
pagination?: {
|
|
63
60
|
showSizeChanger?: boolean | undefined;
|
|
64
61
|
} | undefined;
|
|
62
|
+
select?: {
|
|
63
|
+
showSearch?: boolean | undefined;
|
|
64
|
+
} | undefined;
|
|
65
65
|
wave?: {
|
|
66
66
|
disabled?: boolean | undefined;
|
|
67
67
|
} | undefined;
|
|
68
68
|
getPopupContainer?: ((triggerNode?: HTMLElement | undefined) => HTMLElement) | undefined;
|
|
69
69
|
prefixCls?: string | undefined;
|
|
70
70
|
iconPrefixCls?: string | undefined;
|
|
71
|
-
getTargetContainer?: (() =>
|
|
71
|
+
getTargetContainer?: (() => HTMLElement | Window) | undefined;
|
|
72
72
|
getPrefixCls?: ((suffixCls?: string | undefined, customizePrefixCls?: string | undefined) => string) | undefined;
|
|
73
73
|
renderEmpty?: __DTS_DEFAULT_0__ | undefined;
|
|
74
74
|
transformCellText?: ((tableProps: TransformCellTextProps) => any) | undefined;
|