@aplus-frontend/ui 0.0.6 → 0.0.7

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 (55) hide show
  1. package/es/index.mjs +91 -85
  2. package/es/src/ap-field/checkbox/index.vue.mjs +8 -8
  3. package/es/src/ap-field/date-range/index.vue.d.ts +4 -0
  4. package/es/src/ap-field/date-range/index.vue.mjs +45 -43
  5. package/es/src/ap-field/index.d.ts +6 -2
  6. package/es/src/ap-field/index.mjs +23 -16
  7. package/es/src/ap-field/interface.d.ts +22 -1
  8. package/es/src/ap-field/segmented/index.vue.d.ts +31 -0
  9. package/es/src/ap-field/segmented/index.vue.mjs +77 -0
  10. package/es/src/ap-field/segmented/index.vue2.mjs +4 -0
  11. package/es/src/ap-field/select/index.vue.mjs +3 -3
  12. package/es/src/ap-field/slider/index.vue.d.ts +64 -0
  13. package/es/src/ap-field/slider/index.vue.mjs +90 -0
  14. package/es/src/ap-field/slider/index.vue2.mjs +4 -0
  15. package/es/src/ap-field/switch/index.vue.mjs +7 -7
  16. package/es/src/ap-field/text/index.d.ts +8 -0
  17. package/es/src/ap-field/text/index.mjs +10 -0
  18. package/es/src/ap-field/text/index.vue.mjs +2 -131
  19. package/es/src/ap-field/text/index.vue2.mjs +131 -2
  20. package/es/src/ap-field/text/input-password-props.d.ts +13 -0
  21. package/es/src/ap-field/text/password.vue.d.ts +74 -0
  22. package/es/src/ap-field/text/password.vue.mjs +152 -0
  23. package/es/src/ap-field/text/password.vue2.mjs +4 -0
  24. package/es/src/ap-table/constants.d.ts +706 -1
  25. package/es/src/ap-table/constants.mjs +17 -17
  26. package/es/src/ap-table/hooks/use-table-paging.mjs +14 -14
  27. package/es/src/index.mjs +73 -67
  28. package/lib/index.js +1 -1
  29. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  30. package/lib/src/ap-field/date-range/index.vue.d.ts +4 -0
  31. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  32. package/lib/src/ap-field/index.d.ts +6 -2
  33. package/lib/src/ap-field/index.js +1 -1
  34. package/lib/src/ap-field/interface.d.ts +22 -1
  35. package/lib/src/ap-field/segmented/index.vue.d.ts +31 -0
  36. package/lib/src/ap-field/segmented/index.vue.js +1 -0
  37. package/lib/src/ap-field/segmented/index.vue2.js +1 -0
  38. package/lib/src/ap-field/select/index.vue.js +1 -1
  39. package/lib/src/ap-field/slider/index.vue.d.ts +64 -0
  40. package/lib/src/ap-field/slider/index.vue.js +1 -0
  41. package/lib/src/ap-field/slider/index.vue2.js +1 -0
  42. package/lib/src/ap-field/switch/index.vue.js +1 -1
  43. package/lib/src/ap-field/text/index.d.ts +8 -0
  44. package/lib/src/ap-field/text/index.js +1 -0
  45. package/lib/src/ap-field/text/index.vue.js +1 -1
  46. package/lib/src/ap-field/text/index.vue2.js +1 -1
  47. package/lib/src/ap-field/text/input-password-props.d.ts +13 -0
  48. package/lib/src/ap-field/text/password.vue.d.ts +74 -0
  49. package/lib/src/ap-field/text/password.vue.js +1 -0
  50. package/lib/src/ap-field/text/password.vue2.js +1 -0
  51. package/lib/src/ap-table/constants.d.ts +706 -1
  52. package/lib/src/ap-table/constants.js +1 -1
  53. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  54. package/lib/src/index.js +1 -1
  55. package/package.json +2 -2
