@aplus-frontend/ui 0.0.27 → 0.0.28

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 (69) hide show
  1. package/es/src/ap-action/group/index.vue.mjs +27 -31
  2. package/es/src/ap-action/item-dropdown/index.vue.mjs +14 -15
  3. package/es/src/ap-action/style/item-dropdown.css +2 -0
  4. package/es/src/ap-form/ap-form-item-group/index.vue.mjs +21 -21
  5. package/es/src/ap-form/ap-form-item.vue.mjs +72 -64
  6. package/es/src/ap-form/ap-form.vue.d.ts +13 -3
  7. package/es/src/ap-form/ap-form.vue2.mjs +91 -70
  8. package/es/src/ap-form/constant.d.ts +1 -0
  9. package/es/src/ap-form/constant.mjs +2 -1
  10. package/es/src/ap-form/context.d.ts +4 -3
  11. package/es/src/ap-form/hooks/use-watch.mjs +20 -16
  12. package/es/src/ap-form/interface.d.ts +35 -4
  13. package/es/src/ap-form/items/checkbox/index.vue.mjs +11 -10
  14. package/es/src/ap-form/items/date/index.vue.mjs +14 -13
  15. package/es/src/ap-form/items/date-range/index.vue.mjs +12 -11
  16. package/es/src/ap-form/items/number/index.vue.mjs +13 -12
  17. package/es/src/ap-form/items/radio/index.vue.mjs +4 -3
  18. package/es/src/ap-form/items/select/index.vue.mjs +3 -2
  19. package/es/src/ap-form/items/switch/index.vue.mjs +9 -8
  20. package/es/src/ap-form/items/text/index.vue2.mjs +15 -14
  21. package/es/src/ap-form/items/text/password.vue.mjs +1 -0
  22. package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
  23. package/es/src/ap-form/modal-form/index.vue.d.ts +1 -1
  24. package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
  25. package/es/src/ap-table/constants.d.ts +132 -0
  26. package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
  27. package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +53 -47
  28. package/es/src/business/expandAlert/interface.d.ts +4 -0
  29. package/es/src/business/index.d.ts +38 -7
  30. package/es/src/business/index.mjs +1 -1
  31. package/es/src/editable-table/form-item.vue.mjs +72 -74
  32. package/es/src/locale/lang/en.mjs +2 -1
  33. package/es/src/locale/lang/zh-cn.mjs +2 -1
  34. package/es/src/theme/ap-action/item-dropdown.css +2 -0
  35. package/lib/src/ap-action/group/index.vue.js +1 -1
  36. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  37. package/lib/src/ap-action/style/item-dropdown.css +2 -0
  38. package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
  39. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  40. package/lib/src/ap-form/ap-form.vue.d.ts +13 -3
  41. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  42. package/lib/src/ap-form/constant.d.ts +1 -0
  43. package/lib/src/ap-form/constant.js +1 -1
  44. package/lib/src/ap-form/context.d.ts +4 -3
  45. package/lib/src/ap-form/hooks/use-watch.js +1 -1
  46. package/lib/src/ap-form/interface.d.ts +35 -4
  47. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  48. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  49. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  50. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  51. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  52. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  53. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  54. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  55. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  56. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  57. package/lib/src/ap-form/modal-form/index.vue.d.ts +1 -1
  58. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  59. package/lib/src/ap-table/constants.d.ts +132 -0
  60. package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +19 -1
  61. package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -1
  62. package/lib/src/business/expandAlert/interface.d.ts +4 -0
  63. package/lib/src/business/index.d.ts +38 -7
  64. package/lib/src/business/index.js +1 -1
  65. package/lib/src/editable-table/form-item.vue.js +1 -1
  66. package/lib/src/locale/lang/en.js +1 -1
  67. package/lib/src/locale/lang/zh-cn.js +1 -1
  68. package/lib/src/theme/ap-action/item-dropdown.css +2 -0
  69. package/package.json +4 -3
