@aplus-frontend/ui 7.4.0 → 7.4.1
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-field/date/index.vue.mjs +68 -63
- package/es/src/ap-form/item/index.vue.mjs +95 -86
- package/es/src/ap-modal/style/index.d.ts +3 -0
- package/es/src/ap-modal/style/index.mjs +20 -0
- package/es/src/ap-modal/utils/createModal.mjs +38 -39
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-modal.mjs +24 -22
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.mjs +26 -24
- package/es/src/business/ag-grid-modal/interface.d.ts +2 -1
- package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +3 -1
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +16 -15
- package/es/src/utils/cssinjs/TokenUtil.mjs +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-modal/style/index.d.ts +3 -0
- package/lib/src/ap-modal/style/index.js +1 -0
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-modal.js +1 -1
- package/lib/src/business/ag-grid-modal/hooks/use-ag-grid-select-modal.js +1 -1
- package/lib/src/business/ag-grid-modal/interface.d.ts +2 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +3 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
- package/lib/src/utils/cssinjs/TokenUtil.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as E, computed as r, unref as t, createElementBlock as B, createBlock as y, openBlock as i, Fragment as g, createTextVNode as k, toDisplayString as w, normalizeStyle as N, withCtx as s, createVNode as P, createCommentVNode as I, isRef as j, renderList as b, mergeProps as U, createSlots as H, renderSlot as K, normalizeProps as W, guardReactiveProps as $ } from "vue";
|
|
2
2
|
import u from "dayjs";
|
|
3
|
-
import { InputGroup as G,
|
|
4
|
-
import { ApFieldDatePresetFormats as
|
|
3
|
+
import { InputGroup as G, FormItemRest as L, Select as Y, SelectOption as Z, DatePicker as q } from "@aplus-frontend/antdv";
|
|
4
|
+
import { ApFieldDatePresetFormats as J, PRESET_FORMAT_MAP as C, PRESET_FORMAT_PICK_MAP as Q, PRESET_FORMAT_TIME_MAP as X } from "./constant.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
|
-
import { isNil as
|
|
7
|
-
import { formatDayWithTimezone as
|
|
8
|
-
import { getTimeFormatToZone as
|
|
9
|
-
import { useDefaultPlaceholder as
|
|
10
|
-
import { useDateTimezone as
|
|
11
|
-
import { useControllableValue as
|
|
12
|
-
const
|
|
6
|
+
import { isNil as S, omit as ee } from "lodash-unified";
|
|
7
|
+
import { formatDayWithTimezone as oe } from "./helper.mjs";
|
|
8
|
+
import { getTimeFormatToZone as te } from "@aplus-frontend/utils";
|
|
9
|
+
import { useDefaultPlaceholder as ae } from "../hooks/use-default-placeholder.mjs";
|
|
10
|
+
import { useDateTimezone as ne } from "../hooks/use-date-timezone.mjs";
|
|
11
|
+
import { useControllableValue as le } from "../../hooks/useControllableValue.mjs";
|
|
12
|
+
const he = /* @__PURE__ */ E({
|
|
13
13
|
name: "ApFieldDate",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -91,23 +91,23 @@ const ye = /* @__PURE__ */ z({
|
|
|
91
91
|
timezone: {}
|
|
92
92
|
},
|
|
93
93
|
emits: ["update:value"],
|
|
94
|
-
setup(
|
|
95
|
-
const e =
|
|
94
|
+
setup(T, { emit: F }) {
|
|
95
|
+
const e = T, O = F, { value: f, updateValue: h } = le(
|
|
96
96
|
e,
|
|
97
97
|
O
|
|
98
|
-
),
|
|
99
|
-
() =>
|
|
100
|
-
), A = r(() => e.shownFormat ? e.shownFormat : l.value ?
|
|
101
|
-
() => l.value ?
|
|
98
|
+
), _ = ae("Date", e), { currentTimezone: d } = ne(e), l = r(
|
|
99
|
+
() => J.indexOf(e.format) > -1
|
|
100
|
+
), A = r(() => e.shownFormat ? e.shownFormat : l.value ? C[e.format] : e.format), m = r(
|
|
101
|
+
() => l.value ? C[e.format] : e.format
|
|
102
102
|
), c = r(() => {
|
|
103
|
-
if (
|
|
103
|
+
if (S(t(f)))
|
|
104
104
|
return;
|
|
105
105
|
let o = u(t(f));
|
|
106
|
-
return e.timezone && (o = u(
|
|
107
|
-
}),
|
|
108
|
-
const o = t(l) ?
|
|
106
|
+
return e.timezone && (o = u(te(t(f), d.value))), o;
|
|
107
|
+
}), R = r(() => t(l) ? e.picker ?? Q[e.format] : e.picker), M = r(() => {
|
|
108
|
+
const o = t(l) ? X[e.format] : {};
|
|
109
109
|
return {
|
|
110
|
-
...
|
|
110
|
+
...ee(e, [
|
|
111
111
|
"value",
|
|
112
112
|
"defaultValue",
|
|
113
113
|
"onChange",
|
|
@@ -116,12 +116,12 @@ const ye = /* @__PURE__ */ z({
|
|
|
116
116
|
"onUpdate:value",
|
|
117
117
|
"mode"
|
|
118
118
|
]),
|
|
119
|
-
placeholder: t(
|
|
119
|
+
placeholder: t(_),
|
|
120
120
|
...o
|
|
121
121
|
};
|
|
122
|
-
}), v = (o, n, a = !0) =>
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
122
|
+
}), v = (o, n, a = !0) => oe(d.value)(o, n, a);
|
|
123
|
+
function D(o) {
|
|
124
|
+
if (S(o)) {
|
|
125
125
|
h(null);
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
@@ -129,71 +129,76 @@ const ye = /* @__PURE__ */ z({
|
|
|
129
129
|
h(
|
|
130
130
|
v(
|
|
131
131
|
n,
|
|
132
|
-
t(l) ? t(
|
|
132
|
+
t(l) ? t(m) : void 0,
|
|
133
133
|
e.formatBegins
|
|
134
134
|
)
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
const a = u(o),
|
|
137
|
+
function V(o, n) {
|
|
138
|
+
const a = u(o), p = o ? v(
|
|
139
139
|
a,
|
|
140
|
-
t(l) ? t(
|
|
140
|
+
t(l) ? t(m) : void 0,
|
|
141
141
|
e.formatBegins
|
|
142
142
|
) : null;
|
|
143
|
-
e.onChange?.(
|
|
143
|
+
e.onChange?.(p, n);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function x(o) {
|
|
146
146
|
const n = u(o), a = o ? v(
|
|
147
147
|
n,
|
|
148
|
-
t(l) ? t(
|
|
148
|
+
t(l) ? t(m) : void 0,
|
|
149
149
|
e.formatBegins
|
|
150
150
|
) : null;
|
|
151
151
|
e.onOk?.(a);
|
|
152
152
|
}
|
|
153
153
|
return (o, n) => o.mode === "read" ? (i(), B(g, { key: 0 }, [
|
|
154
|
-
k(w(c.value ? t(u)(c.value).format(
|
|
154
|
+
k(w(c.value ? t(u)(c.value).format(m.value) : o.emptyText), 1)
|
|
155
155
|
], 64)) : (i(), y(t(G), {
|
|
156
156
|
key: 1,
|
|
157
157
|
compact: "",
|
|
158
|
-
style:
|
|
158
|
+
style: N({
|
|
159
159
|
display: Array.isArray(e.timezone) && e.timezone.length ? "flex" : "block"
|
|
160
160
|
})
|
|
161
161
|
}, {
|
|
162
|
-
default:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
(i(!0), B(g, null, P(e.timezone, (a) => (i(), y(t(Y), {
|
|
174
|
-
key: a?.value,
|
|
175
|
-
value: a?.value
|
|
162
|
+
default: s(() => [
|
|
163
|
+
P(t(L), null, {
|
|
164
|
+
default: s(() => [
|
|
165
|
+
Array.isArray(e.timezone) && e.timezone.length ? (i(), y(t(Y), {
|
|
166
|
+
key: 0,
|
|
167
|
+
value: t(d),
|
|
168
|
+
"onUpdate:value": n[0] || (n[0] = (a) => j(d) ? d.value = a : null),
|
|
169
|
+
"default-active-first-option": "",
|
|
170
|
+
"dropdown-match-select-width": !1,
|
|
171
|
+
style: { "max-width": "50%" },
|
|
172
|
+
disabled: o.disabled
|
|
176
173
|
}, {
|
|
177
|
-
default:
|
|
178
|
-
|
|
174
|
+
default: s(() => [
|
|
175
|
+
(i(!0), B(g, null, b(e.timezone, (a) => (i(), y(t(Z), {
|
|
176
|
+
key: a?.value,
|
|
177
|
+
value: a?.value
|
|
178
|
+
}, {
|
|
179
|
+
default: s(() => [
|
|
180
|
+
k(w(a?.label ?? a?.value), 1)
|
|
181
|
+
]),
|
|
182
|
+
_: 2
|
|
183
|
+
}, 1032, ["value"]))), 128))
|
|
179
184
|
]),
|
|
180
|
-
_:
|
|
181
|
-
},
|
|
185
|
+
_: 1
|
|
186
|
+
}, 8, ["value", "disabled"])) : I("", !0)
|
|
182
187
|
]),
|
|
183
188
|
_: 1
|
|
184
|
-
}
|
|
185
|
-
|
|
189
|
+
}),
|
|
190
|
+
P(t(q), U(M.value, {
|
|
186
191
|
value: c.value,
|
|
187
192
|
format: A.value,
|
|
188
|
-
picker:
|
|
189
|
-
"onUpdate:value":
|
|
190
|
-
onChange:
|
|
191
|
-
onOk:
|
|
193
|
+
picker: R.value,
|
|
194
|
+
"onUpdate:value": D,
|
|
195
|
+
onChange: V,
|
|
196
|
+
onOk: x
|
|
192
197
|
}), H({ _: 2 }, [
|
|
193
|
-
|
|
194
|
-
name:
|
|
195
|
-
fn:
|
|
196
|
-
K(o.$slots,
|
|
198
|
+
b(o.$slots, (a, p) => ({
|
|
199
|
+
name: p,
|
|
200
|
+
fn: s((z) => [
|
|
201
|
+
K(o.$slots, p, W($(z || {})))
|
|
197
202
|
])
|
|
198
203
|
}))
|
|
199
204
|
]), 1040, ["value", "format", "picker"])
|
|
@@ -203,5 +208,5 @@ const ye = /* @__PURE__ */ z({
|
|
|
203
208
|
}
|
|
204
209
|
});
|
|
205
210
|
export {
|
|
206
|
-
|
|
211
|
+
he as default
|
|
207
212
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { isFunction as
|
|
1
|
+
import { defineComponent as _, useSlots as j, ref as y, onMounted as E, computed as M, unref as r, cloneVNode as O, createBlock as b, openBlock as v, mergeProps as $, createSlots as q, withCtx as i, resolveDynamicComponent as K, renderList as Q, createElementVNode as U, normalizeClass as Y, createVNode as f, normalizeStyle as G, renderSlot as H, normalizeProps as J, guardReactiveProps as W } from "vue";
|
|
2
|
+
import { Form as X, Tooltip as Z, TypographyText as ee } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useToken as oe } from "@aplus-frontend/antdv/es/theme/internal";
|
|
4
|
+
import { isFunction as F, cloneDeep as te, isArray as re, omit as V } from "lodash-unified";
|
|
5
5
|
import { apFormItemColPropKeys as le } from "../constant.mjs";
|
|
6
|
-
import { QuestionCircleOutlined as
|
|
6
|
+
import { QuestionCircleOutlined as ne } from "@ant-design/icons-vue";
|
|
7
7
|
import "../../config-provider/index.mjs";
|
|
8
8
|
import { useInjectForm as ae } from "../context.mjs";
|
|
9
|
-
import { isPromise as
|
|
10
|
-
import { getValidVNodeList as
|
|
11
|
-
import
|
|
12
|
-
import { useNamespace as
|
|
13
|
-
const
|
|
9
|
+
import { isPromise as ie } from "@fruits-chain/utils";
|
|
10
|
+
import { getValidVNodeList as se } from "../../utils/slot.mjs";
|
|
11
|
+
import ue from "../style/item.mjs";
|
|
12
|
+
import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
const Ce = /* @__PURE__ */ _({
|
|
14
14
|
name: "ApFormItem",
|
|
15
15
|
__name: "index",
|
|
16
16
|
props: {
|
|
@@ -57,100 +57,109 @@ const Be = /* @__PURE__ */ L({
|
|
|
57
57
|
customFilled: {},
|
|
58
58
|
disabled: { type: Boolean }
|
|
59
59
|
},
|
|
60
|
-
setup(
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
name:
|
|
66
|
-
initialValue:
|
|
67
|
-
transform:
|
|
60
|
+
setup(g, { expose: h }) {
|
|
61
|
+
const o = g, m = j(), { model: p, updateModel: B, internalInstance: C } = ae(), { m: u, b: k } = de("ap-form-item"), P = ue("ap-form-item"), d = y(!1), a = y(), [, x] = oe();
|
|
62
|
+
E(async () => {
|
|
63
|
+
let e = F(o.initialValue) ? o.initialValue() : o.initialValue;
|
|
64
|
+
ie(e) && (e = await e), C?.registerField({
|
|
65
|
+
name: o.name,
|
|
66
|
+
initialValue: te(e),
|
|
67
|
+
transform: o.transform
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
|
-
const
|
|
71
|
-
function
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return l ? j(l, {
|
|
77
|
-
[e.valuePropName]: t(f),
|
|
78
|
-
[`onUpdate:${e.valuePropName}`]: N,
|
|
79
|
-
variant: e.bordered ? "borderless" : l?.props?.variant,
|
|
80
|
-
bordered: e.bordered ? !1 : l?.props?.bordered,
|
|
81
|
-
onFocus: P,
|
|
82
|
-
onBlur: S
|
|
83
|
-
}) : null;
|
|
84
|
-
}
|
|
85
|
-
function N(o) {
|
|
86
|
-
h?.(e.name, o);
|
|
70
|
+
const c = M(() => o.name ? re(o.name) ? o.name.reduce((e, t) => e?.[t], r(p)) : p?.value[o.name] : null);
|
|
71
|
+
function N(e, t) {
|
|
72
|
+
const l = Object.keys(t), n = { ...t };
|
|
73
|
+
return l.forEach((s) => {
|
|
74
|
+
s in e || delete n[s];
|
|
75
|
+
}), n;
|
|
87
76
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
77
|
+
function I() {
|
|
78
|
+
const e = m.default?.() || [];
|
|
79
|
+
if (!o.name)
|
|
80
|
+
return e[0];
|
|
81
|
+
const t = se(e)[0];
|
|
82
|
+
if (!t)
|
|
83
|
+
return null;
|
|
84
|
+
const l = t?.type?.props ?? {}, n = {
|
|
85
|
+
[o.valuePropName]: r(c),
|
|
86
|
+
[`onUpdate:${o.valuePropName}`]: S,
|
|
87
|
+
variant: o.bordered ? "borderless" : t?.props?.variant,
|
|
88
|
+
bordered: o.bordered ? !1 : t?.props?.bordered,
|
|
89
|
+
onFocus: T,
|
|
90
|
+
onBlur: w
|
|
91
|
+
};
|
|
92
|
+
return O(t, N(l, n));
|
|
90
93
|
}
|
|
91
|
-
function S() {
|
|
92
|
-
|
|
94
|
+
function S(e) {
|
|
95
|
+
B?.(o.name, e);
|
|
93
96
|
}
|
|
94
97
|
function T() {
|
|
95
|
-
|
|
98
|
+
d.value = !0;
|
|
96
99
|
}
|
|
97
100
|
function w() {
|
|
98
|
-
|
|
101
|
+
d.value = !1;
|
|
99
102
|
}
|
|
100
103
|
function z() {
|
|
101
|
-
|
|
104
|
+
a.value?.onFieldBlur();
|
|
102
105
|
}
|
|
103
106
|
function R() {
|
|
104
|
-
|
|
107
|
+
a.value?.onFieldChange();
|
|
108
|
+
}
|
|
109
|
+
function A() {
|
|
110
|
+
a.value?.clearValidate();
|
|
111
|
+
}
|
|
112
|
+
function D() {
|
|
113
|
+
a.value?.resetField();
|
|
105
114
|
}
|
|
106
|
-
function
|
|
107
|
-
const
|
|
108
|
-
if (!
|
|
109
|
-
return
|
|
110
|
-
const
|
|
111
|
-
return
|
|
115
|
+
function L(e = !1) {
|
|
116
|
+
const t = r(c);
|
|
117
|
+
if (!e || !o.transform)
|
|
118
|
+
return t;
|
|
119
|
+
const l = F(o.transform) ? o.transform : o.transform.transformer;
|
|
120
|
+
return o.transform ? l(t) : t;
|
|
112
121
|
}
|
|
113
|
-
return
|
|
114
|
-
onFieldBlur:
|
|
115
|
-
onFieldChange:
|
|
116
|
-
clearValidate:
|
|
117
|
-
resetField:
|
|
118
|
-
getFieldValue:
|
|
119
|
-
}), (
|
|
122
|
+
return h({
|
|
123
|
+
onFieldBlur: z,
|
|
124
|
+
onFieldChange: R,
|
|
125
|
+
clearValidate: A,
|
|
126
|
+
resetField: D,
|
|
127
|
+
getFieldValue: L
|
|
128
|
+
}), (e, t) => (v(), b(r(X).Item, $(
|
|
120
129
|
{
|
|
121
130
|
ref_key: "formItemRef",
|
|
122
|
-
ref:
|
|
131
|
+
ref: a
|
|
123
132
|
},
|
|
124
|
-
|
|
133
|
+
r(V)(o, [...r(le), "tooltip", "label", "description"]),
|
|
125
134
|
{
|
|
126
135
|
class: {
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
131
|
-
[
|
|
136
|
+
[r(u)("bordered")]: e.bordered,
|
|
137
|
+
[r(u)("focused")]: e.bordered && d.value,
|
|
138
|
+
[r(u)("disabled")]: e.bordered && e.disabled,
|
|
139
|
+
[r(k)()]: !0,
|
|
140
|
+
[r(P)]: !0
|
|
132
141
|
},
|
|
133
|
-
colon:
|
|
142
|
+
colon: e.bordered ? !1 : o.colon
|
|
134
143
|
}
|
|
135
|
-
),
|
|
136
|
-
default:
|
|
144
|
+
), q({
|
|
145
|
+
default: i(() => [
|
|
137
146
|
(v(), b(K(I())))
|
|
138
147
|
]),
|
|
139
148
|
_: 2
|
|
140
149
|
}, [
|
|
141
|
-
|
|
150
|
+
o.tooltip ? {
|
|
142
151
|
name: "tooltip",
|
|
143
|
-
fn:
|
|
144
|
-
|
|
145
|
-
class:
|
|
152
|
+
fn: i(({ class: l }) => [
|
|
153
|
+
U("span", {
|
|
154
|
+
class: Y(l)
|
|
146
155
|
}, [
|
|
147
|
-
|
|
148
|
-
title:
|
|
156
|
+
f(r(Z), {
|
|
157
|
+
title: o.tooltip
|
|
149
158
|
}, {
|
|
150
|
-
default:
|
|
151
|
-
|
|
152
|
-
style:
|
|
153
|
-
color:
|
|
159
|
+
default: i(() => [
|
|
160
|
+
f(r(ne), {
|
|
161
|
+
style: G({
|
|
162
|
+
color: r(x).colorTextTertiary,
|
|
154
163
|
fontSize: "14px",
|
|
155
164
|
transform: "translateY(1px)"
|
|
156
165
|
})
|
|
@@ -162,26 +171,26 @@ const Be = /* @__PURE__ */ L({
|
|
|
162
171
|
]),
|
|
163
172
|
key: "0"
|
|
164
173
|
} : void 0,
|
|
165
|
-
|
|
174
|
+
e.label ? {
|
|
166
175
|
name: "label",
|
|
167
|
-
fn:
|
|
168
|
-
|
|
169
|
-
content:
|
|
170
|
-
ellipsis: { tooltip:
|
|
176
|
+
fn: i(() => [
|
|
177
|
+
f(r(ee), {
|
|
178
|
+
content: e.label,
|
|
179
|
+
ellipsis: { tooltip: e.label },
|
|
171
180
|
style: { "min-width": "0px", flex: "1" }
|
|
172
181
|
}, null, 8, ["content", "ellipsis"])
|
|
173
182
|
]),
|
|
174
183
|
key: "1"
|
|
175
184
|
} : void 0,
|
|
176
|
-
|
|
177
|
-
name:
|
|
178
|
-
fn:
|
|
179
|
-
|
|
185
|
+
Q(r(V)(m, "default"), (l, n) => ({
|
|
186
|
+
name: n,
|
|
187
|
+
fn: i((s) => [
|
|
188
|
+
H(e.$slots, n, J(W(s || {})))
|
|
180
189
|
])
|
|
181
190
|
}))
|
|
182
191
|
]), 1040, ["class", "colon"]));
|
|
183
192
|
}
|
|
184
193
|
});
|
|
185
194
|
export {
|
|
186
|
-
|
|
195
|
+
Ce as default
|
|
187
196
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { genComponentStyleHook as n } from "../../utils/cssinjs/index.mjs";
|
|
2
|
+
const t = (o) => {
|
|
3
|
+
const { componentCls: e } = o;
|
|
4
|
+
return {
|
|
5
|
+
[e]: {
|
|
6
|
+
[`${e}-body-wrapper`]: {
|
|
7
|
+
"scrollbar-width": "none",
|
|
8
|
+
"-ms-overflow-style": "none",
|
|
9
|
+
"&::-webkit-scrollbar": {
|
|
10
|
+
display: "none"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}, r = n("ApModal", (o) => [
|
|
16
|
+
t(o)
|
|
17
|
+
]);
|
|
18
|
+
export {
|
|
19
|
+
r as default
|
|
20
|
+
};
|
|
@@ -1,39 +1,36 @@
|
|
|
1
|
-
import { render as
|
|
1
|
+
import { render as h, defineComponent as k, createVNode as u, mergeProps as N, h as $ } from "vue";
|
|
2
2
|
import { Modal as E } from "@aplus-frontend/antdv";
|
|
3
|
-
import {
|
|
3
|
+
import { globalConfigCached as p, ConfigProvider as F } from "../../config-provider/config-provider.mjs";
|
|
4
4
|
import { omit as L } from "lodash-unified";
|
|
5
|
-
import { isNumeric as
|
|
6
|
-
import "
|
|
7
|
-
import { getContainerDom as C, getModalGlobalAppContext as M } from "./util.mjs";
|
|
5
|
+
import { isNumeric as C } from "@aplus-frontend/utils";
|
|
6
|
+
import { getContainerDom as g, getModalGlobalAppContext as M } from "./util.mjs";
|
|
8
7
|
import { getTopWindow as A } from "../../utils/index.mjs";
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
let n, r;
|
|
12
|
-
const {
|
|
13
|
-
destroyOnClose:
|
|
8
|
+
import H from "../style/index.mjs";
|
|
9
|
+
const j = (t) => {
|
|
10
|
+
let n, r, i;
|
|
11
|
+
const s = (e) => e ? `${p.value.namespace}-ap-modal-${e}` : `${p.value.namespace}-ap-modal`, {
|
|
12
|
+
destroyOnClose: d = !0,
|
|
14
13
|
wrapperOffset: o = !1,
|
|
15
|
-
wrapperFullHeight:
|
|
16
|
-
} = t
|
|
17
|
-
|
|
18
|
-
} = H("ap-modal");
|
|
19
|
-
function s() {
|
|
14
|
+
wrapperFullHeight: m = !1
|
|
15
|
+
} = t;
|
|
16
|
+
function l() {
|
|
20
17
|
n && n(!1), setTimeout(() => {
|
|
21
|
-
|
|
18
|
+
h(null, a), a.parentElement?.removeChild(a);
|
|
22
19
|
}, 500);
|
|
23
20
|
}
|
|
24
|
-
function
|
|
21
|
+
function v() {
|
|
25
22
|
n && n(!0);
|
|
26
23
|
}
|
|
27
|
-
function
|
|
24
|
+
function c() {
|
|
28
25
|
n && n(!1);
|
|
29
26
|
}
|
|
30
27
|
function x(e) {
|
|
31
28
|
r && r(e);
|
|
32
29
|
}
|
|
33
|
-
const
|
|
30
|
+
const y = /* @__PURE__ */ k({
|
|
34
31
|
data() {
|
|
35
32
|
return {
|
|
36
|
-
open:
|
|
33
|
+
open: d,
|
|
37
34
|
props: t
|
|
38
35
|
};
|
|
39
36
|
},
|
|
@@ -45,7 +42,7 @@ const q = (t) => {
|
|
|
45
42
|
...this.props,
|
|
46
43
|
...e
|
|
47
44
|
};
|
|
48
|
-
};
|
|
45
|
+
}, i = H("ap-modal");
|
|
49
46
|
},
|
|
50
47
|
methods: {
|
|
51
48
|
async handleCancel() {
|
|
@@ -53,7 +50,7 @@ const q = (t) => {
|
|
|
53
50
|
const e = this.props?.content?.component?.exposed ?? void 0;
|
|
54
51
|
await this.props?.onCancel(e);
|
|
55
52
|
}
|
|
56
|
-
|
|
53
|
+
d ? l() : c();
|
|
57
54
|
},
|
|
58
55
|
async handleOk() {
|
|
59
56
|
try {
|
|
@@ -65,7 +62,7 @@ const q = (t) => {
|
|
|
65
62
|
}
|
|
66
63
|
r({
|
|
67
64
|
confirmLoading: !1
|
|
68
|
-
}),
|
|
65
|
+
}), d ? l() : c();
|
|
69
66
|
} catch {
|
|
70
67
|
r({
|
|
71
68
|
confirmLoading: !1
|
|
@@ -81,11 +78,12 @@ const q = (t) => {
|
|
|
81
78
|
},
|
|
82
79
|
render() {
|
|
83
80
|
const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon", "footer"]);
|
|
84
|
-
return
|
|
85
|
-
default: () => [
|
|
81
|
+
return u(F, p.value, {
|
|
82
|
+
default: () => [u(E, N({
|
|
86
83
|
class: {
|
|
87
|
-
[
|
|
88
|
-
[
|
|
84
|
+
[s()]: !0,
|
|
85
|
+
[s("wrapper")]: o,
|
|
86
|
+
[i.value]: !0
|
|
89
87
|
},
|
|
90
88
|
centered: !0
|
|
91
89
|
}, e, {
|
|
@@ -94,29 +92,30 @@ const q = (t) => {
|
|
|
94
92
|
onOk: this.handleOk,
|
|
95
93
|
footer: this?.handleFooter
|
|
96
94
|
}), {
|
|
97
|
-
default: () => [
|
|
95
|
+
default: () => [u("div", {
|
|
98
96
|
class: {
|
|
99
|
-
[
|
|
97
|
+
[s("body-wrapper")]: o,
|
|
98
|
+
[i.value]: !0
|
|
100
99
|
},
|
|
101
100
|
style: {
|
|
102
|
-
maxHeight: o !== !1 ? `calc(100vh - ${(o === !0 ? 100 :
|
|
103
|
-
height:
|
|
104
|
-
overflowY: o !== !1 ||
|
|
101
|
+
maxHeight: o !== !1 ? `calc(100vh - ${(o === !0 ? 100 : C(o) ? Number(o) : 100) * 2}px)` : void 0,
|
|
102
|
+
height: m === !0 ? `calc(100vh - ${(o === !0 ? 100 : C(o) ? Number(o) : 100) * 2}px)` : void 0,
|
|
103
|
+
overflowY: o !== !1 || m === !0 ? "auto" : void 0
|
|
105
104
|
}
|
|
106
105
|
}, [this.props?.content])]
|
|
107
106
|
})]
|
|
108
107
|
});
|
|
109
108
|
}
|
|
110
|
-
}),
|
|
109
|
+
}), O = g(p?.value?.getPopupContainer), w = g(t.getContainer), b = O || w || A().document.body, a = document.createElement("div");
|
|
111
110
|
b.appendChild(a);
|
|
112
|
-
const
|
|
113
|
-
return
|
|
114
|
-
destroy:
|
|
111
|
+
const f = $(y), P = M();
|
|
112
|
+
return f.appContext = t.appContext || P || f.appContext, h(f, a), {
|
|
113
|
+
destroy: l,
|
|
115
114
|
update: x,
|
|
116
|
-
open:
|
|
117
|
-
close:
|
|
115
|
+
open: v,
|
|
116
|
+
close: c
|
|
118
117
|
};
|
|
119
118
|
};
|
|
120
119
|
export {
|
|
121
|
-
|
|
120
|
+
j as createModal
|
|
122
121
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, ref as P, createVNode as n, mergeProps as w } from "vue";
|
|
2
2
|
import { ApModal as y } from "../../../ap-modal/index.mjs";
|
|
3
3
|
import "../../../ag-grid/index.mjs";
|
|
4
4
|
import { genRequest as I } from "../utils.mjs";
|
|
5
5
|
import { useAgGridInstance as A } from "./use-ag-grid-instance.mjs";
|
|
6
|
-
import { isFunction as
|
|
6
|
+
import { isFunction as H, isEmpty as f, omitBy as M, isUndefined as _, omit as q } from "lodash-unified";
|
|
7
7
|
import "../wrapper/index.vue.mjs";
|
|
8
|
-
import
|
|
8
|
+
import G from "../wrapper/index.vue2.mjs";
|
|
9
9
|
import x from "../../../ag-grid/index.vue.mjs";
|
|
10
10
|
function j(r) {
|
|
11
|
-
let a = null,
|
|
12
|
-
const [o, c] = A(),
|
|
11
|
+
let a = null, l = null;
|
|
12
|
+
const [o, c] = A(), s = I(r.api, r.getRowKey, o.setDataSourceLength), u = (t) => {
|
|
13
13
|
const {
|
|
14
14
|
title: e,
|
|
15
15
|
width: i,
|
|
16
|
-
modalProps:
|
|
16
|
+
modalProps: v,
|
|
17
17
|
...d
|
|
18
|
-
} =
|
|
19
|
-
f(d) ||
|
|
20
|
-
const m =
|
|
18
|
+
} = H(t) ? t(r) : t;
|
|
19
|
+
f(d) || l?.(d);
|
|
20
|
+
const m = M({
|
|
21
21
|
title: e,
|
|
22
22
|
width: i,
|
|
23
|
-
modalProps:
|
|
24
|
-
},
|
|
23
|
+
modalProps: v
|
|
24
|
+
}, _);
|
|
25
25
|
f(m) || a?.update(m);
|
|
26
|
-
}, g = /* @__PURE__ */
|
|
26
|
+
}, g = /* @__PURE__ */ C({
|
|
27
27
|
name: "AgGridModalPreviewContent",
|
|
28
28
|
props: {
|
|
29
29
|
modalConfig: {
|
|
@@ -32,17 +32,18 @@ function j(r) {
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
setup(t) {
|
|
35
|
-
const e =
|
|
36
|
-
return
|
|
35
|
+
const e = P(t.modalConfig);
|
|
36
|
+
return l = (i) => {
|
|
37
37
|
e.value = {
|
|
38
38
|
...e.value,
|
|
39
39
|
...i
|
|
40
40
|
};
|
|
41
41
|
}, () => n(c, null, {
|
|
42
|
-
default: () => [n(
|
|
42
|
+
default: () => [n(G, {
|
|
43
|
+
height: e.value.height,
|
|
43
44
|
rowHeight: e.value.rowHeight
|
|
44
45
|
}, {
|
|
45
|
-
default: () => [e.value.renderHeader?.(
|
|
46
|
+
default: () => [e.value.renderHeader?.(q(o, "setInstance"), {
|
|
46
47
|
updateProps: u
|
|
47
48
|
}), n(x, w({
|
|
48
49
|
ref: o.setInstance,
|
|
@@ -53,18 +54,19 @@ function j(r) {
|
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
rowKey: e.value.getRowKey,
|
|
56
|
-
request:
|
|
57
|
+
request: s.request,
|
|
57
58
|
style: {
|
|
58
59
|
padding: "0px"
|
|
59
60
|
},
|
|
60
61
|
rowHeight: e.value.rowHeight,
|
|
61
|
-
columns: e.value.columns
|
|
62
|
+
columns: e.value.columns,
|
|
63
|
+
autoHeight: !!e.value.height
|
|
62
64
|
}, r.gridProps), e.value.gridSlots)]
|
|
63
65
|
})]
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
|
-
function
|
|
69
|
+
function h() {
|
|
68
70
|
a = y.createModal({
|
|
69
71
|
title: r.title,
|
|
70
72
|
width: r.width,
|
|
@@ -80,11 +82,11 @@ function j(r) {
|
|
|
80
82
|
...r.modalProps || {}
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
+
function p(t) {
|
|
86
|
+
s.setExtraParams(t?.extraParams), h();
|
|
85
87
|
}
|
|
86
88
|
return {
|
|
87
|
-
open:
|
|
89
|
+
open: p,
|
|
88
90
|
refresh: o.refresh,
|
|
89
91
|
getAgGridInstance: o.getInstance,
|
|
90
92
|
updateProps: u
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as _, ref as
|
|
2
|
-
import { ApModal as
|
|
1
|
+
import { defineComponent as _, ref as H, createVNode as i, mergeProps as L, onUnmounted as j } from "vue";
|
|
2
|
+
import { ApModal as q } from "../../../ap-modal/index.mjs";
|
|
3
3
|
import "../../../ag-grid/index.mjs";
|
|
4
|
-
import { AsyncCallback as
|
|
4
|
+
import { AsyncCallback as G, genRequest as T, delRowKeyField as D, addRowKeyField as F, getModalLayoutConfig as E } from "../utils.mjs";
|
|
5
5
|
import { useAgGridInstance as U } from "./use-ag-grid-instance.mjs";
|
|
6
6
|
import { isFunction as u, cloneDeep as W, isEmpty as b, omitBy as $, isUndefined as z, omit as p } from "lodash-unified";
|
|
7
7
|
import { ROW_KEY as B } from "../constants.mjs";
|
|
@@ -16,7 +16,7 @@ import Q from "../modal-layout/index.vue2.mjs";
|
|
|
16
16
|
import X from "../../../ag-grid/index.vue.mjs";
|
|
17
17
|
function we(t) {
|
|
18
18
|
let c, f = null, g = null;
|
|
19
|
-
const d = new
|
|
19
|
+
const d = new G(), [K, S] = N(), {
|
|
20
20
|
t: k
|
|
21
21
|
} = Y(), [s, x] = U({
|
|
22
22
|
onSelectedRows(e) {
|
|
@@ -39,13 +39,13 @@ function we(t) {
|
|
|
39
39
|
}, m = u(t.getRowKey) ? t.getRowKey : (e) => e[t.getRowKey], P = () => {
|
|
40
40
|
const e = t.mergeRule || "old", o = s.getSelectedRows() || [];
|
|
41
41
|
return {
|
|
42
|
-
keys:
|
|
42
|
+
keys: A(o),
|
|
43
43
|
rows: o.map((a) => {
|
|
44
44
|
const r = m(a);
|
|
45
45
|
return e === "old" && c?.[r] ? c[r] : D(a);
|
|
46
46
|
})
|
|
47
47
|
};
|
|
48
|
-
},
|
|
48
|
+
}, h = async () => {
|
|
49
49
|
const e = P(), o = t.maxCount || 1 / 0;
|
|
50
50
|
return e.keys.length > o ? (V.warning(k("ap.apTableModal.messageMaxCount", {
|
|
51
51
|
maxCount: o
|
|
@@ -65,7 +65,7 @@ function we(t) {
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
setup(e) {
|
|
68
|
-
const o =
|
|
68
|
+
const o = H(e.modalConfig);
|
|
69
69
|
return g = (l) => {
|
|
70
70
|
o.value = {
|
|
71
71
|
...o.value,
|
|
@@ -75,12 +75,13 @@ function we(t) {
|
|
|
75
75
|
const l = e.selectedRows?.map((r) => F(r, o.value.getRowKey)), n = o.value, a = E(n.modalLayout);
|
|
76
76
|
return i(x, null, {
|
|
77
77
|
default: () => [i(J, {
|
|
78
|
+
height: n.height,
|
|
78
79
|
rowHeight: n.rowHeight
|
|
79
80
|
}, {
|
|
80
81
|
default: () => [t.renderHeader?.(p(s, "setInstance"), {
|
|
81
82
|
updateProps: y
|
|
82
83
|
}), i(Q, a.props, {
|
|
83
|
-
default: () => [i(X,
|
|
84
|
+
default: () => [i(X, L({
|
|
84
85
|
ref: s.setInstance,
|
|
85
86
|
searchForm: {
|
|
86
87
|
sortable: !1,
|
|
@@ -105,7 +106,8 @@ function we(t) {
|
|
|
105
106
|
return u(n.disabledCheckbox) ? n.disabledCheckbox(r, p(s, "setInstance")) : n.disabledCheckbox ?? !1;
|
|
106
107
|
},
|
|
107
108
|
...t.rowSelection
|
|
108
|
-
}
|
|
109
|
+
},
|
|
110
|
+
autoHeight: !!o.value.height
|
|
109
111
|
}, t.gridProps), n.gridSlots)],
|
|
110
112
|
...a.slots
|
|
111
113
|
})]
|
|
@@ -114,15 +116,15 @@ function we(t) {
|
|
|
114
116
|
};
|
|
115
117
|
}
|
|
116
118
|
});
|
|
117
|
-
function
|
|
119
|
+
function C(e) {
|
|
118
120
|
return i(I, {
|
|
119
121
|
modalConfig: t,
|
|
120
122
|
selectedRows: e
|
|
121
123
|
}, null);
|
|
122
124
|
}
|
|
123
|
-
function
|
|
124
|
-
const e = Object.values(c || {}), o =
|
|
125
|
-
f =
|
|
125
|
+
function v() {
|
|
126
|
+
const e = Object.values(c || {}), o = C(e);
|
|
127
|
+
f = q.createModal({
|
|
126
128
|
title: i(K, {
|
|
127
129
|
title: t.title,
|
|
128
130
|
maxCount: t.maxCount || 1 / 0
|
|
@@ -130,7 +132,7 @@ function we(t) {
|
|
|
130
132
|
width: t.width,
|
|
131
133
|
destroyOnClose: !0,
|
|
132
134
|
maskClosable: !1,
|
|
133
|
-
onOk:
|
|
135
|
+
onOk: h,
|
|
134
136
|
onCancel: M,
|
|
135
137
|
afterOpenChange(l) {
|
|
136
138
|
l === !1 && (s.setInstance(void 0), s.setDataSourceLength(0));
|
|
@@ -139,28 +141,28 @@ function we(t) {
|
|
|
139
141
|
...t.modalProps || {}
|
|
140
142
|
});
|
|
141
143
|
}
|
|
142
|
-
function
|
|
144
|
+
function A(e) {
|
|
143
145
|
return e?.map(m) || [];
|
|
144
146
|
}
|
|
145
|
-
function
|
|
147
|
+
function R(e, o, l = !1) {
|
|
146
148
|
if (c = e?.reduce((n, a) => {
|
|
147
149
|
const r = m(a);
|
|
148
150
|
return n[r] = a, n;
|
|
149
|
-
}, {}), w.setExtraParams(o?.extraParams),
|
|
151
|
+
}, {}), w.setExtraParams(o?.extraParams), v(), l)
|
|
150
152
|
return d.buildPromise();
|
|
151
153
|
}
|
|
152
|
-
function
|
|
153
|
-
return
|
|
154
|
+
function O(e, o) {
|
|
155
|
+
return R(e, o, !0);
|
|
154
156
|
}
|
|
155
|
-
return
|
|
157
|
+
return j(() => {
|
|
156
158
|
d.reject("component is Unmounted!");
|
|
157
159
|
}), {
|
|
158
|
-
open:
|
|
159
|
-
asyncOpen:
|
|
160
|
+
open: R,
|
|
161
|
+
asyncOpen: O,
|
|
160
162
|
refresh: s.refresh,
|
|
161
163
|
getAgGridInstance: s.getInstance,
|
|
162
|
-
genContent:
|
|
163
|
-
validate:
|
|
164
|
+
genContent: C,
|
|
165
|
+
validate: h,
|
|
164
166
|
updateProps: y
|
|
165
167
|
};
|
|
166
168
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StyleValue, VNodeChild } from 'vue';
|
|
1
|
+
import { CSSProperties, StyleValue, VNodeChild } from 'vue';
|
|
2
2
|
import { AgGridColumnType, AgGridExpose, AgGridProps, AgGridRowSelection, AgGridSlots } from '../../ag-grid';
|
|
3
3
|
import { CreateModalFuncProps } from '../../ap-modal';
|
|
4
4
|
import { Recordable } from '../../type';
|
|
@@ -19,6 +19,7 @@ export interface AgGridModalBasicProps<TableRowType = any> {
|
|
|
19
19
|
updateProps: UpdatePropsFn<TableRowType>;
|
|
20
20
|
}) => VNodeChild;
|
|
21
21
|
rowHeight?: number;
|
|
22
|
+
height?: CSSProperties['height'];
|
|
22
23
|
}
|
|
23
24
|
/** 刷新方式 */
|
|
24
25
|
export type RefreshType = 'reset' | 'submit' | 'submitWith';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
rowHeight?: number;
|
|
4
|
+
height?: CSSProperties['height'];
|
|
4
5
|
};
|
|
5
6
|
declare function __VLS_template(): {
|
|
6
7
|
attrs: Partial<{}>;
|
|
@@ -14,6 +15,7 @@ declare function __VLS_template(): {
|
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
17
|
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
height: import("csstype").Property.Height<string | number>;
|
|
17
19
|
rowHeight: number;
|
|
18
20
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
19
21
|
wrapperContainer: HTMLDivElement;
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { SMALL_HEIGHT as l, LARGER_HEIGHT as
|
|
1
|
+
import { defineComponent as h, useTemplateRef as g, computed as p, ref as f, watch as d, onMounted as m, createElementBlock as H, openBlock as v, normalizeStyle as y, unref as w, renderSlot as S } from "vue";
|
|
2
|
+
import { SMALL_HEIGHT as l, LARGER_HEIGHT as _ } from "../constants.mjs";
|
|
3
3
|
import { useAgGridModalInject as L } from "../hooks/use-ag-grid-instance.mjs";
|
|
4
|
-
const
|
|
4
|
+
const k = /* @__PURE__ */ h({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
|
-
rowHeight: { default: 32 }
|
|
7
|
+
rowHeight: { default: 32 },
|
|
8
|
+
height: { default: void 0 }
|
|
8
9
|
},
|
|
9
10
|
setup(c) {
|
|
10
|
-
const
|
|
11
|
-
() =>
|
|
12
|
-
),
|
|
11
|
+
const u = c, t = g("wrapperContainer"), s = L(), r = p(
|
|
12
|
+
() => s?.dataSourceLength?.value || 0
|
|
13
|
+
), i = f(l), a = () => {
|
|
13
14
|
const e = t.value?.clientHeight, o = t.value?.querySelector(
|
|
14
15
|
".ag-body.ag-layout-normal"
|
|
15
16
|
)?.clientHeight;
|
|
16
17
|
let n = 0;
|
|
17
|
-
!e || !o ? n = 0 : n = e - o, r.value *
|
|
18
|
+
!e || !o ? n = 0 : n = e - o, r.value * u.rowHeight > 480 - n && (i.value = _);
|
|
18
19
|
};
|
|
19
20
|
return d(
|
|
20
21
|
() => r.value,
|
|
21
22
|
() => {
|
|
22
|
-
|
|
23
|
+
a();
|
|
23
24
|
}
|
|
24
25
|
), m(() => {
|
|
25
|
-
|
|
26
|
+
a();
|
|
26
27
|
}), (e, o) => (v(), H("div", {
|
|
27
28
|
ref_key: "wrapperContainer",
|
|
28
29
|
ref: t,
|
|
29
|
-
style:
|
|
30
|
-
minHeight:
|
|
31
|
-
height:
|
|
30
|
+
style: y({
|
|
31
|
+
minHeight: e.height ? "unset" : w(l),
|
|
32
|
+
height: e.height ?? i.value,
|
|
32
33
|
display: "flex",
|
|
33
34
|
flexDirection: "column"
|
|
34
35
|
})
|
|
35
36
|
}, [
|
|
36
|
-
|
|
37
|
+
S(e.$slots, "default")
|
|
37
38
|
], 4));
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
k as default
|
|
42
43
|
};
|
|
@@ -6,7 +6,7 @@ class s {
|
|
|
6
6
|
return t instanceof s ? this.result = `${this.result} + ${t.getResult()}` : this.result = `${this.result} + ${t}`, this.lowPriority = !0, this;
|
|
7
7
|
}
|
|
8
8
|
sub(t) {
|
|
9
|
-
return
|
|
9
|
+
return t instanceof s ? this.result = `${this.result} - ${t.getResult()}` : this.result = `${this.result} - ${t}`, this.lowPriority = !0, this;
|
|
10
10
|
}
|
|
11
11
|
mul(t) {
|
|
12
12
|
return this.lowPriority && (this.result = `(${this.result})`), t instanceof s ? this.result = `${this.result} * ${t.getResult()}` : this.result = `${this.result} * ${t}`, this.lowPriority = !1, this;
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.4.
|
|
1
|
+
declare const _default: "7.4.1";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("dayjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("dayjs"),d=require("@aplus-frontend/antdv"),i=require("./constant.js");require("../../hooks/index.js");const v=require("lodash-unified"),F=require("./helper.js"),O=require("@aplus-frontend/utils"),A=require("../hooks/use-default-placeholder.js"),M=require("../hooks/use-date-timezone.js"),R=require("../../hooks/useControllableValue.js"),D=e.defineComponent({name:"ApFieldDate",__name:"index",props:{mode:{default:"edit"},class:{},style:{},dropdownClassName:{},dropdownAlign:{},popupStyle:{},transitionName:{},placeholder:{},allowClear:{type:Boolean,default:!0},autofocus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},tabindex:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},inputReadOnly:{type:Boolean,default:void 0},id:{},presets:{},suffixIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},clearIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},getPopupContainer:{},panelRender:{},inputRender:{},onOpenChange:{},onPanelChange:{},onFocus:{},onBlur:{},onMousedown:{},onMouseup:{},onMouseenter:{},onMouseleave:{},onClick:{},onContextmenu:{},onKeydown:{},role:{},name:{},autocomplete:{},direction:{},showToday:{type:Boolean,default:void 0},showTime:{type:Boolean,default:void 0},picker:{},prefixCls:{},defaultPickerValue:{},disabledDate:{},showWeek:{type:Boolean},dateRender:{},monthCellRender:{},renderExtraFooter:{},onSelect:{},locale:{},size:{},bordered:{type:Boolean,default:void 0},variant:{},showNow:{type:Boolean,default:void 0},disabledTime:{},defaultOpenValue:{},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12Hours:{type:Boolean,default:void 0},hourStep:{},minuteStep:{},secondStep:{},hideDisabledOptions:{type:Boolean,default:void 0},disabledHours:{},disabledMinutes:{},disabledSeconds:{},valueFormat:{},emptyText:{default:"--"},value:{},defaultValue:{},onChange:{},onOk:{},format:{default:"Y-D"},shownFormat:{},formatBegins:{type:Boolean,default:!0},timezone:{}},emits:["update:value"],setup(h,{emit:B}){const o=h,k=B,{value:p,updateValue:y}=R.useControllableValue(o,k),g=A.useDefaultPlaceholder("Date",o),{currentTimezone:u}=M.useDateTimezone(o),l=e.computed(()=>i.ApFieldDatePresetFormats.indexOf(o.format)>-1),w=e.computed(()=>o.shownFormat?o.shownFormat:l.value?i.PRESET_FORMAT_MAP[o.format]:o.format),s=e.computed(()=>l.value?i.PRESET_FORMAT_MAP[o.format]:o.format),f=e.computed(()=>{if(v.isNil(e.unref(p)))return;let t=r(e.unref(p));return o.timezone&&(t=r(O.getTimeFormatToZone(e.unref(p),u.value))),t}),C=e.computed(()=>e.unref(l)?o.picker??i.PRESET_FORMAT_PICK_MAP[o.format]:o.picker),P=e.computed(()=>{const t=e.unref(l)?i.PRESET_FORMAT_TIME_MAP[o.format]:{};return{...v.omit(o,["value","defaultValue","onChange","onOk","format","onUpdate:value","mode"]),placeholder:e.unref(g),...t}}),m=(t,n,a=!0)=>F.formatDayWithTimezone(u.value)(t,n,a);function T(t){if(v.isNil(t)){y(null);return}const n=r(t);y(m(n,e.unref(l)?e.unref(s):void 0,o.formatBegins))}function b(t,n){const a=r(t),c=t?m(a,e.unref(l)?e.unref(s):void 0,o.formatBegins):null;o.onChange?.(c,n)}function S(t){const n=r(t),a=t?m(n,e.unref(l)?e.unref(s):void 0,o.formatBegins):null;o.onOk?.(a)}return(t,n)=>t.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f.value?e.unref(r)(f.value).format(s.value):t.emptyText),1)],64)):(e.openBlock(),e.createBlock(e.unref(d.InputGroup),{key:1,compact:"",style:e.normalizeStyle({display:Array.isArray(o.timezone)&&o.timezone.length?"flex":"block"})},{default:e.withCtx(()=>[e.createVNode(e.unref(d.FormItemRest),null,{default:e.withCtx(()=>[Array.isArray(o.timezone)&&o.timezone.length?(e.openBlock(),e.createBlock(e.unref(d.Select),{key:0,value:e.unref(u),"onUpdate:value":n[0]||(n[0]=a=>e.isRef(u)?u.value=a:null),"default-active-first-option":"","dropdown-match-select-width":!1,style:{"max-width":"50%"},disabled:t.disabled},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.timezone,a=>(e.openBlock(),e.createBlock(e.unref(d.SelectOption),{key:a?.value,value:a?.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a?.label??a?.value),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","disabled"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.unref(d.DatePicker),e.mergeProps(P.value,{value:f.value,format:w.value,picker:C.value,"onUpdate:value":T,onChange:b,onOk:S}),e.createSlots({_:2},[e.renderList(t.$slots,(a,c)=>({name:c,fn:e.withCtx(_=>[e.renderSlot(t.$slots,c,e.normalizeProps(e.guardReactiveProps(_||{})))])}))]),1040,["value","format","picker"])]),_:3},8,["style"]))}});exports.default=D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@aplus-frontend/antdv"),T=require("@aplus-frontend/antdv/es/theme/internal"),a=require("lodash-unified"),_=require("../constant.js"),z=require("@ant-design/icons-vue");require("../../config-provider/index.js");const M=require("../context.js"),R=require("@fruits-chain/utils"),j=require("../../utils/slot.js"),A=require("../style/item.js"),D=require("../../config-provider/hooks/use-namespace.js"),L=e.defineComponent({name:"ApFormItem",__name:"index",props:{htmlFor:{},prefixCls:{},label:{},help:{},extra:{},labelCol:{},wrapperCol:{},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:{},prop:{},name:{},rules:{},autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:{},validateTrigger:{},messageVariables:{},hidden:{type:Boolean},noStyle:{type:Boolean},tooltip:{},span:{},order:{},offset:{},push:{},pull:{},xs:{},sm:{},md:{},lg:{},xl:{},xxl:{},flex:{},bordered:{type:Boolean,default:!1},valuePropName:{default:"value"},initialValue:{},_signal:{},transform:{},description:{},customFilled:{},disabled:{type:Boolean}},setup(v,{expose:b}){const o=v,c=e.useSlots(),{model:p,updateModel:y,internalInstance:h}=M.useInjectForm(),{m:u,b:V}=D.useNamespace("ap-form-item"),F=A.default("ap-form-item"),d=e.ref(!1),i=e.ref(),[,g]=T.useToken();e.onMounted(async()=>{let t=a.isFunction(o.initialValue)?o.initialValue():o.initialValue;R.isPromise(t)&&(t=await t),h?.registerField({name:o.name,initialValue:a.cloneDeep(t),transform:o.transform})});const m=e.computed(()=>o.name?a.isArray(o.name)?o.name.reduce((t,r)=>t?.[r],e.unref(p)):p?.value[o.name]:null);function B(t,r){const n=Object.keys(r),l={...r};return n.forEach(s=>{s in t||delete l[s]}),l}function C(){const t=c.default?.()||[];if(!o.name)return t[0];const r=j.getValidVNodeList(t)[0];if(!r)return null;const n=r?.type?.props??{},l={[o.valuePropName]:e.unref(m),[`onUpdate:${o.valuePropName}`]:q,variant:o.bordered?"borderless":r?.props?.variant,bordered:o.bordered?!1:r?.props?.bordered,onFocus:x,onBlur:k};return e.cloneVNode(r,B(n,l))}function q(t){y?.(o.name,t)}function x(){d.value=!0}function k(){d.value=!1}function N(){i.value?.onFieldBlur()}function P(){i.value?.onFieldChange()}function w(){i.value?.clearValidate()}function I(){i.value?.resetField()}function S(t=!1){const r=e.unref(m);if(!t||!o.transform)return r;const n=a.isFunction(o.transform)?o.transform:o.transform.transformer;return o.transform?n(r):r}return b({onFieldBlur:N,onFieldChange:P,clearValidate:w,resetField:I,getFieldValue:S}),(t,r)=>(e.openBlock(),e.createBlock(e.unref(f.Form).Item,e.mergeProps({ref_key:"formItemRef",ref:i},e.unref(a.omit)(o,[...e.unref(_.apFormItemColPropKeys),"tooltip","label","description"]),{class:{[e.unref(u)("bordered")]:t.bordered,[e.unref(u)("focused")]:t.bordered&&d.value,[e.unref(u)("disabled")]:t.bordered&&t.disabled,[e.unref(V)()]:!0,[e.unref(F)]:!0},colon:t.bordered?!1:o.colon}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C())))]),_:2},[o.tooltip?{name:"tooltip",fn:e.withCtx(({class:n})=>[e.createElementVNode("span",{class:e.normalizeClass(n)},[e.createVNode(e.unref(f.Tooltip),{title:o.tooltip},{default:e.withCtx(()=>[e.createVNode(e.unref(z.QuestionCircleOutlined),{style:e.normalizeStyle({color:e.unref(g).colorTextTertiary,fontSize:"14px",transform:"translateY(1px)"})},null,8,["style"])]),_:1},8,["title"])],2)]),key:"0"}:void 0,t.label?{name:"label",fn:e.withCtx(()=>[e.createVNode(e.unref(f.TypographyText),{content:t.label,ellipsis:{tooltip:t.label},style:{"min-width":"0px",flex:"1"}},null,8,["content","ellipsis"])]),key:"1"}:void 0,e.renderList(e.unref(a.omit)(c,"default"),(n,l)=>({name:l,fn:e.withCtx(s=>[e.renderSlot(t.$slots,l,e.normalizeProps(e.guardReactiveProps(s||{})))])}))]),1040,["class","colon"]))}});exports.default=L;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/cssinjs/index.js"),n=e=>{const{componentCls:o}=e;return{[o]:{[`${o}-body-wrapper`]:{"scrollbar-width":"none","-ms-overflow-style":"none","&::-webkit-scrollbar":{display:"none"}}}}},l=t.genComponentStyleHook("ApModal",e=>[n(e)]);exports.default=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),w=require("@aplus-frontend/antdv"),s=require("../../config-provider/config-provider.js"),N=require("lodash-unified"),m=require("@aplus-frontend/utils"),h=require("./util.js"),P=require("../../utils/index.js"),$=require("../style/index.js"),k=o=>{let r,a,d;const c=e=>e?`${s.globalConfigCached.value.namespace}-ap-modal-${e}`:`${s.globalConfigCached.value.namespace}-ap-modal`,{destroyOnClose:l=!0,wrapperOffset:n=!1,wrapperFullHeight:C=!1}=o;function p(){r&&r(!1),setTimeout(()=>{t.render(null,i),i.parentElement?.removeChild(i)},500)}function g(){r&&r(!0)}function u(){r&&r(!1)}function v(e){a&&a(e)}const x=t.defineComponent({data(){return{open:l,props:o}},created(){r=e=>{this.open=e},a=e=>{this.props={...this.props,...e}},d=$.default("ap-modal")},methods:{async handleCancel(){if(this.props?.onCancel){const e=this.props?.content?.component?.exposed??void 0;await this.props?.onCancel(e)}l?p():u()},async handleOk(){try{if(a({confirmLoading:!0}),this.props?.onOk){const e=this.props?.content?.component?.exposed??void 0;await this.props.onOk(e)}a({confirmLoading:!1}),l?p():u()}catch{a({confirmLoading:!1})}},handleFooter(e){return o?.footer!==void 0?typeof o.footer=="function"?o.footer({...e,contentExposed:this.props?.content?.component?.exposed??void 0}):o.footer:e?.originNode}},render(){const e=N.omit(this.props,["onCancel","onOk","open","onUpdate:open","getContainer","icon","footer"]);return t.createVNode(s.ConfigProvider,s.globalConfigCached.value,{default:()=>[t.createVNode(w.Modal,t.mergeProps({class:{[c()]:!0,[c("wrapper")]:n,[d.value]:!0},centered:!0},e,{open:this.open,onCancel:this.handleCancel,onOk:this.handleOk,footer:this?.handleFooter}),{default:()=>[t.createVNode("div",{class:{[c("body-wrapper")]:n,[d.value]:!0},style:{maxHeight:n!==!1?`calc(100vh - ${(n===!0?100:m.isNumeric(n)?Number(n):100)*2}px)`:void 0,height:C===!0?`calc(100vh - ${(n===!0?100:m.isNumeric(n)?Number(n):100)*2}px)`:void 0,overflowY:n!==!1||C===!0?"auto":void 0}},[this.props?.content])]})]})}}),b=h.getContainerDom(s.globalConfigCached?.value?.getPopupContainer),y=h.getContainerDom(o.getContainer),O=b||y||P.getTopWindow().document.body,i=document.createElement("div");O.appendChild(i);const f=t.h(x),q=h.getModalGlobalAppContext();return f.appContext=o.appContext||q||f.appContext,t.render(f,i),{destroy:p,update:v,open:g,close:u}};exports.createModal=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),_=require("../../../ap-modal/index.js");require("../../../ag-grid/index.js");const q=require("../utils.js"),y=require("./use-ag-grid-instance.js"),a=require("lodash-unified");require("../wrapper/index.vue.js");const C=require("../wrapper/index.vue2.js"),P=require("../../../ag-grid/index.vue.js");function w(r){let i=null,s=null;const[n,f]=y.useAgGridInstance(),l=q.genRequest(r.api,r.getRowKey,n.setDataSourceLength),d=t=>{const{title:e,width:u,modalProps:p,...c}=a.isFunction(t)?t(r):t;a.isEmpty(c)||s?.(c);const g=a.omitBy({title:e,width:u,modalProps:p},a.isUndefined);a.isEmpty(g)||i?.update(g)},m=o.defineComponent({name:"AgGridModalPreviewContent",props:{modalConfig:{type:Object,required:!0}},setup(t){const e=o.ref(t.modalConfig);return s=u=>{e.value={...e.value,...u}},()=>o.createVNode(f,null,{default:()=>[o.createVNode(C.default,{height:e.value.height,rowHeight:e.value.rowHeight},{default:()=>[e.value.renderHeader?.(a.omit(n,"setInstance"),{updateProps:d}),o.createVNode(P.default,o.mergeProps({ref:n.setInstance,searchForm:{sortable:!1,resize:{target:"form"}},rowKey:e.value.getRowKey,request:l.request,style:{padding:"0px"},rowHeight:e.value.rowHeight,columns:e.value.columns,autoHeight:!!e.value.height},r.gridProps),e.value.gridSlots)]})]})}});function h(){i=_.ApModal.createModal({title:r.title,width:r.width,destroyOnClose:!0,maskClosable:!1,footer:null,afterOpenChange(t){t===!1&&(n.setInstance(void 0),n.setDataSourceLength(0),i=null)},content:o.createVNode(m,{modalConfig:r},null),...r.modalProps||{}})}function v(t){l.setExtraParams(t?.extraParams),h()}return{open:v,refresh:n.refresh,getAgGridInstance:n.getInstance,updateProps:d}}exports.useAgGridModal=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),I=require("../../../ap-modal/index.js");require("../../../ag-grid/index.js");const u=require("../utils.js"),p=require("./use-ag-grid-instance.js"),r=require("lodash-unified"),O=require("../constants.js"),F=require("./use-modal-title.js"),G=require("@aplus-frontend/antdv");require("../../../config-provider/index.js");require("../modal-layout/index.vue.js");require("../wrapper/index.vue.js");const L=require("../../../config-provider/hooks/use-locale.js"),T=require("../wrapper/index.vue2.js"),j=require("../modal-layout/index.vue2.js"),H=require("../../../ag-grid/index.vue.js");function N(t){let d,m=null,y=null;const g=new u.AsyncCallback,[q,b]=F.useModalTitle(),{t:S}=L.useLocale(),[c,v]=p.useAgGridInstance({onSelectedRows(e){b.setCount(e?.length||0)}}),w=u.genRequest(t.api,t.getRowKey,c.setDataSourceLength),h=e=>{const{title:n,width:l,modalProps:o,...s}=r.isFunction(e)?e(r.cloneDeep(t)):e;r.isEmpty(s)||y?.(s);const a=r.omitBy({title:n,width:l,modalProps:o},r.isUndefined);r.isEmpty(a)||m?.update(a)},f=r.isFunction(t.getRowKey)?t.getRowKey:e=>e[t.getRowKey],x=()=>{const e=t.mergeRule||"old",n=c.getSelectedRows()||[];return{keys:P(n),rows:n.map(s=>{const a=f(s);return e==="old"&&d?.[a]?d[a]:u.delRowKeyField(s)})}},C=async()=>{const e=x(),n=t.maxCount||1/0;return e.keys.length>n?(G.message.warning(S("ap.apTableModal.messageMaxCount",{maxCount:n})),Promise.reject()):(await t.beforeOk?.(e),t.finishCallback?.(e),g.resolve(e),e)},K=()=>{g.reject("modal is closed!")},k=i.defineComponent({name:"AgGridModalSelectContent",props:{modalConfig:{type:Object,required:!0},selectedRows:{type:Array,default:()=>[]}},setup(e){const n=i.ref(e.modalConfig);return y=l=>{n.value={...n.value,...l}},()=>{const l=e.selectedRows?.map(a=>u.addRowKeyField(a,n.value.getRowKey)),o=n.value,s=u.getModalLayoutConfig(o.modalLayout);return i.createVNode(v,null,{default:()=>[i.createVNode(T.default,{height:o.height,rowHeight:o.rowHeight},{default:()=>[t.renderHeader?.(r.omit(c,"setInstance"),{updateProps:h}),i.createVNode(j.default,s.props,{default:()=>[i.createVNode(H.default,i.mergeProps({ref:c.setInstance,searchForm:{sortable:!1,resize:{target:"form"}},rowKey:r.isFunction(o.getRowKey)?O.ROW_KEY:o.getRowKey,request:w.request,style:{padding:"0px"},rowHeight:o.rowHeight,columns:o.columns,rowSelection:{defaultSelectedRows:l,preserveSelectedRowKeys:!0,type:o.mode||"checkbox",fixed:"left",columnWidth:38,disabled(a){return r.isFunction(o.disabledCheckbox)?o.disabledCheckbox(a,r.omit(c,"setInstance")):o.disabledCheckbox??!1},...t.rowSelection},autoHeight:!!n.value.height},t.gridProps),o.gridSlots)],...s.slots})]})]})}}});function R(e){return i.createVNode(k,{modalConfig:t,selectedRows:e},null)}function M(){const e=Object.values(d||{}),n=R(e);m=I.ApModal.createModal({title:i.createVNode(q,{title:t.title,maxCount:t.maxCount||1/0},t.modalTitleSlots),width:t.width,destroyOnClose:!0,maskClosable:!1,onOk:C,onCancel:K,afterOpenChange(l){l===!1&&(c.setInstance(void 0),c.setDataSourceLength(0))},content:n,...t.modalProps||{}})}function P(e){return e?.map(f)||[]}function _(e,n,l=!1){if(d=e?.reduce((o,s)=>{const a=f(s);return o[a]=s,o},{}),w.setExtraParams(n?.extraParams),M(),l)return g.buildPromise()}function A(e,n){return _(e,n,!0)}return i.onUnmounted(()=>{g.reject("component is Unmounted!")}),{open:_,asyncOpen:A,refresh:c.refresh,getAgGridInstance:c.getInstance,genContent:R,validate:C,updateProps:h}}exports.useAgGridSelectModal=N;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StyleValue, VNodeChild } from 'vue';
|
|
1
|
+
import { CSSProperties, StyleValue, VNodeChild } from 'vue';
|
|
2
2
|
import { AgGridColumnType, AgGridExpose, AgGridProps, AgGridRowSelection, AgGridSlots } from '../../ag-grid';
|
|
3
3
|
import { CreateModalFuncProps } from '../../ap-modal';
|
|
4
4
|
import { Recordable } from '../../type';
|
|
@@ -19,6 +19,7 @@ export interface AgGridModalBasicProps<TableRowType = any> {
|
|
|
19
19
|
updateProps: UpdatePropsFn<TableRowType>;
|
|
20
20
|
}) => VNodeChild;
|
|
21
21
|
rowHeight?: number;
|
|
22
|
+
height?: CSSProperties['height'];
|
|
22
23
|
}
|
|
23
24
|
/** 刷新方式 */
|
|
24
25
|
export type RefreshType = 'reset' | 'submit' | 'submitWith';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
rowHeight?: number;
|
|
4
|
+
height?: CSSProperties['height'];
|
|
4
5
|
};
|
|
5
6
|
declare function __VLS_template(): {
|
|
6
7
|
attrs: Partial<{}>;
|
|
@@ -14,6 +15,7 @@ declare function __VLS_template(): {
|
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
17
|
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
height: import("csstype").Property.Height<string | number>;
|
|
17
19
|
rowHeight: number;
|
|
18
20
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
19
21
|
wrapperContainer: HTMLDivElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../constants.js"),h=require("../hooks/use-ag-grid-instance.js"),d=e.defineComponent({__name:"index",props:{rowHeight:{default:32},height:{default:void 0}},setup(s){const c=s,n=e.useTemplateRef("wrapperContainer"),g=h.useAgGridModalInject(),a=e.computed(()=>g?.dataSourceLength?.value||0),l=e.ref(i.SMALL_HEIGHT),u=()=>{const t=n.value?.clientHeight,o=n.value?.querySelector(".ag-body.ag-layout-normal")?.clientHeight;let r=0;!t||!o?r=0:r=t-o,a.value*c.rowHeight>480-r&&(l.value=i.LARGER_HEIGHT)};return e.watch(()=>a.value,()=>{u()}),e.onMounted(()=>{u()}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperContainer",ref:n,style:e.normalizeStyle({minHeight:t.height?"unset":e.unref(i.SMALL_HEIGHT),height:t.height??l.value,display:"flex",flexDirection:"column"})},[e.renderSlot(t.$slots,"default")],4))}});exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(t){this.result="",this.result=t}add(t){return t instanceof s?this.result=`${this.result} + ${t.getResult()}`:this.result=`${this.result} + ${t}`,this.lowPriority=!0,this}sub(t){return
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(t){this.result="",this.result=t}add(t){return t instanceof s?this.result=`${this.result} + ${t.getResult()}`:this.result=`${this.result} + ${t}`,this.lowPriority=!0,this}sub(t){return t instanceof s?this.result=`${this.result} - ${t.getResult()}`:this.result=`${this.result} - ${t}`,this.lowPriority=!0,this}mul(t){return this.lowPriority&&(this.result=`(${this.result})`),t instanceof s?this.result=`${this.result} * ${t.getResult()}`:this.result=`${this.result} * ${t}`,this.lowPriority=!1,this}div(t){return this.lowPriority&&(this.result=`(${this.result})`),t instanceof s?this.result=`${this.result} / ${t.getResult()}`:this.result=`${this.result} / ${t}`,this.lowPriority=!1,this}getResult(){return this.lowPriority?`(${this.result})`:this.result}equal(){return typeof this.lowPriority<"u"?`calc(${this.result})`:this.result}}exports.TokenUtil=s;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.4.
|
|
1
|
+
declare const _default: "7.4.1";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.4.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.4.1";exports.default=e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"@aplus-frontend/hooks": "1.0.7"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@aplus-frontend/antdv": "^1.2.
|
|
46
|
+
"@aplus-frontend/antdv": "^1.2.19",
|
|
47
47
|
"@aplus-frontend/icon": "^1.3.2",
|
|
48
48
|
"@aplus-frontend/oss": "^1.1.2",
|
|
49
49
|
"vue": "^3.5.17",
|
|
50
50
|
"vxe-table": "^4.13.37"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@aplus-frontend/antdv": "^1.2.
|
|
53
|
+
"@aplus-frontend/antdv": "^1.2.19",
|
|
54
54
|
"@aplus-frontend/icon": "^1.3.2",
|
|
55
55
|
"@aplus-frontend/oss": "^1.1.2",
|
|
56
56
|
"@emotion/serialize": "^1.3.3",
|