@@ -0,0 +1,31 @@
1
+ import { ApFieldSegmentedProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_TypePropsToRuntimeProps<ApFieldSegmentedProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
5
+ "update:value": (...args: any[]) => void;
6
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ApFieldSegmentedProps>>> & {
7
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
8
+ }, {}, {}>, {
9
+ label?(_: {
10
+ value: string | number;
11
+ disabled?: boolean | undefined;
12
+ payload?: any;
13
+ title?: string | undefined;
14
+ className?: string | undefined;
15
+ }): any;
16
+ }>;
17
+ export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToRuntimeProps<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
27
+ type __VLS_WithTemplateSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,77 @@
1
+ import { defineComponent as S, ref as f, useSlots as B, onMounted as U, computed as V, unref as n, createVNode as s, Fragment as a, openBlock as r, createBlock as d, createElementBlock as _, resolveDynamicComponent as h, mergeProps as F, withCtx as N, renderSlot as q, normalizeProps as z, guardReactiveProps as P } from "vue";
2
+ import { Spin as T, Segmented as R } from "ant-design-vue";
3
+ import { isFunction as v, isUndefined as w, isString as A, isNumber as D, omit as E } from "lodash-unified";
4
+ import "../../hooks/index.mjs";
5
+ import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
6
+ const J = /* @__PURE__ */ S({
7
+ name: "ApFieldSegmented",
8
+ __name: "index",
9
+ props: {
10
+ mode: {},
11
+ prefixCls: {},
12
+ options: {},
13
+ block: {
14
+ type: Boolean
15
+ },
16
+ disabled: {
17
+ type: Boolean
18
+ },
19
+ size: {},
20
+ value: {},
21
+ motionName: {},
22
+ onChange: {},
23
+ "onUpdate:value": {},
24
+ emptyText: {},
25
+ defaultValue: {},
26
+ request: {
27
+ type: Function
28
+ }
29
+ },
30
+ emits: ["update:value"],
31
+ setup(y, {
32
+ emit: g
33
+ }) {
34
+ const e = y, i = f((e == null ? void 0 : e.options) || []), k = g, {
35
+ value: p,
36
+ updateValue: b
37
+ } = M(e, k), m = f(!1), x = B();
38
+ U(() => {
39
+ v(e.request) && (m.value = !0, e.request().then((t) => i.value = t).finally(() => {
40
+ m.value = !1;
41
+ }));
42
+ });
43
+ const C = V(() => {
44
+ var c;
45
+ const t = n(p);
46
+ if (w(t))
47
+ return s(a, null, [e.emptyText]);
48
+ const l = (c = n(i)) == null ? void 0 : c.find((u) => u === t || (u == null ? void 0 : u.value) === t);
49
+ if (A(l) || D(l))
50
+ return s(a, null, [l]);
51
+ const o = (l == null ? void 0 : l.label) || x.label;
52
+ return v(o) ? s(a, null, [o == null ? void 0 : o({
53
+ ...l
54
+ })]) : s(a, null, [o || e.emptyText]);
55
+ });
56
+ return (t, l) => m.value ? (r(), d(n(T), {
57
+ key: 0,
58
+ size: "small"
59
+ })) : (r(), _(a, {
60
+ key: 1
61
+ }, [t.mode === "read" ? (r(), d(h(C.value), {
62
+ key: 0
63
+ })) : (r(), d(n(R), F({
64
+ key: 1
65
+ }, n(E)(e, ["onUpdate:value", "value", "defaultValue", "options"]), {
66
+ value: n(p),
67
+ "onUpdate:value": n(b),
68
+ options: i.value
69
+ }), {
70
+ label: N((o) => [q(t.$slots, "label", z(P(o)))]),
71
+ _: 3
72
+ }, 16, ["value", "onUpdate:value", "options"]))], 64));
73
+ }
74
+ });
75
+ export {
76
+ J as default
77
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { defineComponent as P, ref as c, onMounted as k, computed as p, unref as l, openBlock as m, createElementBlock as A, toDisplayString as O, createBlock as T, mergeProps as M, createSlots as N, renderList as _, withCtx as v, renderSlot as R, normalizeProps as q, guardReactiveProps as U, createVNode as D } from "vue";
1
+ import { defineComponent as P, ref as c, onMounted as k, computed as p, unref as l, openBlock as m, createElementBlock as A, toDisplayString as O, createBlock as T, mergeProps as M, createSlots as N, renderList as _, withCtx as v, renderSlot as q, normalizeProps as R, guardReactiveProps as U, createVNode as D } from "vue";
2
2
  import { debounce as L, isFunction as h, isArray as z, omit as K, isNil as H } from "lodash-unified";
3
3
  import { Select as $, Spin as j } from "ant-design-vue";
4
4
  import "../../hooks/index.mjs";
@@ -135,7 +135,7 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
135
135
  };
136
136
  return {
137
137
  ...E(
138
- K(e, ["mode", "value", "onUpdate:value", "onSearch"])
138
+ K(e, ["mode", "value", "onUpdate:value", "onSearch", "request"])
139
139
  ),
140
140
  ...t,
141
141
  filterOption: e.showSearch ? !1 : H(e == null ? void 0 : e.filterOption) ? S : e == null ? void 0 : e.filterOption
@@ -167,7 +167,7 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
167
167
  _(o.$slots, (i, u) => ({
168
168
  name: u,
169
169
  fn: v((s) => [
170
- R(o.$slots, u, q(U(s || {})))
170
+ q(o.$slots, u, R(U(s || {})))
171
171
  ])
172
172
  })),
173
173
  n.value ? {
@@ -0,0 +1,64 @@
1
+ import { ApFieldSliderProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ type ApFieldSliderSlots = {
5
+ default?: any;
6
+ mark?: (option: {
7
+ point: number;
8
+ label: any;
9
+ }) => any;
10
+ };
11
+ declare function focus(): void;
12
+ declare function blur(): void;
13
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldSliderProps>, {
14
+ included: boolean;
15
+ min: number;
16
+ max: number;
17
+ step: number;
18
+ tooltipOpen: undefined;
19
+ tooltipVisible: undefined;
20
+ }>, {
21
+ focus: typeof focus;
22
+ blur: typeof blur;
23
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
24
+ "update:value": (...args: any[]) => void;
25
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldSliderProps>, {
26
+ included: boolean;
27
+ min: number;
28
+ max: number;
29
+ step: number;
30
+ tooltipOpen: undefined;
31
+ tooltipVisible: undefined;
32
+ }>>> & {
33
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
34
+ }, {
35
+ min: number;
36
+ max: number;
37
+ step: number;
38
+ included: boolean;
39
+ tooltipOpen: boolean;
40
+ tooltipVisible: boolean;
41
+ }, {}>, Readonly<ApFieldSliderSlots> & ApFieldSliderSlots>;
42
+ export default _default;
43
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
44
+ type __VLS_TypePropsToRuntimeProps<T> = {
45
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
46
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
47
+ } : {
48
+ type: PropType<T[K]>;
49
+ required: true;
50
+ };
51
+ };
52
+ type __VLS_WithDefaults<P, D> = {
53
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
54
+ default: D[K];
55
+ }> : P[K];
56
+ };
57
+ type __VLS_Prettify<T> = {
58
+ [K in keyof T]: T[K];
59
+ } & {};
60
+ type __VLS_WithTemplateSlots<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
@@ -0,0 +1,90 @@
1
+ import { defineComponent as x, useSlots as g, ref as k, computed as C, unref as o, openBlock as u, createElementBlock as S, Fragment as _, createTextVNode as P, toDisplayString as T, createBlock as V, mergeProps as b, createSlots as h, renderList as F, withCtx as R, renderSlot as U, normalizeProps as A, guardReactiveProps as $ } from "vue";
2
+ import { Slider as N } from "ant-design-vue";
3
+ import "../../hooks/index.mjs";
4
+ import { isNil as w, isArray as z, omit as D } from "lodash-unified";
5
+ import { useControllableValue as E } from "../../hooks/useControllableValue.mjs";
6
+ const I = /* @__PURE__ */ x({
7
+ name: "ApFieldSlider",
8
+ __name: "index",
9
+ props: {
10
+ mode: {},
11
+ id: {},
12
+ prefixCls: {},
13
+ tooltipPrefixCls: {},
14
+ range: {},
15
+ reverse: { type: Boolean },
16
+ min: { default: 0 },
17
+ max: { default: 100 },
18
+ step: { default: 1 },
19
+ marks: {},
20
+ dots: { type: Boolean },
21
+ value: {},
22
+ defaultValue: {},
23
+ included: { type: Boolean, default: !0 },
24
+ disabled: { type: Boolean },
25
+ vertical: { type: Boolean },
26
+ tipFormatter: {},
27
+ tooltipOpen: { type: Boolean, default: void 0 },
28
+ tooltipVisible: { type: Boolean, default: void 0 },
29
+ tooltipPlacement: {},
30
+ getTooltipPopupContainer: {},
31
+ autofocus: { type: Boolean },
32
+ handleStyle: {},
33
+ trackStyle: {},
34
+ onChange: {},
35
+ onAfterChange: {},
36
+ onFocus: {},
37
+ onBlur: {},
38
+ "onUpdate:value": {},
39
+ emptyText: {}
40
+ },
41
+ emits: ["update:value"],
42
+ setup(p, { expose: i, emit: s }) {
43
+ const d = g(), a = k(), l = p, m = s, { value: r, updateValue: f } = E(
44
+ l,
45
+ m
46
+ ), c = C(() => {
47
+ const e = o(r);
48
+ return w(e) ? l.emptyText : z(e) ? `${e[0]}-${e[1]}` : e;
49
+ });
50
+ function v() {
51
+ var e, t;
52
+ (t = (e = a.value) == null ? void 0 : e.focus) == null || t.call(e);
53
+ }
54
+ function y() {
55
+ var e, t;
56
+ (t = (e = a.value) == null ? void 0 : e.blur) == null || t.call(e);
57
+ }
58
+ return i({
59
+ focus: v,
60
+ blur: y
61
+ }), (e, t) => e.mode === "read" ? (u(), S(_, { key: 0 }, [
62
+ P(T(c.value), 1)
63
+ ], 64)) : (u(), V(o(N), b(
64
+ { key: 1 },
65
+ o(D)(l, [
66
+ "value",
67
+ "onUpdate:value",
68
+ "mode",
69
+ "emptyText",
70
+ "defaultValue"
71
+ ]),
72
+ {
73
+ value: o(r),
74
+ "onUpdate:value": o(f),
75
+ ref_key: "sliderRef",
76
+ ref: a
77
+ }
78
+ ), h({ _: 2 }, [
79
+ F(d, (L, n) => ({
80
+ name: n,
81
+ fn: R((B) => [
82
+ U(e.$slots, n, A($(B || {})))
83
+ ])
84
+ }))
85
+ ]), 1040, ["value", "onUpdate:value"]));
86
+ }
87
+ });
88
+ export {
89
+ I as default
90
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -1,10 +1,10 @@
1
- import { defineComponent as U, useSlots as z, ref as D, unref as o, computed as T, createVNode as u, Fragment as s, openBlock as h, createBlock as k, resolveDynamicComponent as $, createElementBlock as E, mergeProps as p, createSlots as g, renderList as V, withCtx as C, renderSlot as v, normalizeProps as B, guardReactiveProps as w } from "vue";
1
+ import { defineComponent as F, useSlots as U, ref as z, unref as o, computed as D, createVNode as u, Fragment as s, openBlock as h, createBlock as k, resolveDynamicComponent as T, createElementBlock as E, mergeProps as p, createSlots as g, renderList as V, withCtx as C, renderSlot as v, normalizeProps as B, guardReactiveProps as w } from "vue";
2
2
  import { Switch as A, Popconfirm as K } from "ant-design-vue";
3
3
  import "../../hooks/index.mjs";
4
4
  import { isNil as L, omit as P } from "lodash-unified";
5
5
  import { isDef as f } from "@fruits-chain/utils";
6
6
  import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
7
- const J = /* @__PURE__ */ U({
7
+ const J = /* @__PURE__ */ F({
8
8
  name: "ApFieldSwitch",
9
9
  __name: "index",
10
10
  props: {
@@ -50,12 +50,12 @@ const J = /* @__PURE__ */ U({
50
50
  setup(S, {
51
51
  emit: b
52
52
  }) {
53
- const c = z(), n = S, N = b, {
53
+ const c = U(), n = S, N = b, {
54
54
  value: l,
55
55
  updateValue: a
56
56
  } = M(n, N, {
57
57
  valuePropName: "checked"
58
- }), i = D(!1);
58
+ }), i = z(!1);
59
59
  async function y(e, r) {
60
60
  if (!f(n.confirm)) {
61
61
  if (!f(n.onAction)) {
@@ -78,12 +78,12 @@ const J = /* @__PURE__ */ U({
78
78
  }
79
79
  await n.onAction(e) && a(e);
80
80
  }
81
- const F = T(() => {
81
+ const $ = D(() => {
82
82
  var t, d;
83
83
  const e = o(l);
84
- return L(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((t = c.checkedChildren) == null ? void 0 : t.call(c)) || n.checkedValue]) : u(s, null, [n.unCheckedChildren || ((d = c.unCheckedChildren) == null ? void 0 : d.call(c)) || n.unCheckedValue]);
84
+ return L(e) ? u(s, null, [n.emptyText]) : e === n.checkedValue ? u(s, null, [n.checkedChildren || ((t = c.checkedChildren) == null ? void 0 : t.call(c)) || `${n.checkedValue}`]) : u(s, null, [n.unCheckedChildren || ((d = c.unCheckedChildren) == null ? void 0 : d.call(c)) || `${n.unCheckedValue}`]);
85
85
  });
86
- return (e, r) => e.mode === "read" ? (h(), k($(F.value), {
86
+ return (e, r) => e.mode === "read" ? (h(), k(T($.value), {
87
87
  key: 0
88
88
  })) : (h(), E(s, {
89
89
  key: 1
@@ -0,0 +1,8 @@
1
+ import { default as _ApFieldText } from './index.vue';
2
+ import { default as ApFieldPassword } from './password.vue';
3
+
4
+ type ApFieldTextType = typeof _ApFieldText & {
5
+ Password: typeof ApFieldPassword;
6
+ };
7
+ declare const ApFieldText: ApFieldTextType;
8
+ export { ApFieldText, ApFieldPassword };
@@ -0,0 +1,10 @@
1
+ import "./index.vue.mjs";
2
+ import "./password.vue2.mjs";
3
+ import o from "./index.vue2.mjs";
4
+ import r from "./password.vue.mjs";
5
+ const i = o;
6
+ i.Password = r;
7
+ export {
8
+ r as ApFieldPassword,
9
+ i as ApFieldText
10
+ };
@@ -1,133 +1,4 @@
1
- import { isVNode as x, defineComponent as v, ref as B, useSlots as g, computed as b, createVNode as p, mergeProps as C, unref as i, Fragment as h, openBlock as S, createBlock as _, resolveDynamicComponent as R } from "vue";
2
- import { Input as V } from "ant-design-vue";
3
- import "../../hooks/index.mjs";
4
- import { omit as j } from "lodash-unified";
5
- import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
6
- function T(u) {
7
- return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !x(u);
8
- }
9
- const K = /* @__PURE__ */ v({
10
- name: "ApFieldText",
11
- __name: "index",
12
- props: {
13
- mode: {
14
- default: "edit"
15
- },
16
- id: {},
17
- placeholder: {},
18
- autocomplete: {},
19
- type: {
20
- default: "text"
21
- },
22
- name: {},
23
- size: {},
24
- autofocus: {
25
- type: Boolean
26
- },
27
- lazy: {
28
- type: Boolean,
29
- default: !0
30
- },
31
- maxlength: {},
32
- loading: {
33
- type: Boolean
34
- },
35
- bordered: {
36
- type: Boolean,
37
- default: !0
38
- },
39
- showCount: {
40
- type: [Boolean, Object]
41
- },
42
- htmlSize: {},
43
- onPressEnter: {},
44
- onKeydown: {},
45
- onKeyup: {},
46
- onFocus: {},
47
- onBlur: {},
48
- onChange: {},
49
- onInput: {},
50
- "onUpdate:value": {},
51
- onCompositionstart: {},
52
- onCompositionend: {},
53
- valueModifiers: {},
54
- hidden: {
55
- type: Boolean
56
- },
57
- status: {},
58
- value: {},
59
- defaultValue: {},
60
- inputElement: {},
61
- prefixCls: {},
62
- disabled: {
63
- type: Boolean
64
- },
65
- focused: {
66
- type: Boolean
67
- },
68
- triggerFocus: {},
69
- readonly: {
70
- type: Boolean
71
- },
72
- handleReset: {},
73
- addonBefore: {},
74
- addonAfter: {},
75
- prefix: {},
76
- suffix: {},
77
- clearIcon: {},
78
- allowClear: {
79
- type: Boolean,
80
- default: void 0
81
- },
82
- emptyText: {
83
- default: "-"
84
- }
85
- },
86
- emits: ["update:value"],
87
- setup(u, {
88
- expose: d,
89
- emit: c
90
- }) {
91
- const n = B(), t = g();
92
- d({
93
- focus: (e) => {
94
- var o;
95
- (o = n.value) == null || o.focus(e);
96
- },
97
- blur: () => {
98
- var e;
99
- (e = n.value) == null || e.blur();
100
- },
101
- setSelectionRange: (e, o, y) => {
102
- var r;
103
- (r = n.value) == null || r.setSelectionRange(e, o, y);
104
- },
105
- select: () => {
106
- var e;
107
- (e = n.value) == null || e.select();
108
- },
109
- input: b(() => {
110
- var e;
111
- return (e = n.value) == null ? void 0 : e.input;
112
- })
113
- });
114
- const f = c, a = u, {
115
- value: l,
116
- updateValue: s
117
- } = F(a, f);
118
- function m() {
119
- var e, o;
120
- return a.mode === "edit" ? p(V, C(j(a, ["mode", "emptyText", "value", "onUpdate:value"]), {
121
- value: i(l),
122
- "onUpdate:value": s,
123
- ref: n
124
- }), T(t) ? t : {
125
- default: () => [t]
126
- }) : p(h, null, [a.prefix || ((e = t == null ? void 0 : t.prefix) == null ? void 0 : e.call(t)), i(l) || a.emptyText, a.suffix || ((o = t == null ? void 0 : t.suffix) == null ? void 0 : o.call(t))]);
127
- }
128
- return (e, o) => (S(), _(R(m())));
129
- }
130
- });
1
+ import f from "./index.vue2.mjs";
131
2
  export {
132
- K as default
3
+ f as default
133
4
  };
@@ -1,4 +1,133 @@
1
- import f from "./index.vue.mjs";
1
+ import { isVNode as x, defineComponent as v, ref as B, useSlots as g, computed as b, createVNode as p, mergeProps as C, unref as i, Fragment as h, openBlock as S, createBlock as _, resolveDynamicComponent as R } from "vue";
2
+ import { Input as V } from "ant-design-vue";
3
+ import "../../hooks/index.mjs";
4
+ import { omit as j } from "lodash-unified";
5
+ import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
6
+ function T(u) {
7
+ return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !x(u);
8
+ }
9
+ const K = /* @__PURE__ */ v({
10
+ name: "ApFieldText",
11
+ __name: "index",
12
+ props: {
13
+ mode: {
14
+ default: "edit"
15
+ },
16
+ id: {},
17
+ placeholder: {},
18
+ autocomplete: {},
19
+ type: {
20
+ default: "text"
21
+ },
22
+ name: {},
23
+ size: {},
24
+ autofocus: {
25
+ type: Boolean
26
+ },
27
+ lazy: {
28
+ type: Boolean,
29
+ default: !0
30
+ },
31
+ maxlength: {},
32
+ loading: {
33
+ type: Boolean
34
+ },
35
+ bordered: {
36
+ type: Boolean,
37
+ default: !0
38
+ },
39
+ showCount: {
40
+ type: [Boolean, Object]
41
+ },
42
+ htmlSize: {},
43
+ onPressEnter: {},
44
+ onKeydown: {},
45
+ onKeyup: {},
46
+ onFocus: {},
47
+ onBlur: {},
48
+ onChange: {},
49
+ onInput: {},
50
+ "onUpdate:value": {},
51
+ onCompositionstart: {},
52
+ onCompositionend: {},
53
+ valueModifiers: {},
54
+ hidden: {
55
+ type: Boolean
56
+ },
57
+ status: {},
58
+ value: {},
59
+ defaultValue: {},
60
+ inputElement: {},
61
+ prefixCls: {},
62
+ disabled: {
63
+ type: Boolean
64
+ },
65
+ focused: {
66
+ type: Boolean
67
+ },
68
+ triggerFocus: {},
69
+ readonly: {
70
+ type: Boolean
71
+ },
72
+ handleReset: {},
73
+ addonBefore: {},
74
+ addonAfter: {},
75
+ prefix: {},
76
+ suffix: {},
77
+ clearIcon: {},
78
+ allowClear: {
79
+ type: Boolean,
80
+ default: void 0
81
+ },
82
+ emptyText: {
83
+ default: "-"
84
+ }
85
+ },
86
+ emits: ["update:value"],
87
+ setup(u, {
88
+ expose: d,
89
+ emit: c
90
+ }) {
91
+ const n = B(), t = g();
92
+ d({
93
+ focus: (e) => {
94
+ var o;
95
+ (o = n.value) == null || o.focus(e);
96
+ },
97
+ blur: () => {
98
+ var e;
99
+ (e = n.value) == null || e.blur();
100
+ },
101
+ setSelectionRange: (e, o, y) => {
102
+ var r;
103
+ (r = n.value) == null || r.setSelectionRange(e, o, y);
104
+ },
105
+ select: () => {
106
+ var e;
107
+ (e = n.value) == null || e.select();
108
+ },
109
+ input: b(() => {
110
+ var e;
111
+ return (e = n.value) == null ? void 0 : e.input;
112
+ })
113
+ });
114
+ const f = c, a = u, {
115
+ value: l,
116
+ updateValue: s
117
+ } = F(a, f);
118
+ function m() {
119
+ var e, o;
120
+ return a.mode === "edit" ? p(V, C(j(a, ["mode", "emptyText", "value", "onUpdate:value"]), {
121
+ value: i(l),
122
+ "onUpdate:value": s,
123
+ ref: n
124
+ }), T(t) ? t : {
125
+ default: () => [t]
126
+ }) : p(h, null, [a.prefix || ((e = t == null ? void 0 : t.prefix) == null ? void 0 : e.call(t)), i(l) || a.emptyText, a.suffix || ((o = t == null ? void 0 : t.suffix) == null ? void 0 : o.call(t))]);
127
+ }
128
+ return (e, o) => (S(), _(R(m())));
129
+ }
130
+ });
2
131
  export {
3
- f as default
132
+ K as default
4
133
  };
@@ -0,0 +1,13 @@
1
+ import { InputProps } from 'ant-design-vue';
2
+
3
+ /**
4
+ * 根据antdv类型定义创建的Input.Password Props类型定义
5
+ */
6
+ export type InputPasswordProps = InputProps & {
7
+ prefixCls?: string;
8
+ inputPrefixCls?: string;
9
+ action?: string;
10
+ visibilityToggle?: boolean;
11
+ visible?: boolean;
12
+ 'onUpdate:visible'?: (visible: boolean) => void;
13
+ };