@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.
- package/es/index.mjs +29 -31
- package/es/src/ag-grid/editable/form-item.vue.mjs +48 -48
- package/es/src/ap-field/cascader/index.vue.mjs +82 -130
- package/es/src/ap-field/cascader/read.vue2.mjs +36 -35
- package/es/src/ap-field/checkbox/index.vue.d.ts +18 -1
- package/es/src/ap-field/checkbox/index.vue.mjs +42 -43
- package/es/src/ap-field/checkbox/read.vue2.mjs +1 -1
- package/es/src/ap-field/date/index.vue.mjs +48 -48
- package/es/src/ap-field/date/read.vue2.mjs +1 -1
- package/es/src/ap-field/date-range/index.vue.mjs +31 -31
- package/es/src/ap-field/date-range/read.vue2.mjs +1 -1
- package/es/src/ap-field/interface.d.ts +13 -23
- package/es/src/ap-field/number/index.vue.mjs +36 -34
- package/es/src/ap-field/number/read.vue2.mjs +1 -1
- package/es/src/ap-field/radio/index.vue.mjs +34 -42
- package/es/src/ap-field/radio/read.vue2.mjs +1 -1
- package/es/src/ap-field/rate/index.vue.mjs +23 -23
- package/es/src/ap-field/second/index.vue.mjs +27 -29
- package/es/src/ap-field/second/read.vue2.mjs +2 -2
- package/es/src/ap-field/segmented/index.vue.mjs +37 -37
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.mjs +147 -136
- package/es/src/ap-field/select/read.vue2.mjs +2 -1
- package/es/src/ap-field/slider/index.vue.mjs +35 -37
- package/es/src/ap-field/switch/index.vue.mjs +38 -38
- package/es/src/ap-field/switch/read.vue2.mjs +3 -3
- package/es/src/ap-field/text/index.vue.d.ts +478 -3
- package/es/src/ap-field/text/index.vue2.mjs +47 -46
- package/es/src/ap-field/text/password.vue.d.ts +549 -3
- package/es/src/ap-field/text/password.vue.mjs +61 -56
- package/es/src/ap-field/text/read-password.vue2.mjs +16 -16
- package/es/src/ap-field/text/read.vue2.mjs +1 -1
- package/es/src/ap-field/text-area/index.vue.mjs +29 -31
- package/es/src/ap-field/text-area/read.vue2.mjs +1 -1
- package/es/src/ap-field/tree-select/index.vue.mjs +47 -47
- package/es/src/ap-field/tree-select/read.vue2.mjs +3 -3
- package/es/src/ap-form/drawer-form/index.vue.mjs +99 -90
- package/es/src/ap-form/hooks/use-regist-form.d.ts +7 -0
- package/es/src/ap-form/hooks/use-regist-form.mjs +24 -0
- package/es/src/ap-form/interface.d.ts +18 -0
- package/es/src/ap-form/item/index.vue.d.ts +6 -6
- package/es/src/ap-form/item/index.vue.mjs +85 -94
- package/es/src/ap-form/item-group/index.vue.mjs +14 -14
- package/es/src/ap-form/items/cascader/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
- package/es/src/ap-form/items/date/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +10 -8
- package/es/src/ap-form/items/switch/index.vue.d.ts +3 -3
- package/es/src/ap-form/items/text/index.vue.d.ts +476 -4
- package/es/src/ap-form/items/text/password.vue.d.ts +547 -4
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-form/list/index.vue.mjs +29 -34
- package/es/src/ap-form/modal-form/index.vue.mjs +77 -68
- package/es/src/ap-form/set/index.vue.d.ts +2 -4
- package/es/src/ap-form/set/index.vue.mjs +23 -18
- package/es/src/ap-grid/index.vue.mjs +1 -1
- package/es/src/ap-table/constants.d.ts +600 -37
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/business/batch-input-group/index.vue.d.ts +240 -3
- package/es/src/business/batch-input-group/index.vue.mjs +1 -1
- package/es/src/check-card/index.vue2.mjs +61 -64
- package/es/src/hooks/index.d.ts +0 -1
- package/es/src/hooks/index.mjs +10 -12
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-field/cascader/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/read.vue2.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.d.ts +18 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/interface.d.ts +13 -23
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/number/read.vue2.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/radio/read.vue2.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/switch/read.vue2.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +478 -3
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +549 -3
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/hooks/use-regist-form.d.ts +7 -0
- package/lib/src/ap-form/hooks/use-regist-form.js +1 -0
- package/lib/src/ap-form/interface.d.ts +18 -0
- package/lib/src/ap-form/item/index.vue.d.ts +6 -6
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/cascader/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
- package/lib/src/ap-form/items/date/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +10 -8
- package/lib/src/ap-form/items/switch/index.vue.d.ts +3 -3
- package/lib/src/ap-form/items/text/index.vue.d.ts +476 -4
- package/lib/src/ap-form/items/text/password.vue.d.ts +547 -4
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/list/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/set/index.vue.d.ts +2 -4
- package/lib/src/ap-form/set/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +600 -37
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +240 -3
- package/lib/src/business/batch-input-group/index.vue.js +1 -1
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/hooks/index.d.ts +0 -1
- package/lib/src/hooks/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/es/src/hooks/useMessage.d.ts +0 -62
- package/es/src/hooks/useMessage.mjs +0 -86
- package/lib/src/hooks/useMessage.d.ts +0 -62
- 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
|
|
2
|
-
import { InputNumber as
|
|
3
|
-
import {
|
|
4
|
-
import { roundWith as
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import { addZeroToDecimalPlaces as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
import { useControllableValue as
|
|
12
|
-
const
|
|
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(
|
|
65
|
-
const v =
|
|
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
|
-
|
|
68
|
-
),
|
|
69
|
+
h
|
|
70
|
+
), S = Z("Number", o), x = m(() => {
|
|
69
71
|
let e = t(p);
|
|
70
|
-
if (
|
|
72
|
+
if (W(e))
|
|
71
73
|
return o.emptyText;
|
|
72
|
-
o.precision && (e =
|
|
73
|
-
let a = o.thousands ?
|
|
74
|
-
return o.precision && o.limitDecimalsRetain && (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
|
|
78
|
+
function C() {
|
|
77
79
|
n.value?.focus();
|
|
78
80
|
}
|
|
79
|
-
function
|
|
81
|
+
function N() {
|
|
80
82
|
n.value?.blur();
|
|
81
83
|
}
|
|
82
|
-
return
|
|
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(
|
|
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)) :
|
|
92
|
-
|
|
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)) :
|
|
99
|
-
], 2)) : (l(),
|
|
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(
|
|
104
|
+
placeholder: t(S),
|
|
103
105
|
value: t(p),
|
|
104
106
|
mode: e.inputMode,
|
|
105
|
-
"onUpdate:value": t(
|
|
106
|
-
}),
|
|
107
|
-
|
|
107
|
+
"onUpdate:value": t(k)
|
|
108
|
+
}), U({ _: 2 }, [
|
|
109
|
+
z(B, (J, d) => ({
|
|
108
110
|
name: d,
|
|
109
|
-
fn:
|
|
110
|
-
u(e.$slots, d,
|
|
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
|
-
|
|
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
|
|
2
|
-
import { Spin as
|
|
3
|
-
import {
|
|
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
|
|
7
|
-
import
|
|
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
|
|
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(
|
|
36
|
-
const t =
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
+
O(() => {
|
|
45
|
+
s();
|
|
44
46
|
});
|
|
45
|
-
const
|
|
47
|
+
const h = p(() => {
|
|
46
48
|
const o = e(r);
|
|
47
|
-
if (
|
|
49
|
+
if (F(o))
|
|
48
50
|
return t.emptyText;
|
|
49
|
-
const
|
|
50
|
-
(
|
|
51
|
+
const i = n.value?.find(
|
|
52
|
+
(q) => o === A(q)
|
|
51
53
|
);
|
|
52
|
-
return D(
|
|
54
|
+
return D(i) || t.emptyText;
|
|
53
55
|
});
|
|
54
|
-
return
|
|
55
|
-
request:
|
|
56
|
-
}), (o,
|
|
57
|
-
|
|
58
|
-
], 64)) : (a(),
|
|
59
|
-
l.value ? (a(),
|
|
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(),
|
|
63
|
-
|
|
64
|
-
e(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import { Rate as
|
|
3
|
-
import { omit as
|
|
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
|
|
6
|
-
const A = /* @__PURE__ */
|
|
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(
|
|
37
|
-
const e =
|
|
38
|
-
function
|
|
39
|
-
|
|
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
|
|
42
|
-
|
|
41
|
+
function m() {
|
|
42
|
+
o.value?.blur?.();
|
|
43
43
|
}
|
|
44
|
-
return
|
|
45
|
-
focus:
|
|
46
|
-
blur:
|
|
47
|
-
}), (
|
|
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:
|
|
50
|
-
value:
|
|
51
|
-
disabled:
|
|
52
|
-
"onUpdate:value":
|
|
53
|
-
}),
|
|
54
|
-
|
|
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:
|
|
57
|
-
|
|
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
|
|
2
|
-
import { InputNumber as
|
|
3
|
-
import { omit as
|
|
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
|
|
6
|
-
import { formatSecond as
|
|
7
|
-
import { useControllableValue as
|
|
8
|
-
const
|
|
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 =
|
|
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
|
-
|
|
61
|
-
),
|
|
62
|
-
function
|
|
62
|
+
i
|
|
63
|
+
), c = S(), m = D("Second", o);
|
|
64
|
+
function y() {
|
|
63
65
|
t.value?.focus();
|
|
64
66
|
}
|
|
65
|
-
function
|
|
67
|
+
function v() {
|
|
66
68
|
t.value?.blur();
|
|
67
69
|
}
|
|
68
|
-
return d({ focus:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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:
|
|
82
|
-
|
|
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
|
-
|
|
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;
|