@aplus-frontend/ui 7.14.5 → 7.15.0

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 (75) hide show
  1. package/es/src/ap-field/checkbox/index.vue.d.ts +1 -1
  2. package/es/src/ap-field/date/index.vue.d.ts +1086 -6
  3. package/es/src/ap-field/date/index.vue.mjs +63 -57
  4. package/es/src/ap-field/date-range/index.vue.d.ts +1155 -4
  5. package/es/src/ap-field/date-range/index.vue.mjs +70 -63
  6. package/es/src/ap-field/interface.d.ts +25 -29
  7. package/es/src/ap-field/number/index.vue.d.ts +1 -1
  8. package/es/src/ap-field/radio/index.vue.d.ts +1 -1
  9. package/es/src/ap-field/rate/index.vue.d.ts +1 -1
  10. package/es/src/ap-field/second/index.vue.d.ts +1 -1
  11. package/es/src/ap-field/select/index.vue.d.ts +3 -2
  12. package/es/src/ap-field/select/index.vue.mjs +116 -104
  13. package/es/src/ap-field/select/read.vue2.mjs +4 -3
  14. package/es/src/ap-field/slider/index.vue.d.ts +1 -1
  15. package/es/src/ap-field/switch/index.vue.d.ts +232 -4
  16. package/es/src/ap-field/switch/index.vue.mjs +48 -42
  17. package/es/src/ap-field/text/password.vue.d.ts +1 -1
  18. package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
  19. package/es/src/ap-form/item-group/index.vue.d.ts +2 -4
  20. package/es/src/ap-form/item-group/index.vue.mjs +37 -42
  21. package/es/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
  22. package/es/src/ap-form/items/checkbox/index.vue.mjs +20 -14
  23. package/es/src/ap-form/items/date/index.vue.d.ts +1497 -5
  24. package/es/src/ap-form/items/date/index.vue.mjs +25 -19
  25. package/es/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
  26. package/es/src/ap-form/items/date-range/index.vue.mjs +25 -19
  27. package/es/src/ap-form/items/number/index.vue.d.ts +4 -4
  28. package/es/src/ap-form/items/radio/index.vue.d.ts +5 -5
  29. package/es/src/ap-form/items/radio/index.vue.mjs +2 -3
  30. package/es/src/ap-form/items/select/index.vue.d.ts +18 -12
  31. package/es/src/ap-form/items/switch/index.vue.d.ts +436 -5
  32. package/es/src/ap-form/items/switch/index.vue.mjs +24 -17
  33. package/es/src/ap-form/items/text/password.vue.d.ts +5 -5
  34. package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  35. package/es/src/ap-table/constants.d.ts +1923 -107
  36. package/es/src/version.d.ts +1 -1
  37. package/es/src/version.mjs +1 -1
  38. package/lib/src/ap-field/checkbox/index.vue.d.ts +1 -1
  39. package/lib/src/ap-field/date/index.vue.d.ts +1086 -6
  40. package/lib/src/ap-field/date/index.vue.js +1 -1
  41. package/lib/src/ap-field/date-range/index.vue.d.ts +1155 -4
  42. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  43. package/lib/src/ap-field/interface.d.ts +25 -29
  44. package/lib/src/ap-field/number/index.vue.d.ts +1 -1
  45. package/lib/src/ap-field/radio/index.vue.d.ts +1 -1
  46. package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
  47. package/lib/src/ap-field/second/index.vue.d.ts +1 -1
  48. package/lib/src/ap-field/select/index.vue.d.ts +3 -2
  49. package/lib/src/ap-field/select/index.vue.js +1 -1
  50. package/lib/src/ap-field/select/read.vue2.js +1 -1
  51. package/lib/src/ap-field/slider/index.vue.d.ts +1 -1
  52. package/lib/src/ap-field/switch/index.vue.d.ts +232 -4
  53. package/lib/src/ap-field/switch/index.vue.js +1 -1
  54. package/lib/src/ap-field/text/password.vue.d.ts +1 -1
  55. package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
  56. package/lib/src/ap-form/item-group/index.vue.d.ts +2 -4
  57. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  58. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
  59. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  60. package/lib/src/ap-form/items/date/index.vue.d.ts +1497 -5
  61. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  62. package/lib/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
  63. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  64. package/lib/src/ap-form/items/number/index.vue.d.ts +4 -4
  65. package/lib/src/ap-form/items/radio/index.vue.d.ts +5 -5
  66. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  67. package/lib/src/ap-form/items/select/index.vue.d.ts +18 -12
  68. package/lib/src/ap-form/items/switch/index.vue.d.ts +436 -5
  69. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  70. package/lib/src/ap-form/items/text/password.vue.d.ts +5 -5
  71. package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  72. package/lib/src/ap-table/constants.d.ts +1923 -107
  73. package/lib/src/version.d.ts +1 -1
  74. package/lib/src/version.js +1 -1
  75. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { defineComponent as U, useSlots as x, ref as z, unref as o, computed as g, createVNode as u, Fragment as s, createBlock as h, createElementBlock as D, openBlock as f, resolveDynamicComponent as E, mergeProps as p, createSlots as v, renderList as V, withCtx as k, renderSlot as B, normalizeProps as b, guardReactiveProps as w } from "vue";
