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