@aplus-frontend/ui 0.0.5 → 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.
- package/es/index.mjs +91 -85
- package/es/src/ap-field/checkbox/index.vue.mjs +8 -8
- package/es/src/ap-field/date-range/index.vue.d.ts +4 -0
- package/es/src/ap-field/date-range/index.vue.mjs +68 -59
- package/es/src/ap-field/index.d.ts +6 -2
- package/es/src/ap-field/index.mjs +23 -16
- package/es/src/ap-field/interface.d.ts +24 -3
- package/es/src/ap-field/segmented/index.vue.d.ts +31 -0
- package/es/src/ap-field/segmented/index.vue.mjs +77 -0
- package/es/src/ap-field/segmented/index.vue2.mjs +4 -0
- package/es/src/ap-field/select/index.vue.mjs +3 -3
- package/es/src/ap-field/slider/index.vue.d.ts +64 -0
- package/es/src/ap-field/slider/index.vue.mjs +90 -0
- package/es/src/ap-field/slider/index.vue2.mjs +4 -0
- package/es/src/ap-field/switch/index.vue.mjs +7 -7
- package/es/src/ap-field/text/index.d.ts +8 -0
- package/es/src/ap-field/text/index.mjs +10 -0
- package/es/src/ap-field/text/index.vue.mjs +2 -131
- package/es/src/ap-field/text/index.vue2.mjs +131 -2
- package/es/src/ap-field/text/input-password-props.d.ts +13 -0
- package/es/src/ap-field/text/password.vue.d.ts +74 -0
- package/es/src/ap-field/text/password.vue.mjs +152 -0
- package/es/src/ap-field/text/password.vue2.mjs +4 -0
- package/es/src/ap-table/constants.d.ts +706 -1
- package/es/src/ap-table/constants.mjs +17 -17
- package/es/src/ap-table/hooks/use-table-paging.mjs +14 -14
- package/es/src/index.mjs +73 -67
- package/lib/index.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +4 -0
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/index.d.ts +6 -2
- package/lib/src/ap-field/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +24 -3
- package/lib/src/ap-field/segmented/index.vue.d.ts +31 -0
- package/lib/src/ap-field/segmented/index.vue.js +1 -0
- package/lib/src/ap-field/segmented/index.vue2.js +1 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +64 -0
- package/lib/src/ap-field/slider/index.vue.js +1 -0
- package/lib/src/ap-field/slider/index.vue2.js +1 -0
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.d.ts +8 -0
- package/lib/src/ap-field/text/index.js +1 -0
- package/lib/src/ap-field/text/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/input-password-props.d.ts +13 -0
- package/lib/src/ap-field/text/password.vue.d.ts +74 -0
- package/lib/src/ap-field/text/password.vue.js +1 -0
- package/lib/src/ap-field/text/password.vue2.js +1 -0
- package/lib/src/ap-table/constants.d.ts +706 -1
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/index.js +1 -1
- package/package.json +2 -2
package/es/index.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import * as e from "./src/index.mjs";
|
|
|
2
2
|
import "./src/hooks/index.mjs";
|
|
3
3
|
import { Icon as l, SvgIcon as s } from "./src/icon/index.mjs";
|
|
4
4
|
import { configProviderProps as x } from "./src/config-provider/config-provider-props.mjs";
|
|
5
|
-
import { configProviderContextKey as
|
|
6
|
-
import { keysOf as
|
|
7
|
-
import { buildLocaleContext as S, buildTranslator as I, localeContextKey as
|
|
5
|
+
import { configProviderContextKey as n, tableDefaultConfig as u } from "./src/config-provider/constants.mjs";
|
|
6
|
+
import { keysOf as c, provideGlobalConfig as F, useGlobalConfig as T } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
7
|
+
import { buildLocaleContext as S, buildTranslator as I, localeContextKey as g, translate as b, useLocale as P } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
8
|
import { defaultNamespace as v, namespaceContextKey as R, useGetDerivedNamespace as M, useNamespace as h } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
|
-
import { ConfigProvider as
|
|
9
|
+
import { ConfigProvider as w } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as G } from "./src/config-provider/index.mjs";
|
|
11
11
|
import { Scrollbar as y } from "./src/scroll-bar/index.mjs";
|
|
12
12
|
import { CollapseContainer as X, ScrollContainer as K } from "./src/container/index.mjs";
|
|
@@ -16,16 +16,16 @@ import { default as z } from "./src/locale/lang/en.mjs";
|
|
|
16
16
|
import { BasicArrow as V, BasicHelp as $, BasicTitle as j } from "./src/basic/index.mjs";
|
|
17
17
|
import { default as J } from "./src/transition/collapse-transition.vue.mjs";
|
|
18
18
|
import { ExpandTransition as Z, ExpandXTransition as _, FadeTransition as oo, ScaleRotateTransition as eo, ScaleTransition as ro, ScrollXReverseTransition as to, ScrollXTransition as ao, ScrollYReverseTransition as po, ScrollYTransition as fo, SlideXReverseTransition as mo, SlideXTransition as lo, SlideYReverseTransition as so, SlideYTransition as xo } from "./src/transition/index.mjs";
|
|
19
|
-
import { useDescription as
|
|
20
|
-
import { Description as
|
|
21
|
-
import { useComponentRegister as
|
|
19
|
+
import { useDescription as no } from "./src/description/use-description.mjs";
|
|
20
|
+
import { Description as Ao } from "./src/description/index.mjs";
|
|
21
|
+
import { useComponentRegister as Fo } from "./src/pro-form/hooks/use-component-register.mjs";
|
|
22
22
|
import { useForm as Co } from "./src/pro-form/hooks/use-form.mjs";
|
|
23
|
-
import { isComponentFormSchema as Io, isSlotFormSchema as
|
|
23
|
+
import { isComponentFormSchema as Io, isSlotFormSchema as go } from "./src/pro-form/types/form.mjs";
|
|
24
24
|
import { Field as Po } from "./src/pro-form/index.mjs";
|
|
25
25
|
import { default as vo } from "./src/pro-form/components/api-cascader.vue.mjs";
|
|
26
26
|
import { default as Mo } from "./src/pro-form/components/api-radio-group.vue.mjs";
|
|
27
27
|
import { default as Bo } from "./src/pro-form/components/api-select.vue.mjs";
|
|
28
|
-
import { default as
|
|
28
|
+
import { default as ko } from "./src/pro-form/components/api-transfer.vue.mjs";
|
|
29
29
|
import { default as No } from "./src/pro-form/components/api-tree.vue.mjs";
|
|
30
30
|
import { default as Lo } from "./src/pro-form/components/radio-button-group.vue.mjs";
|
|
31
31
|
import { default as Ko } from "./src/pro-form/pro-form.vue.mjs";
|
|
@@ -41,16 +41,16 @@ import { useModal as re, useModalInner as te } from "./src/modal/hooks/use-modal
|
|
|
41
41
|
import { BaseModal as pe } from "./src/modal/index.mjs";
|
|
42
42
|
import { CropperAvatar as me, CropperImage as le } from "./src/cropper/index.mjs";
|
|
43
43
|
import { CountdownButton as de, CountdownInput as xe } from "./src/count-down/index.mjs";
|
|
44
|
-
import { createPrompt as
|
|
45
|
-
import { Dropdown as
|
|
46
|
-
import { default as
|
|
44
|
+
import { createPrompt as ne } from "./src/prompt/index.mjs";
|
|
45
|
+
import { Dropdown as Ae } from "./src/dropdown/index.mjs";
|
|
46
|
+
import { default as Fe } from "./src/pro-table/pro-table.vue.mjs";
|
|
47
47
|
import { default as Ce } from "./src/pro-table/components/table-action.vue.mjs";
|
|
48
48
|
import { default as Ie } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
|
|
49
|
-
import { default as
|
|
49
|
+
import { default as be } from "./src/pro-table/components/table-image.vue.mjs";
|
|
50
50
|
import { useTable as De } from "./src/pro-table/hooks/use-table.mjs";
|
|
51
51
|
import { default as Re } from "./src/ap-form/items/text/index.vue.mjs";
|
|
52
52
|
import { default as he } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
53
|
-
import { default as
|
|
53
|
+
import { default as we } from "./src/ap-form/items/number/index.vue.mjs";
|
|
54
54
|
import { default as Ge } from "./src/ap-form/items/date/index.vue.mjs";
|
|
55
55
|
import { default as ye } from "./src/ap-form/items/date-range/index.vue.mjs";
|
|
56
56
|
import { default as Xe } from "./src/ap-form/items/radio/index.vue.mjs";
|
|
@@ -64,38 +64,41 @@ import { default as Qe } from "./src/ap-form/ap-form-list.vue.mjs";
|
|
|
64
64
|
import { default as _e } from "./src/ap-form/search-form/index.vue.mjs";
|
|
65
65
|
import { default as er } from "./src/ap-form/modal-form/index.vue.mjs";
|
|
66
66
|
import { ApField as tr } from "./src/ap-field/index.mjs";
|
|
67
|
-
import {
|
|
67
|
+
import { ApFieldText as pr } from "./src/ap-field/text/index.mjs";
|
|
68
68
|
import { default as mr } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
69
69
|
import { default as sr } from "./src/ap-field/date/index.vue.mjs";
|
|
70
70
|
import { default as xr } from "./src/ap-field/number/index.vue.mjs";
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
71
|
+
import { default as nr } from "./src/ap-field/radio/index.vue.mjs";
|
|
72
|
+
import { default as Ar } from "./src/ap-field/switch/index.vue.mjs";
|
|
73
|
+
import { default as Fr } from "./src/ap-field/text-area/index.vue.mjs";
|
|
74
74
|
import { default as Cr } from "./src/ap-field/date-range/index.vue.mjs";
|
|
75
75
|
import { default as Ir } from "./src/ap-field/select/index.vue.mjs";
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import { default as
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import { default as Nr } from "./src/ap-action/
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import { default as Er } from "./src/ap-
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import { default as jr } from "./src/
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import { default as ot } from "./src/
|
|
92
|
-
import {
|
|
93
|
-
import { default as at } from "./src/ap-
|
|
94
|
-
import { default as ft } from "./src/ap-
|
|
95
|
-
import {
|
|
96
|
-
import { default as dt } from "./src/ap-
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
76
|
+
import { default as br } from "./src/ap-field/text/password.vue.mjs";
|
|
77
|
+
import { default as Dr } from "./src/ap-field/slider/index.vue.mjs";
|
|
78
|
+
import { default as Rr } from "./src/ap-field/segmented/index.vue.mjs";
|
|
79
|
+
import { adminToken as hr, aplusToken as Br } from "./src/design-token/index.mjs";
|
|
80
|
+
import { ApActionItem as kr } from "./src/ap-action/index.mjs";
|
|
81
|
+
import { default as Nr } from "./src/ap-action/item-modal/index.vue.mjs";
|
|
82
|
+
import { default as Lr } from "./src/ap-action/item-popconfirm/index.vue.mjs";
|
|
83
|
+
import { default as Kr } from "./src/ap-action/item-dropdown/index.vue.mjs";
|
|
84
|
+
import { default as Er } from "./src/ap-action/group/index.vue.mjs";
|
|
85
|
+
import { generateTableList as Hr } from "./src/ap-custom-column/utils.mjs";
|
|
86
|
+
import { useCacheColumnSetting as zr } from "./src/ap-custom-column/useCacheColumnSetting.mjs";
|
|
87
|
+
import { default as Vr } from "./src/ap-custom-column/custom-column.vue.mjs";
|
|
88
|
+
import { default as jr } from "./src/ap-custom-column/column-select.vue.mjs";
|
|
89
|
+
import { DictCode as Jr } from "./src/work-order-modal/interfaces.mjs";
|
|
90
|
+
import { createWorkOrderModal as Zr } from "./src/work-order-modal/createWorkOrder.mjs";
|
|
91
|
+
import { default as ot } from "./src/work-order-modal/work-order-modal.vue.mjs";
|
|
92
|
+
import { default as rt } from "./src/ap-tag/ap-tag.vue.mjs";
|
|
93
|
+
import { default as at } from "./src/ap-tag/ap-tag-group.vue.mjs";
|
|
94
|
+
import { default as ft } from "./src/ap-layout/ap-info-layout/ap-info-layout.vue.mjs";
|
|
95
|
+
import { NeedNameKeyDefault as lt } from "./src/ap-upload/apUploadTypes.mjs";
|
|
96
|
+
import { default as dt } from "./src/ap-upload/apUpload.vue.mjs";
|
|
97
|
+
import { default as it } from "./src/ap-download/ap-download.vue.mjs";
|
|
98
|
+
import { useTablePaging as ut } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
99
|
+
import { default as ct } from "./src/ap-table/ap-table.vue.mjs";
|
|
100
|
+
import { useMessage as Tt } from "./src/hooks/useMessage.mjs";
|
|
101
|
+
import { useControllableValue as St } from "./src/hooks/useControllableValue.mjs";
|
|
99
102
|
const p = {
|
|
100
103
|
install: (r) => {
|
|
101
104
|
for (const t in e) {
|
|
@@ -106,31 +109,34 @@ const p = {
|
|
|
106
109
|
};
|
|
107
110
|
export {
|
|
108
111
|
G as APConfigProvider,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
Er as ApActionGroup,
|
|
113
|
+
kr as ApActionItem,
|
|
114
|
+
Kr as ApActionItemDropdown,
|
|
115
|
+
Nr as ApActionItemModal,
|
|
116
|
+
Lr as ApActionItemPopconfirm,
|
|
117
|
+
Vr as ApCustomColumn,
|
|
118
|
+
jr as ApCustomSelect,
|
|
119
|
+
it as ApDownload,
|
|
117
120
|
tr as ApField,
|
|
118
121
|
mr as ApFieldCheckbox,
|
|
119
122
|
sr as ApFieldDate,
|
|
120
123
|
Cr as ApFieldDateRange,
|
|
121
124
|
xr as ApFieldNumber,
|
|
122
|
-
|
|
125
|
+
br as ApFieldPassword,
|
|
126
|
+
nr as ApFieldRadio,
|
|
127
|
+
Rr as ApFieldSegmented,
|
|
123
128
|
Ir as ApFieldSelect,
|
|
124
|
-
|
|
129
|
+
Dr as ApFieldSlider,
|
|
130
|
+
Ar as ApFieldSwitch,
|
|
125
131
|
pr as ApFieldText,
|
|
126
|
-
|
|
132
|
+
Fr as ApFieldTextArea,
|
|
127
133
|
Ue as ApForm,
|
|
128
134
|
$e as ApFormItem,
|
|
129
135
|
We as ApFormItemCheckbox,
|
|
130
136
|
Ge as ApFormItemDate,
|
|
131
137
|
ye as ApFormItemDateRange,
|
|
132
138
|
qe as ApFormItemGroup,
|
|
133
|
-
|
|
139
|
+
we as ApFormItemNumber,
|
|
134
140
|
Xe as ApFormItemRadio,
|
|
135
141
|
Ye as ApFormItemSelect,
|
|
136
142
|
Oe as ApFormItemSwitch,
|
|
@@ -139,15 +145,15 @@ export {
|
|
|
139
145
|
Qe as ApFormList,
|
|
140
146
|
er as ApFormModalForm,
|
|
141
147
|
_e as ApFormSearchForm,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
ft as ApInfoLayout,
|
|
149
|
+
ct as ApTable,
|
|
150
|
+
rt as ApTag,
|
|
151
|
+
at as ApTagGroup,
|
|
152
|
+
dt as ApUpload,
|
|
147
153
|
vo as ApiCascader,
|
|
148
154
|
Mo as ApiRadioGroup,
|
|
149
155
|
Bo as ApiSelect,
|
|
150
|
-
|
|
156
|
+
ko as ApiTransfer,
|
|
151
157
|
No as ApiTree,
|
|
152
158
|
Eo as ApiTreeSelect,
|
|
153
159
|
Jo as BaseButton,
|
|
@@ -157,14 +163,14 @@ export {
|
|
|
157
163
|
j as BasicTitle,
|
|
158
164
|
X as CollapseContainer,
|
|
159
165
|
J as CollapseTransition,
|
|
160
|
-
|
|
166
|
+
w as ConfigProvider,
|
|
161
167
|
de as CountdownButton,
|
|
162
168
|
xe as CountdownInput,
|
|
163
169
|
me as CropperAvatar,
|
|
164
170
|
le as CropperImage,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
171
|
+
Ao as Description,
|
|
172
|
+
Jr as DictCode,
|
|
173
|
+
Ae as Dropdown,
|
|
168
174
|
Ie as EditTableHeaderIcon,
|
|
169
175
|
Z as ExpandTransition,
|
|
170
176
|
_ as ExpandXTransition,
|
|
@@ -173,10 +179,10 @@ export {
|
|
|
173
179
|
l as Icon,
|
|
174
180
|
E as IconPicker,
|
|
175
181
|
Vo as ModalButton,
|
|
176
|
-
|
|
182
|
+
lt as NeedNameKeyDefault,
|
|
177
183
|
jo as PopConfirmButton,
|
|
178
184
|
Ko as ProForm,
|
|
179
|
-
|
|
185
|
+
Fe as ProTable,
|
|
180
186
|
Ho as ProTableForm,
|
|
181
187
|
zo as ProTableFormInner,
|
|
182
188
|
Lo as RadioButtonGroup,
|
|
@@ -195,42 +201,42 @@ export {
|
|
|
195
201
|
Zo as StrengthMeter,
|
|
196
202
|
s as SvgIcon,
|
|
197
203
|
Ce as TableAction,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
204
|
+
be as TableImg,
|
|
205
|
+
ot as WorkOrderModal,
|
|
206
|
+
hr as adminToken,
|
|
207
|
+
Br as aplusToken,
|
|
202
208
|
S as buildLocaleContext,
|
|
203
209
|
I as buildTranslator,
|
|
204
|
-
|
|
210
|
+
n as configProviderContextKey,
|
|
205
211
|
x as configProviderProps,
|
|
206
|
-
|
|
207
|
-
|
|
212
|
+
ne as createPrompt,
|
|
213
|
+
Zr as createWorkOrderModal,
|
|
208
214
|
p as default,
|
|
209
215
|
v as defaultNamespace,
|
|
210
216
|
z as en,
|
|
211
|
-
|
|
217
|
+
Hr as generateTableList,
|
|
212
218
|
Io as isComponentFormSchema,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
219
|
+
go as isSlotFormSchema,
|
|
220
|
+
c as keysOf,
|
|
221
|
+
g as localeContextKey,
|
|
216
222
|
R as namespaceContextKey,
|
|
217
|
-
|
|
223
|
+
F as provideGlobalConfig,
|
|
218
224
|
u as tableDefaultConfig,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
225
|
+
b as translate,
|
|
226
|
+
zr as useCacheColumnSetting,
|
|
227
|
+
Fo as useComponentRegister,
|
|
228
|
+
St as useControllableValue,
|
|
229
|
+
no as useDescription,
|
|
224
230
|
Co as useForm,
|
|
225
231
|
M as useGetDerivedNamespace,
|
|
226
|
-
|
|
232
|
+
T as useGlobalConfig,
|
|
227
233
|
P as useLocale,
|
|
228
|
-
|
|
234
|
+
Tt as useMessage,
|
|
229
235
|
re as useModal,
|
|
230
236
|
oe as useModalContext,
|
|
231
237
|
te as useModalInner,
|
|
232
238
|
h as useNamespace,
|
|
233
239
|
De as useTable,
|
|
234
|
-
|
|
240
|
+
ut as useTablePaging,
|
|
235
241
|
H as zhCn
|
|
236
242
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as g, ref as m, onMounted as h, openBlock as o, createElementBlock as a, Fragment as l, unref as e, createTextVNode as d, toDisplayString as f, createBlock as c, mergeProps as C } from "vue";
|
|
2
2
|
import { isFunction as V, isNil as b, omit as _ } from "lodash-unified";
|
|
3
|
-
import { Spin as
|
|
3
|
+
import { Spin as q, CheckboxGroup as B } from "ant-design-vue";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { getOptionValue as
|
|
5
|
+
import { getOptionValue as T, getOptionLabel as U } from "./helper.mjs";
|
|
6
6
|
import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
|
|
7
7
|
const E = /* @__PURE__ */ g({
|
|
8
8
|
name: "ApFieldCheckbox",
|
|
@@ -26,7 +26,7 @@ const E = /* @__PURE__ */ g({
|
|
|
26
26
|
setup(v, { emit: y }) {
|
|
27
27
|
const k = y, t = v, n = m(t.options), u = m(!1);
|
|
28
28
|
h(() => {
|
|
29
|
-
V(t.request) && (u.value = !0, t.request().then((
|
|
29
|
+
V(t.request) && (u.value = !0, t.request().then((r) => n.value = r).finally(() => {
|
|
30
30
|
u.value = !1;
|
|
31
31
|
}));
|
|
32
32
|
});
|
|
@@ -37,19 +37,19 @@ const E = /* @__PURE__ */ g({
|
|
|
37
37
|
defaultValue: []
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
|
-
return (
|
|
40
|
+
return (r, O) => {
|
|
41
41
|
var s;
|
|
42
|
-
return
|
|
42
|
+
return r.mode === "read" ? (o(), a(l, { key: 0 }, [
|
|
43
43
|
e(b)(e(i)) ? (o(), a(l, { key: 0 }, [
|
|
44
44
|
d(f(t.emptyText), 1)
|
|
45
45
|
], 64)) : (o(), a(l, { key: 1 }, [
|
|
46
|
-
d(f(((s = n.value) == null ? void 0 : s.filter((
|
|
46
|
+
d(f(((s = n.value) == null ? void 0 : s.filter((p) => e(i).indexOf(e(T)(p)) > -1).map((p) => e(U)(p)).join("、")) || t.emptyText), 1)
|
|
47
47
|
], 64))
|
|
48
48
|
], 64)) : (o(), a(l, { key: 1 }, [
|
|
49
|
-
u.value ? (o(), c(e(
|
|
49
|
+
u.value ? (o(), c(e(q), {
|
|
50
50
|
key: 0,
|
|
51
51
|
size: "small"
|
|
52
|
-
})) : (o(), c(e(
|
|
52
|
+
})) : (o(), c(e(B), C({ key: 1 }, e(_)(t, ["onUpdate:value", "value", "request"]), {
|
|
53
53
|
options: n.value,
|
|
54
54
|
value: e(i),
|
|
55
55
|
"onUpdate:value": e(x)
|
|
@@ -13,6 +13,10 @@ type ApFieldDateRangeSlots = {
|
|
|
13
13
|
renderExtraFooter?: any;
|
|
14
14
|
default?: any;
|
|
15
15
|
separator?: any;
|
|
16
|
+
/**
|
|
17
|
+
* 只读模式下的分隔符
|
|
18
|
+
*/
|
|
19
|
+
readModeSeparator?: any;
|
|
16
20
|
clearIcon?: any;
|
|
17
21
|
};
|
|
18
22
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldDateRangeProps>, {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ApFieldDatePresetFormats as
|
|
1
|
+
import { defineComponent as x, computed as p, unref as o, openBlock as y, createElementBlock as k, Fragment as B, createTextVNode as O, toDisplayString as C, renderSlot as S, createVNode as V, createBlock as I, mergeProps as j, createSlots as U, renderList as H, withCtx as $, normalizeProps as z, guardReactiveProps as K } from "vue";
|
|
2
|
+
import { ApFieldDatePresetFormats as L, PRESET_FORMAT_MAP as Y, PRESET_FORMAT_PICK_MAP as q, PRESET_FORMAT_TIME_MAP as G } from "../date/constant.mjs";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
|
-
import { isNil as
|
|
4
|
+
import { isNil as b, omit as T, isString as s } from "lodash-unified";
|
|
5
5
|
import u from "dayjs";
|
|
6
|
-
import { DatePicker as
|
|
7
|
-
import { formatDay as
|
|
8
|
-
import { SwapRightOutlined as
|
|
9
|
-
import { omitUndefined as
|
|
10
|
-
import { useControllableValue as
|
|
11
|
-
const
|
|
6
|
+
import { DatePicker as J } from "ant-design-vue";
|
|
7
|
+
import { formatDay as f, formatValue as M } from "../date/helper.mjs";
|
|
8
|
+
import { SwapRightOutlined as Q } from "@ant-design/icons-vue";
|
|
9
|
+
import { omitUndefined as W } from "../../utils/index.mjs";
|
|
10
|
+
import { useControllableValue as X } from "../../hooks/useControllableValue.mjs";
|
|
11
|
+
const de = /* @__PURE__ */ x({
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
14
14
|
mode: { default: "edit" },
|
|
@@ -84,26 +84,26 @@ const ie = /* @__PURE__ */ A({
|
|
|
84
84
|
onOk: {}
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:value"],
|
|
87
|
-
setup(
|
|
88
|
-
const t =
|
|
89
|
-
() =>
|
|
90
|
-
), l =
|
|
91
|
-
() => r.value ?
|
|
92
|
-
), { value:
|
|
87
|
+
setup(R, { emit: w }) {
|
|
88
|
+
const t = R, D = w, r = p(
|
|
89
|
+
() => L.indexOf(t.format) > -1
|
|
90
|
+
), l = p(
|
|
91
|
+
() => r.value ? Y[t.format] : t.format
|
|
92
|
+
), { value: g, updateValue: h } = X(
|
|
93
93
|
t,
|
|
94
|
-
|
|
95
|
-
), m =
|
|
96
|
-
var
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}),
|
|
103
|
-
const e = o(r) ?
|
|
94
|
+
D
|
|
95
|
+
), m = p(() => {
|
|
96
|
+
var n, a;
|
|
97
|
+
const e = o(g);
|
|
98
|
+
return b(e) || !(e != null && e.length) ? e : [
|
|
99
|
+
u((n = o(g)) == null ? void 0 : n[0]),
|
|
100
|
+
u((a = o(g)) == null ? void 0 : a[1])
|
|
101
|
+
];
|
|
102
|
+
}), _ = p(() => o(r) ? t.picker ?? q[t.format] : t.picker), A = p(() => {
|
|
103
|
+
const e = o(r) ? G[t.format] : {};
|
|
104
104
|
return {
|
|
105
|
-
...
|
|
106
|
-
|
|
105
|
+
...W(
|
|
106
|
+
T(t, [
|
|
107
107
|
"value",
|
|
108
108
|
"onUpdate:value",
|
|
109
109
|
"onChange",
|
|
@@ -115,46 +115,55 @@ const ie = /* @__PURE__ */ A({
|
|
|
115
115
|
...e
|
|
116
116
|
};
|
|
117
117
|
});
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
function E(e) {
|
|
119
|
+
if (!e) {
|
|
120
|
+
h(e);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const n = s(e[0]) ? u(e[0]) : e[0], a = s(e[1]) ? u(e[1]) : e[1];
|
|
124
|
+
o(r) ? h([
|
|
125
|
+
f(n, o(l)),
|
|
126
|
+
f(a, o(l), !1)
|
|
127
|
+
]) : h([M(n), M(a)]);
|
|
125
128
|
}
|
|
126
|
-
function
|
|
129
|
+
function F(e) {
|
|
127
130
|
var d;
|
|
128
|
-
const
|
|
131
|
+
const n = s(e[0]) ? u(e[0]) : e[0], a = s(e[1]) ? u(e[1]) : e[1], i = e[0] ? o(r) ? f(n, o(l)) : n.valueOf() : null, c = e[1] ? o(r) ? f(a, o(l), !1) : a.valueOf() : null;
|
|
129
132
|
(d = t.onOk) == null || d.call(t, [i, c]);
|
|
130
133
|
}
|
|
131
|
-
function
|
|
132
|
-
var v;
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
function N(e, n) {
|
|
135
|
+
var v, P;
|
|
136
|
+
if (b(e)) {
|
|
137
|
+
(v = t.onChange) == null || v.call(t, e, n);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const a = s(e[0]) ? u(e[0]) : e[0], i = s(e[1]) ? u(e[1]) : e[1], c = e[0] ? o(r) ? f(a, o(l)) : a.valueOf() : null, d = e[1] ? o(r) ? f(i, o(l), !1) : i.valueOf() : null;
|
|
141
|
+
(P = t.onChange) == null || P.call(t, [c, d], n);
|
|
135
142
|
}
|
|
136
|
-
return (e,
|
|
137
|
-
var
|
|
138
|
-
return e.mode === "read" ? (y(),
|
|
139
|
-
m.value ? (y(),
|
|
140
|
-
O(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
O(
|
|
143
|
+
return (e, n) => {
|
|
144
|
+
var a, i;
|
|
145
|
+
return e.mode === "read" ? (y(), k(B, { key: 0 }, [
|
|
146
|
+
m.value ? (y(), k(B, { key: 0 }, [
|
|
147
|
+
O(C((a = m.value[0]) == null ? void 0 : a.format(l.value)) + " ", 1),
|
|
148
|
+
S(e.$slots, "readModeSeparator", {}, () => [
|
|
149
|
+
V(o(Q))
|
|
150
|
+
]),
|
|
151
|
+
O(" " + C((i = m.value[1]) == null ? void 0 : i.format(l.value)), 1)
|
|
152
|
+
], 64)) : (y(), k(B, { key: 1 }, [
|
|
153
|
+
O(C(e.emptyText), 1)
|
|
145
154
|
], 64))
|
|
146
|
-
], 64)) : (y(),
|
|
155
|
+
], 64)) : (y(), I(o(J).RangePicker, j({ key: 1 }, A.value, {
|
|
147
156
|
value: m.value,
|
|
148
|
-
"onUpdate:value":
|
|
149
|
-
onChange:
|
|
150
|
-
picker:
|
|
157
|
+
"onUpdate:value": E,
|
|
158
|
+
onChange: N,
|
|
159
|
+
picker: _.value,
|
|
151
160
|
format: l.value,
|
|
152
|
-
onOk:
|
|
153
|
-
}),
|
|
154
|
-
|
|
161
|
+
onOk: F
|
|
162
|
+
}), U({ _: 2 }, [
|
|
163
|
+
H(o(T)(e.$slots, "readModeSeparator"), (c, d) => ({
|
|
155
164
|
name: d,
|
|
156
|
-
fn:
|
|
157
|
-
|
|
165
|
+
fn: $((v) => [
|
|
166
|
+
S(e.$slots, d, z(K(v || {})))
|
|
158
167
|
])
|
|
159
168
|
}))
|
|
160
169
|
]), 1040, ["value", "picker", "format"]));
|
|
@@ -162,5 +171,5 @@ const ie = /* @__PURE__ */ A({
|
|
|
162
171
|
}
|
|
163
172
|
});
|
|
164
173
|
export {
|
|
165
|
-
|
|
174
|
+
de as default
|
|
166
175
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApFieldText, ApFieldPassword } from './text';
|
|
2
2
|
import { default as ApFieldCheckbox } from './checkbox/index.vue';
|
|
3
3
|
import { default as ApFieldDate } from './date/index.vue';
|
|
4
4
|
import { default as ApFieldNumber } from './number/index.vue';
|
|
@@ -7,6 +7,8 @@ import { default as ApFieldSwitch } from './switch/index.vue';
|
|
|
7
7
|
import { default as ApFieldTextArea } from './text-area/index.vue';
|
|
8
8
|
import { default as ApFieldDateRange } from './date-range/index.vue';
|
|
9
9
|
import { default as ApFieldSelect } from './select/index.vue';
|
|
10
|
+
import { default as ApFieldSlider } from './slider/index.vue';
|
|
11
|
+
import { default as ApFieldSegmented } from './segmented/index.vue';
|
|
10
12
|
|
|
11
13
|
export type FieldType = {
|
|
12
14
|
Text: typeof ApFieldText;
|
|
@@ -18,7 +20,9 @@ export type FieldType = {
|
|
|
18
20
|
Checkbox: typeof ApFieldCheckbox;
|
|
19
21
|
Select: typeof ApFieldSelect;
|
|
20
22
|
Switch: typeof ApFieldSwitch;
|
|
23
|
+
Slider: typeof ApFieldSlider;
|
|
24
|
+
Segmented: typeof ApFieldSegmented;
|
|
21
25
|
};
|
|
22
26
|
export declare const ApField: FieldType;
|
|
23
27
|
export * from './interface';
|
|
24
|
-
export { ApFieldText, ApFieldCheckbox, ApFieldDate, ApFieldNumber, ApFieldRadio, ApFieldSwitch, ApFieldTextArea, ApFieldDateRange, ApFieldSelect };
|
|
28
|
+
export { ApFieldText, ApFieldCheckbox, ApFieldDate, ApFieldNumber, ApFieldRadio, ApFieldSwitch, ApFieldTextArea, ApFieldDateRange, ApFieldSelect, ApFieldPassword, ApFieldSlider, ApFieldSegmented };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./text/index.
|
|
1
|
+
import { ApFieldText as i } from "./text/index.mjs";
|
|
2
2
|
import "./checkbox/index.vue2.mjs";
|
|
3
3
|
import "./date/index.vue2.mjs";
|
|
4
4
|
import "./number/index.vue2.mjs";
|
|
@@ -7,36 +7,43 @@ import "./switch/index.vue2.mjs";
|
|
|
7
7
|
import "./text-area/index.vue2.mjs";
|
|
8
8
|
import "./date-range/index.vue2.mjs";
|
|
9
9
|
import "./select/index.vue2.mjs";
|
|
10
|
+
import "./slider/index.vue2.mjs";
|
|
11
|
+
import "./segmented/index.vue2.mjs";
|
|
10
12
|
import "./interface.mjs";
|
|
11
|
-
import i from "./text/index.vue.mjs";
|
|
12
13
|
import m from "./text-area/index.vue.mjs";
|
|
13
|
-
import
|
|
14
|
+
import e from "./number/index.vue.mjs";
|
|
14
15
|
import r from "./date/index.vue.mjs";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
16
|
+
import o from "./date-range/index.vue.mjs";
|
|
17
|
+
import t from "./radio/index.vue.mjs";
|
|
17
18
|
import p from "./checkbox/index.vue.mjs";
|
|
18
19
|
import a from "./select/index.vue.mjs";
|
|
19
|
-
import
|
|
20
|
-
|
|
20
|
+
import f from "./switch/index.vue.mjs";
|
|
21
|
+
import s from "./slider/index.vue.mjs";
|
|
22
|
+
import _ from "./segmented/index.vue.mjs";
|
|
23
|
+
const v = {
|
|
21
24
|
Text: i,
|
|
22
25
|
TextArea: m,
|
|
23
|
-
Number:
|
|
26
|
+
Number: e,
|
|
24
27
|
Date: r,
|
|
25
|
-
DateRange:
|
|
26
|
-
Radio:
|
|
28
|
+
DateRange: o,
|
|
29
|
+
Radio: t,
|
|
27
30
|
Checkbox: p,
|
|
28
31
|
Select: a,
|
|
29
|
-
Switch:
|
|
32
|
+
Switch: f,
|
|
33
|
+
Slider: s,
|
|
34
|
+
Segmented: _
|
|
30
35
|
};
|
|
31
36
|
export {
|
|
32
|
-
|
|
37
|
+
v as ApField,
|
|
33
38
|
p as ApFieldCheckbox,
|
|
34
39
|
r as ApFieldDate,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
o as ApFieldDateRange,
|
|
41
|
+
e as ApFieldNumber,
|
|
42
|
+
t as ApFieldRadio,
|
|
43
|
+
_ as ApFieldSegmented,
|
|
38
44
|
a as ApFieldSelect,
|
|
39
|
-
s as
|
|
45
|
+
s as ApFieldSlider,
|
|
46
|
+
f as ApFieldSwitch,
|
|
40
47
|
i as ApFieldText,
|
|
41
48
|
m as ApFieldTextArea
|
|
42
49
|
};
|