@aplus-frontend/ui 7.17.1-beta.0 → 7.17.2

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 (139) hide show
  1. package/es/index.mjs +29 -31
  2. package/es/src/ag-grid/editable/form-item.vue.mjs +48 -48
  3. package/es/src/ap-field/cascader/index.vue.mjs +82 -130
  4. package/es/src/ap-field/cascader/read.vue2.mjs +36 -35
  5. package/es/src/ap-field/checkbox/index.vue.d.ts +18 -1
  6. package/es/src/ap-field/checkbox/index.vue.mjs +42 -43
  7. package/es/src/ap-field/checkbox/read.vue2.mjs +1 -1
  8. package/es/src/ap-field/date/index.vue.mjs +48 -48
  9. package/es/src/ap-field/date/read.vue2.mjs +1 -1
  10. package/es/src/ap-field/date-range/index.vue.mjs +31 -31
  11. package/es/src/ap-field/date-range/read.vue2.mjs +1 -1
  12. package/es/src/ap-field/interface.d.ts +13 -23
  13. package/es/src/ap-field/number/index.vue.mjs +36 -34
  14. package/es/src/ap-field/number/read.vue2.mjs +1 -1
  15. package/es/src/ap-field/radio/index.vue.mjs +34 -42
  16. package/es/src/ap-field/radio/read.vue2.mjs +1 -1
  17. package/es/src/ap-field/rate/index.vue.mjs +23 -23
  18. package/es/src/ap-field/second/index.vue.mjs +27 -29
  19. package/es/src/ap-field/second/read.vue2.mjs +2 -2
  20. package/es/src/ap-field/segmented/index.vue.mjs +37 -37
  21. package/es/src/ap-field/select/index.vue.d.ts +1 -1
  22. package/es/src/ap-field/select/index.vue.mjs +147 -136
  23. package/es/src/ap-field/select/read.vue2.mjs +2 -1
  24. package/es/src/ap-field/slider/index.vue.mjs +35 -37
  25. package/es/src/ap-field/switch/index.vue.mjs +38 -38
  26. package/es/src/ap-field/switch/read.vue2.mjs +3 -3
  27. package/es/src/ap-field/text/index.vue.d.ts +478 -3
  28. package/es/src/ap-field/text/index.vue2.mjs +47 -46
  29. package/es/src/ap-field/text/password.vue.d.ts +549 -3
  30. package/es/src/ap-field/text/password.vue.mjs +61 -56
  31. package/es/src/ap-field/text/read-password.vue2.mjs +16 -16
  32. package/es/src/ap-field/text/read.vue2.mjs +1 -1
  33. package/es/src/ap-field/text-area/index.vue.mjs +29 -31
  34. package/es/src/ap-field/text-area/read.vue2.mjs +1 -1
  35. package/es/src/ap-field/tree-select/index.vue.mjs +47 -47
  36. package/es/src/ap-field/tree-select/read.vue2.mjs +3 -3
  37. package/es/src/ap-form/drawer-form/index.vue.mjs +99 -90
  38. package/es/src/ap-form/hooks/use-regist-form.d.ts +7 -0
  39. package/es/src/ap-form/hooks/use-regist-form.mjs +24 -0
  40. package/es/src/ap-form/interface.d.ts +18 -0
  41. package/es/src/ap-form/item/index.vue.d.ts +6 -6
  42. package/es/src/ap-form/item/index.vue.mjs +85 -94
  43. package/es/src/ap-form/item-group/index.vue.mjs +14 -14
  44. package/es/src/ap-form/items/cascader/index.vue.d.ts +2 -2
  45. package/es/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
  46. package/es/src/ap-form/items/date/index.vue.d.ts +2 -2
  47. package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -2
  48. package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
  49. package/es/src/ap-form/items/select/index.vue.d.ts +10 -8
  50. package/es/src/ap-form/items/switch/index.vue.d.ts +3 -3
  51. package/es/src/ap-form/items/text/index.vue.d.ts +476 -4
  52. package/es/src/ap-form/items/text/password.vue.d.ts +547 -4
  53. package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  54. package/es/src/ap-form/list/index.vue.mjs +29 -34
  55. package/es/src/ap-form/modal-form/index.vue.mjs +77 -68
  56. package/es/src/ap-form/set/index.vue.d.ts +2 -4
  57. package/es/src/ap-form/set/index.vue.mjs +23 -18
  58. package/es/src/ap-grid/index.vue.mjs +1 -1
  59. package/es/src/ap-table/constants.d.ts +600 -37
  60. package/es/src/ap-table/utils.d.ts +1 -1
  61. package/es/src/business/batch-input-group/index.vue.d.ts +240 -3
  62. package/es/src/business/batch-input-group/index.vue.mjs +1 -1
  63. package/es/src/check-card/index.vue2.mjs +61 -64
  64. package/es/src/hooks/index.d.ts +0 -1
  65. package/es/src/hooks/index.mjs +10 -12
  66. package/es/src/version.d.ts +1 -1
  67. package/es/src/version.mjs +1 -1
  68. package/lib/index.js +1 -1
  69. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  70. package/lib/src/ap-field/cascader/index.vue.js +1 -1
  71. package/lib/src/ap-field/cascader/read.vue2.js +1 -1
  72. package/lib/src/ap-field/checkbox/index.vue.d.ts +18 -1
  73. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  74. package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
  75. package/lib/src/ap-field/date/index.vue.js +1 -1
  76. package/lib/src/ap-field/date/read.vue2.js +1 -1
  77. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  78. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  79. package/lib/src/ap-field/interface.d.ts +13 -23
  80. package/lib/src/ap-field/number/index.vue.js +1 -1
  81. package/lib/src/ap-field/number/read.vue2.js +1 -1
  82. package/lib/src/ap-field/radio/index.vue.js +1 -1
  83. package/lib/src/ap-field/radio/read.vue2.js +1 -1
  84. package/lib/src/ap-field/rate/index.vue.js +1 -1
  85. package/lib/src/ap-field/second/index.vue.js +1 -1
  86. package/lib/src/ap-field/second/read.vue2.js +1 -1
  87. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  88. package/lib/src/ap-field/select/index.vue.d.ts +1 -1
  89. package/lib/src/ap-field/select/index.vue.js +1 -1
  90. package/lib/src/ap-field/select/read.vue2.js +1 -1
  91. package/lib/src/ap-field/slider/index.vue.js +1 -1
  92. package/lib/src/ap-field/switch/index.vue.js +1 -1
  93. package/lib/src/ap-field/switch/read.vue2.js +1 -1
  94. package/lib/src/ap-field/text/index.vue.d.ts +478 -3
  95. package/lib/src/ap-field/text/index.vue2.js +1 -1
  96. package/lib/src/ap-field/text/password.vue.d.ts +549 -3
  97. package/lib/src/ap-field/text/password.vue.js +1 -1
  98. package/lib/src/ap-field/text/read-password.vue2.js +1 -1
  99. package/lib/src/ap-field/text/read.vue2.js +1 -1
  100. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  101. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  102. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  103. package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
  104. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  105. package/lib/src/ap-form/hooks/use-regist-form.d.ts +7 -0
  106. package/lib/src/ap-form/hooks/use-regist-form.js +1 -0
  107. package/lib/src/ap-form/interface.d.ts +18 -0
  108. package/lib/src/ap-form/item/index.vue.d.ts +6 -6
  109. package/lib/src/ap-form/item/index.vue.js +1 -1
  110. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  111. package/lib/src/ap-form/items/cascader/index.vue.d.ts +2 -2
  112. package/lib/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
  113. package/lib/src/ap-form/items/date/index.vue.d.ts +2 -2
  114. package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -2
  115. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
  116. package/lib/src/ap-form/items/select/index.vue.d.ts +10 -8
  117. package/lib/src/ap-form/items/switch/index.vue.d.ts +3 -3
  118. package/lib/src/ap-form/items/text/index.vue.d.ts +476 -4
  119. package/lib/src/ap-form/items/text/password.vue.d.ts +547 -4
  120. package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
  121. package/lib/src/ap-form/list/index.vue.js +1 -1
  122. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  123. package/lib/src/ap-form/set/index.vue.d.ts +2 -4
  124. package/lib/src/ap-form/set/index.vue.js +1 -1
  125. package/lib/src/ap-grid/index.vue.js +1 -1
  126. package/lib/src/ap-table/constants.d.ts +600 -37
  127. package/lib/src/ap-table/utils.d.ts +1 -1
  128. package/lib/src/business/batch-input-group/index.vue.d.ts +240 -3
  129. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  130. package/lib/src/check-card/index.vue2.js +1 -1
  131. package/lib/src/hooks/index.d.ts +0 -1
  132. package/lib/src/hooks/index.js +1 -1
  133. package/lib/src/version.d.ts +1 -1
  134. package/lib/src/version.js +1 -1
  135. package/package.json +1 -1
  136. package/es/src/hooks/useMessage.d.ts +0 -62
  137. package/es/src/hooks/useMessage.mjs +0 -86
  138. package/lib/src/hooks/useMessage.d.ts +0 -62
  139. package/lib/src/hooks/useMessage.js +0 -1