2
- import { Switch as A, Popconfirm as K } from "@aplus-frontend/antdv";
3
- import { isNil as L, isFunction as M, omit as P } from "lodash-unified";
1
+ import { defineComponent as z, useSlots as D, ref as v, unref as o, computed as V, createVNode as a, Fragment as s, createBlock as p, createElementBlock as E, openBlock as f, resolveDynamicComponent as K, mergeProps as k, createSlots as b, renderList as w, withCtx as C, renderSlot as B, normalizeProps as A, guardReactiveProps as P } from "vue";
2
+ import { Switch as _, Popconfirm as L } from "@aplus-frontend/antdv";
3
+ import { isNil as M, isFunction as j, omit as S } from "lodash-unified";
4
4
  import "../../utils/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import { useControllableValue as R } from "../../hooks/useControllableValue.mjs";
7
- import { isDef as d } from "../../utils/is.mjs";
8
- const Q = /* @__PURE__ */ U({
6
+ import { useControllableValue as q } from "../../hooks/useControllableValue.mjs";
7
+ import { isDef as r } from "../../utils/is.mjs";
8
+ const X = /* @__PURE__ */ z({
9
9
  name: "ApFieldSwitch",
10
10
  __name: "index",
11
11
  props: {
@@ -51,76 +51,82 @@ const Q = /* @__PURE__ */ U({
51
51
  confirm: {}
52
52
  },
53
53
  emits: ["update:checked"],
54
- setup(S, {
55
- emit: _
54
+ setup(F, {
55
+ expose: N,
56
+ emit: T
56
57
  }) {
57
- const i = x(), e = S, F = _, {
58
+ const d = D(), e = F, $ = T, h = v(), {
58
59
  value: t,
59
- updateValue: r
60
- } = R(e, F, {
60
+ updateValue: i
61
+ } = q(e, $, {
61
62
  valuePropName: "checked"
62
- }), c = z(!1);
63
- async function C(n, a) {
64
- if (!d(e.confirm)) {
65
- if (!d(e.onAction)) {
66
- r(n);
63
+ }), c = v(!1);
64
+ async function y(n, u) {
65
+ if (!r(e.confirm)) {
66
+ if (!r(e.onAction)) {
67
+ i(n);
67
68
  return;
68
69
  }
69
70
  c.value = !0;
70
71
  try {
71
- await e.onAction(n, a) && r(n);
72
+ await e.onAction(n, u) && i(n);
72
73
  } finally {
73
74
  c.value = !1;
74
75
  }
75
76
  }
76
77
  }
77
- async function N() {
78
+ async function x() {
78
79
  const n = o(t) === e.checkedValue ? e.unCheckedValue : e.checkedValue;
79
- if (!d(e.onAction)) {
80
- r(n);
80
+ if (!r(e.onAction)) {
81
+ i(n);
81
82
  return;
82
83
  }
83
- await e.onAction(n) && r(n);
84
+ await e.onAction(n) && i(n);
84
85
  }
85
- const T = g(() => {
86
+ const R = V(() => {
86
87
  const n = o(t);
87
- return L(n) ? u(s, null, [e.emptyText]) : n === e.checkedValue ? u(s, null, [e.checkedChildren || i.checkedChildren?.() || `${e.checkedValue}`]) : u(s, null, [e.unCheckedChildren || i.unCheckedChildren?.() || `${e.unCheckedValue}`]);
88
- }), $ = g(() => d(e.confirm) ? M(e.confirm) ? e.confirm(o(t)) : e.confirm : {});
89
- return (n, a) => n.mode === "read" ? (f(), h(E(T.value), {
88
+ return M(n) ? a(s, null, [e.emptyText]) : n === e.checkedValue ? a(s, null, [e.checkedChildren || d.checkedChildren?.() || `${e.checkedValue}`]) : a(s, null, [e.unCheckedChildren || d.unCheckedChildren?.() || `${e.unCheckedValue}`]);
89
+ }), U = V(() => r(e.confirm) ? j(e.confirm) ? e.confirm(o(t)) : e.confirm : {});
90
+ return N({
91
+ focus: () => h.value?.focus(),
92
+ blur: () => h.value?.blur()
93
+ }), (n, u) => n.mode === "read" ? (f(), p(K(R.value), {
90
94
  key: 0
91
- })) : (f(), D(s, {
95
+ })) : (f(), E(s, {
92
96
  key: 1
93
- }, [!o(d)(n.confirm) || n.disabled ? (f(), h(o(A), p({
94
- key: 0
95
- }, o(P)(e, ["onUpdate:checked", "emptyText"]), {
97
+ }, [!o(r)(n.confirm) || n.disabled ? (f(), p(o(_), k({
98
+ key: 0,
99
+ ref_key: "switchRef",
100
+ ref: h
101
+ }, o(S)(e, ["onUpdate:checked", "emptyText"]), {
96
102
  checked: o(t),
97
103
  loading: n.loading ?? c.value,
98
- onClick: C
99
- }), v({
104
+ onClick: y
105
+ }), b({
100
106
  _: 2
101
- }, [V(i, (y, l) => ({
107
+ }, [w(d, (g, l) => ({
102
108
  name: l,
103
- fn: k((m) => [B(n.$slots, l, b(w(m || {})))])
104
- }))]), 1040, ["checked", "loading"])) : (f(), h(o(K), p({
109
+ fn: C((m) => [B(n.$slots, l, A(P(m || {})))])
110
+ }))]), 1040, ["checked", "loading"])) : (f(), p(o(L), k({
105
111
  key: 1,
106
112
  disabled: c.value
107
- }, $.value, {
108
- onConfirm: N
113
+ }, U.value, {
114
+ onConfirm: x
109
115
  }), {
110
- default: k(() => [u(o(A), p(o(P)(e, ["onUpdate:checked", "emptyText"]), {
116
+ default: C(() => [a(o(_), k(o(S)(e, ["onUpdate:checked", "emptyText"]), {
111
117
  checked: o(t),
112
118
  loading: n.loading ?? c.value,
113
- onClick: C
114
- }), v({
119
+ onClick: y
120
+ }), b({
115
121
  _: 2
116
- }, [V(i, (y, l) => ({
122
+ }, [w(d, (g, l) => ({
117
123
  name: l,
118
- fn: k((m) => [B(n.$slots, l, b(w(m || {})))])
124
+ fn: C((m) => [B(n.$slots, l, A(P(m || {})))])
119
125
  }))]), 1040, ["checked", "loading"])]),
120
126
  _: 3
121
127
  }, 16, ["disabled"]))], 64));
122
128
  }
123
129
  });
124
130
  export {
125
- Q as default
131
+ X as default
126
132
  };
@@ -17,8 +17,8 @@ declare function __VLS_template(): {
17
17
  };
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: DefineComponent<ApFieldTextPasswordProps, {
20
- focus: () => void;
21
20
  blur: () => void;
21
+ focus: () => void;
22
22
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
23
23
  "update:value": (...args: any[]) => void;
24
24
  "update:visible": (...args: any[]) => void;
@@ -9,8 +9,8 @@ import { ShowCountProps } from '@aplus-frontend/antdv/es/vc-input/inputProps';
9
9
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
10
10
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
11
11
  declare const _default: DefineComponent<ApFieldTextAreaProps, {
12
- focus: (options?: InputFocusOptions) => void;
13
12
  blur: () => void;
13
+ focus: (options?: InputFocusOptions) => void;
14
14
  resizableTextArea: any;
15
15
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
16
  "update:value": (...args: any[]) => void;
@@ -4,10 +4,8 @@ import { Breakpoint } from '@aplus-frontend/antdv/es/_util/responsiveObserve';
4
4
  import { Gutter } from '@aplus-frontend/antdv/es/grid/Row';
5
5
  declare function __VLS_template(): {
6
6
  attrs: Partial<{}>;
7
- slots: Readonly<{
8
- default(): any[];
9
- }> & {
10
- default(): any[];
7
+ slots: {
8
+ default?(_: {}): any;
11
9
  };
12
10
  refs: {};
13
11
  rootEl: any;
@@ -1,17 +1,19 @@
1
- import { isVNode as C, defineComponent as P, useSlots as k, ref as w, onBeforeUpdate as S, watch as B, unref as r, createVNode as N, mergeProps as d, createBlock as f, openBlock as s, withCtx as R, createElementBlock as b, Fragment as x, renderList as j, resolveDynamicComponent as v } from "vue";
2
- import { Col as F, Row as I } from "@aplus-frontend/antdv";
3
- import { pick as D, isBoolean as O, omit as V } from "lodash-unified";
1
+ import { isVNode as _, defineComponent as P, unref as o, createVNode as s, mergeProps as a, createBlock as y, openBlock as S, withCtx as c, renderSlot as h } from "vue";
2
+ import { Col as w, Row as C } from "@aplus-frontend/antdv";
3
+ import { pick as R, isBoolean as b, omit as N } from "lodash-unified";
4
+ import "../../render/index.mjs";
4
5
  import "../../config-provider/index.mjs";
5
6
  import "../../utils/index.mjs";
6
- import { apFormItemColPropKeys as $ } from "../constant.mjs";
7
- import A from "../style/item-group.mjs";
8
- import { genRealChildren as E, buildColSpan as G, getStringName as H } from "./helper.mjs";
9
- import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { isDef as L } from "../../utils/is.mjs";
11
- function U(o) {
12
- return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !C(o);
7
+ import { apFormItemColPropKeys as j } from "../constant.mjs";
8
+ import k from "../style/item-group.mjs";
9
+ import { buildColSpan as x, getStringName as B } from "./helper.mjs";
10
+ import { useNamespace as I } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { isDef as $ } from "../../utils/is.mjs";
12
+ import F from "../../render/render.mjs";
13
+ function O(e) {
14
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !_(e);
13
15
  }
14
- const ee = /* @__PURE__ */ P({
16
+ const M = /* @__PURE__ */ P({
15
17
  name: "ApFormItemGroup",
16
18
  __name: "index",
17
19
  props: {
@@ -29,41 +31,34 @@ const ee = /* @__PURE__ */ P({
29
31
  default: 3
30
32
  }
31
33
  },
32
- setup(o) {
33
- const a = o, m = k(), {
34
- b: i
35
- } = K("ap-form-item-group"), g = A("ap-form-item-group"), p = w([]);
36
- S(() => {
37
- p.value = c(m.default());
38
- }), B(() => m.default(), (n) => {
39
- p.value = c(n);
40
- }, {
41
- immediate: !0
42
- });
43
- function c(n) {
44
- const l = E(n || []);
45
- return r(l).map((e, y) => {
46
- const t = e.props, u = D(t, $), _ = u?.span ? {} : G(a.countPerRow), h = O(t.hidden) ? !!t.hidden : L(t.hidden);
47
- return {
48
- key: `${y}-${H(t.name)}`,
49
- node: N(F, d(_, u, {
50
- class: h ? i("col-hidden") : ""
51
- }), U(e) ? e : {
52
- default: () => [e]
53
- })
54
- };
34
+ setup(e) {
35
+ const p = e, {
36
+ b: m
37
+ } = I("ap-form-item-group"), f = k("ap-form-item-group");
38
+ function u(n) {
39
+ return o(n).map((t, d) => {
40
+ const r = t.props, i = R(r, j), l = i?.span ? {} : x(p.countPerRow), g = b(r.hidden) ? !!r.hidden : $(r.hidden);
41
+ return s(w, a(l, i, {
42
+ key: `${d}-${B(r.name)}`,
43
+ class: g ? m("col-hidden") : ""
44
+ }), O(t) ? t : {
45
+ default: () => [t]
46
+ });
55
47
  });
56
48
  }
57
- return (n, l) => (s(), f(r(I), d({
58
- class: [r(i)(), r(g)]
59
- }, r(V)(a, ["countPerRow"])), {
60
- default: R(() => [(s(!0), b(x, null, j(p.value, (e) => (s(), f(v(e.node), {
61
- key: e.key
62
- }))), 128))]),
63
- _: 1
49
+ return (n, t) => (S(), y(o(C), a({
50
+ class: [o(m)(), o(f)]
51
+ }, o(N)(p, ["countPerRow"])), {
52
+ default: c(() => [s(o(F), {
53
+ renderer: u
54
+ }, {
55
+ default: c(() => [h(n.$slots, "default")]),
56
+ _: 3
57
+ })]),
58
+ _: 3
64
59
  }, 16, ["class"]));
65
60
  }
66
61
  });
67
62
  export {
68
- ee as default
63
+ M as default
69
64
  };
@@ -1,16 +1,48 @@
1
1
  import { ApFormItemSlots } from '../../interface';
2
2
  import { ApFormItemCheckboxProps } from '../interface';
3
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
- import { ApFieldCheckboxProps } from '../../..';
3
+ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
4
+ import { ApFieldCheckboxProps, FieldMode } from '../../..';
5
+ import { CheckboxOptionType } from '@aplus-frontend/antdv';
5
6
  type ApFormItemCheckboxSlots = Omit<ApFormItemSlots, 'default'>;
6
7
  declare function __VLS_template(): {
7
8
  attrs: Partial<{}>;
8
9
  slots: Readonly<ApFormItemCheckboxSlots> & ApFormItemCheckboxSlots;
9
- refs: {};
10
+ refs: {
11
+ checkboxRef: CreateComponentPublicInstanceWithMixins<Readonly< ApFieldCheckboxProps> & Readonly<{
12
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
13
+ }>, {
14
+ request: () => void;
15
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
+ "update:value": (...args: any[]) => void;
17
+ }, PublicProps, {
18
+ mode: FieldMode;
19
+ disabled: boolean;
20
+ options: (string | number | CheckboxOptionType)[];
21
+ emptyText: string;
22
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
23
+ P: {};
24
+ B: {};
25
+ D: {};
26
+ C: {};
27
+ M: {};
28
+ Defaults: {};
29
+ }, Readonly< ApFieldCheckboxProps> & Readonly<{
30
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
31
+ }>, {
32
+ request: () => void;
33
+ }, {}, {}, {}, {
34
+ mode: FieldMode;
35
+ disabled: boolean;
36
+ options: (string | number | CheckboxOptionType)[];
37
+ emptyText: string;
38
+ }> | null;
39
+ };
10
40
  rootEl: any;
11
41
  };
12
42
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
- declare const __VLS_component: DefineComponent<ApFormItemCheckboxProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormItemCheckboxProps> & Readonly<{}>, {
43
+ declare const __VLS_component: DefineComponent<ApFormItemCheckboxProps, {
44
+ request: () => void | undefined;
45
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormItemCheckboxProps> & Readonly<{}>, {
14
46
  disabled: boolean;
15
47
  required: boolean;
16
48
  colon: boolean;
@@ -18,7 +50,36 @@ declare const __VLS_component: DefineComponent<ApFormItemCheckboxProps, {}, {},
18
50
  autoLink: boolean;
19
51
  validateFirst: boolean;
20
52
  field: Omit< ApFieldCheckboxProps, "value" | "onUpdate:value">;
21
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
53
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
54
+ checkboxRef: CreateComponentPublicInstanceWithMixins<Readonly< ApFieldCheckboxProps> & Readonly<{
55
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
56
+ }>, {
57
+ request: () => void;
58
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
59
+ "update:value": (...args: any[]) => void;
60
+ }, PublicProps, {
61
+ mode: FieldMode;
62
+ disabled: boolean;
63
+ options: (string | number | CheckboxOptionType)[];
64
+ emptyText: string;
65
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
66
+ P: {};
67
+ B: {};
68
+ D: {};
69
+ C: {};
70
+ M: {};
71
+ Defaults: {};
72
+ }, Readonly< ApFieldCheckboxProps> & Readonly<{
73
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
74
+ }>, {
75
+ request: () => void;
76
+ }, {}, {}, {}, {
77
+ mode: FieldMode;
78
+ disabled: boolean;
79
+ options: (string | number | CheckboxOptionType)[];
80
+ emptyText: string;
81
+ }> | null;
82
+ }, any>;
22
83
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
84
  export default _default;
24
85
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,10 +1,10 @@
1
- import { defineComponent as u, useSlots as f, createBlock as m, openBlock as c, normalizeProps as a, guardReactiveProps as t, unref as o, createSlots as B, withCtx as r, createVNode as b, mergeProps as y, renderList as _, renderSlot as v } from "vue";
1
+ import { defineComponent as m, ref as c, useSlots as b, createBlock as x, openBlock as y, normalizeProps as a, guardReactiveProps as r, unref as o, createSlots as B, withCtx as s, createVNode as _, mergeProps as h, renderList as v, renderSlot as g } from "vue";
2
2
  import { omit as i } from "lodash-unified";
3
3
  import "../../../ap-field/index.mjs";
4
4
  import "../../item/index.vue2.mjs";
5
- import x from "../../item/index.vue.mjs";
6
- import g from "../../../ap-field/checkbox/index.vue.mjs";
7
- const w = /* @__PURE__ */ u({
5
+ import k from "../../item/index.vue.mjs";
6
+ import C from "../../../ap-field/checkbox/index.vue.mjs";
7
+ const A = /* @__PURE__ */ m({
8
8
  name: "ApFormItemCheckbox",
9
9
  __name: "index",
10
10
  props: {
@@ -52,23 +52,29 @@ const w = /* @__PURE__ */ u({
52
52
  autoFocus: { type: Boolean },
53
53
  field: { default: () => ({}) }
54
54
  },
55
- setup(s) {
56
- const n = s, d = f();
57
- return (e, h) => (c(), m(x, a(t(o(i)(n, ["field"]))), B({
58
- default: r(() => [
59
- b(o(g), y({ disabled: e.disabled }, e.field), null, 16, ["disabled"])
55
+ setup(n, { expose: d }) {
56
+ const p = n, l = c(), f = b();
57
+ return d({
58
+ request: () => l.value?.request()
59
+ }), (e, F) => (y(), x(k, a(r(o(i)(p, ["field"]))), B({
60
+ default: s(() => [
61
+ _(o(C), h(e.field, {
62
+ ref_key: "checkboxRef",
63
+ ref: l,
64
+ disabled: e.disabled
65
+ }), null, 16, ["disabled"])
60
66
  ]),
61
67
  _: 2
62
68
  }, [
63
- _(o(i)(d, "default"), (C, l) => ({
64
- name: l,
65
- fn: r((p) => [
66
- v(e.$slots, l, a(t(p || {})))
69
+ v(o(i)(f, "default"), (S, t) => ({
70
+ name: t,
71
+ fn: s((u) => [
72
+ g(e.$slots, t, a(r(u || {})))
67
73
  ])
68
74
  }))
69
75
  ]), 1040));
70
76
  }
71
77
  });
72
78
  export {
73
- w as default
79
+ A as default
74
80
  };