@@ -1,8 +1,10 @@
1
- import { defineComponent as R, ref as k, reactive as x, toRaw as M, computed as T, openBlock as w, createBlock as W, unref as y, mergeProps as q, withCtx as z, renderSlot as A } from "vue";
2
- import { Form as E } from "ant-design-vue";
3
- import { useProvideForm as O } from "./context.mjs";
4
- import { isArray as C, omit as P } from "lodash-unified";
5
- const N = /* @__PURE__ */ R({
1
+ import { defineComponent as x, ref as A, reactive as E, nextTick as N, toRaw as m, computed as O, openBlock as w, createBlock as j, unref as y, mergeProps as S, withCtx as W, renderSlot as q } from "vue";
2
+ import { Form as z } from "ant-design-vue";
3
+ import { useProvideForm as D } from "./context.mjs";
4
+ import { isArray as g, cloneDeep as L, omit as P } from "lodash-unified";
5
+ import { INTERNAL_FORM_INSTANCE_MARK as K } from "./constant.mjs";
6
+ import { isDef as $ } from "../utils/index.mjs";
7
+ const Y = /* @__PURE__ */ x({
6
8
  __name: "ap-form",
7
9
  props: {
8
10
  layout: { default: "horizontal" },
@@ -30,93 +32,112 @@ const N = /* @__PURE__ */ R({
30
32
  onValidate: {},
31
33
  initialValues: {}
32
34
  },
33
- setup(B, { expose: _ }) {
34
- const r = B;
35
- function b(e, t) {
36
- var V;
37
- if (C(e)) {
38
- let n = o;
39
- for (let u = 0; u < e.length - 1; u++)
40
- n = n[e[u]];
41
- n[e[e.length - 1]] = t;
35
+ setup(C, { expose: _ }) {
36
+ const a = C;
37
+ function p(e, t, l = !0) {
38
+ var v;
39
+ if (g(e)) {
40
+ let f = o;
41
+ for (let c = 0; c < e.length - 1; c++)
42
+ f = f[e[c]];
43
+ f[e[e.length - 1]] = t;
42
44
  } else
43
45
  o[e] = t;
44
- let l = C(e) ? e[0] : e;
45
- (V = r.onValuesChange) == null || V.call(r, { [l]: o[l] }, o), s();
46
+ let i = g(e) ? e[0] : e;
47
+ l && ((v = a.onValuesChange) == null || v.call(a, { [i]: o[i] }, o)), u();
46
48
  }
47
- const a = k(), o = x(r.initialValues || {});
48
- let i = [];
49
- const d = (e) => {
49
+ const r = A();
50
+ let s = a.initialValues || {};
51
+ const o = E(a.initialValues || {});
52
+ let n = [];
53
+ const V = () => {
54
+ var e;
55
+ (e = r.value) == null || e.resetFields(), N(() => {
56
+ Object.keys(o).forEach((t) => delete o[t]), Object.assign(o, s), u();
57
+ });
58
+ }, R = (e) => {
50
59
  var t;
51
- (t = a.value) == null || t.resetFields(e), s();
52
- }, f = (e) => {
53
- var t;
54
- (t = a.value) == null || t.clearValidate(e);
55
- }, c = (e, t) => {
60
+ (t = r.value) == null || t.clearValidate(e);
61
+ }, B = (e, t) => {
56
62
  var l;
57
- return (l = a.value) == null ? void 0 : l.validateFields(e, t);
58
- }, p = (e) => {
63
+ return (l = r.value) == null ? void 0 : l.validateFields(e, t);
64
+ }, I = (e) => {
59
65
  var t;
60
- return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
61
- }, h = (e, t) => {
66
+ return (t = r.value) == null ? void 0 : t.getFieldsValue(e);
67
+ }, M = (e, t) => {
62
68
  var l;
63
- return (l = a.value) == null ? void 0 : l.validate(e, t);
64
- }, g = (e, t = {}) => {
69
+ return (l = r.value) == null ? void 0 : l.validate(e, t);
70
+ }, T = (e, t = {}) => {
65
71
  var l;
66
- (l = a.value) == null || l.scrollToField(e, t);
67
- }, m = (e) => {
68
- Object.assign(o, e), s();
69
- }, F = (e, t) => {
70
- o[e] = t, s();
72
+ (l = r.value) == null || l.scrollToField(e, t);
73
+ }, b = (e) => {
74
+ Object.assign(o, e), u();
75
+ }, h = (e, t) => {
76
+ o[e] = t, u();
71
77
  };
72
- function v(e) {
73
- return i.push(e), () => {
74
- i = i.filter((t) => t !== e);
78
+ function d(e, t) {
79
+ return t || e(m(o)), n.push(e), () => {
80
+ n = n.filter((l) => l !== e);
81
+ };
82
+ }
83
+ function F({ initialValue: e, name: t }) {
84
+ if ($(e))
85
+ if (p(t, e, !1), g(t)) {
86
+ let l = L(s);
87
+ for (let i = 0; i < t.length - 1; i++)
88
+ l[t[i]] && (l[t[i]] = {});
89
+ l[t[t.length - 1]] = e, s = l;
90
+ } else
91
+ s[t] = e;
92
+ }
93
+ function k(e) {
94
+ if (e !== K) {
95
+ console.warn("getInternalInstance should only used at internal");
96
+ return;
97
+ }
98
+ return {
99
+ registerField: F,
100
+ registerWatch: d
75
101
  };
76
102
  }
77
- function s() {
78
- if (i.length) {
79
- const e = M(o);
80
- i.forEach((t) => {
103
+ function u() {
104
+ if (n.length) {
105
+ const e = m(o);
106
+ n.forEach((t) => {
81
107
  t(e);
82
108
  });
83
109
  }
84
110
  }
85
- return O({
86
- model: T(() => o),
87
- updateModel: b,
88
- formInstance: {
89
- resetFields: d,
90
- clearValidate: f,
91
- validateFields: c,
92
- getFieldsValue: p,
93
- validate: h,
94
- scrollToField: g,
95
- setFieldsValue: m,
96
- setFieldValue: F,
97
- registerWatch: v
111
+ return D({
112
+ model: O(() => o),
113
+ updateModel: p,
114
+ internalInstance: {
115
+ registerWatch: d,
116
+ registerField: F,
117
+ setFieldValue: h
98
118
  }
99
119
  }), _({
100
- resetFields: d,
101
- clearValidate: f,
102
- validateFields: c,
103
- getFieldsValue: p,
104
- validate: h,
105
- scrollToField: g,
106
- setFieldsValue: m,
107
- setFieldValue: F,
108
- registerWatch: v
109
- }), (e, t) => (w(), W(y(E), q({
120
+ resetFields: V,
121
+ clearValidate: R,
122
+ validateFields: B,
123
+ getFieldsValue: I,
124
+ validate: M,
125
+ scrollToField: T,
126
+ setFieldsValue: b,
127
+ setFieldValue: h,
128
+ registerWatch: d,
129
+ getInternalInstance: k
130
+ }), (e, t) => (w(), j(y(z), S({
110
131
  ref_key: "formRef",
111
- ref: a
112
- }, y(P)(r, ["initialValues"]), { model: o }), {
113
- default: z(() => [
114
- A(e.$slots, "default")
132
+ ref: r
133
+ }, y(P)(a, ["initialValues"]), { model: o }), {
134
+ default: W(() => [
135
+ q(e.$slots, "default")
115
136
  ]),
116
137
  _: 3
117
138
  }, 16, ["model"]));
118
139
  }
119
140
  });
120
141
  export {
121
- N as default
142
+ Y as default
122
143
  };
@@ -5,3 +5,4 @@ export declare const apFormItemColPropKeys: Array<keyof ApFormColProps>;
5
5
  * ApFormItem支持的自定义的插槽的名称列表
6
6
  */
7
7
  export declare const apFormItemSlotNames: readonly ["extra", "help", "label"];
8
+ export declare const INTERNAL_FORM_INSTANCE_MARK = "_INTERNAL_FORM_INSTANCE_MARK";
@@ -11,8 +11,9 @@ const e = [
11
11
  "xl",
12
12
  "xs",
13
13
  "xxl"
14
- ], l = ["extra", "help", "label"];
14
+ ], l = ["extra", "help", "label"], o = "_INTERNAL_FORM_INSTANCE_MARK";
15
15
  export {
16
+ o as INTERNAL_FORM_INSTANCE_MARK,
16
17
  e as apFormItemColPropKeys,
17
18
  l as apFormItemSlotNames
18
19
  };
@@ -1,6 +1,6 @@
1
1
  import { NamePath } from 'ant-design-vue/es/form/interface';
2
2
  import { ComputedRef, InjectionKey } from 'vue';
3
- import { ApFormExpose } from './interface';
3
+ import { ApFormInternalInstance } from './interface';
4
4
 
5
5
  type ApFormContextProps<ModelType> = {
6
6
  /**
@@ -11,13 +11,14 @@ type ApFormContextProps<ModelType> = {
11
11
  * 更新数据源的方法
12
12
  * @param name
13
13
  * @param value
14
+ * @param triggerChange 是否触发外部的`onValuesChange`函数
14
15
  * @returns
15
16
  */
16
- updateModel?: (name: NamePath, value: any) => void;
17
+ updateModel?: (name: NamePath, value: any, triggerChange?: boolean) => void;
17
18
  /**
18
19
  * ApForm内部实例
19
20
  */
20
- formInstance?: ApFormExpose;
21
+ internalInstance?: ApFormInternalInstance;
21
22
  };
22
23
  export declare const ApFormContextKey: InjectionKey<ApFormContextProps<any>>;
23
24
  export declare function useProvideForm<ModelType>(state: ApFormContextProps<ModelType>): void;
@@ -1,30 +1,34 @@
1
- import { useInjectForm as l } from "../context.mjs";
2
- import { ref as g, watchEffect as h } from "vue";
1
+ import { useInjectForm as I } from "../context.mjs";
2
+ import { ref as h, watchEffect as N } from "vue";
3
3
  import { isArray as S } from "lodash-unified";
4
- function V(t, r) {
4
+ import { INTERNAL_FORM_INSTANCE_MARK as A } from "../constant.mjs";
5
+ function M(t, r) {
5
6
  return S(r) ? r.reduce((e, n) => e == null ? void 0 : e[n], t) : t == null ? void 0 : t[r];
6
7
  }
7
- function w(t) {
8
+ function R(t) {
8
9
  try {
9
10
  return JSON.stringify(t);
10
11
  } catch {
11
12
  return Math.random();
12
13
  }
13
14
  }
14
- const M = (t, r) => {
15
- const { formInstance: e } = l(), n = g();
16
- let c = "";
17
- return h((s) => {
18
- const u = (r == null ? void 0 : r.value) || e;
19
- if (!u)
15
+ const _ = (t, r) => {
16
+ const { internalInstance: e } = I(), n = h();
17
+ let a = "", c = !0;
18
+ return N((f) => {
19
+ var i;
20
+ const u = ((i = r == null ? void 0 : r.value) == null ? void 0 : i.getInternalInstance(A)) || e;
21
+ if (!u) {
22
+ c = !1;
20
23
  return;
21
- const o = u.registerWatch((f) => {
22
- const a = V(f, t), i = w(a);
23
- i !== c && (n.value = a, c = i);
24
- });
25
- s(o);
24
+ }
25
+ const l = u.registerWatch((g) => {
26
+ const s = M(g, t), o = R(s);
27
+ o !== a && (n.value = s, a = o);
28
+ }, c);
29
+ f(l);
26
30
  }), n;
27
31
  };
28
32
  export {
29
- M as default
33
+ _ as default
30
34
  };
@@ -11,6 +11,10 @@ export type ApFormItemProps = FormItemProps & Partial<ApFormColProps> & {
11
11
  */
12
12
  bordered?: boolean;
13
13
  valuePropName?: string;
14
+ /**
15
+ * 表单项的默认值(只生效一次)
16
+ */
17
+ initialValue?: any;
14
18
  };
15
19
  export type ApFormItemGroupProps = RowProps & {
16
20
  countPerRow?: number;
@@ -27,16 +31,43 @@ export type ApFormProps = Omit<FormProps, 'model'> & {
27
31
  };
28
32
  export type WatchFunc = (values?: Recordable) => void;
29
33
  export type ApFormExpose<ModelType = any> = {
30
- setFieldsValue?: (fields: Partial<ModelType>) => void;
31
- setFieldValue?: (key: keyof ModelType, value: any) => void;
32
- resetFields: (name?: NamePath) => void;
34
+ setFieldsValue: (fields: Partial<ModelType>) => void;
35
+ setFieldValue: (key: keyof ModelType, value: any) => void;
36
+ resetFields: () => void;
33
37
  clearValidate: (name?: NamePath) => void;
34
38
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
35
39
  getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<ModelType> | undefined;
36
40
  validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
37
41
  scrollToField: (name: NamePath, options?: any) => void;
38
- registerWatch: (callback: WatchFunc) => () => void;
42
+ /**
43
+ * 内部使用,请勿在外部通过Form实例调用
44
+ * @param mark 内部使用的标记
45
+ * @returns
46
+ */
47
+ getInternalInstance: (mark: string) => ApFormInternalInstance;
39
48
  };
49
+ /**
50
+ * 被注册的表单项
51
+ */
52
+ export type RegistedFieldType = {
53
+ name: FormItemProps['name'];
54
+ initialValue?: any;
55
+ };
56
+ export type ApFormInternalInstance = {
57
+ /**
58
+ * 注册字段watch
59
+ * @param callback
60
+ * @param inner
61
+ * @returns
62
+ */
63
+ registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
64
+ /**
65
+ * 注册表单项
66
+ * @param field
67
+ * @returns
68
+ */
69
+ registerField: (field: RegistedFieldType) => void;
70
+ } & Pick<ApFormExpose, 'setFieldValue'>;
40
71
  export type ApFormItemExpose = FormItemExpose & {
41
72
  getFieldValue: () => any;
42
73
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as f, useSlots as m, openBlock as u, createBlock as c, normalizeProps as a, guardReactiveProps as t, unref as o, createSlots as b, withCtx as r, createVNode as B, mergeProps as x, renderList as y, renderSlot as _ } from "vue";
1
+ import { defineComponent as f, useSlots as m, openBlock as u, createBlock as c, normalizeProps as a, guardReactiveProps as t, unref as l, createSlots as b, withCtx as r, createVNode as B, mergeProps as x, renderList as y, renderSlot as _ } from "vue";
2
2
  import "../../ap-form-item.vue2.mjs";
3
3
  import "../../../ap-field/index.mjs";
4
4
  import { omit as d } from "lodash-unified";
5
5
  import h from "../../ap-form-item.vue.mjs";
6
6
  import v from "../../../ap-field/checkbox/index.vue.mjs";
7
- const A = /* @__PURE__ */ f({
7
+ const w = /* @__PURE__ */ f({
8
8
  name: "ApFormItemCheckbox",
9
9
  __name: "index",
10
10
  props: {
@@ -43,26 +43,27 @@ const A = /* @__PURE__ */ f({
43
43
  xxl: {},
44
44
  flex: {},
45
45
  valuePropName: {},
46
+ initialValue: {},
46
47
  field: { default: () => ({}) },
47
48
  disabled: { type: Boolean, default: !1 }
48
49
  },
49
- setup(s) {
50
- const i = s, n = m();
51
- return (e, g) => (u(), c(h, a(t(o(d)(i, ["field", "disabled"]))), b({
50
+ setup(i) {
51
+ const s = i, n = m();
52
+ return (e, g) => (u(), c(h, a(t(l(d)(s, ["field", "disabled"]))), b({
52
53
  default: r(() => [
53
- B(o(v), x({ disabled: e.disabled }, e.field), null, 16, ["disabled"])
54
+ B(l(v), x({ disabled: e.disabled }, e.field), null, 16, ["disabled"])
54
55
  ]),
55
56
  _: 2
56
57
  }, [
57
- y(o(d)(n, "default"), (C, l) => ({
58
- name: l,
58
+ y(l(d)(n, "default"), (C, o) => ({
59
+ name: o,
59
60
  fn: r((p) => [
60
- _(e.$slots, l, a(t(p || {})))
61
+ _(e.$slots, o, a(t(p || {})))
61
62
  ])
62
63
  }))
63
64
  ]), 1040));
64
65
  }
65
66
  });
66
67
  export {
67
- A as default
68
+ w as default
68
69
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as h, useSlots as B, computed as y, openBlock as v, createBlock as x, normalizeProps as a, guardReactiveProps as t, unref as r, createSlots as n, withCtx as p, createVNode as g, renderList as i, renderSlot as f } from "vue";
1
+ import { defineComponent as h, useSlots as B, computed as y, openBlock as v, createBlock as x, normalizeProps as r, guardReactiveProps as t, unref as a, createSlots as p, withCtx as i, createVNode as g, renderList as s, renderSlot as f } from "vue";
2
2
  import "../../ap-form-item.vue2.mjs";
3
3
  import "../../../ap-field/date/index.vue2.mjs";
4
4
  import { isUndefined as F, omit as m, pick as S } from "lodash-unified";
5
5
  import { apFormItemSlotNames as u } from "../../constant.mjs";
6
6
  import k from "../../ap-form-item.vue.mjs";
7
7
  import C from "../../../ap-field/date/index.vue.mjs";
8
- const V = /* @__PURE__ */ h({
8
+ const L = /* @__PURE__ */ h({
9
9
  name: "ApFormItemDate",
10
10
  __name: "index",
11
11
  props: {
@@ -45,12 +45,13 @@ const V = /* @__PURE__ */ h({
45
45
  flex: {},
46
46
  bordered: { type: Boolean },
47
47
  valuePropName: {},
48
+ initialValue: {},
48
49
  field: { default: () => ({}) },
49
50
  placeholder: {},
50
51
  disabled: { type: Boolean, default: !1 }
51
52
  },
52
53
  setup(c) {
53
- const e = c, s = B(), b = y(() => {
54
+ const e = c, n = B(), b = y(() => {
54
55
  var o;
55
56
  return {
56
57
  placeholder: e.placeholder,
@@ -59,28 +60,28 @@ const V = /* @__PURE__ */ h({
59
60
  bordered: e.bordered ? !1 : F((o = e.field) == null ? void 0 : o.bordered) ? !0 : e.field.bordered
60
61
  };
61
62
  });
62
- return (o, P) => (v(), x(k, a(t(r(m)(e, ["field", "placeholder", "disabled"]))), n({
63
- default: p(() => [
64
- g(C, a(t(b.value)), n({ _: 2 }, [
65
- i(r(m)(s, r(u)), (_, l) => ({
63
+ return (o, P) => (v(), x(k, r(t(a(m)(e, ["field", "placeholder", "disabled"]))), p({
64
+ default: i(() => [
65
+ g(C, r(t(b.value)), p({ _: 2 }, [
66
+ s(a(m)(n, a(u)), (_, l) => ({
66
67
  name: l,
67
- fn: p((d) => [
68
- f(o.$slots, l, a(t(d || {})))
68
+ fn: i((d) => [
69
+ f(o.$slots, l, r(t(d || {})))
69
70
  ])
70
71
  }))
71
72
  ]), 1040)
72
73
  ]),
73
74
  _: 2
74
75
  }, [
75
- i(r(S)(s, r(u)), (_, l) => ({
76
+ s(a(S)(n, a(u)), (_, l) => ({
76
77
  name: l,
77
- fn: p((d) => [
78
- f(o.$slots, l, a(t(d || {})))
78
+ fn: i((d) => [
79
+ f(o.$slots, l, r(t(d || {})))
79
80
  ])
80
81
  }))
81
82
  ]), 1040));
82
83
  }
83
84
  });
84
85
  export {
85
- V as default
86
+ L as default
86
87
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as B, useSlots as y, computed as g, openBlock as v, createBlock as x, normalizeProps as r, guardReactiveProps as t, unref as o, createSlots as i, withCtx as p, createVNode as F, renderList as f, renderSlot as m } from "vue";
1
+ import { defineComponent as B, useSlots as y, computed as g, openBlock as v, createBlock as x, normalizeProps as r, guardReactiveProps as t, unref as o, createSlots as s, withCtx as i, createVNode as F, renderList as f, renderSlot as m } from "vue";
2
2
  import "../../ap-form-item.vue2.mjs";
3
3
  import "../../../ap-field/index.mjs";
4
4
  import { isUndefined as S, omit as u, pick as k } from "lodash-unified";
5
5
  import { apFormItemSlotNames as c } from "../../constant.mjs";
6
6
  import C from "../../ap-form-item.vue.mjs";
7
7
  import P from "../../../ap-field/date-range/index.vue.mjs";
8
- const L = /* @__PURE__ */ B({
8
+ const I = /* @__PURE__ */ B({
9
9
  name: "ApFormItemDateRange",
10
10
  __name: "index",
11
11
  props: {
@@ -45,12 +45,13 @@ const L = /* @__PURE__ */ B({
45
45
  flex: {},
46
46
  bordered: { type: Boolean },
47
47
  valuePropName: {},
48
+ initialValue: {},
48
49
  field: { default: () => ({}) },
49
50
  placeholder: {},
50
51
  disabled: { type: Boolean, default: !1 }
51
52
  },
52
53
  setup(b) {
53
- const e = b, s = y(), _ = g(() => {
54
+ const e = b, p = y(), _ = g(() => {
54
55
  var l, d;
55
56
  return {
56
57
  placeholder: e.placeholder,
@@ -59,12 +60,12 @@ const L = /* @__PURE__ */ B({
59
60
  bordered: e.bordered ? !1 : S((l = e.field) == null ? void 0 : l.bordered) ? !0 : (d = e.field) == null ? void 0 : d.bordered
60
61
  };
61
62
  });
62
- return (l, d) => (v(), x(C, r(t(o(u)(e, ["field", "placeholder", "disabled"]))), i({
63
- default: p(() => [
64
- F(o(P), r(t(_.value)), i({ _: 2 }, [
65
- f(o(u)(s, o(c)), (h, a) => ({
63
+ return (l, d) => (v(), x(C, r(t(o(u)(e, ["field", "placeholder", "disabled"]))), s({
64
+ default: i(() => [
65
+ F(o(P), r(t(_.value)), s({ _: 2 }, [
66
+ f(o(u)(p, o(c)), (h, a) => ({
66
67
  name: a,
67
- fn: p((n) => [
68
+ fn: i((n) => [
68
69
  m(l.$slots, a, r(t(n || {})))
69
70
  ])
70
71
  }))
@@ -72,9 +73,9 @@ const L = /* @__PURE__ */ B({
72
73
  ]),
73
74
  _: 2
74
75
  }, [
75
- f(o(k)(s, o(c)), (h, a) => ({
76
+ f(o(k)(p, o(c)), (h, a) => ({
76
77
  name: a,
77
- fn: p((n) => [
78
+ fn: i((n) => [
78
79
  m(l.$slots, a, r(t(n || {})))
79
80
  ])
80
81
  }))
@@ -82,5 +83,5 @@ const L = /* @__PURE__ */ B({
82
83
  }
83
84
  });
84
85
  export {
85
- L as default
86
+ I as default
86
87
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as B, useSlots as v, ref as _, openBlock as g, createBlock as x, normalizeProps as t, guardReactiveProps as s, unref as l, createSlots as n, withCtx as p, createVNode as k, mergeProps as N, renderList as i, renderSlot as f } from "vue";
1
+ import { defineComponent as B, useSlots as v, ref as _, openBlock as g, createBlock as x, normalizeProps as t, guardReactiveProps as s, unref as l, createSlots as n, withCtx as p, createVNode as k, mergeProps as N, renderList as i, renderSlot as u } from "vue";
2
2
  import "../../ap-form-item.vue2.mjs";
3
3
  import "../../../ap-field/number/index.vue2.mjs";
4
- import { omit as u, pick as S } from "lodash-unified";
4
+ import { omit as f, pick as S } from "lodash-unified";
5
5
  import { apFormItemSlotNames as m } from "../../constant.mjs";
6
6
  import C from "../../ap-form-item.vue.mjs";
7
7
  import F from "../../../ap-field/number/index.vue.mjs";
@@ -45,33 +45,34 @@ const T = /* @__PURE__ */ B({
45
45
  flex: {},
46
46
  bordered: { type: Boolean },
47
47
  valuePropName: {},
48
+ initialValue: {},
48
49
  field: { default: () => ({}) },
49
50
  placeholder: {},
50
51
  disabled: { type: Boolean, default: !1 }
51
52
  },
52
53
  setup(c, { expose: b }) {
53
- const h = c, d = v(), r = _();
54
+ const h = c, d = v(), a = _();
54
55
  return b({
55
56
  focus: () => {
56
57
  var e;
57
- (e = r.value) == null || e.focus();
58
+ (e = a.value) == null || e.focus();
58
59
  },
59
60
  blur: () => {
60
61
  var e;
61
- (e = r.value) == null || e.blur();
62
+ (e = a.value) == null || e.blur();
62
63
  }
63
- }), (e, R) => (g(), x(C, t(s(l(u)(h, ["field", "placeholder", "disabled"]))), n({
64
+ }), (e, R) => (g(), x(C, t(s(l(f)(h, ["field", "placeholder", "disabled"]))), n({
64
65
  default: p(() => [
65
66
  k(F, N({
66
67
  ref_key: "inputNumberRef",
67
- ref: r,
68
+ ref: a,
68
69
  placeholder: e.placeholder,
69
70
  disabled: e.disabled
70
71
  }, e.field), n({ _: 2 }, [
71
- i(l(u)(d, l(m)), (y, o) => ({
72
+ i(l(f)(d, l(m)), (y, o) => ({
72
73
  name: o,
73
- fn: p((a) => [
74
- f(e.$slots, o, t(s(a || {})))
74
+ fn: p((r) => [
75
+ u(e.$slots, o, t(s(r || {})))
75
76
  ])
76
77
  }))
77
78
  ]), 1040, ["placeholder", "disabled"])
@@ -80,8 +81,8 @@ const T = /* @__PURE__ */ B({
80
81
  }, [
81
82
  i(l(S)(d, l(m)), (y, o) => ({
82
83
  name: o,
83
- fn: p((a) => [
84
- f(e.$slots, o, t(s(a || {})))
84
+ fn: p((r) => [
85
+ u(e.$slots, o, t(s(r || {})))
85
86
  ])
86
87
  }))
87
88
  ]), 1040));
@@ -43,12 +43,13 @@ const q = /* @__PURE__ */ u({
43
43
  xxl: {},
44
44
  flex: {},
45
45
  valuePropName: {},
46
+ initialValue: {},
46
47
  field: { default: () => ({}) },
47
48
  disabled: { type: Boolean, default: !1 }
48
49
  },
49
- setup(d, { expose: i }) {
50
- const n = d, p = m(), o = c();
51
- return i({
50
+ setup(i, { expose: d }) {
51
+ const n = i, p = m(), o = c();
52
+ return d({
52
53
  focus: () => {
53
54
  var e;
54
55
  (e = o.value) == null || e.focus();
@@ -4,7 +4,7 @@ import "../../../ap-field/index.mjs";
4
4
  import { isUndefined as P, omit as c, pick as $ } from "lodash-unified";
5
5
  import { apFormItemSlotNames as b } from "../../constant.mjs";
6
6
  import N from "../../ap-form-item.vue.mjs";
7
- import w from "../../../ap-field/select/index.vue.mjs";
7
+ import V from "../../../ap-field/select/index.vue.mjs";
8
8
  const j = /* @__PURE__ */ x({
9
9
  name: "ApFormItemSelect",
10
10
  __name: "index",
@@ -45,6 +45,7 @@ const j = /* @__PURE__ */ x({
45
45
  flex: {},
46
46
  bordered: { type: Boolean },
47
47
  valuePropName: {},
48
+ initialValue: {},
48
49
  field: { default: () => ({}) },
49
50
  placeholder: {},
50
51
  disabled: { type: Boolean, default: !1 }
@@ -72,7 +73,7 @@ const j = /* @__PURE__ */ x({
72
73
  });
73
74
  return (e, d) => (F(), k(N, t(a(l(c)(o, ["field", "placeholder", "disabled"]))), f({
74
75
  default: n(() => [
75
- C(l(w), t(a(v.value)), f({ _: 2 }, [
76
+ C(l(V), t(a(v.value)), f({ _: 2 }, [
76
77
  u(l(c)(i, l(b)), (B, r) => ({
77
78
  name: r,
78
79
  fn: n((s) => [