@@ -20,9 +20,9 @@ export type BasicApFieldProps<FieldPropsType = any> = {
20
20
  mode?: FieldMode;
21
21
  class?: unknown;
22
22
  style?: unknown;
23
+ emptyText?: string;
23
24
  } & FieldPropsType;
24
25
  export type ApFieldTextProps = BasicApFieldProps<InputProps> & {
25
- emptyText?: string;
26
26
  /**
27
27
  * 输入生效前的事件,受控输入拦截
28
28
  * @param nextVal
@@ -30,10 +30,6 @@ export type ApFieldTextProps = BasicApFieldProps<InputProps> & {
30
30
  */
31
31
  beforeInput?: (nextVal: string) => string;
32
32
  };
33
- export type ApFieldTextPasswordProps = BasicApFieldProps<InputPasswordProps> & {
34
- emptyText?: string;
35
- };
36
- export type ApFieldTextPasswordExpose = Omit<CommonApFieldExpose, 'request'>;
37
33
  export type ApFieldTextExpose = {
38
34
  focus: (options?: InputFocusOptions) => void;
39
35
  blur: () => void;
@@ -41,14 +37,14 @@ export type ApFieldTextExpose = {
41
37
  setSelectionRange: (start: number, end: number, direction?: 'forward' | 'backward' | 'none') => void;
42
38
  select: () => void;
43
39
  };
40
+ export type ApFieldTextPasswordProps = BasicApFieldProps<InputPasswordProps>;
41
+ export type ApFieldTextPasswordExpose = Omit<CommonApFieldExpose, 'request'>;
44
42
  export type ApFieldCheckboxProps = BasicApFieldProps<CheckboxGroupProps> & {
45
- emptyText?: string;
46
43
  request?: () => Promise<CheckboxGroupProps['options']>;
47
44
  vertical?: boolean;
48
45
  };
49
46
  export type ApFieldCheckboxExpose = Pick<CommonApFieldExpose, 'request'>;
50
47
  export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' | 'value' | 'defaultValue' | 'onChange' | 'onOk' | 'format' | 'onUpdate:value'>> & {
51
- emptyText?: string;
52
48
  value?: number | null;
53
49
  defaultValue?: number;
54
50
  'onUpdate:value'?: (ts: number | null) => void;
@@ -79,7 +75,6 @@ export type ApFieldNumberProps = BasicApFieldProps<Omit<InputNumberProps, 'mode'
79
75
  * 输入框的显示模式(输入框/数字轮播)
80
76
  */
81
77
  inputMode?: InputNumberProps['mode'];
82
- emptyText?: string;
83
78
  /**
84
79
  * 是否展示千分位,只读模式可用
85
80
  */
@@ -91,20 +86,17 @@ export type ApFieldNumberProps = BasicApFieldProps<Omit<InputNumberProps, 'mode'
91
86
  };
