@aplus-frontend/ui 0.5.13 → 0.5.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.
Files changed (33) hide show
  1. package/es/src/ap-button/interface.d.ts +1 -1
  2. package/es/src/ap-field/date/constant.d.ts +1 -1
  3. package/es/src/ap-field/date/constant.mjs +14 -2
  4. package/es/src/ap-field/date/index.vue.mjs +59 -58
  5. package/es/src/ap-field/date/interface.d.ts +1 -1
  6. package/es/src/ap-field/date-range/index.vue.mjs +67 -66
  7. package/es/src/ap-field/interface.d.ts +18 -2
  8. package/es/src/ap-field/select/index.vue.d.ts +1 -0
  9. package/es/src/ap-field/select/index.vue.mjs +98 -92
  10. package/es/src/ap-modal/index.mjs +33 -15
  11. package/es/src/ap-modal/utils/confirm.d.ts +17 -0
  12. package/es/src/ap-modal/utils/confirm.mjs +110 -0
  13. package/es/src/ap-modal/utils/createModal.mjs +2 -1
  14. package/es/src/ap-modal/utils/destroyFns.d.ts +2 -0
  15. package/es/src/ap-modal/utils/destroyFns.mjs +4 -0
  16. package/es/src/ap-table/constants.d.ts +3 -0
  17. package/lib/src/ap-button/interface.d.ts +1 -1
  18. package/lib/src/ap-field/date/constant.d.ts +1 -1
  19. package/lib/src/ap-field/date/constant.js +1 -1
  20. package/lib/src/ap-field/date/index.vue.js +1 -1
  21. package/lib/src/ap-field/date/interface.d.ts +1 -1
  22. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  23. package/lib/src/ap-field/interface.d.ts +18 -2
  24. package/lib/src/ap-field/select/index.vue.d.ts +1 -0
  25. package/lib/src/ap-field/select/index.vue.js +1 -1
  26. package/lib/src/ap-modal/index.js +1 -1
  27. package/lib/src/ap-modal/utils/confirm.d.ts +17 -0
  28. package/lib/src/ap-modal/utils/confirm.js +1 -0
  29. package/lib/src/ap-modal/utils/createModal.js +1 -1
  30. package/lib/src/ap-modal/utils/destroyFns.d.ts +2 -0
  31. package/lib/src/ap-modal/utils/destroyFns.js +1 -0
  32. package/lib/src/ap-table/constants.d.ts +3 -0
  33. package/package.json +4 -4
@@ -13,6 +13,6 @@ export type ApButtonSlots = {
13
13
  };
14
14
  export type ApConfirButtonProps = ApButtonProps & {
15
15
  title: ModalFuncProps['title'];
16
- content: ModalFuncProps['content'];
16
+ content?: ModalFuncProps['content'];
17
17
  confirmProps?: ModalFuncProps;
18
18
  };
@@ -1,7 +1,7 @@
1
1
  import { PickerMode } from '@aplus-frontend/antdv/es/vc-picker/interface';
2
2
  import { ApFormatPresetType } from './interface';
3
3
  export declare const ApFieldDatePresetFormats: string[];
4
- export declare const PRESET_FORMAT_MAP: Record<ApFormatPresetType, string>;
4
+ export declare const PRESET_FORMAT_MAP: Record<ApFormatPresetType, string | undefined>;
5
5
  export declare const PRESET_FORMAT_PICK_MAP: Record<ApFormatPresetType, PickerMode>;
