@aplus-frontend/ui 7.7.2 → 7.7.4
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 +62 -60
- package/es/src/ap-field/checkbox/index.vue.mjs +18 -8
- package/es/src/ap-field/number/index.vue.mjs +19 -19
- package/es/src/ap-field/radio/index.vue.mjs +24 -24
- package/es/src/ap-field/rate/index.vue.mjs +10 -10
- package/es/src/ap-field/select/index.vue.mjs +74 -71
- package/es/src/ap-field/slider/index.vue.d.ts +4 -2
- package/es/src/ap-field/slider/index.vue.mjs +12 -12
- package/es/src/ap-field/switch/index.vue.mjs +20 -20
- package/es/src/ap-field/text/index.vue2.mjs +23 -23
- package/es/src/ap-field/text/password.vue.mjs +9 -9
- package/es/src/ap-field/text-area/index.vue.mjs +24 -20
- package/es/src/ap-field/tree-select/index.vue.mjs +17 -17
- package/es/src/ap-form/ap-form.vue2.mjs +64 -64
- package/es/src/ap-form/drawer-form/index.vue.mjs +41 -41
- package/es/src/ap-form/item/index.vue.mjs +64 -64
- package/es/src/ap-form/items/number/index.vue.mjs +10 -10
- package/es/src/ap-form/items/radio/index.vue.mjs +3 -3
- package/es/src/ap-form/items/select/index.vue.mjs +5 -5
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue2.mjs +6 -6
- package/es/src/ap-form/items/text/password.vue.mjs +7 -7
- package/es/src/ap-form/items/text-area/index.vue.mjs +5 -5
- package/es/src/ap-form/items/tree-select/index.vue.mjs +7 -7
- package/es/src/ap-form/search-form/index.vue.mjs +63 -63
- package/es/src/ap-form/style/item.mjs +17 -10
- package/es/src/ap-list/index.vue.mjs +6 -6
- package/es/src/ap-table/constants.d.ts +1 -1
- package/es/src/business/ap-descriptions/index.d.ts +1 -0
- package/es/src/business/ap-descriptions/index.mjs +4 -0
- package/es/src/business/ap-value-select-card/style/index.mjs +1 -1
- package/es/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/es/src/editable-table/form-item.vue.mjs +64 -64
- package/es/src/editable-table/index.vue.mjs +66 -66
- package/es/src/editable-table/style/index.mjs +5 -5
- package/es/src/index.mjs +46 -44
- package/es/src/scroll-bar/index.vue.d.ts +7 -7
- package/es/src/scroll-bar/index.vue.mjs +21 -21
- package/es/src/scroll-bar/internal.vue.d.ts +4 -4
- package/es/src/scroll-bar/internal.vue.mjs +20 -20
- package/es/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
- package/es/src/scroll-view/hooks/use-scroll-wrapper.mjs +13 -13
- package/es/src/scroll-view/index.vue.d.ts +25 -25
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +4 -2
- 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/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/item.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +1 -1
- package/lib/src/business/ap-descriptions/index.d.ts +1 -0
- package/lib/src/business/ap-descriptions/index.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/style/index.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/scroll-bar/index.vue.d.ts +7 -7
- package/lib/src/scroll-bar/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.d.ts +4 -4
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/scroll-view/hooks/use-scroll-wrapper.d.ts +4 -4
- package/lib/src/scroll-view/hooks/use-scroll-wrapper.js +1 -1
- package/lib/src/scroll-view/index.vue.d.ts +25 -25
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
package/es/index.mjs
CHANGED
|
@@ -120,36 +120,37 @@ import { NeedNameKeyDefault as Wt } from "./src/business/ap-upload/apUploadTypes
|
|
|
120
120
|
import { default as Jt } from "./src/business/ap-upload/apUpload.vue.mjs";
|
|
121
121
|
import { ApDownLoadNeedNameKeyDefault as Xt } from "./src/business/ap-download/interface.mjs";
|
|
122
122
|
import { default as Zt } from "./src/business/ap-download/ap-download.vue.mjs";
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import { default as xp } from "./src/editable-table/
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import { default as np } from "./src/scroll-bar/
|
|
131
|
-
import { default as Fp } from "./src/scroll-
|
|
132
|
-
import { default as Ip } from "./src/
|
|
133
|
-
import { default as Sp } from "./src/
|
|
134
|
-
import { default as Cp } from "./src/
|
|
135
|
-
import {
|
|
136
|
-
import {
|
|
137
|
-
import {
|
|
138
|
-
import { default as Np } from "./src/ap-grid/
|
|
139
|
-
import { default as Mp } from "./src/ap-grid/editable/
|
|
140
|
-
import { default as wp } from "./src/
|
|
141
|
-
import { default as Kp } from "./src/text/
|
|
142
|
-
import { default as Up } from "./src/
|
|
143
|
-
import {
|
|
144
|
-
import {
|
|
145
|
-
import { default as $p } from "./src/ag-grid/
|
|
146
|
-
import { default as Wp } from "./src/ag-grid/editable/
|
|
147
|
-
import {
|
|
148
|
-
import {
|
|
149
|
-
import {
|
|
150
|
-
import {
|
|
151
|
-
import {
|
|
152
|
-
import {
|
|
123
|
+
import { formatString as op } from "./src/business/ap-descriptions/formatter/utils.mjs";
|
|
124
|
+
import { default as tp } from "./src/business/ap-descriptions/ap-descriptions.vue.mjs";
|
|
125
|
+
import { useTablePaging as ap } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
126
|
+
import { ApTable as mp } from "./src/ap-table/index.mjs";
|
|
127
|
+
import { default as xp } from "./src/editable-table/index.vue.mjs";
|
|
128
|
+
import { default as sp } from "./src/editable-table/form-item.vue.mjs";
|
|
129
|
+
import { ensureRangeValue as Ap } from "./src/scroll-bar/utils/index.mjs";
|
|
130
|
+
import { default as np } from "./src/scroll-bar/index.vue.mjs";
|
|
131
|
+
import { default as Fp } from "./src/scroll-bar/internal.vue.mjs";
|
|
132
|
+
import { default as Ip } from "./src/scroll-view/index.vue.mjs";
|
|
133
|
+
import { default as Sp } from "./src/portal/index.vue.mjs";
|
|
134
|
+
import { default as Cp } from "./src/full-screen/index.vue.mjs";
|
|
135
|
+
import { default as Dp } from "./src/resize-observer/index.vue.mjs";
|
|
136
|
+
import { ROW_SELECTION_FIELD as Ep } from "./src/ap-grid/constants.mjs";
|
|
137
|
+
import { toTreeArray as Lp } from "./src/ap-grid/utils/to-tree-array.mjs";
|
|
138
|
+
import { default as Np } from "./src/ap-grid/index.vue.mjs";
|
|
139
|
+
import { default as Mp } from "./src/ap-grid/editable/index.vue.mjs";
|
|
140
|
+
import { default as wp } from "./src/ap-grid/editable/form-item.vue.mjs";
|
|
141
|
+
import { default as Kp } from "./src/text/index.vue.mjs";
|
|
142
|
+
import { default as Up } from "./src/text/group.vue.mjs";
|
|
143
|
+
import { default as Vp } from "./src/mask/index.vue.mjs";
|
|
144
|
+
import { Splitter as _p } from "./src/splitter/index.mjs";
|
|
145
|
+
import { default as $p } from "./src/ag-grid/index.vue.mjs";
|
|
146
|
+
import { default as Wp } from "./src/ag-grid/editable/index.vue.mjs";
|
|
147
|
+
import { default as Jp } from "./src/ag-grid/editable/form-item.vue.mjs";
|
|
148
|
+
import { useMessage as Xp } from "./src/hooks/useMessage.mjs";
|
|
149
|
+
import { useControllableValue as Zp } from "./src/hooks/useControllableValue.mjs";
|
|
150
|
+
import { useManualRef as oa } from "./src/hooks/useManualRef.mjs";
|
|
151
|
+
import { useThrottleRef as ta } from "./src/hooks/useThrottleRef.mjs";
|
|
152
|
+
import { useFullScreen as aa } from "./src/hooks/useFullScreen.mjs";
|
|
153
|
+
import { useResize as ma } from "./src/hooks/useResize.mjs";
|
|
153
154
|
const a = console.log;
|
|
154
155
|
a(`UI version: ${p}`);
|
|
155
156
|
const l = {
|
|
@@ -162,7 +163,7 @@ const l = {
|
|
|
162
163
|
};
|
|
163
164
|
export {
|
|
164
165
|
w as APConfigProvider,
|
|
165
|
-
|
|
166
|
+
$p as AgGrid,
|
|
166
167
|
Ro as ApActionButton,
|
|
167
168
|
go as ApActionGroup,
|
|
168
169
|
xo as ApActionItem,
|
|
@@ -178,7 +179,7 @@ export {
|
|
|
178
179
|
sr as ApCard,
|
|
179
180
|
vo as ApConfirmButton,
|
|
180
181
|
ct as ApCopy,
|
|
181
|
-
|
|
182
|
+
tp as ApDescriptions,
|
|
182
183
|
Xt as ApDownLoadNeedNameKeyDefault,
|
|
183
184
|
Zt as ApDownload,
|
|
184
185
|
Mt as ApDraggableGrid,
|
|
@@ -227,7 +228,7 @@ export {
|
|
|
227
228
|
Ee as ApFormProvider,
|
|
228
229
|
Ae as ApFormSearchForm,
|
|
229
230
|
Ie as ApFormSet,
|
|
230
|
-
|
|
231
|
+
Np as ApGrid,
|
|
231
232
|
Cr as ApImage,
|
|
232
233
|
Dr as ApInputRadio,
|
|
233
234
|
Dt as ApKeepAlive,
|
|
@@ -248,12 +249,12 @@ export {
|
|
|
248
249
|
Br as ApStatus,
|
|
249
250
|
Kr as ApStatusGroup,
|
|
250
251
|
Yr as ApSummary,
|
|
251
|
-
|
|
252
|
+
mp as ApTable,
|
|
252
253
|
Xo as ApTableModal,
|
|
253
254
|
_t as ApTag,
|
|
254
255
|
$t as ApTagGroup,
|
|
255
|
-
|
|
256
|
-
|
|
256
|
+
Kp as ApText,
|
|
257
|
+
Up as ApTextGroup,
|
|
257
258
|
Ur as ApTitle,
|
|
258
259
|
Jo as ApTransformDataHelper,
|
|
259
260
|
Jt as ApUpload,
|
|
@@ -266,26 +267,26 @@ export {
|
|
|
266
267
|
v as ConfigProvider,
|
|
267
268
|
A as DEFAULT_NAMESPACE,
|
|
268
269
|
i as DEFAULT_UIMODE,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
270
|
+
Wp as EditableAgGrid,
|
|
271
|
+
Jp as EditableAgGridFormItem,
|
|
272
|
+
Mp as EditableGrid,
|
|
273
|
+
wp as EditableGridFormItem,
|
|
274
|
+
xp as EditableTable,
|
|
275
|
+
sp as EditableTableFormItem,
|
|
276
|
+
Cp as FullScreen,
|
|
276
277
|
Wo as Highlight,
|
|
277
|
-
|
|
278
|
+
Fp as InternalScrollBar,
|
|
278
279
|
Uo as LoadingBar,
|
|
279
280
|
Et as LruCacher,
|
|
280
|
-
|
|
281
|
+
Vp as Mask,
|
|
281
282
|
Wt as NeedNameKeyDefault,
|
|
282
|
-
|
|
283
|
-
|
|
283
|
+
Sp as Portal,
|
|
284
|
+
Ep as ROW_SELECTION_FIELD,
|
|
284
285
|
Vo as Render,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
286
|
+
Dp as ResizeObserver,
|
|
287
|
+
np as ScrollBar,
|
|
288
|
+
Ip as ScrollView,
|
|
289
|
+
_p as Splitter,
|
|
289
290
|
_o as TimeAgo,
|
|
290
291
|
fo as adminToken,
|
|
291
292
|
mo as aplusToken,
|
|
@@ -297,11 +298,12 @@ export {
|
|
|
297
298
|
Sr as convertExportField,
|
|
298
299
|
l as default,
|
|
299
300
|
E as defaultNamespace,
|
|
300
|
-
|
|
301
|
+
Ap as ensureRangeValue,
|
|
301
302
|
qr as flattenColumns,
|
|
302
303
|
Ct as forceStopTags,
|
|
303
304
|
Jr as formatDataIndex,
|
|
304
305
|
Qr as formatNumber,
|
|
306
|
+
op as formatString,
|
|
305
307
|
M as globalConfigCached,
|
|
306
308
|
Ir as handleExportDownload,
|
|
307
309
|
Nt as isNameMatches,
|
|
@@ -310,26 +312,26 @@ export {
|
|
|
310
312
|
Rr as locales,
|
|
311
313
|
P as namespaceContextKey,
|
|
312
314
|
g as provideGlobalConfig,
|
|
313
|
-
|
|
315
|
+
Lp as toTreeArray,
|
|
314
316
|
G as translate,
|
|
315
317
|
Kt as useAgGridModal,
|
|
316
318
|
Ut as useAgGridSelectModal,
|
|
317
319
|
Lt as useApKeepAliveInject,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
+
Zp as useControllableValue,
|
|
321
|
+
aa as useFullScreen,
|
|
320
322
|
L as useGetDerivedNamespace,
|
|
321
323
|
I as useGlobalConfig,
|
|
322
324
|
D as useLocale,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
+
oa as useManualRef,
|
|
326
|
+
Xp as useMessage,
|
|
325
327
|
R as useNamespace,
|
|
326
328
|
$r as usePageListAgGrid,
|
|
327
329
|
_r as usePageListApGrid,
|
|
328
330
|
Vr as usePageListApTable,
|
|
329
|
-
|
|
331
|
+
ma as useResize,
|
|
330
332
|
Zo as useTableModal,
|
|
331
|
-
|
|
333
|
+
ap as useTablePaging,
|
|
332
334
|
or as useTableSelectModal,
|
|
333
|
-
|
|
335
|
+
ta as useThrottleRef,
|
|
334
336
|
$o as useTimeAgo
|
|
335
337
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as g, ref as C, onMounted as V, createElementBlock as l, openBlock as o, Fragment as i, unref as e, createTextVNode as u, toDisplayString as m, createBlock as d, mergeProps as B } from "vue";
|
|
2
|
-
import { isFunction as O, isNil as
|
|
2
|
+
import { isFunction as O, isNil as T, omit as q } from "lodash-unified";
|
|
3
3
|
import { Spin as U, CheckboxGroup as _ } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
5
|
import { getOptionValue as F, getOptionLabel as N } from "./helper.mjs";
|
|
@@ -45,7 +45,7 @@ const Q = /* @__PURE__ */ g({
|
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
47
|
return (a, D) => a.mode === "read" ? (o(), l(i, { key: 0 }, [
|
|
48
|
-
e(
|
|
48
|
+
e(T)(e(r)) ? (o(), l(i, { key: 0 }, [
|
|
49
49
|
u(m(t.emptyText), 1)
|
|
50
50
|
], 64)) : (o(), l(i, { key: 1 }, [
|
|
51
51
|
u(m(e(p)?.filter((s) => e(r).indexOf(e(F)(s)) > -1).map((s) => e(N)(s)).join("、") || t.emptyText), 1)
|
|
@@ -54,12 +54,22 @@ const Q = /* @__PURE__ */ g({
|
|
|
54
54
|
n.value ? (o(), d(e(U), {
|
|
55
55
|
key: 0,
|
|
56
56
|
size: "small"
|
|
57
|
-
})) : (o(), d(e(_), B(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
})) : (o(), d(e(_), B(
|
|
58
|
+
{ key: 1 },
|
|
59
|
+
e(q)(t, [
|
|
60
|
+
"onUpdate:value",
|
|
61
|
+
"value",
|
|
62
|
+
"request",
|
|
63
|
+
"vertical",
|
|
64
|
+
"emptyText"
|
|
65
|
+
]),
|
|
66
|
+
{
|
|
67
|
+
options: e(p),
|
|
68
|
+
value: e(r),
|
|
69
|
+
class: [e(k)(), a.vertical ? e(x)("vertical") : null, e(h)],
|
|
70
|
+
"onUpdate:value": e(b)
|
|
71
|
+
}
|
|
72
|
+
), null, 16, ["options", "value", "class", "onUpdate:value"]))
|
|
63
73
|
], 64));
|
|
64
74
|
}
|
|
65
75
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as C,
|
|
1
|
+
import { defineComponent as C, shallowRef as N, computed as D, unref as t, createElementBlock as s, createBlock as P, openBlock as l, normalizeClass as i, createCommentVNode as f, createElementVNode as R, renderSlot as u, toDisplayString as V, mergeProps as $, createSlots as I, renderList as A, withCtx as U, normalizeProps as z, guardReactiveProps as E } from "vue";
|
|
2
2
|
import { InputNumber as M } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
|
-
import { isNil as T, omit as
|
|
5
|
-
import { addZeroToDecimalPlaces as
|
|
4
|
+
import { isNil as T, omit as w } from "lodash-unified";
|
|
5
|
+
import { addZeroToDecimalPlaces as F } from "./helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { useDefaultPlaceholder as
|
|
8
|
-
import
|
|
7
|
+
import { useDefaultPlaceholder as W } from "../hooks/use-default-placeholder.mjs";
|
|
8
|
+
import _ from "../style/index.mjs";
|
|
9
9
|
import { roundWith as L, toDecimalMark as O } from "../../utils/format.mjs";
|
|
10
10
|
import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
11
|
import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
|
|
12
|
-
const
|
|
12
|
+
const le = /* @__PURE__ */ C({
|
|
13
13
|
name: "ApFieldNumber",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -60,16 +60,16 @@ const re = /* @__PURE__ */ C({
|
|
|
60
60
|
},
|
|
61
61
|
emits: ["update:value"],
|
|
62
62
|
setup(m, { expose: c, emit: y }) {
|
|
63
|
-
const v = y, { b:
|
|
63
|
+
const v = y, { b: r } = Z("field-number"), h = _("field"), o = m, n = N(), { value: p, updateValue: B } = j(
|
|
64
64
|
o,
|
|
65
65
|
v
|
|
66
|
-
), b =
|
|
66
|
+
), b = W("Number", o), k = D(() => {
|
|
67
67
|
let e = t(p);
|
|
68
68
|
if (T(e))
|
|
69
69
|
return o.emptyText;
|
|
70
70
|
o.precision && (e = L(e, o.precision));
|
|
71
71
|
let a = o.thousands ? O(e) : String(e);
|
|
72
|
-
return o.precision && o.limitDecimalsRetain && (a =
|
|
72
|
+
return o.precision && o.limitDecimalsRetain && (a = F(a, o.precision)), a;
|
|
73
73
|
});
|
|
74
74
|
function g() {
|
|
75
75
|
n.value?.focus();
|
|
@@ -77,30 +77,30 @@ const re = /* @__PURE__ */ C({
|
|
|
77
77
|
function S() {
|
|
78
78
|
n.value?.blur();
|
|
79
79
|
}
|
|
80
|
-
return c({ focus: g, blur: S }), (e, a) => e.mode === "read" ? (
|
|
80
|
+
return c({ focus: g, blur: S }), (e, a) => e.mode === "read" ? (l(), s("span", {
|
|
81
81
|
key: 0,
|
|
82
|
-
class: i([t(
|
|
82
|
+
class: i([t(r)(), t(h)])
|
|
83
83
|
}, [
|
|
84
|
-
e.$slots.prefix ? (
|
|
84
|
+
e.$slots.prefix ? (l(), s("span", {
|
|
85
85
|
key: 0,
|
|
86
|
-
class: i(t(
|
|
86
|
+
class: i(t(r)("label-left"))
|
|
87
87
|
}, [
|
|
88
88
|
u(e.$slots, "prefix")
|
|
89
89
|
], 2)) : f("", !0),
|
|
90
|
-
|
|
91
|
-
e.$slots.addonAfter ? (
|
|
90
|
+
R("span", null, V(k.value), 1),
|
|
91
|
+
e.$slots.addonAfter ? (l(), s("span", {
|
|
92
92
|
key: 1,
|
|
93
|
-
class: i(t(
|
|
93
|
+
class: i(t(r)("label-right"))
|
|
94
94
|
}, [
|
|
95
95
|
u(e.$slots, "addonAfter")
|
|
96
96
|
], 2)) : f("", !0)
|
|
97
|
-
], 2)) : (
|
|
97
|
+
], 2)) : (l(), P(t(M), $({ key: 1 }, t(w)(o, ["value", "onUpdate:value"]), {
|
|
98
98
|
ref_key: "inputRef",
|
|
99
99
|
ref: n,
|
|
100
100
|
placeholder: t(b),
|
|
101
101
|
value: t(p),
|
|
102
102
|
"onUpdate:value": t(B)
|
|
103
|
-
}),
|
|
103
|
+
}), I({ _: 2 }, [
|
|
104
104
|
A(e.$slots, (q, d) => ({
|
|
105
105
|
name: d,
|
|
106
106
|
fn: U((x) => [
|
|
@@ -111,5 +111,5 @@ const re = /* @__PURE__ */ C({
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
export {
|
|
114
|
-
|
|
114
|
+
le as default
|
|
115
115
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Spin as
|
|
1
|
+
import { defineComponent as V, shallowRef as _, ref as q, onMounted as C, computed as O, unref as e, createElementBlock as s, openBlock as a, Fragment as p, createTextVNode as S, toDisplayString as U, createBlock as m, mergeProps as G } from "vue";
|
|
2
|
+
import { Spin as N, RadioGroup as z } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
|
-
import { isNil as
|
|
4
|
+
import { isNil as F, omit as w } from "lodash-unified";
|
|
5
5
|
import { getOptionValue as A, getOptionLabel as D } from "./helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
7
|
import E from "../hooks/use-options.mjs";
|
|
8
8
|
import I from "../style/index.mjs";
|
|
9
9
|
import { useControllableValue as L } from "../../hooks/useControllableValue.mjs";
|
|
10
10
|
import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
-
const
|
|
11
|
+
const $ = /* @__PURE__ */ V({
|
|
12
12
|
name: "ApFieldRadio",
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
@@ -32,40 +32,40 @@ const Z = /* @__PURE__ */ q({
|
|
|
32
32
|
vertical: { type: Boolean, default: !1 }
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:value"],
|
|
35
|
-
setup(
|
|
36
|
-
const t =
|
|
35
|
+
setup(d, { expose: f, emit: c }) {
|
|
36
|
+
const t = d, v = c, l = _(), { options: r, updateOptions: y } = E(t), { value: u, updateValue: g } = L(t, v), { b: k, m: b } = M("field-radio"), x = I("field"), n = q(!1);
|
|
37
37
|
C(() => {
|
|
38
|
-
t.request && (n.value = !0, t.request?.().then((o) =>
|
|
38
|
+
t.request && (n.value = !0, t.request?.().then((o) => y(o)).finally(() => {
|
|
39
39
|
n.value = !1;
|
|
40
40
|
}));
|
|
41
41
|
});
|
|
42
|
-
const
|
|
42
|
+
const h = O(() => {
|
|
43
43
|
const o = e(u);
|
|
44
|
-
if (
|
|
44
|
+
if (F(o))
|
|
45
45
|
return t.emptyText;
|
|
46
46
|
const i = r.value?.find(
|
|
47
|
-
(
|
|
47
|
+
(R) => o === A(R)
|
|
48
48
|
);
|
|
49
49
|
return D(i) || t.emptyText;
|
|
50
50
|
});
|
|
51
|
-
function
|
|
51
|
+
function B() {
|
|
52
52
|
l.value?.focus();
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function T() {
|
|
55
55
|
l.value?.blur();
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
focus:
|
|
59
|
-
blur:
|
|
60
|
-
}), (o, i) => o.mode === "read" ? (a(), p
|
|
61
|
-
|
|
62
|
-
], 64)) : (a(), p
|
|
63
|
-
n.value ? (a(),
|
|
57
|
+
return f({
|
|
58
|
+
focus: B,
|
|
59
|
+
blur: T
|
|
60
|
+
}), (o, i) => o.mode === "read" ? (a(), s(p, { key: 0 }, [
|
|
61
|
+
S(U(h.value), 1)
|
|
62
|
+
], 64)) : (a(), s(p, { key: 1 }, [
|
|
63
|
+
n.value ? (a(), m(e(N), {
|
|
64
64
|
key: 0,
|
|
65
65
|
size: "small"
|
|
66
|
-
})) : (a(),
|
|
66
|
+
})) : (a(), m(e(z), G(
|
|
67
67
|
{ key: 1 },
|
|
68
|
-
e(
|
|
68
|
+
e(w)(t, [
|
|
69
69
|
"value",
|
|
70
70
|
"onUpdate:value",
|
|
71
71
|
"options",
|
|
@@ -77,13 +77,13 @@ const Z = /* @__PURE__ */ q({
|
|
|
77
77
|
ref: l,
|
|
78
78
|
value: e(u),
|
|
79
79
|
options: e(r),
|
|
80
|
-
class: [e(
|
|
81
|
-
"onUpdate:value": e(
|
|
80
|
+
class: [e(k)(), o.vertical ? e(b)("vertical") : null, e(x)],
|
|
81
|
+
"onUpdate:value": e(g)
|
|
82
82
|
}
|
|
83
83
|
), null, 16, ["value", "options", "class", "onUpdate:value"]))
|
|
84
84
|
], 64));
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
87
|
export {
|
|
88
|
-
|
|
88
|
+
$ as default
|
|
89
89
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as m,
|
|
2
|
-
import { omit as
|
|
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 { omit as w } from "lodash-unified";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
|
-
import { Rate as
|
|
5
|
-
import { useControllableValue as
|
|
4
|
+
import { Rate as R } from "@aplus-frontend/antdv";
|
|
5
|
+
import { useControllableValue as g } from "../../hooks/useControllableValue.mjs";
|
|
6
6
|
const D = /* @__PURE__ */ m({
|
|
7
7
|
name: "ApFieldRate",
|
|
8
8
|
__name: "index",
|
|
@@ -32,20 +32,20 @@ const D = /* @__PURE__ */ m({
|
|
|
32
32
|
defaultValue: {}
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:value"],
|
|
35
|
-
setup(
|
|
36
|
-
const e =
|
|
35
|
+
setup(t, { expose: l, emit: r }) {
|
|
36
|
+
const e = t, a = v(), u = r, n = b(), { value: d, updateValue: s } = g(e, u), f = y(() => e.mode === "read" ? !0 : e.disabled);
|
|
37
37
|
function c() {
|
|
38
|
-
|
|
38
|
+
a.value?.focus?.();
|
|
39
39
|
}
|
|
40
40
|
function i() {
|
|
41
|
-
|
|
41
|
+
a.value?.blur?.();
|
|
42
42
|
}
|
|
43
43
|
return l({
|
|
44
44
|
focus: c,
|
|
45
45
|
blur: i
|
|
46
|
-
}), (p, V) => (B(), h(o(
|
|
46
|
+
}), (p, V) => (B(), h(o(R), C(o(w)(e, ["mode", "defaultValue"]), {
|
|
47
47
|
ref_key: "rateRef",
|
|
48
|
-
ref:
|
|
48
|
+
ref: a,
|
|
49
49
|
value: o(d),
|
|
50
50
|
disabled: f.value,
|
|
51
51
|
"onUpdate:value": o(s)
|