92
87
  export type ApiFieldNumberExpose = Omit<CommonApFieldExpose, 'request'>;
93
88
  export type ApFieldRadioProps = BasicApFieldProps<RadioGroupProps> & {
94
- emptyText?: string;
95
89
  request?: () => Promise<RadioGroupProps['options']>;
96
90
  vertical?: boolean;
97
91
  };
98
92
  export type ApFieldRadioExpose = Pick<CommonApFieldExpose, 'request'>;
99
93
  export type ApFieldSwitchConfirmConfig = Pick<PopconfirmProps, 'title' | 'okText' | 'cancelText' | 'description' | 'showCancel' | 'icon' | 'okType' | 'onCancel' | 'okButtonProps' | 'cancelButtonProps'>;
100
94
  export type ApFieldSwitchProps = BasicApFieldProps<Omit<SwitchProps, 'onClick'>> & {
101
- emptyText?: string;
102
95
  onAction?: (checked: string | boolean | number, e?: Event) => boolean | Promise<boolean>;
103
96
  confirm?: ApFieldSwitchConfirmConfig | ((checked: string | number | boolean) => ApFieldSwitchConfirmConfig);
104
97
  };
105
98
  export type ApFieldSwitchExpose = Omit<CommonApFieldExpose, 'request'>;
106
99
  export type ApFieldTextAreaProps = BasicApFieldProps<Omit<TextAreaProps, 'autosize'>> & {
107
- emptyText?: string;
108
100
  /**
109
101
  * 输入生效前的事件,受控输入拦截
110
102
  * @param nextVal
@@ -123,7 +115,6 @@ export type ApFieldTextAreaExpose = Pick<CommonApFieldExpose, 'blur'> & {
123
115
  resizableTextArea: any;
124
116
  };
125
117
  export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'value' | 'onChange' | 'onPanelChange' | 'defaultValue' | 'onOk' | 'renderExtraFooter' | 'onUpdate:value' | 'mode' | 'format' | 'presets'>> & {
126
- emptyText?: string;
127
118
  value?: RangeValue<number> | null;
128
119
  defaultValue?: RangeValue<number>;
129
120
  'onUpdate:value'?: (ts: RangeValue<number> | null) => void;
@@ -194,7 +185,6 @@ export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'va
194
185
  };
195
186
  export type ApFieldDateRangeExpose = Omit<CommonApFieldExpose, 'request'>;
196
187
  export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'value' | 'onUpdate:value' | 'onSearch'>> & {
197
- emptyText?: string;
198
188
  request?: (value?: string, extraParams?: Recordable) => Promise<SelectProps['options']>;
199
189
  multiple?: boolean;
200
190
  value?: SelectProps['value'];
@@ -213,10 +203,15 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
213
203
  * @since 7.15.0
214
204
  */
215
205
  fetchOnFocus?: boolean;
206
+ /**
207
+ * 是否在打开选项列表时请求列表数据
208
+ * @since 7.17.2
209
+ */
210
+ fetchOnOpen?: boolean;
216
211
  /**
217
212
  * 是否延迟请求选项列表 true: 不请求选项; 'first-focus': 首次聚焦时触发网络请求
218
213
  */
219
- lazy?: boolean | 'first-focus';
214
+ lazy?: boolean | 'first-focus' | 'first-open';
220
215
  /**
221
216
  * 添加一个名为全部的节点(只在多选的情况下有效)
222
217
  */
@@ -235,8 +230,10 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
235
230
  */
236
231
  allowOnlySelect?: boolean;
237
232
  };
