@aplus-frontend/ui 0.1.29 → 0.1.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 +78 -76
- package/es/src/ap-form/ap-form.vue.d.ts +1 -1
- package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/es/src/ap-table/ap-table.vue.mjs +1 -1
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +84 -89
- package/es/src/ap-table/utils.mjs +42 -42
- package/es/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
- package/es/src/business/ap-action-button/ApActionButton.vue.mjs +4 -0
- package/es/src/business/ap-action-button/ApActionButton.vue2.mjs +97 -0
- package/es/src/business/ap-action-button/index.css +6 -0
- package/es/src/business/ap-action-button/interface.d.ts +6 -0
- package/es/src/business/ap-action-button/interface.mjs +1 -0
- package/es/src/business/index.d.ts +265 -0
- package/es/src/business/index.mjs +25 -21
- package/es/src/editable-table/form-item.vue.d.ts +1 -1
- package/es/src/editable-table/form-item.vue.mjs +41 -41
- package/es/src/editable-table/index.vue.d.ts +1 -1
- package/es/src/editable-table/index.vue.mjs +29 -29
- package/es/src/index.mjs +209 -207
- package/es/src/theme/ap-action-button/ap-action-button.css +6 -0
- package/es/src/work-order-modal/index.mjs +4 -3
- package/es/src/work-order-modal/interfaces.d.ts +3 -0
- package/es/src/work-order-modal/interfaces.mjs +6 -1
- package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
- package/lib/index.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-action-button/ApActionButton.vue.d.ts +43 -0
- package/lib/src/business/ap-action-button/ApActionButton.vue.js +1 -0
- package/lib/src/business/ap-action-button/ApActionButton.vue2.js +1 -0
- package/lib/src/business/ap-action-button/index.css +6 -0
- package/lib/src/business/ap-action-button/interface.d.ts +6 -0
- package/lib/src/business/ap-action-button/interface.js +1 -0
- package/lib/src/business/index.d.ts +265 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.d.ts +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-action-button/ap-action-button.css +6 -0
- package/lib/src/work-order-modal/index.js +1 -1
- package/lib/src/work-order-modal/interfaces.d.ts +3 -0
- package/lib/src/work-order-modal/interfaces.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +1 -1
|
@@ -14,13 +14,15 @@ import "./ap-batch-action-group/ApBatchActionGroup.vue.mjs";
|
|
|
14
14
|
import "./ap-image/ApImage.vue.mjs";
|
|
15
15
|
import "./ap-ladder/ApLadder.vue.mjs";
|
|
16
16
|
import p from "./ap-attachment/ApAttachment.mjs";
|
|
17
|
-
import
|
|
17
|
+
import "./ap-action-button/ApActionButton.vue.mjs";
|
|
18
|
+
import { ApTransformDataHelper as so } from "../utils/ap-trans-data/index.mjs";
|
|
18
19
|
import "./ap-batch-action-group/interface.mjs";
|
|
19
|
-
import
|
|
20
|
+
import "./ap-action-button/interface.mjs";
|
|
21
|
+
import { default as Ao } from "./ap-table-modal/index.mjs";
|
|
20
22
|
import r from "./title/ApTitle.vue2.mjs";
|
|
21
23
|
import i from "./ap-expand-alert/ApExpandAlert.vue2.mjs";
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
+
import n from "./ap-status/ApStatus.vue2.mjs";
|
|
25
|
+
import a from "./ap-status/ApStatusGroup.vue2.mjs";
|
|
24
26
|
import c from "./ap-select-layout/select-layout.vue2.mjs";
|
|
25
27
|
import f from "./ap-export-group/ApExportGroup.vue2.mjs";
|
|
26
28
|
import s from "./ap-input-radio/ApInputRadio.vue2.mjs";
|
|
@@ -28,22 +30,24 @@ import _ from "./ap-batch-action/ApBatchAction.vue2.mjs";
|
|
|
28
30
|
import A from "./ap-batch-action-group/ApBatchActionGroup.vue2.mjs";
|
|
29
31
|
import e from "./ap-image/ApImage.vue2.mjs";
|
|
30
32
|
import l from "./ap-ladder/ApLadder.vue2.mjs";
|
|
31
|
-
|
|
33
|
+
import u from "./ap-action-button/ApActionButton.vue2.mjs";
|
|
34
|
+
const Q = o(r), U = i, V = o(t), W = o(n), X = o(a), Y = o(c), Z = o(f), oo = s, to = _, mo = m, po = A, ro = e, io = o(l), no = p, ao = o(u);
|
|
32
35
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
ao as ApActionButton,
|
|
37
|
+
no as ApAttachment,
|
|
38
|
+
to as ApBatchAction,
|
|
39
|
+
po as ApBatchActionGroup,
|
|
40
|
+
U as ApExpandAlert,
|
|
41
|
+
Z as ApExportGroup,
|
|
42
|
+
ro as ApImage,
|
|
43
|
+
oo as ApInputRadio,
|
|
44
|
+
V as ApLabel,
|
|
45
|
+
mo as ApLabelGroup,
|
|
46
|
+
io as ApLadder,
|
|
47
|
+
Y as ApSelectLayout,
|
|
48
|
+
W as ApStatus,
|
|
49
|
+
X as ApStatusGroup,
|
|
50
|
+
Ao as ApTableModal,
|
|
51
|
+
Q as ApTitle,
|
|
52
|
+
so as ApTransformDataHelper
|
|
49
53
|
};
|
|
@@ -9,7 +9,7 @@ declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<type
|
|
|
9
9
|
remove: (index: number | number[]) => void;
|
|
10
10
|
getRowData: (index: number) => UnwrapRefSimple<RecordType>;
|
|
11
11
|
getRowsData: () => UnwrapRefSimple<RecordType>[];
|
|
12
|
-
setRowData: (index: number, payload: any) => void;
|
|
12
|
+
setRowData: (index: number, payload: any, merge?: boolean) => void;
|
|
13
13
|
addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix") => void;
|
|
14
14
|
scrollTo: (index: number | "end", options?: StandardBehaviorOptions) => void;
|
|
15
15
|
setTableData: (nextTableData: RecordType[]) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as q, ref as x, unref as
|
|
1
|
+
import { defineComponent as q, ref as x, unref as l, useSlots as G, watch as H, openBlock as m, createBlock as y, mergeProps as C, withCtx as d, createVNode as b, createSlots as W, createElementBlock as $, normalizeClass as Q, createCommentVNode as w, createElementVNode as U, toDisplayString as I, normalizeStyle as J, renderList as X, renderSlot as Y, normalizeProps as Z, guardReactiveProps as ee } from "vue";
|
|
2
2
|
import { Table as te, Tooltip as oe } from "ant-design-vue";
|
|
3
3
|
import { ApForm as R } from "../ap-form/index.mjs";
|
|
4
4
|
import { isArray as ae, isNumber as i, cloneDeep as f, omit as le } from "lodash-unified";
|
|
@@ -115,70 +115,70 @@ const Fe = /* @__PURE__ */ q({
|
|
|
115
115
|
setup(B, {
|
|
116
116
|
expose: D
|
|
117
117
|
}) {
|
|
118
|
-
const
|
|
118
|
+
const n = B;
|
|
119
119
|
function k(e, t) {
|
|
120
|
-
return ae(t) ? t.reduce((o,
|
|
120
|
+
return ae(t) ? t.reduce((o, a) => o == null ? void 0 : o[a], e) : e == null ? void 0 : e[t];
|
|
121
121
|
}
|
|
122
122
|
const {
|
|
123
|
-
internalInstance:
|
|
123
|
+
internalInstance: r,
|
|
124
124
|
model: T
|
|
125
|
-
} = ne(), u = x(k(
|
|
125
|
+
} = ne(), u = x(k(l(T), n.name) || []), F = G(), L = R.useWatch(n.name);
|
|
126
126
|
H(() => L.value, (e) => {
|
|
127
127
|
var t;
|
|
128
|
-
u.value = e, (t =
|
|
128
|
+
u.value = e, (t = n.onChange) == null || t.call(n, e);
|
|
129
129
|
}, {
|
|
130
130
|
deep: !0
|
|
131
131
|
});
|
|
132
132
|
const {
|
|
133
133
|
b: E,
|
|
134
134
|
em: N
|
|
135
|
-
} = ie("editable-table"), c = x(), S = fe("valueTypeMap"), [, V] = me(), _ = re(
|
|
135
|
+
} = ie("editable-table"), c = x(), S = fe("valueTypeMap"), [, V] = me(), _ = re(n, S);
|
|
136
136
|
function v(e, t) {
|
|
137
137
|
var s;
|
|
138
|
-
const o = ((s =
|
|
139
|
-
if (p(
|
|
138
|
+
const o = ((s = l(u)) == null ? void 0 : s.length) || 0;
|
|
139
|
+
if (p(n.maxLength) && o >= n.maxLength)
|
|
140
140
|
return;
|
|
141
|
-
const
|
|
142
|
-
p(t) ?
|
|
141
|
+
const a = [...l(u) || []];
|
|
142
|
+
p(t) ? a.splice(t, 0, {
|
|
143
143
|
...e || {}
|
|
144
|
-
}) :
|
|
144
|
+
}) : a.push({
|
|
145
145
|
...e || {}
|
|
146
|
-
}),
|
|
146
|
+
}), r == null || r.setFieldValue(n.name, a);
|
|
147
147
|
}
|
|
148
148
|
function z(e, t = "suffix") {
|
|
149
149
|
var g;
|
|
150
|
-
const o = ((g =
|
|
151
|
-
if (p(
|
|
150
|
+
const o = ((g = l(u)) == null ? void 0 : g.length) || 0, a = i(e) ? e : e.length;
|
|
151
|
+
if (p(n.maxLength) && o + a > n.maxLength)
|
|
152
152
|
return;
|
|
153
|
-
const s = [...
|
|
154
|
-
t === "suffix" ? s.push(...h) : s.unshift(...h),
|
|
153
|
+
const s = [...l(u) || []], h = i(e) ? new Array(e).fill({}) : f(e);
|
|
154
|
+
t === "suffix" ? s.push(...h) : s.unshift(...h), r == null || r.setFieldValue(n.name, s);
|
|
155
155
|
}
|
|
156
156
|
function P(e) {
|
|
157
|
-
let t = f(
|
|
157
|
+
let t = f(l(u) || []);
|
|
158
158
|
const o = i(e) ? [e] : e;
|
|
159
|
-
t = t.filter((
|
|
159
|
+
t = t.filter((a, s) => !o.includes(s)), r == null || r.setFieldValue(n.name, t);
|
|
160
160
|
}
|
|
161
161
|
function j() {
|
|
162
|
-
return
|
|
162
|
+
return l(u);
|
|
163
163
|
}
|
|
164
164
|
function A(e) {
|
|
165
165
|
var t;
|
|
166
|
-
return (t =
|
|
166
|
+
return (t = l(u)) == null ? void 0 : t[e];
|
|
167
167
|
}
|
|
168
|
-
function O(e, t) {
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
...o[e],
|
|
168
|
+
function O(e, t, o = !0) {
|
|
169
|
+
const a = f(l(u));
|
|
170
|
+
a[e] && (a[e] = {
|
|
171
|
+
...o ? a[e] : {},
|
|
172
172
|
...t
|
|
173
|
-
},
|
|
173
|
+
}, r == null || r.setFieldValue(n.name, [...a]));
|
|
174
174
|
}
|
|
175
175
|
function K(e) {
|
|
176
|
-
|
|
176
|
+
r == null || r.setFieldValue(n.name, e);
|
|
177
177
|
}
|
|
178
178
|
function M(e, t) {
|
|
179
|
-
var
|
|
179
|
+
var a;
|
|
180
180
|
const o = e === "end" ? u.value.length - 1 : e;
|
|
181
|
-
ue(o, (
|
|
181
|
+
ue(o, (a = c.value) == null ? void 0 : a.$el, t);
|
|
182
182
|
}
|
|
183
183
|
return D({
|
|
184
184
|
add: v,
|
|
@@ -189,39 +189,39 @@ const Fe = /* @__PURE__ */ q({
|
|
|
189
189
|
addMultiple: z,
|
|
190
190
|
scrollTo: M,
|
|
191
191
|
setTableData: K
|
|
192
|
-
}), (e, t) => (m(), y(
|
|
192
|
+
}), (e, t) => (m(), y(l(R).FormItem, C(e.formItem, {
|
|
193
193
|
name: e.name,
|
|
194
194
|
label: e.label
|
|
195
195
|
}), {
|
|
196
|
-
default: d(() => [b(
|
|
197
|
-
class:
|
|
198
|
-
columns:
|
|
196
|
+
default: d(() => [b(l(te), C(l(le)(n, ["name", "maxLength", "onChange"]), {
|
|
197
|
+
class: l(E)(),
|
|
198
|
+
columns: l(_),
|
|
199
199
|
"data-source": u.value,
|
|
200
200
|
ref_key: "tableRef",
|
|
201
201
|
ref: c
|
|
202
202
|
}), W({
|
|
203
203
|
headerCell: d(({
|
|
204
204
|
column: o
|
|
205
|
-
}) => [
|
|
205
|
+
}) => [l(se)(o) ? (m(), $("span", {
|
|
206
206
|
key: 0,
|
|
207
|
-
class: Q(
|
|
208
|
-
}, "*", 2)) : w("", !0), U("span", null, I(o.title), 1), o.tooltip ? (m(), y(
|
|
207
|
+
class: Q(l(N)("header-cell", "required"))
|
|
208
|
+
}, "*", 2)) : w("", !0), U("span", null, I(o.title), 1), o.tooltip ? (m(), y(l(oe), {
|
|
209
209
|
key: 1,
|
|
210
210
|
title: o.tooltip,
|
|
211
211
|
placement: "bottom"
|
|
212
212
|
}, {
|
|
213
|
-
default: d(() => [b(
|
|
213
|
+
default: d(() => [b(l(de), {
|
|
214
214
|
style: J({
|
|
215
215
|
paddingLeft: "4px",
|
|
216
|
-
color:
|
|
216
|
+
color: l(V).colorPrimary
|
|
217
217
|
})
|
|
218
218
|
}, null, 8, ["style"])]),
|
|
219
219
|
_: 2
|
|
220
220
|
}, 1032, ["title"])) : w("", !0)]),
|
|
221
221
|
_: 2
|
|
222
|
-
}, [X(F, (o,
|
|
223
|
-
name:
|
|
224
|
-
fn: d((s) => [Y(e.$slots,
|
|
222
|
+
}, [X(F, (o, a) => ({
|
|
223
|
+
name: a,
|
|
224
|
+
fn: d((s) => [Y(e.$slots, a, Z(ee(s || {})))])
|
|
225
225
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
226
226
|
_: 3
|
|
227
227
|
}, 16, ["name", "label"]));
|
|
@@ -16,7 +16,7 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
|
|
|
16
16
|
remove: (index: number | number[]) => void;
|
|
17
17
|
getRowData: (index: number) => RecordType;
|
|
18
18
|
getRowsData: () => RecordType[];
|
|
19
|
-
setRowData: (index: number, payload: any) => void;
|
|
19
|
+
setRowData: (index: number, payload: any, merge?: boolean) => void;
|
|
20
20
|
addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix") => void;
|
|
21
21
|
scrollTo: (index: number | "end", options?: StandardBehaviorOptions) => void;
|
|
22
22
|
clear: () => void;
|
|
@@ -140,38 +140,38 @@ const ze = /* @__PURE__ */ J({
|
|
|
140
140
|
(e = s.value) == null || e.resetFields();
|
|
141
141
|
}
|
|
142
142
|
function O(e) {
|
|
143
|
-
return e ? (k(e) ? e : [e]).map((
|
|
143
|
+
return e ? (k(e) ? e : [e]).map((n) => k(n) ? [l.name, ...n] : [l.name, n]) : void 0;
|
|
144
144
|
}
|
|
145
145
|
async function j(e, t) {
|
|
146
|
-
var
|
|
147
|
-
const
|
|
148
|
-
return
|
|
146
|
+
var a;
|
|
147
|
+
const n = await ((a = s.value) == null ? void 0 : a.validateFields(O(e), t));
|
|
148
|
+
return n == null ? void 0 : n[l.name];
|
|
149
149
|
}
|
|
150
150
|
function q(e, t) {
|
|
151
151
|
var r, i, d;
|
|
152
|
-
const
|
|
153
|
-
if (C(l.maxLength) &&
|
|
152
|
+
const n = ((r = o(u)) == null ? void 0 : r.length) || 0;
|
|
153
|
+
if (C(l.maxLength) && n >= l.maxLength)
|
|
154
154
|
return;
|
|
155
|
-
const
|
|
156
|
-
C(t) ?
|
|
155
|
+
const a = [...o(u) || []];
|
|
156
|
+
C(t) ? a.splice(t, 0, {
|
|
157
157
|
...e || {}
|
|
158
|
-
}) :
|
|
158
|
+
}) : a.push({
|
|
159
159
|
...e || {}
|
|
160
|
-
}), (d = (i = s.value) == null ? void 0 : i.setFieldValue) == null || d.call(i, l.name,
|
|
160
|
+
}), (d = (i = s.value) == null ? void 0 : i.setFieldValue) == null || d.call(i, l.name, a);
|
|
161
161
|
}
|
|
162
162
|
function K(e, t = "suffix") {
|
|
163
163
|
var d, f, w;
|
|
164
|
-
const
|
|
165
|
-
if (C(l.maxLength) &&
|
|
164
|
+
const n = ((d = o(u)) == null ? void 0 : d.length) || 0, a = g(e) ? e : e.length;
|
|
165
|
+
if (C(l.maxLength) && n + a > l.maxLength)
|
|
166
166
|
return;
|
|
167
167
|
const r = [...o(u) || []], i = g(e) ? new Array(e).fill({}) : h(e);
|
|
168
168
|
t === "suffix" ? r.push(...i) : r.unshift(...i), (w = (f = s.value) == null ? void 0 : f.setFieldValue) == null || w.call(f, l.name, r);
|
|
169
169
|
}
|
|
170
170
|
function M(e) {
|
|
171
|
-
var
|
|
171
|
+
var a, r;
|
|
172
172
|
let t = h(o(u) || []);
|
|
173
|
-
const
|
|
174
|
-
t = t.filter((i, d) => !
|
|
173
|
+
const n = g(e) ? [e] : e;
|
|
174
|
+
t = t.filter((i, d) => !n.includes(d)), (r = (a = s.value) == null ? void 0 : a.setFieldValue) == null || r.call(a, l.name, t);
|
|
175
175
|
}
|
|
176
176
|
function G() {
|
|
177
177
|
return o(u);
|
|
@@ -184,18 +184,18 @@ const ze = /* @__PURE__ */ J({
|
|
|
184
184
|
var t;
|
|
185
185
|
return (t = o(u)) == null ? void 0 : t[e];
|
|
186
186
|
}
|
|
187
|
-
function W(e, t) {
|
|
188
|
-
var
|
|
187
|
+
function W(e, t, n = !0) {
|
|
188
|
+
var r, i;
|
|
189
189
|
const a = h(o(u));
|
|
190
190
|
a[e] && (a[e] = {
|
|
191
|
-
...a[e],
|
|
191
|
+
...n ? a[e] : {},
|
|
192
192
|
...t
|
|
193
|
-
}, (
|
|
193
|
+
}, (i = (r = s.value) == null ? void 0 : r.setFieldValue) == null || i.call(r, l.name, [...a]));
|
|
194
194
|
}
|
|
195
195
|
function $(e, t) {
|
|
196
|
-
var
|
|
197
|
-
const
|
|
198
|
-
ce(
|
|
196
|
+
var a;
|
|
197
|
+
const n = e === "end" ? u.value.length - 1 : e;
|
|
198
|
+
ce(n, (a = v.value) == null ? void 0 : a.$el, t);
|
|
199
199
|
}
|
|
200
200
|
function Q() {
|
|
201
201
|
var e, t;
|
|
@@ -232,13 +232,13 @@ const ze = /* @__PURE__ */ J({
|
|
|
232
232
|
ref: v
|
|
233
233
|
}), Z({
|
|
234
234
|
headerCell: m(({
|
|
235
|
-
column:
|
|
236
|
-
}) => [o(pe)(
|
|
235
|
+
column: n
|
|
236
|
+
}) => [o(pe)(n) ? (p(), ee("span", {
|
|
237
237
|
key: 0,
|
|
238
238
|
class: te(o(L)("header-cell", "required"))
|
|
239
|
-
}, "*", 2)) : B("", !0), ae("span", null, ne(
|
|
239
|
+
}, "*", 2)) : B("", !0), ae("span", null, ne(n.title), 1), n.tooltip ? (p(), F(o(de), {
|
|
240
240
|
key: 1,
|
|
241
|
-
title:
|
|
241
|
+
title: n.tooltip,
|
|
242
242
|
placement: "bottom"
|
|
243
243
|
}, {
|
|
244
244
|
default: m(() => [x(o(ge), {
|
|
@@ -250,9 +250,9 @@ const ze = /* @__PURE__ */ J({
|
|
|
250
250
|
_: 2
|
|
251
251
|
}, 1032, ["title"])) : B("", !0)]),
|
|
252
252
|
_: 2
|
|
253
|
-
}, [le(N, (
|
|
254
|
-
name:
|
|
255
|
-
fn: m((r) => [re(e.$slots,
|
|
253
|
+
}, [le(N, (n, a) => ({
|
|
254
|
+
name: a,
|
|
255
|
+
fn: m((r) => [re(e.$slots, a, ue(se(r || {})))])
|
|
256
256
|
}))]), 1040, ["class", "columns", "data-source"])]),
|
|
257
257
|
_: 3
|
|
258
258
|
}, 8, ["name"])]),
|