6
6
  export declare const PRESET_FORMAT_TIME_MAP: Record<ApFormatPresetType, {
7
7
  showTime: boolean;
@@ -1,31 +1,43 @@
1
1
  const Y = [
2
2
  "Y",
3
+ "Y-Q",
3
4
  "Y-M",
5
+ "Y-W",
4
6
  "Y-D",
5
7
  "Y-h",
6
8
  "Y-m",
7
9
  "Y-s"
8
10
  ], e = {
9
11
  Y: "YYYY",
12
+ "Y-Q": void 0,
10
13
  "Y-M": "YYYY-MM",
14
+ "Y-W": void 0,
11
15
  "Y-D": "YYYY-MM-DD",
12
16
  "Y-h": "YYYY-MM-DD HH",
13
17
  "Y-m": "YYYY-MM-DD HH:mm",
14
18
  "Y-s": "YYYY-MM-DD HH:mm:ss"
15
19
  }, s = {
16
20
  Y: "year",
21
+ "Y-Q": "quarter",
17
22
  "Y-M": "month",
23
+ "Y-W": "week",
18
24
  "Y-D": "date",
19
25
  "Y-h": "date",
20
26
  "Y-m": "date",
21
27
  "Y-s": "date"
22
- }, M = {
28
+ }, o = {
23
29
  Y: {
24
30
  showTime: !1
25
31
  },
32
+ "Y-Q": {
33
+ showTime: !1
34
+ },
26
35
  "Y-M": {
27
36
  showTime: !1
28
37
  },
38
+ "Y-W": {
39
+ showTime: !1
40
+ },
29
41
  "Y-D": {
30
42
  showTime: !1
31
43
  },
@@ -46,5 +58,5 @@ export {
46
58
  Y as ApFieldDatePresetFormats,
47
59
  e as PRESET_FORMAT_MAP,
48
60
  s as PRESET_FORMAT_PICK_MAP,
49
- M as PRESET_FORMAT_TIME_MAP
61
+ o as PRESET_FORMAT_TIME_MAP
50
62
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as x, computed as s, unref as a, createElementBlock as g, createBlock as h, openBlock as m, Fragment as k, createTextVNode as P, toDisplayString as C, normalizeStyle as V, withCtx as f, createCommentVNode as E, createVNode as N, isRef as j, renderList as S, mergeProps as I, createSlots as U, renderSlot as H, normalizeProps as K, guardReactiveProps as $ } from "vue";
2
- import u from "dayjs";
3
- import { InputGroup as G, Select as L, SelectOption as W, DatePicker as Y } from "@aplus-frontend/antdv";
4
- import { ApFieldDatePresetFormats as Z, PRESET_FORMAT_MAP as q, PRESET_FORMAT_PICK_MAP as J, PRESET_FORMAT_TIME_MAP as Q } from "./constant.mjs";
1
+ import { defineComponent as E, computed as u, unref as a, createElementBlock as g, createBlock as h, openBlock as s, Fragment as k, createTextVNode as w, toDisplayString as P, normalizeStyle as N, withCtx as f, createCommentVNode as j, createVNode as I, isRef as U, renderList as C, mergeProps as H, createSlots as K, renderSlot as $, normalizeProps as G, guardReactiveProps as L } from "vue";
2
+ import d from "dayjs";
3
+ import { InputGroup as W, Select as Y, SelectOption as Z, DatePicker as q } from "@aplus-frontend/antdv";
4
+ import { ApFieldDatePresetFormats as J, PRESET_FORMAT_MAP as S, 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 T, omit as X } from "lodash-unified";
7
- import { formatDayWithTimezone as z } from "./helper.mjs";
8
- import { getTimeFormatToZone as ee } from "@aplus-frontend/utils";
9
- import { useDefaultPlaceholder as oe } from "../hooks/use-default-placeholder.mjs";
10
- import { useDateTimezone as te } from "../hooks/use-date-timezone.mjs";
11
- import { useControllableValue as ae } from "../../hooks/useControllableValue.mjs";
12
- const ve = /* @__PURE__ */ x({
6
+ import { isNil as T, omit as z } from "lodash-unified";
7
+ import { formatDayWithTimezone as ee } from "./helper.mjs";
8
+ import { getTimeFormatToZone as oe } from "@aplus-frontend/utils";
9
+ import { useDefaultPlaceholder as te } from "../hooks/use-default-placeholder.mjs";
10
+ import { useDateTimezone as ae } from "../hooks/use-date-timezone.mjs";
11
+ import { useControllableValue as ne } from "../../hooks/useControllableValue.mjs";
12
+ const ye = /* @__PURE__ */ E({
13
13
  name: "ApFieldDate",
14
14
  __name: "index",
15
15
  props: {
@@ -84,27 +84,28 @@ const ve = /* @__PURE__ */ x({
84
84
  onChange: {},
85
85
  onOk: {},
86
86
  format: { default: "Y-D" },
87
+ shownFormat: {},
87
88
  formatBegins: { type: Boolean, default: !0 },
88
89
  timezone: {}
89
90
  },
90
91
  emits: ["update:value"],
91
92
  setup(O, { emit: b }) {
92
- const e = O, w = b, { value: c, updateValue: B } = ae(
93
+ const e = O, F = b, { value: c, updateValue: B } = ne(
93
94
  e,
94
- w
95
- ), A = oe("Date", e), { currentTimezone: d } = te(e), r = s(
96
- () => Z.indexOf(e.format) > -1
97
- ), i = s(
98
- () => r.value ? q[e.format] : e.format
99
- ), v = s(() => {
95
+ F
96
+ ), _ = te("Date", e), { currentTimezone: i } = ae(e), l = u(
97
+ () => J.indexOf(e.format) > -1
98
+ ), A = u(() => e.shownFormat ? e.shownFormat : l.value ? S[e.format] : e.format), m = u(
99
+ () => l.value ? S[e.format] : e.format
100
+ ), v = u(() => {
100
101
  if (T(a(c)))
101
102
  return;
102
- let t = u(a(c));
103
- return e.timezone && (t = u(ee(a(c), d.value))), t;
104
- }), _ = s(() => a(r) ? e.picker ?? J[e.format] : e.picker), R = s(() => {
105
- const t = a(r) ? Q[e.format] : {};
103
+ let t = d(a(c));
104
+ return e.timezone && (t = d(oe(a(c), i.value))), t;
105
+ }), R = u(() => a(l) ? e.picker ?? Q[e.format] : e.picker), M = u(() => {
106
+ const t = a(l) ? X[e.format] : {};
106
107
  return {
107
- ...X(e, [
108
+ ...z(e, [
108
109
  "value",
109
110
  "defaultValue",
110
111
  "onChange",
@@ -113,85 +114,85 @@ const ve = /* @__PURE__ */ x({
113
114
  "onUpdate:value",
114
115
  "mode"
115
116
  ]),
116
- placeholder: a(A),
117
+ placeholder: a(_),
117
118
  ...t
118
119
  };
119
- }), y = (t, n, o = !0) => z(d.value)(t, n, o);
120
- function M(t) {
120
+ }), y = (t, n, o = !0) => ee(i.value)(t, n, o);
121
+ function D(t) {
121
122
  if (T(t)) {
122
123
  B(null);
123
124
  return;
124
125
  }
125
- const n = u(t);
126
+ const n = d(t);
126
127
  B(
127
128
  y(
128
129
  n,
129
- a(r) ? a(i) : void 0,
130
+ a(l) ? a(m) : void 0,
130
131
  e.formatBegins
131
132
  )
132
133
  );
133
134
  }
134
- function D(t, n) {
135
+ function x(t, n) {
135
136
  var p;
136
- const o = u(t), l = t ? y(
137
+ const o = d(t), r = t ? y(
137
138
  o,
138
- a(r) ? a(i) : void 0,
139
+ a(l) ? a(m) : void 0,
139
140
  e.formatBegins
140
141
  ) : null;
141
- (p = e.onChange) == null || p.call(e, l, n);
142
+ (p = e.onChange) == null || p.call(e, r, n);
142
143
  }
143
- function F(t) {
144
- var l;
145
- const n = u(t), o = t ? y(
144
+ function V(t) {
145
+ var r;
146
+ const n = d(t), o = t ? y(
146
147
  n,
147
- a(r) ? a(i) : void 0,
148
+ a(l) ? a(m) : void 0,
148
149
  e.formatBegins
149
150
  ) : null;
150
- (l = e.onOk) == null || l.call(e, o);
151
+ (r = e.onOk) == null || r.call(e, o);
151
152
  }
152
- return (t, n) => t.mode === "read" ? (m(), g(k, { key: 0 }, [
153
- P(C(v.value ? a(u)(v.value).format(i.value) : t.emptyText), 1)
154
- ], 64)) : (m(), h(a(G), {
153
+ return (t, n) => t.mode === "read" ? (s(), g(k, { key: 0 }, [
154
+ w(P(v.value ? a(d)(v.value).format(m.value) : t.emptyText), 1)
155
+ ], 64)) : (s(), h(a(W), {
155
156
  key: 1,
156
157
  compact: "",
157
- style: V({
158
+ style: N({
158
159
  display: Array.isArray(e.timezone) && e.timezone.length ? "flex" : "block"
159
160
  })
160
161
  }, {
161
162
  default: f(() => [
162
- Array.isArray(e.timezone) && e.timezone.length ? (m(), h(a(L), {
163
+ Array.isArray(e.timezone) && e.timezone.length ? (s(), h(a(Y), {
163
164
  key: 0,
164
- value: a(d),
165
- "onUpdate:value": n[0] || (n[0] = (o) => j(d) ? d.value = o : null),
165
+ value: a(i),
166
+ "onUpdate:value": n[0] || (n[0] = (o) => U(i) ? i.value = o : null),
166
167
  "default-active-first-option": "",
167
168
  "dropdown-match-select-width": !1,
168
169
  style: { "max-width": "50%" }
169
170
  }, {
170
171
  default: f(() => [
171
- (m(!0), g(k, null, S(e.timezone, (o) => (m(), h(a(W), {
172
+ (s(!0), g(k, null, C(e.timezone, (o) => (s(), h(a(Z), {
172
173
  key: o == null ? void 0 : o.value,
173
174
  value: o == null ? void 0 : o.value
174
175
  }, {
175
176
  default: f(() => [
176
- P(C((o == null ? void 0 : o.label) ?? (o == null ? void 0 : o.value)), 1)
177
+ w(P((o == null ? void 0 : o.label) ?? (o == null ? void 0 : o.value)), 1)
177
178
  ]),
178
179
  _: 2
179
180
  }, 1032, ["value"]))), 128))
180
181
  ]),
181
182
  _: 1
182
- }, 8, ["value"])) : E("", !0),
183
- N(a(Y), I(R.value, {
183
+ }, 8, ["value"])) : j("", !0),
184
+ I(a(q), H(M.value, {
184
185
  value: v.value,
185
- format: i.value,
186
- picker: _.value,
187
- "onUpdate:value": M,
188
- onChange: D,
189
- onOk: F
190
- }), U({ _: 2 }, [
191
- S(t.$slots, (o, l) => ({
192
- name: l,
186
+ format: A.value,
187
+ picker: R.value,
188
+ "onUpdate:value": D,
189
+ onChange: x,
190
+ onOk: V
191
+ }), K({ _: 2 }, [
192
+ C(t.$slots, (o, r) => ({
193
+ name: r,
193
194
  fn: f((p) => [
194
- H(t.$slots, l, K($(p || {})))
195
+ $(t.$slots, r, G(L(p || {})))
195
196
  ])
196
197
  }))
197
198
  ]), 1040, ["value", "format", "picker"])
@@ -201,5 +202,5 @@ const ve = /* @__PURE__ */ x({
201
202
  }
202
203
  });
203
204
  export {
204
- ve as default
205
+ ye as default
205
206
  };
@@ -1,2 +1,2 @@
1
1
  export type OmitValue<T> = Omit<T, 'value' | 'defaultValue' | 'onChange' | 'mode' | 'format'>;
2
- export type ApFormatPresetType = 'Y' | 'Y-M' | 'Y-D' | 'Y-h' | 'Y-m' | 'Y-s';
2
+ export type ApFormatPresetType = 'Y' | 'Y-Q' | 'Y-M' | 'Y-W' | 'Y-D' | 'Y-h' | 'Y-m' | 'Y-s';
@@ -1,18 +1,18 @@
1
- import { defineComponent as Y, useSlots as Z, computed as y, unref as t, isVNode as q, createVNode as T, Fragment as v, createElementBlock as k, createBlock as C, openBlock as d, createTextVNode as B, toDisplayString as P, resolveDynamicComponent as J, normalizeStyle as Q, withCtx as D, createCommentVNode as X, isRef as z, renderList as R, mergeProps as ee, createSlots as ne, renderSlot as oe, normalizeProps as te, guardReactiveProps as ae } from "vue";
2
- import { ApFieldDatePresetFormats as re, PRESET_FORMAT_MAP as le, PRESET_FORMAT_PICK_MAP as ue, PRESET_FORMAT_TIME_MAP as de } from "../date/constant.mjs";
1
+ import { defineComponent as q, useSlots as J, computed as f, unref as t, isVNode as Q, createVNode as T, Fragment as y, createElementBlock as k, createBlock as C, openBlock as d, createTextVNode as B, toDisplayString as P, resolveDynamicComponent as X, normalizeStyle as z, withCtx as D, createCommentVNode as ee, isRef as ne, renderList as A, mergeProps as oe, createSlots as te, renderSlot as ae, normalizeProps as re, guardReactiveProps as le } from "vue";
2
+ import { ApFieldDatePresetFormats as ue, PRESET_FORMAT_MAP as R, PRESET_FORMAT_PICK_MAP as de, PRESET_FORMAT_TIME_MAP as ie } from "../date/constant.mjs";
3
3
  import "../../hooks/index.mjs";
4
- import { isNil as w, omit as _, isString as h, isFunction as ie } from "lodash-unified";
4
+ import { isNil as F, omit as _, isString as h, isFunction as se } from "lodash-unified";
5
5
  import i from "dayjs";
6
- import { InputGroup as se, Select as fe, SelectOption as pe, DatePicker as me } from "@aplus-frontend/antdv";
7
- import { formatDayWithTimezone as ce } from "../date/helper.mjs";
8
- import { SwapRightOutlined as ye } from "@ant-design/icons-vue";
6
+ import { InputGroup as fe, Select as me, SelectOption as pe, DatePicker as ce } from "@aplus-frontend/antdv";
7
+ import { formatDayWithTimezone as ye } from "../date/helper.mjs";
8
+ import { SwapRightOutlined as he } from "@ant-design/icons-vue";
9
9
  import { omitUndefined as ve } from "../../utils/index.mjs";
10
- import { getTimeFormatToZone as F } from "@aplus-frontend/utils";
11
- import { useDefaultPlaceholder as he } from "../hooks/use-default-placeholder.mjs";
12
- import { useDefaultPresets as ge } from "../hooks/use-default-presets.mjs";
13
- import { useDateTimezone as Se } from "../hooks/use-date-timezone.mjs";
14
- import { useControllableValue as ke } from "../../hooks/useControllableValue.mjs";
15
- const xe = /* @__PURE__ */ Y({
10
+ import { getTimeFormatToZone as N } from "@aplus-frontend/utils";
11
+ import { useDefaultPlaceholder as ge } from "../hooks/use-default-placeholder.mjs";
12
+ import { useDefaultPresets as Se } from "../hooks/use-default-presets.mjs";
13
+ import { useDateTimezone as ke } from "../hooks/use-date-timezone.mjs";
14
+ import { useControllableValue as Ce } from "../../hooks/useControllableValue.mjs";
15
+ const Ee = /* @__PURE__ */ q({
16
16
  __name: "index",
17
17
  props: {
18
18
  mode: {
@@ -147,6 +147,7 @@ const xe = /* @__PURE__ */ Y({
147
147
  format: {
148
148
  default: "Y-D"
149
149
  },
150
+ shownFormat: {},
150
151
  timezone: {},
151
152
  readModeSeparator: {},
152
153
  presets: {
@@ -154,94 +155,94 @@ const xe = /* @__PURE__ */ Y({
154
155
  }
155
156
  },
156
157
  emits: ["update:value"],
157
- setup(N, {
158
- emit: x
158
+ setup(x, {
159
+ emit: E
159
160
  }) {
160
- const n = N, E = x, O = Z(), s = y(() => re.indexOf(n.format) > -1), f = y(() => s.value ? le[n.format] : n.format), {
161
+ const n = x, V = E, O = J(), s = f(() => ue.indexOf(n.format) > -1), v = f(() => s.value ? R[n.format] : n.format), {
161
162
  value: g,
162
- updateValue: M
163
- } = ke(n, E), V = he("DateRange", n), {
163
+ updateValue: w
164
+ } = Ce(n, V), I = f(() => n.shownFormat ? n.shownFormat : s.value ? R[n.format] : n.format), U = ge("DateRange", n), {
164
165
  currentTimezone: u
165
- } = Se(n), {
166
- presets: I,
167
- changeCurrentDate: U
168
- } = ge({
166
+ } = ke(n), {
167
+ presets: j,
168
+ changeCurrentDate: H
169
+ } = Se({
169
170
  ...n,
170
171
  timezone: u
171
- }), p = (e, a, r = !0) => ce(u.value)(e, a, r), S = y(() => {
172
+ }), m = (e, a, r = !0) => ye(u.value)(e, a, r), S = f(() => {
172
173
  var l, o;
173
174
  const e = t(g);
174
- if (w(e) || !(e != null && e.length))
175
+ if (F(e) || !(e != null && e.length))
175
176
  return e;
176
- const a = u.value ? F(t(g)[0], u.value) : (l = t(g)) == null ? void 0 : l[0], r = n.timezone ? F(t(g)[1], u.value) : (o = t(g)) == null ? void 0 : o[1];
177
+ const a = u.value ? N(t(g)[0], u.value) : (l = t(g)) == null ? void 0 : l[0], r = n.timezone ? N(t(g)[1], u.value) : (o = t(g)) == null ? void 0 : o[1];
177
178
  return [i(a), i(r)];
178
- }), j = y(() => t(s) ? n.picker ?? ue[n.format] : n.picker), H = y(() => {
179
- const e = t(s) ? de[n.format] : {};
179
+ }), K = f(() => t(s) ? n.picker ?? de[n.format] : n.picker), $ = f(() => {
180
+ const e = t(s) ? ie[n.format] : {};
180
181
  return {
181
182
  ...ve(_(n, ["value", "onUpdate:value", "onChange", "onOk", "format", "mode", "presets"])),
182
- placeholder: t(V),
183
- presets: t(I),
183
+ placeholder: t(U),
184
+ presets: t(j),
184
185
  ...e
185
186
  };
186
187
  });
187
- function K(e) {
188
+ function G(e) {
188
189
  if (!e) {
189
- M(e);
190
+ w(e);
190
191
  return;
191
192
  }
192
193
  let a = h(e[0]) ? i(e[0]) : e[0], r = h(e[1]) ? i(e[1]) : e[1];
193
- const l = t(s) ? t(f) : void 0;
194
- M([p(a, l), p(r, l, !1)]);
194
+ const l = t(s) ? t(v) : void 0;
195
+ w([m(a, l), m(r, l, !1)]);
195
196
  }
196
- function $(e) {
197
+ function L(e) {
197
198
  var c;
198
- const a = h(e[0]) ? i(e[0]) : e[0], r = h(e[1]) ? i(e[1]) : e[1], l = t(s) ? t(f) : void 0, o = e[0] ? p(a, l) : null, m = e[1] ? p(r, l, !1) : null;
199
- (c = n.onOk) == null || c.call(n, [o, m]);
199
+ const a = h(e[0]) ? i(e[0]) : e[0], r = h(e[1]) ? i(e[1]) : e[1], l = t(s) ? t(v) : void 0, o = e[0] ? m(a, l) : null, p = e[1] ? m(r, l, !1) : null;
200
+ (c = n.onOk) == null || c.call(n, [o, p]);
200
201
  }
201
- function G(e) {
202
+ function W(e) {
202
203
  var a;
203
- e && U(), (a = n.onOpenChange) == null || a.call(n, e);
204
+ e && H(), (a = n.onOpenChange) == null || a.call(n, e);
204
205
  }
205
- function L(e, a) {
206
- var b, A;
207
- if (w(e)) {
208
- (b = n.onChange) == null || b.call(n, e, a);
206
+ function Y(e, a) {
207
+ var M, b;
208
+ if (F(e)) {
209
+ (M = n.onChange) == null || M.call(n, e, a);
209
210
  return;
210
211
  }
211
- const r = h(e[0]) ? i(e[0]) : e[0], l = h(e[1]) ? i(e[1]) : e[1], o = t(s) ? t(f) : void 0, m = e[0] ? p(r, o) : null, c = e[1] ? p(l, o, !1) : null;
212
- (A = n.onChange) == null || A.call(n, [m, c], a);
212
+ const r = h(e[0]) ? i(e[0]) : e[0], l = h(e[1]) ? i(e[1]) : e[1], o = t(s) ? t(v) : void 0, p = e[0] ? m(r, o) : null, c = e[1] ? m(l, o, !1) : null;
213
+ (b = n.onChange) == null || b.call(n, [p, c], a);
213
214
  }
214
- const W = y(() => {
215
+ const Z = f(() => {
215
216
  var r;
216
217
  const e = n.readModeSeparator;
217
218
  if (e)
218
- return q(e) || ie(e) ? n.readModeSeparator : T(v, null, [n.readModeSeparator]);
219
+ return Q(e) || se(e) ? n.readModeSeparator : T(y, null, [n.readModeSeparator]);
219
220
  const a = (r = O.readModeSeparator) == null ? void 0 : r.call(O);
220
- return a ? T(v, null, [a]) : ye;
221
+ return a ? T(y, null, [a]) : he;
221
222
  });
222
223
  return (e, a) => {
223
224
  var r, l;
224
- return e.mode === "read" ? (d(), k(v, {
225
+ return e.mode === "read" ? (d(), k(y, {
225
226
  key: 0
226
- }, [S.value ? (d(), k(v, {
227
+ }, [S.value ? (d(), k(y, {
227
228
  key: 0
228
- }, [B(P((r = S.value[0]) == null ? void 0 : r.format(f.value)) + " ", 1), (d(), C(J(W.value))), B(" " + P((l = S.value[1]) == null ? void 0 : l.format(f.value)), 1)], 64)) : (d(), k(v, {
229
+ }, [B(P((r = S.value[0]) == null ? void 0 : r.format(v.value)) + " ", 1), (d(), C(X(Z.value))), B(" " + P((l = S.value[1]) == null ? void 0 : l.format(v.value)), 1)], 64)) : (d(), k(y, {
229
230
  key: 1
230
- }, [B(P(e.emptyText), 1)], 64))], 64)) : (d(), C(t(se), {
231
+ }, [B(P(e.emptyText), 1)], 64))], 64)) : (d(), C(t(fe), {
231
232
  key: 1,
232
233
  compact: "",
233
- style: Q({
234
+ style: z({
234
235
  display: Array.isArray(n.timezone) && n.timezone.length ? "flex" : "block"
235
236
  })
236
237
  }, {
237
- default: D(() => [Array.isArray(n.timezone) && n.timezone.length ? (d(), C(t(fe), {
238
+ default: D(() => [Array.isArray(n.timezone) && n.timezone.length ? (d(), C(t(me), {
238
239
  key: 0,
239
240
  value: t(u),
240
- "onUpdate:value": a[0] || (a[0] = (o) => z(u) ? u.value = o : null),
241
+ "onUpdate:value": a[0] || (a[0] = (o) => ne(u) ? u.value = o : null),
241
242
  "default-active-first-option": "",
242
243
  "dropdown-match-select-width": !1
243
244
  }, {
244
- default: D(() => [(d(!0), k(v, null, R(n.timezone, (o) => (d(), C(t(pe), {
245
+ default: D(() => [(d(!0), k(y, null, A(n.timezone, (o) => (d(), C(t(pe), {
245
246
  key: o == null ? void 0 : o.value,
246
247
  value: o == null ? void 0 : o.value
247
248
  }, {
@@ -249,19 +250,19 @@ const xe = /* @__PURE__ */ Y({
249
250
  _: 2
250
251
  }, 1032, ["value"]))), 128))]),
251
252
  _: 1
252
- }, 8, ["value"])) : X("", !0), T(t(me).RangePicker, ee(H.value, {
253
+ }, 8, ["value"])) : ee("", !0), T(t(ce).RangePicker, oe($.value, {
253
254
  value: S.value,
254
- picker: j.value,
255
- format: f.value,
256
- "onUpdate:value": K,
257
- onChange: L,
258
- onOk: $,
259
- onOpenChange: G
260
- }), ne({
255
+ picker: K.value,
256
+ format: I.value,
257
+ "onUpdate:value": G,
258
+ onChange: Y,
259
+ onOk: L,
260
+ onOpenChange: W
261
+ }), te({
261
262
  _: 2
262
- }, [R(t(_)(e.$slots, "readModeSeparator"), (o, m) => ({
263
- name: m,
264
- fn: D((c) => [oe(e.$slots, m, te(ae(c || {})))])
263
+ }, [A(t(_)(e.$slots, "readModeSeparator"), (o, p) => ({
264
+ name: p,
265
+ fn: D((c) => [ae(e.$slots, p, re(le(c || {})))])
265
266
  }))]), 1040, ["value", "picker", "format"])]),
266
267
  _: 3
267
268
  }, 8, ["style"]));
@@ -269,5 +270,5 @@ const xe = /* @__PURE__ */ Y({
269
270
  }
270
271
  });
271
272
  export {
272
- xe as default
273
+ Ee as default
273
274
  };
@@ -3,7 +3,7 @@ import { InputFocusOptions } from '@aplus-frontend/antdv/es/vc-input/utils/commo
3
3
  import { ApFormatPresetType } from './date/interface';
4
4
  import { RangeValue } from '@aplus-frontend/antdv/es/vc-picker/interface';
5
5
  import { RangePickerProps } from '@aplus-frontend/antdv/es/date-picker/dayjs';
6
- import { LiteralUnion } from '../type';
6
+ import { LiteralUnion, Recordable } from '../type';
7
7
  import { InputPasswordProps } from './text/input-password-props';
8
8
  import { ZoneAlias } from '@aplus-frontend/utils';
9
9
  export type FieldMode = 'read' | 'edit';
@@ -41,6 +41,10 @@ export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' |
41
41
  onChange?: (ts: number | null, dayStr: string) => void;
42
42
  onOk?: (ts: number | null) => void;
43
43
  format?: LiteralUnion<ApFormatPresetType, string>;
44
+ /**
45
+ * 只用于显示的自定义格式化
46
+ */
47
+ shownFormat?: DatePickerProps['format'];
44
48
  /**
45
49
  * 格式化时间时是否以`format`的开始
46
50
  * @default true
@@ -99,6 +103,10 @@ export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'va
99
103
  onChange?: (ts: RangeValue<number> | null, dayStr: [string, string]) => void;
100
104
  onOk?: (ts: RangeValue<number>) => void;
101
105
  format?: LiteralUnion<ApFormatPresetType, string>;
106
+ /**
107
+ * 只用于显示的format
108
+ */
109
+ shownFormat?: RangePickerProps['format'];
102
110
  /**
103
111
  * 指定时区,指定后value会变为特定时区下的timestamp
104
112
  */
@@ -114,7 +122,7 @@ export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'va
114
122
  };
115
123
  export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'value' | 'onUpdate:value' | 'onSearch'>> & {
116
124
  emptyText?: string;
117
- request?: (value?: string) => Promise<SelectProps['options']>;
125
+ request?: (value?: string, extraParams?: Recordable) => Promise<SelectProps['options']>;
118
126
  multiple?: boolean;
119
127
  value?: SelectProps['value'];
120
128
  'onUpdate:value'?: SelectProps['onUpdate:value'];
@@ -134,6 +142,14 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
134
142
  * 添加一个名为全部的节点(只在多选的情况下有效)
135
143
  */
136
144
  addAll?: boolean | number;
145
+ /**
146
+ * 发起request额外的请求,变更后会自动重新发器请求
147
+ */
148
+ params?: Recordable;
149
+ /**
150
+ * 发起搜索的时间间隔默认300ms
151
+ */
152
+ searchDelay?: number;
137
153
  };
138
154
  export type ApFieldSelectExpose = {
139
155
  focus: () => void;
@@ -464,6 +464,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
464
464
  emptyText: string;
465
465
  searchMode: "filter" | "request";
466
466
  refetchOnFocus: boolean;
467
+ searchDelay: number;
467
468
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
468
469
  selectRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
469
470
  value: {