233
+ export type ApFieldSelectExpose = Omit<CommonApFieldExpose, 'request'> & {
234
+ request: (clear?: boolean) => Promise<void>;
235
+ };
238
236
  export type ApFieldTreeSelectProps = BasicApFieldProps<Omit<TreeSelectProps, 'loadData'>> & {
239
- emptyText?: string;
240
237
  /**
241
238
  * 用于请求treeNode
242
239
  * @param currentNode 异步加载时表示当前节点,非异步请求时为undefined
@@ -257,9 +254,6 @@ export type ApFieldTreeSelectProps = BasicApFieldProps<Omit<TreeSelectProps, 'lo
257
254
  */
258
255
  loadData?: boolean;
259
256
  };
260
- export type ApFieldSelectExpose = Omit<CommonApFieldExpose, 'request'> & {
261
- request: (clear?: boolean) => Promise<void>;
262
- };
263
257
  export type ApFieldTreeSelectExpose = Omit<ApFieldSelectExpose, 'request'> & {
264
258
  /**
265
259
  * 手动请求treeData
@@ -270,26 +264,22 @@ export type ApFieldTreeSelectExpose = Omit<ApFieldSelectExpose, 'request'> & {
270
264
  request: (currentNode?: LegacyDataNode, clear?: boolean) => Promise<void>;
271
265
  };
272
266
  export type ApFieldSliderProps = BasicApFieldProps<Partial<SliderProps>> & {
273
- emptyText?: string;
274
267
  defaultValue?: number | [number, number];
275
268
  };
276
269
  export type ApFieldSliderExpose = Omit<CommonApFieldExpose, 'request'>;
277
270
  export type ApFieldSegmentedProps = BasicApFieldProps<SegmentedProps> & {
278
- emptyText?: string;
279
271
  defaultValue?: string | number;
280
272
  request?: () => Promise<SegmentedProps['options']>;
281
273
  };
282
- export type ApFieldRateProps = BasicApFieldProps<RateProps> & {
274
+ export type ApFieldRateProps = Omit<BasicApFieldProps<RateProps>, 'emptyText'> & {
283
275
  defaultValue?: number;
284
276
  };
285
277
  export type ApFieldRateExpose = Omit<CommonApFieldExpose, 'request'>;
286
278
  export type ApFieldSecondProps = BasicApFieldProps<Omit<InputNumberProps, 'mode'>> & {
287
279
  placeholder?: string;
288
- emptyText?: string;
289
280
  };
290
281
  export type ApFieldSecondExpose = ApiFieldNumberExpose;
291
282
  export type ApFieldCascaderProps = BasicApFieldProps<Omit<CascaderProps, 'loadData'>> & {
292
- emptyText?: string;
293
283
  /**
294
284
  * 手动请求节点数据
295
285
  * @param currentNode 当前选中项
@@ -1,21 +1,22 @@
1
- import { defineComponent as N, shallowRef as x, computed as D, unref as t, createElementBlock as s, createBlock as P, openBlock as l, normalizeClass as i, createCommentVNode as m, createElementVNode as R, renderSlot as u, toDisplayString as V, mergeProps as $, createSlots as I, renderList as M, withCtx as A, normalizeProps as U, guardReactiveProps as z } from "vue";
2
- import { InputNumber as E } from "@aplus-frontend/antdv";
3
- import { isNil as T, omit as w } from "lodash-unified";
4
- import { roundWith as F, toDecimalMark as O } from "../../utils/format.mjs";
1
+ import { defineComponent as D, useSlots as R, computed as m, shallowRef as V, unref as t, createElementBlock as s, createBlock as I, openBlock as l, normalizeClass as i, createCommentVNode as f, createElementVNode as M, renderSlot as u, toDisplayString as $, mergeProps as A, createSlots as U, renderList as z, withCtx as E, normalizeProps as T, guardReactiveProps as w } from "vue";
2
+ import { InputNumber as F } from "@aplus-frontend/antdv";
3
+ import { omit as O, isNil as W } from "lodash-unified";
4
+ import { roundWith as _, toDecimalMark as L } from "../../utils/format.mjs";
5
5
  import "../../config-provider/index.mjs";
6
6
  import "../../hooks/index.mjs";
7
- import { useDefaultPlaceholder as W } from "../hooks/use-default-placeholder.mjs";
8
- import L from "../style/index.mjs";
9
- import { addZeroToDecimalPlaces as Z } from "./helper.mjs";
10
- import { useNamespace as _ } from "../../config-provider/hooks/use-namespace.mjs";
11
- import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
12
- const le = /* @__PURE__ */ N({
7
+ import { useDefaultPlaceholder as Z } from "../hooks/use-default-placeholder.mjs";
8
+ import j from "../style/index.mjs";
9
+ import { addZeroToDecimalPlaces as q } from "./helper.mjs";
10
+ import { useNamespace as G } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { useControllableValue as H } from "../../hooks/useControllableValue.mjs";
12
+ const se = /* @__PURE__ */ D({
13
13
  name: "ApFieldNumber",
14
14
  __name: "index",
15
15
  props: {
16
16
  mode: {},
17
17
  class: {},
18
18
  style: {},
19
+ emptyText: { default: "--" },
19
20
  size: {},
20
21
  bordered: { type: Boolean, default: !0 },
21
22
  placeholder: {},
@@ -56,63 +57,64 @@ const le = /* @__PURE__ */ N({
56
57
  onBlur: {},
57
58
  onFocus: {},
58
59
  inputMode: {},
59
- emptyText: { default: "--" },
60
60
  thousands: { type: Boolean, default: !1 },
61
61
  limitDecimalsRetain: { type: Boolean }
62
62
  },
63
63
  emits: ["update:value"],
64
- setup(f, { expose: c, emit: y }) {
65
- const v = y, { b: r } = _("field-number"), h = L("field"), o = f, n = x(), { value: p, updateValue: B } = j(
64
+ setup(c, { expose: y, emit: v }) {
65
+ const h = v, B = R(), { b: r } = G("field-number"), b = j("field"), o = c, g = m(
66
+ () => O(o, ["value", "onUpdate:value", "mode"])
67
+ ), n = V(), { value: p, updateValue: k } = H(
66
68
  o,
67
- v
68
- ), b = W("Number", o), g = D(() => {
69
+ h
70
+ ), S = Z("Number", o), x = m(() => {
69
71
  let e = t(p);
70
- if (T(e))
72
+ if (W(e))
71
73
  return o.emptyText;
72
- o.precision && (e = F(e, o.precision));
73
- let a = o.thousands ? O(e) : String(e);
74
- return o.precision && o.limitDecimalsRetain && (a = Z(a, o.precision)), a;
74
+ o.precision && (e = _(e, o.precision));
75
+ let a = o.thousands ? L(e) : String(e);
76
+ return o.precision && o.limitDecimalsRetain && (a = q(a, o.precision)), a;
75
77
  });
76
- function k() {
78
+ function C() {
77
79
  n.value?.focus();
78
80
  }
79
- function S() {
81
+ function N() {
80
82
  n.value?.blur();
81
83
  }
82
- return c({ focus: k, blur: S }), (e, a) => e.mode === "read" ? (l(), s("span", {
84
+ return y({ focus: C, blur: N }), (e, a) => e.mode === "read" ? (l(), s("span", {
83
85
  key: 0,
84
- class: i([t(r)(), t(h)])
86
+ class: i([t(r)(), t(b)])
85
87
  }, [
86
88
  e.$slots.prefix ? (l(), s("span", {
87
89
  key: 0,
88
90
  class: i(t(r)("label-left"))
89
91
  }, [
90
92
  u(e.$slots, "prefix")
91
- ], 2)) : m("", !0),
92
- R("span", null, V(g.value), 1),
93
+ ], 2)) : f("", !0),
94
+ M("span", null, $(x.value), 1),
93
95
  e.$slots.addonAfter ? (l(), s("span", {
94
96
  key: 1,
95
97
  class: i(t(r)("label-right"))
96
98
  }, [
97
99
  u(e.$slots, "addonAfter")
98
- ], 2)) : m("", !0)
99
- ], 2)) : (l(), P(t(E), $({ key: 1 }, t(w)(o, ["value", "onUpdate:value", "mode"]), {
100
+ ], 2)) : f("", !0)
101
+ ], 2)) : (l(), I(t(F), A({ key: 1 }, g.value, {
100
102
  ref_key: "inputRef",
101
103
  ref: n,
102
- placeholder: t(b),
104
+ placeholder: t(S),
103
105
  value: t(p),
104
106
  mode: e.inputMode,
105
- "onUpdate:value": t(B)
106
- }), I({ _: 2 }, [
107
- M(e.$slots, (q, d) => ({
107
+ "onUpdate:value": t(k)
108
+ }), U({ _: 2 }, [
109
+ z(B, (J, d) => ({
108
110
  name: d,
109
- fn: A((C) => [
110
- u(e.$slots, d, U(z(C || {})))
111
+ fn: E((P) => [
112
+ u(e.$slots, d, T(w(P || {})))
111
113
  ])
112
114
  }))
113
115
  ]), 1040, ["placeholder", "value", "mode", "onUpdate:value"]));
114
116
  }
115
117
  });
116
118
  export {
117
- le as default
119
+ se as default
118
120
  };
@@ -15,6 +15,7 @@ const h = {
15
15
  mode: {},
16
16
  class: {},
17
17
  style: {},
18
+ emptyText: { default: "--" },
18
19
  size: {},
19
20
  bordered: { type: Boolean },
20
21
  placeholder: {},
@@ -55,7 +56,6 @@ const h = {
55
56
  onBlur: {},
56
57
  onFocus: {},
57
58
  inputMode: {},
58
- emptyText: { default: "--" },
59
59
  thousands: { type: Boolean, default: !1 },
60
60
  limitDecimalsRetain: { type: Boolean }
61
61
  },
@@ -1,20 +1,21 @@
1
- import { defineComponent as h, ref as q, onMounted as V, computed as C, unref as e, createElementBlock as p, openBlock as a, Fragment as u, createTextVNode as O, toDisplayString as S, createBlock as m, mergeProps as U } from "vue";
2
- import { Spin as _, RadioGroup as N } from "@aplus-frontend/antdv";
3
- import { isNil as R, omit as z } from "lodash-unified";
1
+ import { defineComponent as V, computed as p, ref as C, onMounted as O, unref as e, createElementBlock as u, openBlock as a, Fragment as m, createTextVNode as S, toDisplayString as U, createBlock as d, mergeProps as _ } from "vue";
2
+ import { Spin as N, RadioGroup as R } from "@aplus-frontend/antdv";
3
+ import { omit as z, isNil as F } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import "../../hooks/index.mjs";
6
- import F from "../hooks/use-options.mjs";
7
- import G from "../style/index.mjs";
6
+ import G from "../hooks/use-options.mjs";
7
+ import P from "../style/index.mjs";
8
8
  import { getOptionValue as A, getOptionLabel as D } from "./helper.mjs";
9
9
  import { useControllableValue as E } from "../../hooks/useControllableValue.mjs";
10
10
  import { useNamespace as I } from "../../config-provider/hooks/use-namespace.mjs";
11
- const X = /* @__PURE__ */ h({
11
+ const Y = /* @__PURE__ */ V({
12
12
  name: "ApFieldRadio",
13
13
  __name: "index",
14
14
  props: {
15
15
  mode: { default: "edit" },
16
16
  class: {},
17
17
  style: {},
18
+ emptyText: { default: "--" },
18
19
  prefixCls: {},
19
20
  value: {},
20
21
  size: {},
@@ -28,57 +29,48 @@ const X = /* @__PURE__ */ h({
28
29
  onChange: {},
29
30
  "onUpdate:value": {},
30
31
  vertical: { type: Boolean, default: !1 },
31
- emptyText: { default: "--" },
32
32
  request: {}
33
33
  },
34
34
  emits: ["update:value"],
35
- setup(d, { expose: c, emit: f }) {
36
- const t = d, v = f, { options: n, updateOptions: y } = F(t), { value: r, updateValue: g } = E(t, v), { b: k, m: x } = I("field-radio"), b = G("field"), l = q(!1);
37
- async function i() {
38
- t.request && (l.value = !0, t.request?.().then((o) => y(o)).finally(() => {
35
+ setup(c, { expose: f, emit: v }) {
36
+ const t = c, y = p(
37
+ () => z(t, ["value", "onUpdate:value", "options", "request", "vertical"])
38
+ ), g = v, { options: n, updateOptions: k } = G(t), { value: r, updateValue: x } = E(t, g), { b, m: B } = I("field-radio"), T = P("field"), l = C(!1);
39
+ async function s() {
40
+ t.request && (l.value = !0, t.request?.().then((o) => k(o)).finally(() => {
39
41
  l.value = !1;
40
42
  }));
41
43
  }
42
- V(() => {
43
- i();
44
+ O(() => {
45
+ s();
44
46
  });
45
- const B = C(() => {
47
+ const h = p(() => {
46
48
  const o = e(r);
47
- if (R(o))
49
+ if (F(o))
48
50
  return t.emptyText;
49
- const s = n.value?.find(
50
- (T) => o === A(T)
51
+ const i = n.value?.find(
52
+ (q) => o === A(q)
51
53
  );
52
- return D(s) || t.emptyText;
54
+ return D(i) || t.emptyText;
53
55
  });
54
- return c({
55
- request: i
56
- }), (o, s) => o.mode === "read" ? (a(), p(u, { key: 0 }, [
57
- O(S(B.value), 1)
58
- ], 64)) : (a(), p(u, { key: 1 }, [
59
- l.value ? (a(), m(e(_), {
56
+ return f({
57
+ request: s
58
+ }), (o, i) => o.mode === "read" ? (a(), u(m, { key: 0 }, [
59
+ S(U(h.value), 1)
60
+ ], 64)) : (a(), u(m, { key: 1 }, [
61
+ l.value ? (a(), d(e(N), {
60
62
  key: 0,
61
63
  size: "small"
62
- })) : (a(), m(e(N), U(
63
- { key: 1 },
64
- e(z)(t, [
65
- "value",
66
- "onUpdate:value",
67
- "options",
68
- "request",
69
- "vertical"
70
- ]),
71
- {
72
- ref: "radioGroupRef",
73
- value: e(r),
74
- options: e(n),
75
- class: [e(k)(), o.vertical ? e(x)("vertical") : null, e(b)],
76
- "onUpdate:value": e(g)
77
- }
78
- ), null, 16, ["value", "options", "class", "onUpdate:value"]))
64
+ })) : (a(), d(e(R), _({ key: 1 }, y.value, {
65
+ ref: "radioGroupRef",
66
+ value: e(r),
67
+ options: e(n),
68
+ class: [e(b)(), o.vertical ? e(B)("vertical") : null, e(T)],
69
+ "onUpdate:value": e(x)
70
+ }), null, 16, ["value", "options", "class", "onUpdate:value"]))
79
71
  ], 64));
80
72
  }
81
73
  });
82
74
  export {
83
- X as default
75
+ Y as default
84
76
  };
@@ -8,6 +8,7 @@ const y = /* @__PURE__ */ p({
8
8
  mode: { default: "edit" },
9
9
  class: {},
10
10
  style: {},
11
+ emptyText: { default: "--" },
11
12
  prefixCls: {},
12
13
  value: {},
13
14
  size: {},
@@ -21,7 +22,6 @@ const y = /* @__PURE__ */ p({
21
22
  onChange: {},
22
23
  "onUpdate:value": {},
23
24
  vertical: { type: Boolean, default: !1 },
24
- emptyText: { default: "--" },
25
25
  request: {}
26
26
  },
27
27
  setup(a) {
@@ -1,9 +1,9 @@
1
- import { defineComponent as m, shallowRef as v, useSlots as b, computed as y, createBlock as h, openBlock as B, unref as o, mergeProps as C, createSlots as _, withCtx as x, renderSlot as k } from "vue";
2
- import { Rate as w } from "@aplus-frontend/antdv";
3
- import { omit as R } from "lodash-unified";
1
+ import { defineComponent as b, computed as a, shallowRef as y, useSlots as h, createBlock as B, openBlock as C, unref as t, mergeProps as _, createSlots as x, withCtx as k, renderSlot as w } from "vue";
2
+ import { Rate as R } from "@aplus-frontend/antdv";
3
+ import { omit as g } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
- import { useControllableValue as g } from "../../hooks/useControllableValue.mjs";
6
- const A = /* @__PURE__ */ m({
5
+ import { useControllableValue as V } from "../../hooks/useControllableValue.mjs";
6
+ const A = /* @__PURE__ */ b({
7
7
  name: "ApFieldRate",
8
8
  __name: "index",
9
9
  props: {
@@ -33,28 +33,28 @@ const A = /* @__PURE__ */ m({
33
33
  defaultValue: {}
34
34
  },
35
35
  emits: ["update:value"],
36
- setup(t, { expose: l, emit: r }) {
37
- const e = t, a = v(), u = r, n = b(), { value: d, updateValue: s } = g(e, u), f = y(() => e.mode === "read" ? !0 : e.disabled);
38
- function i() {
39
- a.value?.focus?.();
36
+ setup(l, { expose: r, emit: u }) {
37
+ const e = l, n = a(() => g(e, ["mode", "defaultValue"])), o = y(), s = u, d = h(), { value: c, updateValue: f } = V(e, s), i = a(() => e.mode === "read" ? !0 : e.disabled);
38
+ function p() {
39
+ o.value?.focus?.();
40
40
  }
41
- function c() {
42
- a.value?.blur?.();
41
+ function m() {
42
+ o.value?.blur?.();
43
43
  }
44
- return l({
45
- focus: i,
46
- blur: c
47
- }), (p, V) => (B(), h(o(w), C(o(R)(e, ["mode", "defaultValue"]), {
44
+ return r({
45
+ focus: p,
46
+ blur: m
47
+ }), (v, S) => (C(), B(t(R), _(n.value, {
48
48
  ref_key: "rateRef",
49
- ref: a,
50
- value: o(d),
51
- disabled: f.value,
52
- "onUpdate:value": o(s)
53
- }), _({ _: 2 }, [
54
- n.character ? {
49
+ ref: o,
50
+ value: t(c),
51
+ disabled: i.value,
52
+ "onUpdate:value": t(f)
53
+ }), x({ _: 2 }, [
54
+ d.character ? {
55
55
  name: "character",
56
- fn: x(() => [
57
- k(p.$slots, "character")
56
+ fn: k(() => [
57
+ w(v.$slots, "character")
58
58
  ]),
59
59
  key: "0"
60
60
  } : void 0
@@ -1,17 +1,18 @@
1
- import { defineComponent as h, shallowRef as B, useSlots as b, createElementBlock as x, createBlock as S, openBlock as r, toDisplayString as _, unref as e, mergeProps as g, createSlots as k, renderList as C, withCtx as P, renderSlot as I, normalizeProps as U, guardReactiveProps as w } from "vue";
2
- import { InputNumber as R } from "@aplus-frontend/antdv";
3
- import { omit as V } from "lodash-unified";
1
+ import { defineComponent as B, computed as b, shallowRef as x, useSlots as S, createElementBlock as _, createBlock as g, openBlock as r, toDisplayString as k, unref as e, mergeProps as P, createSlots as C, renderList as I, withCtx as U, renderSlot as w, normalizeProps as R, guardReactiveProps as V } from "vue";
2
+ import { InputNumber as z } from "@aplus-frontend/antdv";
3
+ import { omit as A } from "lodash-unified";
4
4
  import "../../hooks/index.mjs";
5
- import { useDefaultPlaceholder as z } from "../hooks/use-default-placeholder.mjs";
6
- import { formatSecond as A } from "./helper.mjs";
7
- import { useControllableValue as D } from "../../hooks/useControllableValue.mjs";
8
- const E = { key: 0 }, q = /* @__PURE__ */ h({
5
+ import { useDefaultPlaceholder as D } from "../hooks/use-default-placeholder.mjs";
6
+ import { formatSecond as E } from "./helper.mjs";
7
+ import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
8
+ const M = { key: 0 }, H = /* @__PURE__ */ B({
9
9
  name: "ApFieldSecond",
10
10
  __name: "index",
11
11
  props: {
12
12
  mode: {},
13
13
  class: {},
14
14
  style: {},
15
+ emptyText: { default: "--" },
15
16
  size: {},
16
17
  bordered: { type: Boolean, default: !0 },
17
18
  placeholder: {},
@@ -50,41 +51,38 @@ const E = { key: 0 }, q = /* @__PURE__ */ h({
50
51
  onPressEnter: {},
51
52
  onStep: {},
52
53
  onBlur: {},
53
- onFocus: {},
54
- emptyText: { default: "--" }
54
+ onFocus: {}
55
55
  },
56
56
  emits: ["update:value"],
57
57
  setup(u, { expose: d, emit: s }) {
58
- const o = u, p = s, t = B(), { value: a, updateValue: i } = D(
58
+ const o = u, p = b(
59
+ () => A(o, ["value", "onUpdate:value", "min", "placeholder", "mode"])
60
+ ), i = s, t = x(), { value: a, updateValue: f } = F(
59
61
  o,
60
- p
61
- ), f = b(), c = z("Second", o);
62
- function m() {
62
+ i
63
+ ), c = S(), m = D("Second", o);
64
+ function y() {
63
65
  t.value?.focus();
64
66
  }
65
- function y() {
67
+ function v() {
66
68
  t.value?.blur();
67
69
  }
68
- return d({ focus: m, blur: y }), (l, F) => l.mode === "read" ? (r(), x("span", E, _(e(A)(Number(e(a)))), 1)) : (r(), S(e(R), g(
69
- {
70
- key: 1,
71
- min: 0,
72
- style: { width: "100%" },
73
- placeholder: e(c),
74
- value: e(a)
75
- },
76
- e(V)(o, ["value", "onUpdate:value", "min", "placeholder", "mode"]),
77
- { "onUpdate:value": e(i) }
78
- ), k({ _: 2 }, [
79
- C(f, (M, n) => ({
70
+ return d({ focus: y, blur: v }), (l, N) => l.mode === "read" ? (r(), _("span", M, k(e(E)(Number(e(a)))), 1)) : (r(), g(e(z), P({
71
+ key: 1,
72
+ min: 0,
73
+ style: { width: "100%" },
74
+ placeholder: e(m),
75
+ value: e(a)
76
+ }, p.value, { "onUpdate:value": e(f) }), C({ _: 2 }, [
77
+ I(c, (O, n) => ({
80
78
  name: n,
81
- fn: P((v) => [
82
- I(l.$slots, n, U(w(v || {})))
79
+ fn: U((h) => [
80
+ w(l.$slots, n, R(V(h || {})))
83
81
  ])
84
82
  }))
85
83
  ]), 1040, ["placeholder", "value", "onUpdate:value"]));
86
84
  }
87
85
  });
88
86
  export {
89
- q as default
87
+ H as default
90
88
  };
@@ -7,6 +7,7 @@ const m = /* @__PURE__ */ n({
7
7
  mode: {},
8
8
  class: {},
9
9
  style: {},
10
+ emptyText: { default: "--" },
10
11
  size: {},
11
12
  bordered: { type: Boolean },
12
13
  placeholder: {},
@@ -45,8 +46,7 @@ const m = /* @__PURE__ */ n({
45
46
  onPressEnter: {},
46
47
  onStep: {},
47
48
  onBlur: {},
48
- onFocus: {},
49
- emptyText: { default: "--" }
49
+ onFocus: {}
50
50
  },
51
51
  setup(o) {
52
52
  const a = o;