@aplus-frontend/ui 0.0.10 → 0.0.12
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/src/ap-action/item/index.vue2.mjs +21 -20
- package/es/src/ap-action/style/item.css +20 -5
- package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
- package/es/src/ap-field/date/index.vue.mjs +1 -1
- package/es/src/ap-field/date-range/index.vue.mjs +1 -1
- package/es/src/ap-field/number/index.vue.mjs +1 -1
- package/es/src/ap-field/radio/index.vue.mjs +1 -1
- package/es/src/ap-field/select/index.vue.mjs +1 -1
- package/es/src/ap-field/slider/index.vue.d.ts +3 -0
- package/es/src/ap-field/slider/index.vue.mjs +4 -4
- package/es/src/ap-field/switch/index.vue.mjs +1 -1
- package/es/src/ap-field/text/index.vue2.mjs +1 -1
- package/es/src/ap-field/text/password.vue.mjs +1 -1
- package/es/src/ap-field/text-area/index.vue.mjs +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +27 -27
- package/es/src/ap-form/modal-form/index.vue.mjs +104 -104
- package/es/src/ap-form/style/modal-form.css +5 -1
- package/es/src/ap-table/ap-table.vue.d.ts +2 -3
- package/es/src/ap-table/ap-table.vue.mjs +95 -91
- package/es/src/ap-table/interface.d.ts +1 -1
- package/es/src/editable-table/interface.d.ts +73 -0
- package/es/src/editable-table/style/index.css +11 -0
- package/es/src/editable-table/utils.d.ts +8 -0
- package/es/src/pro-form/components/form-action.vue2.mjs +8 -8
- package/es/src/theme/ap-action/item.css +20 -5
- package/es/src/theme/ap-form/modal-form.css +5 -1
- package/es/src/theme/editable-table/index.css +11 -0
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/style/item.css +20 -5
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +3 -0
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/modal-form.css +5 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -3
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/interface.d.ts +1 -1
- package/lib/src/editable-table/interface.d.ts +73 -0
- package/lib/src/editable-table/style/index.css +11 -0
- package/lib/src/editable-table/utils.d.ts +8 -0
- package/lib/src/pro-form/components/form-action.vue2.js +1 -1
- package/lib/src/theme/ap-action/item.css +20 -5
- package/lib/src/theme/ap-form/modal-form.css +5 -1
- package/lib/src/theme/editable-table/index.css +11 -0
- package/package.json +1 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { isVNode as U, defineComponent as $, useSlots as q, ref as F, watch as D, cloneVNode as L, computed as A, createVNode as u, mergeProps as p, unref as i, openBlock as g, createElementBlock as G, Fragment as W, withCtx as y, renderSlot as w, createTextVNode as H, toDisplayString as J, createElementVNode as K, normalizeClass as Q, createBlock as x, resolveDynamicComponent as T } from "vue";
|
|
2
|
+
import { Button as V, Flex as X, Modal as Y } from "ant-design-vue";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { getSingleVNode as
|
|
5
|
+
import { getSingleVNode as Z } from "../../utils/slot.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { omit as
|
|
7
|
+
import { omit as I } from "lodash-unified";
|
|
8
8
|
import "../style/modal-form.css";
|
|
9
|
-
import { convertReactiveToRaw as
|
|
10
|
-
import { useControllableValue as
|
|
11
|
-
import { useLocale as
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
import { convertReactiveToRaw as ee } from "../../utils/index.mjs";
|
|
10
|
+
import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
|
|
11
|
+
import { useLocale as le } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
+
import { useGlobalConfig as oe } from "../../config-provider/hooks/use-global-config.mjs";
|
|
13
|
+
import { useNamespace as ae } from "../../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import ie from "../ap-form.vue2.mjs";
|
|
15
|
+
function se(d) {
|
|
16
|
+
return typeof d == "function" || Object.prototype.toString.call(d) === "[object Object]" && !U(d);
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
+
const Pe = /* @__PURE__ */ $({
|
|
18
19
|
__name: "index",
|
|
19
20
|
props: {
|
|
20
21
|
layout: {
|
|
@@ -85,155 +86,154 @@ const xe = /* @__PURE__ */ L({
|
|
|
85
86
|
},
|
|
86
87
|
emits: ["update:open"],
|
|
87
88
|
setup(d, {
|
|
88
|
-
expose:
|
|
89
|
-
emit:
|
|
89
|
+
expose: N,
|
|
90
|
+
emit: P
|
|
90
91
|
}) {
|
|
91
|
-
const
|
|
92
|
-
value:
|
|
93
|
-
updateValue:
|
|
94
|
-
} =
|
|
92
|
+
const o = d, b = q(), S = P, a = F(), c = F(), r = F(!1), {
|
|
93
|
+
value: _,
|
|
94
|
+
updateValue: m
|
|
95
|
+
} = te(o, S, {
|
|
95
96
|
valuePropName: "open",
|
|
96
97
|
defaultValue: !1
|
|
97
98
|
}), {
|
|
98
99
|
t: v
|
|
99
|
-
} =
|
|
100
|
-
b:
|
|
101
|
-
e:
|
|
102
|
-
} =
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
|
|
100
|
+
} = le(), h = oe("uiMode"), {
|
|
101
|
+
b: R,
|
|
102
|
+
e: C
|
|
103
|
+
} = ae("ap-form-modal-form");
|
|
104
|
+
D(() => a.value, (e) => {
|
|
105
|
+
var t;
|
|
106
|
+
e && c.value && ((t = e.setFieldsValue) == null || t.call(e, c.value), c.value = void 0);
|
|
106
107
|
});
|
|
107
|
-
const
|
|
108
|
+
const B = Z(b.trigger), M = B ? L(B, {
|
|
108
109
|
onClick: () => {
|
|
109
|
-
|
|
110
|
+
m(!0);
|
|
110
111
|
}
|
|
111
|
-
}) : null,
|
|
112
|
-
var
|
|
113
|
-
let t;
|
|
112
|
+
}) : null, j = A(() => {
|
|
113
|
+
var t, l, n, f;
|
|
114
114
|
const e = [];
|
|
115
|
-
if (
|
|
115
|
+
if (o.submitter === !1)
|
|
116
116
|
return null;
|
|
117
|
-
if (
|
|
117
|
+
if (o.showCancel) {
|
|
118
118
|
let s;
|
|
119
|
-
e.push(
|
|
120
|
-
onClick:
|
|
121
|
-
disabled:
|
|
122
|
-
},
|
|
119
|
+
e.push(u(V, {
|
|
120
|
+
onClick: k,
|
|
121
|
+
disabled: r.value
|
|
122
|
+
}, se(s = v("ap.common.cancelText")) ? s : {
|
|
123
123
|
default: () => [s]
|
|
124
124
|
}));
|
|
125
125
|
}
|
|
126
|
-
return ((
|
|
126
|
+
return ((t = o.submitter) == null ? void 0 : t.resetButtonProps) !== !1 && e.push(u(V, p(((l = o.submitter) == null ? void 0 : l.resetButtonProps) || {}, {
|
|
127
127
|
key: "submit",
|
|
128
|
-
disabled:
|
|
129
|
-
onClick:
|
|
128
|
+
disabled: r.value,
|
|
129
|
+
onClick: O
|
|
130
130
|
}), {
|
|
131
131
|
default: () => {
|
|
132
132
|
var s;
|
|
133
|
-
return [((s =
|
|
133
|
+
return [((s = o.submitter) == null ? void 0 : s.resetText) || v("ap.common.resetText")];
|
|
134
134
|
}
|
|
135
|
-
})), ((
|
|
135
|
+
})), ((n = o.submitter) == null ? void 0 : n.submitButtonProps) !== !1 && e.push(u(V, p({
|
|
136
136
|
type: "primary",
|
|
137
137
|
key: "submit"
|
|
138
|
-
}, ((
|
|
139
|
-
loading:
|
|
138
|
+
}, ((f = o.submitter) == null ? void 0 : f.submitButtonProps) || {}, {
|
|
139
|
+
loading: r.value,
|
|
140
140
|
onClick: z
|
|
141
141
|
}), {
|
|
142
142
|
default: () => {
|
|
143
143
|
var s;
|
|
144
|
-
return [((s =
|
|
144
|
+
return [((s = o.submitter) == null ? void 0 : s.submitText) || v("ap.common.okText")];
|
|
145
145
|
}
|
|
146
|
-
})),
|
|
146
|
+
})), u(X, {
|
|
147
147
|
justify: "flex-end",
|
|
148
|
-
class:
|
|
149
|
-
}, C(t = b.submitter(e)) ? t : {
|
|
150
|
-
default: () => [t]
|
|
151
|
-
}) : n(S, {
|
|
152
|
-
justify: "flex-end",
|
|
153
|
-
class: B("footer")
|
|
148
|
+
class: C(i(h) === "admin" ? "footer-admin" : "footer")
|
|
154
149
|
}, {
|
|
155
|
-
default: () => [
|
|
156
|
-
default: () => [e]
|
|
157
|
-
})]
|
|
150
|
+
default: () => [b.submitter ? b.submitter(e) : e]
|
|
158
151
|
});
|
|
159
152
|
});
|
|
160
|
-
function
|
|
161
|
-
var
|
|
162
|
-
|
|
153
|
+
function O() {
|
|
154
|
+
var e, t, l;
|
|
155
|
+
o.submitter !== !1 && ((e = a.value) == null || e.resetFields(), (l = (t = o.submitter) == null ? void 0 : t.onReset) == null || l.call(t));
|
|
163
156
|
}
|
|
164
157
|
async function z() {
|
|
165
|
-
var
|
|
166
|
-
if (
|
|
158
|
+
var e, t, l, n;
|
|
159
|
+
if (o.submitter !== !1)
|
|
167
160
|
try {
|
|
168
|
-
const
|
|
169
|
-
(l = (
|
|
161
|
+
const f = await ((e = a.value) == null ? void 0 : e.validateFields());
|
|
162
|
+
(l = (t = o.submitter) == null ? void 0 : t.onSubmit) == null || l.call(t), r.value = !0, await ((n = o.onFinish) == null ? void 0 : n.call(o, ee(f))) && m(!1);
|
|
170
163
|
} finally {
|
|
171
|
-
|
|
164
|
+
r.value = !1;
|
|
172
165
|
}
|
|
173
166
|
}
|
|
174
|
-
function
|
|
175
|
-
r
|
|
167
|
+
function k() {
|
|
168
|
+
i(r) || m(!1);
|
|
176
169
|
}
|
|
177
|
-
function
|
|
178
|
-
!
|
|
170
|
+
function E(e) {
|
|
171
|
+
!e && i(r) || m(e);
|
|
179
172
|
}
|
|
180
|
-
return
|
|
181
|
-
resetFields: (
|
|
182
|
-
var
|
|
183
|
-
(
|
|
173
|
+
return N({
|
|
174
|
+
resetFields: (e) => {
|
|
175
|
+
var t;
|
|
176
|
+
(t = a.value) == null || t.resetFields(e);
|
|
184
177
|
},
|
|
185
|
-
clearValidate: (
|
|
186
|
-
var
|
|
187
|
-
(
|
|
178
|
+
clearValidate: (e) => {
|
|
179
|
+
var t;
|
|
180
|
+
(t = a.value) == null || t.clearValidate(e);
|
|
188
181
|
},
|
|
189
|
-
validateFields: (
|
|
182
|
+
validateFields: (e, t) => {
|
|
190
183
|
var l;
|
|
191
|
-
return (l =
|
|
184
|
+
return (l = a.value) == null ? void 0 : l.validateFields(e, t);
|
|
192
185
|
},
|
|
193
|
-
getFieldsValue: (
|
|
194
|
-
var
|
|
195
|
-
return (
|
|
186
|
+
getFieldsValue: (e) => {
|
|
187
|
+
var t;
|
|
188
|
+
return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
|
|
196
189
|
},
|
|
197
|
-
validate: (
|
|
190
|
+
validate: (e, t) => {
|
|
198
191
|
var l;
|
|
199
|
-
return (l =
|
|
192
|
+
return (l = a.value) == null ? void 0 : l.validate(e, t);
|
|
200
193
|
},
|
|
201
|
-
scrollToField: (
|
|
194
|
+
scrollToField: (e, t = {}) => {
|
|
202
195
|
var l;
|
|
203
|
-
(l =
|
|
196
|
+
(l = a.value) == null || l.scrollToField(e, t);
|
|
204
197
|
},
|
|
205
|
-
setFieldValue: (
|
|
206
|
-
var l,
|
|
207
|
-
(
|
|
198
|
+
setFieldValue: (e, t) => {
|
|
199
|
+
var l, n;
|
|
200
|
+
(n = (l = a.value) == null ? void 0 : l.setFieldValue) == null || n.call(l, e, t);
|
|
208
201
|
},
|
|
209
|
-
setFieldsValue: (
|
|
210
|
-
var
|
|
211
|
-
if (!
|
|
212
|
-
c.value =
|
|
202
|
+
setFieldsValue: (e) => {
|
|
203
|
+
var t, l;
|
|
204
|
+
if (!a.value) {
|
|
205
|
+
c.value = e;
|
|
213
206
|
return;
|
|
214
207
|
}
|
|
215
|
-
(l = (
|
|
208
|
+
(l = (t = a.value) == null ? void 0 : t.setFieldsValue) == null || l.call(t, e);
|
|
216
209
|
}
|
|
217
|
-
}), (
|
|
218
|
-
open:
|
|
219
|
-
"onUpdate:open":
|
|
220
|
-
onCancel:
|
|
210
|
+
}), (e, t) => (g(), G(W, null, [u(i(Y), p(e.modalProps, {
|
|
211
|
+
open: i(_),
|
|
212
|
+
"onUpdate:open": E,
|
|
213
|
+
onCancel: k,
|
|
221
214
|
footer: null,
|
|
222
|
-
width:
|
|
223
|
-
class:
|
|
215
|
+
width: e.width,
|
|
216
|
+
class: i(R)(),
|
|
217
|
+
"body-style": {
|
|
218
|
+
padding: i(h) === "admin" ? "0px !important" : "20px !important"
|
|
219
|
+
// 这里使用内联样式目的是为了使用最高优先级覆盖设置的全局样式
|
|
220
|
+
// 使用ModalForm你可能无法再自定义body的样式
|
|
221
|
+
}
|
|
224
222
|
}), {
|
|
225
|
-
title:
|
|
226
|
-
default:
|
|
223
|
+
title: y(() => [w(e.$slots, "title", {}, () => [H(J(o.title), 1)])]),
|
|
224
|
+
default: y(() => [K("div", {
|
|
225
|
+
class: Q(i(C)(i(h) === "admin" ? "content-admin" : "content"))
|
|
226
|
+
}, [u(ie, p({
|
|
227
227
|
ref_key: "formRef",
|
|
228
|
-
ref:
|
|
229
|
-
},
|
|
230
|
-
default:
|
|
228
|
+
ref: a
|
|
229
|
+
}, i(I)(o, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
|
|
230
|
+
default: y(() => [w(e.$slots, "default")]),
|
|
231
231
|
_: 3
|
|
232
|
-
}, 16), (g(),
|
|
232
|
+
}, 16)], 2), (g(), x(T(j.value)))]),
|
|
233
233
|
_: 3
|
|
234
|
-
}, 16, ["open", "width", "class"]), (g(),
|
|
234
|
+
}, 16, ["open", "width", "class", "body-style"]), (g(), x(T(i(M))))], 64));
|
|
235
235
|
}
|
|
236
236
|
});
|
|
237
237
|
export {
|
|
238
|
-
|
|
238
|
+
Pe as default
|
|
239
239
|
};
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
border-bottom: 1px solid #E9EDF3;
|
|
7
7
|
margin-bottom: 0;
|
|
8
8
|
}
|
|
9
|
-
.aplus-ap-form-modal-
|
|
9
|
+
.aplus-ap-form-modal-form__content-admin {
|
|
10
10
|
padding: 20px;
|
|
11
11
|
}
|
|
12
12
|
.aplus-ap-form-modal-form__footer {
|
|
13
13
|
padding-top: 20px;
|
|
14
14
|
}
|
|
15
|
+
.aplus-ap-form-modal-form__footer-admin {
|
|
16
|
+
border-top: 1px solid #E9EDF3;
|
|
17
|
+
padding: 12px 20px;
|
|
18
|
+
}
|
|
15
19
|
.aplus-ap-form-modal-form .ant-modal-close {
|
|
16
20
|
top: 16px;
|
|
17
21
|
}
|
|
@@ -22,6 +22,7 @@ type ApTableSlots = {
|
|
|
22
22
|
expandColumnTitle?: any;
|
|
23
23
|
customFilterIcon?: any;
|
|
24
24
|
customFilterDropdown?: any;
|
|
25
|
+
searchFormExtra?: any;
|
|
25
26
|
};
|
|
26
27
|
/**
|
|
27
28
|
* 设置查询表单值
|
|
@@ -167,9 +168,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
167
168
|
card: boolean;
|
|
168
169
|
searchForm: false | ApFormSearchFormProps;
|
|
169
170
|
adaptive: boolean;
|
|
170
|
-
}, {}>,
|
|
171
|
-
title?(_: {}): any;
|
|
172
|
-
}>;
|
|
171
|
+
}, {}>, Readonly<ApTableSlots> & ApTableSlots>;
|
|
173
172
|
export default _default;
|
|
174
173
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
175
174
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { ApForm as
|
|
4
|
-
import { apTableRenderItemMap as
|
|
1
|
+
import { defineComponent as X, useSlots as Y, computed as d, createVNode as s, mergeProps as m, unref as l, watch as Z, openBlock as i, createElementBlock as g, normalizeClass as F, normalizeStyle as v, createSlots as P, withCtx as p, Fragment as ee, renderList as I, createBlock as ae, resolveDynamicComponent as te, renderSlot as S, createCommentVNode as k, createElementVNode as E, toDisplayString as oe, normalizeProps as re, guardReactiveProps as le } from "vue";
|
|
2
|
+
import { Typography as ne, Table as de, Tooltip as se } from "ant-design-vue";
|
|
3
|
+
import { ApForm as ue } from "../ap-form/index.mjs";
|
|
4
|
+
import { apTableRenderItemMap as ie, noRenderAsFormItemValueList as O, apTableFormItemMap as pe } from "./constants.mjs";
|
|
5
5
|
import "../config-provider/index.mjs";
|
|
6
|
-
import { useTablePaging as
|
|
7
|
-
import { isUndefined as
|
|
6
|
+
import { useTablePaging as ce } from "./hooks/use-table-paging.mjs";
|
|
7
|
+
import { isUndefined as fe, omit as me } from "lodash-unified";
|
|
8
8
|
import "./style/ap-table.css";
|
|
9
|
-
import { QuestionCircleOutlined as
|
|
10
|
-
import { apColumnToColumn as
|
|
11
|
-
import
|
|
12
|
-
import { useLocale as
|
|
13
|
-
import { useNamespace as
|
|
14
|
-
import { useGlobalConfig as
|
|
15
|
-
const
|
|
9
|
+
import { QuestionCircleOutlined as ge } from "@ant-design/icons-vue";
|
|
10
|
+
import { apColumnToColumn as ye, getTableRenderType as he, getTableRenderProps as be, getColumnOrder as z, updateFormProps as Ce, getFieldProps as Fe, getPlaceholder as Se } from "./utils.mjs";
|
|
11
|
+
import Re from "./hooks/use-table-content-height.mjs";
|
|
12
|
+
import { useLocale as xe } from "../config-provider/hooks/use-locale.mjs";
|
|
13
|
+
import { useNamespace as we } from "../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import { useGlobalConfig as Te } from "../config-provider/hooks/use-global-config.mjs";
|
|
15
|
+
const Be = {
|
|
16
16
|
key: 0
|
|
17
|
-
},
|
|
17
|
+
}, Ae = /* @__PURE__ */ X({
|
|
18
18
|
name: "ApTable",
|
|
19
19
|
__name: "ap-table",
|
|
20
20
|
props: {
|
|
@@ -127,22 +127,22 @@ const Te = {
|
|
|
127
127
|
default: !1
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
|
-
setup(
|
|
131
|
-
expose:
|
|
130
|
+
setup(L, {
|
|
131
|
+
expose: V
|
|
132
132
|
}) {
|
|
133
|
-
const r =
|
|
134
|
-
t:
|
|
135
|
-
} =
|
|
133
|
+
const r = L, R = Y(), {
|
|
134
|
+
t: N
|
|
135
|
+
} = xe(), {
|
|
136
136
|
e: y,
|
|
137
|
-
b:
|
|
138
|
-
} =
|
|
139
|
-
height:
|
|
140
|
-
contentRef:
|
|
141
|
-
} =
|
|
137
|
+
b: c
|
|
138
|
+
} = we("ap-table"), D = Te("uiMode"), {
|
|
139
|
+
height: W,
|
|
140
|
+
contentRef: _
|
|
141
|
+
} = Re(), h = d(() => {
|
|
142
142
|
var t;
|
|
143
143
|
let e = ((t = r.columns) == null ? void 0 : t.filter((a) => !a.hideInTable)) || [];
|
|
144
144
|
return e = e.map((a) => ({
|
|
145
|
-
...
|
|
145
|
+
...ye(a),
|
|
146
146
|
customRender({
|
|
147
147
|
value: o,
|
|
148
148
|
...n
|
|
@@ -155,24 +155,24 @@ const Te = {
|
|
|
155
155
|
column: a
|
|
156
156
|
});
|
|
157
157
|
else {
|
|
158
|
-
const
|
|
158
|
+
const B = he(a), U = ie[B], J = be(a, {
|
|
159
159
|
value: o,
|
|
160
160
|
...n
|
|
161
161
|
});
|
|
162
|
-
u = s(
|
|
162
|
+
u = s(U, m(J, {
|
|
163
163
|
mode: "read"
|
|
164
164
|
}), null);
|
|
165
165
|
}
|
|
166
|
-
return
|
|
166
|
+
return $(a, o, u);
|
|
167
167
|
}
|
|
168
168
|
})), e;
|
|
169
|
-
}),
|
|
169
|
+
}), x = d(() => {
|
|
170
170
|
var e, t, a;
|
|
171
|
-
return ((a = (t = (e = r.columns) == null ? void 0 : e.filter((o) => !o.hideInSearch && o.dataIndex && (o.valueType || o.customRenderFormItem) && !
|
|
172
|
-
let u =
|
|
173
|
-
return
|
|
171
|
+
return ((a = (t = (e = r.columns) == null ? void 0 : e.filter((o) => !o.hideInSearch && o.dataIndex && (o.valueType || o.customRenderFormItem) && !O.includes(o.valueType))) == null ? void 0 : t.sort((o, n) => {
|
|
172
|
+
let u = z(o.order);
|
|
173
|
+
return z(n.order) - u;
|
|
174
174
|
})) == null ? void 0 : a.map((o) => {
|
|
175
|
-
const n =
|
|
175
|
+
const n = Ce(o, Fe(o.fieldProps));
|
|
176
176
|
return {
|
|
177
177
|
...o,
|
|
178
178
|
fieldProps: {
|
|
@@ -180,18 +180,18 @@ const Te = {
|
|
|
180
180
|
name: o.dataIndex,
|
|
181
181
|
...n || {},
|
|
182
182
|
// 格式化placeholder
|
|
183
|
-
placeholder:
|
|
183
|
+
placeholder: Se(N, o.valueType, n == null ? void 0 : n.placeholder)
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
})) || [];
|
|
187
|
-
}),
|
|
188
|
-
formRef:
|
|
189
|
-
submit:
|
|
190
|
-
reset:
|
|
191
|
-
tableProps:
|
|
192
|
-
handleTableChange:
|
|
187
|
+
}), j = d(() => l(h).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), A = d(() => l(h).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
|
|
188
|
+
formRef: b,
|
|
189
|
+
submit: w,
|
|
190
|
+
reset: T,
|
|
191
|
+
tableProps: f,
|
|
192
|
+
handleTableChange: M,
|
|
193
193
|
data: C
|
|
194
|
-
} =
|
|
194
|
+
} = ce({
|
|
195
195
|
async request(e) {
|
|
196
196
|
var a, o;
|
|
197
197
|
const t = await ((a = r.request) == null ? void 0 : a.call(r, e));
|
|
@@ -200,30 +200,30 @@ const Te = {
|
|
|
200
200
|
total: (t == null ? void 0 : t.total) || 0
|
|
201
201
|
};
|
|
202
202
|
},
|
|
203
|
-
filterFields: l(
|
|
204
|
-
sortFields: l(
|
|
203
|
+
filterFields: l(A),
|
|
204
|
+
sortFields: l(j),
|
|
205
205
|
defaultParams: r.params,
|
|
206
206
|
defaultData: r.defaultData,
|
|
207
207
|
manual: r.manual,
|
|
208
208
|
defaultCurrent: r.pagination ? r.pagination.defaultCurrent : void 0,
|
|
209
209
|
defaultPageSize: r.pagination ? r.pagination.defaultPageSize : void 0,
|
|
210
210
|
formatParams: r.beforeSearchSubmit
|
|
211
|
-
}),
|
|
211
|
+
}), q = d(() => {
|
|
212
212
|
if (r.scroll)
|
|
213
213
|
return r.scroll;
|
|
214
214
|
if (r.adaptive && C.value.total > 0)
|
|
215
215
|
return {
|
|
216
|
-
y: l(
|
|
216
|
+
y: l(W)
|
|
217
217
|
};
|
|
218
|
-
}),
|
|
218
|
+
}), H = d(() => ({
|
|
219
219
|
...r,
|
|
220
|
-
...l(
|
|
221
|
-
loading:
|
|
222
|
-
pagination: r.pagination === !1 ? !1 : l(
|
|
223
|
-
scroll: l(
|
|
224
|
-
})),
|
|
225
|
-
function
|
|
226
|
-
return
|
|
220
|
+
...l(f),
|
|
221
|
+
loading: fe(r.loading) ? l(f).loading : r.loading,
|
|
222
|
+
pagination: r.pagination === !1 ? !1 : l(f).pagination,
|
|
223
|
+
scroll: l(q)
|
|
224
|
+
})), K = d(() => [r.card ? null : c("wrapper"), r.adaptive ? c("adaptive") : null].filter(Boolean));
|
|
225
|
+
function $(e, t, a) {
|
|
226
|
+
return O.includes(e.valueType) ? a : e.copyable || e.ellipsis ? s(ne.Text, {
|
|
227
227
|
copyable: e.copyable ? {
|
|
228
228
|
text: t,
|
|
229
229
|
tooltip: !1
|
|
@@ -234,78 +234,82 @@ const Te = {
|
|
|
234
234
|
content: a
|
|
235
235
|
}, null) : a;
|
|
236
236
|
}
|
|
237
|
-
|
|
237
|
+
Z(() => l(C).loading, (e) => {
|
|
238
238
|
var t;
|
|
239
239
|
(t = r.onLoadingChange) == null || t.call(r, e);
|
|
240
240
|
});
|
|
241
|
-
function
|
|
241
|
+
function G(e) {
|
|
242
242
|
var t, a, o;
|
|
243
|
-
(o = (a = (t =
|
|
243
|
+
(o = (a = (t = b.value) == null ? void 0 : t.apForm) == null ? void 0 : a.setFieldsValue) == null || o.call(a, e);
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function Q() {
|
|
246
246
|
var e, t, a;
|
|
247
|
-
return (a = (t = (e =
|
|
247
|
+
return (a = (t = (e = b.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValue) == null ? void 0 : a.call(t, !0);
|
|
248
248
|
}
|
|
249
|
-
return
|
|
250
|
-
submit: () =>
|
|
251
|
-
reset: () =>
|
|
252
|
-
setSearchFormValues:
|
|
253
|
-
getSearchFormValues:
|
|
249
|
+
return V({
|
|
250
|
+
submit: () => w(),
|
|
251
|
+
reset: () => T(),
|
|
252
|
+
setSearchFormValues: G,
|
|
253
|
+
getSearchFormValues: Q,
|
|
254
254
|
dataSource: d(() => l(C).records)
|
|
255
|
-
}), (e, t) => (i(),
|
|
256
|
-
class: F(
|
|
257
|
-
}, [e.searchForm !== !1 &&
|
|
255
|
+
}), (e, t) => (i(), g("div", {
|
|
256
|
+
class: F(K.value)
|
|
257
|
+
}, [e.searchForm !== !1 && x.value.length > 0 ? (i(), g("div", {
|
|
258
258
|
key: 0,
|
|
259
259
|
class: F(e.card ? l(y)("search-wrapper") : null),
|
|
260
|
-
style:
|
|
261
|
-
}, [s(l(
|
|
260
|
+
style: v(e.searchFormWrapperStyle)
|
|
261
|
+
}, [s(l(ue).SearchForm, m(e.searchForm || {}, {
|
|
262
262
|
ref_key: "formRef",
|
|
263
|
-
ref:
|
|
263
|
+
ref: b,
|
|
264
264
|
"custom-reset": "",
|
|
265
|
-
onSubmit: l(
|
|
266
|
-
onReset: l(
|
|
267
|
-
"submit-loading": l(
|
|
268
|
-
}), {
|
|
269
|
-
default:
|
|
265
|
+
onSubmit: l(w),
|
|
266
|
+
onReset: l(T),
|
|
267
|
+
"submit-loading": l(f).loading
|
|
268
|
+
}), P({
|
|
269
|
+
default: p(() => [(i(!0), g(ee, null, I(x.value, (a) => (i(), ae(te(a.customRenderFormItem ? a.customRenderFormItem(a) : l(pe)[a.valueType || "text"]), m({
|
|
270
270
|
key: a.dataIndex,
|
|
271
271
|
ref_for: !0
|
|
272
272
|
}, a.fieldProps || {}, {
|
|
273
273
|
span: a.span
|
|
274
274
|
}), null, 16, ["span"]))), 128))]),
|
|
275
|
-
_:
|
|
276
|
-
},
|
|
275
|
+
_: 2
|
|
276
|
+
}, [R.searchFormExtra ? {
|
|
277
|
+
name: "extra",
|
|
278
|
+
fn: p(() => [S(e.$slots, "searchFormExtra")]),
|
|
279
|
+
key: "0"
|
|
280
|
+
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : k("", !0), E("div", {
|
|
277
281
|
ref_key: "contentRef",
|
|
278
|
-
ref:
|
|
282
|
+
ref: _,
|
|
279
283
|
class: F([l(y)("table-wrapper"), e.card ? l(y)("table-wrapper-card") : null]),
|
|
280
|
-
style:
|
|
281
|
-
}, [
|
|
282
|
-
class: l(
|
|
283
|
-
},
|
|
284
|
-
onChange: l(
|
|
285
|
-
columns:
|
|
286
|
-
}),
|
|
287
|
-
headerCell:
|
|
284
|
+
style: v(e.tableWrapperStyle)
|
|
285
|
+
}, [S(e.$slots, "title"), s(l(de), m({
|
|
286
|
+
class: l(D) === "admin" ? l(c)("table-admin") : l(c)("table")
|
|
287
|
+
}, H.value, {
|
|
288
|
+
onChange: l(M),
|
|
289
|
+
columns: h.value
|
|
290
|
+
}), P({
|
|
291
|
+
headerCell: p(({
|
|
288
292
|
column: a,
|
|
289
293
|
title: o
|
|
290
|
-
}) => [a.tooltip ? (i(),
|
|
294
|
+
}) => [a.tooltip ? (i(), g("span", Be, [E("span", null, oe(o), 1), s(l(se), {
|
|
291
295
|
title: a.tooltip,
|
|
292
296
|
placement: "bottom"
|
|
293
297
|
}, {
|
|
294
|
-
default:
|
|
298
|
+
default: p(() => [s(l(ge), {
|
|
295
299
|
style: {
|
|
296
300
|
color: "#0070ff",
|
|
297
301
|
"padding-left": "4px"
|
|
298
302
|
}
|
|
299
303
|
})]),
|
|
300
304
|
_: 2
|
|
301
|
-
}, 1032, ["title"])])) :
|
|
305
|
+
}, 1032, ["title"])])) : k("", !0)]),
|
|
302
306
|
_: 2
|
|
303
|
-
}, [
|
|
307
|
+
}, [I(l(me)(R, ["title", "searchFormExtra"]), (a, o) => ({
|
|
304
308
|
name: o,
|
|
305
|
-
fn:
|
|
309
|
+
fn: p((n) => [S(e.$slots, o, re(le(n || {})))])
|
|
306
310
|
}))]), 1040, ["class", "onChange", "columns"])], 6)], 2));
|
|
307
311
|
}
|
|
308
312
|
});
|
|
309
313
|
export {
|
|
310
|
-
|
|
314
|
+
Ae as default
|
|
311
315
|
};
|
|
@@ -62,7 +62,7 @@ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters'>
|
|
|
62
62
|
multiple?: number;
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = ExtraProColumnType<
|
|
65
|
+
export type ApColumnType<ValueType extends keyof ApTableValueFields = 'text', RecordType = any> = ExtraProColumnType<RecordType> & {
|
|
66
66
|
children?: ApColumnType<any, RecordType>[];
|
|
67
67
|
/**
|
|
68
68
|
* 表单项所占据的格子数(1-24格)
|