@aplus-frontend/ui 0.2.0-beta.2 → 0.2.0-beta.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 +59 -52
- package/es/src/ap-field/interface.d.ts +6 -0
- package/es/src/ap-field/select/index.vue.mjs +14 -13
- package/es/src/ap-form/item/index.vue.mjs +58 -58
- package/es/src/ap-form/item-text/style/css.d.ts +0 -1
- package/es/src/ap-form/item-text/style/css.js +1 -1
- package/es/src/ap-form/item-text/style/index.d.ts +0 -1
- package/es/src/ap-form/item-text/style/index.js +1 -1
- package/es/src/ap-form/item-text-group/style/css.d.ts +0 -0
- package/es/src/ap-form/item-text-group/style/css.js +1 -0
- package/es/src/ap-form/item-text-group/style/index.d.ts +0 -0
- package/es/src/ap-form/item-text-group/style/index.js +1 -0
- package/es/src/ap-form/items/interface.d.ts +11 -0
- package/es/src/ap-form/items/text/group.vue.d.ts +42 -0
- package/es/src/ap-form/items/text/group.vue.mjs +4 -0
- package/es/src/ap-form/items/text/group.vue2.mjs +26 -0
- package/es/src/ap-form/items/text/index.d.ts +3 -1
- package/es/src/ap-form/items/text/index.mjs +10 -6
- package/es/src/ap-table/ap-table.vue.d.ts +2 -0
- package/es/src/ap-table/ap-table.vue.mjs +28 -27
- package/es/src/ap-table/constants.d.ts +20 -30
- package/es/src/ap-table/utils.d.ts +35 -3
- package/es/src/ap-table/utils.mjs +69 -69
- package/es/src/ap-upload/apUpload.vue.d.ts +17 -1
- package/es/src/ap-upload/apUpload.vue.mjs +54 -42
- package/es/src/ap-upload/apUploadTypes.d.ts +6 -1
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +4 -1
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +98 -90
- package/es/src/ap-upload/components/Picture.vue.d.ts +4 -1
- package/es/src/ap-upload/components/Picture.vue2.mjs +146 -138
- package/es/src/ap-upload/components/SingleFile.vue.d.ts +4 -1
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +84 -86
- package/es/src/business/ap-label/constans.d.ts +1 -1
- package/es/src/business/ap-label/interface.d.ts +2 -2
- package/es/src/business/ap-summary/ap-summary.vue.d.ts +30 -0
- package/es/src/business/ap-summary/ap-summary.vue.mjs +4 -0
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +68 -0
- package/es/src/business/ap-summary/index.d.ts +95 -0
- package/es/src/business/ap-summary/index.mjs +13 -0
- package/es/src/business/ap-summary/interface.d.ts +41 -0
- package/es/src/business/ap-summary/interface.mjs +1 -0
- package/es/src/business/ap-summary/style/css.d.ts +0 -0
- package/es/src/business/ap-summary/style/css.js +1 -0
- package/es/src/business/ap-summary/style/index.d.ts +0 -0
- package/es/src/business/ap-summary/style/index.js +1 -0
- package/es/src/business/ap-summary/utils.d.ts +12 -0
- package/es/src/business/ap-summary/utils.mjs +36 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +16 -14
- package/es/src/editable-table/utils.mjs +51 -51
- package/es/src/hooks/useControllableValue.d.ts +8 -3
- package/es/src/hooks/useControllableValue.mjs +18 -13
- package/es/src/index.mjs +59 -52
- package/es/src/path-map.mjs +3 -1
- package/es/src/utils/slot.d.ts +9 -1
- package/es/src/utils/slot.mjs +10 -6
- package/lib/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +6 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-text/style/css.d.ts +0 -1
- package/lib/src/ap-form/item-text/style/css.js +1 -1
- package/lib/src/ap-form/item-text/style/index.d.ts +0 -1
- package/lib/src/ap-form/item-text/style/index.js +1 -1
- package/lib/src/ap-form/item-text-group/style/css.d.ts +0 -0
- package/lib/src/ap-form/item-text-group/style/css.js +1 -0
- package/lib/src/ap-form/item-text-group/style/index.d.ts +0 -0
- package/lib/src/ap-form/item-text-group/style/index.js +1 -0
- package/lib/src/ap-form/items/interface.d.ts +11 -0
- package/lib/src/ap-form/items/text/group.vue.d.ts +42 -0
- package/lib/src/ap-form/items/text/group.vue.js +1 -0
- package/lib/src/ap-form/items/text/group.vue2.js +1 -0
- package/lib/src/ap-form/items/text/index.d.ts +3 -1
- package/lib/src/ap-form/items/text/index.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +20 -30
- package/lib/src/ap-table/utils.d.ts +35 -3
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.d.ts +17 -1
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/apUploadTypes.d.ts +6 -1
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +4 -1
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue.d.ts +4 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue.d.ts +4 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +1 -1
- package/lib/src/business/ap-label/interface.d.ts +2 -2
- package/lib/src/business/ap-summary/ap-summary.vue.d.ts +30 -0
- package/lib/src/business/ap-summary/ap-summary.vue.js +1 -0
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -0
- package/lib/src/business/ap-summary/index.d.ts +95 -0
- package/lib/src/business/ap-summary/index.js +1 -0
- package/lib/src/business/ap-summary/interface.d.ts +41 -0
- package/lib/src/business/ap-summary/interface.js +1 -0
- package/lib/src/business/ap-summary/style/css.d.ts +0 -0
- package/lib/src/business/ap-summary/style/css.js +1 -0
- package/lib/src/business/ap-summary/style/index.d.ts +0 -0
- package/lib/src/business/ap-summary/style/index.js +1 -0
- package/lib/src/business/ap-summary/utils.d.ts +12 -0
- package/lib/src/business/ap-summary/utils.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/hooks/useControllableValue.d.ts +8 -3
- package/lib/src/hooks/useControllableValue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/utils/slot.d.ts +9 -1
- package/lib/src/utils/slot.js +1 -1
- package/package.json +4 -4
package/es/index.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import "./src/hooks/index.mjs";
|
|
|
4
4
|
import { configProviderProps as x } from "./src/config-provider/config-provider-props.mjs";
|
|
5
5
|
import { configProviderContextKey as u } from "./src/config-provider/constants.mjs";
|
|
6
6
|
import { keysOf as i, provideGlobalConfig as n, useGlobalConfig as c } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
7
|
-
import { buildLocaleContext as b, buildTranslator as T, localeContextKey as I, translate as
|
|
8
|
-
import { defaultNamespace as h, namespaceContextKey as G, useGetDerivedNamespace as S, useNamespace as
|
|
9
|
-
import { ConfigProvider as
|
|
10
|
-
import { APConfigProvider as
|
|
7
|
+
import { buildLocaleContext as b, buildTranslator as T, localeContextKey as I, translate as C, useLocale as g } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
|
+
import { defaultNamespace as h, namespaceContextKey as G, useGetDerivedNamespace as S, useNamespace as y } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { ConfigProvider as M, globalConfigCached as P } from "./src/config-provider/config-provider.mjs";
|
|
10
|
+
import { APConfigProvider as k } from "./src/config-provider/index.mjs";
|
|
11
11
|
import { ApFormItemText as R } from "./src/ap-form/items/text/index.mjs";
|
|
12
12
|
import { default as E } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
13
13
|
import { default as K } from "./src/ap-form/items/number/index.vue.mjs";
|
|
@@ -28,13 +28,13 @@ import { default as Ao } from "./src/ap-form/dependency/index.vue.mjs";
|
|
|
28
28
|
import { default as no } from "./src/ap-form/set/index.vue.mjs";
|
|
29
29
|
import { default as Fo } from "./src/ap-form/drawer-form/index.vue.mjs";
|
|
30
30
|
import { ApField as To } from "./src/ap-field/index.mjs";
|
|
31
|
-
import { ApFieldText as
|
|
31
|
+
import { ApFieldText as Co } from "./src/ap-field/text/index.mjs";
|
|
32
32
|
import { default as Do } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
33
33
|
import { default as Go } from "./src/ap-field/date/index.vue.mjs";
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
34
|
+
import { default as yo } from "./src/ap-field/number/index.vue.mjs";
|
|
35
|
+
import { default as Mo } from "./src/ap-field/radio/index.vue.mjs";
|
|
36
|
+
import { default as No } from "./src/ap-field/switch/index.vue.mjs";
|
|
37
|
+
import { default as wo } from "./src/ap-field/text-area/index.vue.mjs";
|
|
38
38
|
import { default as vo } from "./src/ap-field/date-range/index.vue.mjs";
|
|
39
39
|
import { default as Bo } from "./src/ap-field/select/index.vue.mjs";
|
|
40
40
|
import { default as Oo } from "./src/ap-field/text/password.vue.mjs";
|
|
@@ -54,13 +54,13 @@ import { default as Ae } from "./src/ap-tag/ap-tag.vue.mjs";
|
|
|
54
54
|
import { default as ne } from "./src/ap-tag/ap-tag-group.vue.mjs";
|
|
55
55
|
import { default as Fe } from "./src/ap-info-layout/ApInfoLayout.vue.mjs";
|
|
56
56
|
import { NeedNameKeyDefault as Te } from "./src/ap-upload/apUploadTypes.mjs";
|
|
57
|
-
import { default as
|
|
57
|
+
import { default as Ce } from "./src/ap-upload/apUpload.vue.mjs";
|
|
58
58
|
import { ApDownLoadNeedNameKeyDefault as De } from "./src/ap-download/interface.mjs";
|
|
59
59
|
import { default as Ge } from "./src/ap-download/ap-download.vue.mjs";
|
|
60
|
-
import { CheckCard as
|
|
61
|
-
import { default as
|
|
62
|
-
import { ApModal as
|
|
63
|
-
import { default as
|
|
60
|
+
import { CheckCard as ye } from "./src/check-card/index.mjs";
|
|
61
|
+
import { default as Me } from "./src/check-card/group.vue.mjs";
|
|
62
|
+
import { ApModal as Ne } from "./src/ap-modal/index.mjs";
|
|
63
|
+
import { default as we } from "./src/ap-list/index.vue.mjs";
|
|
64
64
|
import { default as ve } from "./src/ap-button/ap-button.vue.mjs";
|
|
65
65
|
import { default as Be } from "./src/ap-button/ap-action-button.vue.mjs";
|
|
66
66
|
import { ApTransformDataHelper as Oe } from "./src/utils/ap-trans-data/index.mjs";
|
|
@@ -81,18 +81,20 @@ import { ApInputRadio as Ar } from "./src/business/ap-input-radio/index.mjs";
|
|
|
81
81
|
import { ApLabel as nr, ApLabelGroup as cr } from "./src/business/ap-label/index.mjs";
|
|
82
82
|
import { locales as br } from "./src/business/ap-ladder/interface.mjs";
|
|
83
83
|
import { ApLadder as Ir } from "./src/business/ap-ladder/index.mjs";
|
|
84
|
-
import { ApSelectLayout as
|
|
84
|
+
import { ApSelectLayout as gr } from "./src/business/ap-select-layout/index.mjs";
|
|
85
85
|
import { ApStatus as hr, ApStatusGroup as Gr } from "./src/business/ap-status/index.mjs";
|
|
86
|
-
import { ApTitle as
|
|
87
|
-
import { usePageListApTable as
|
|
88
|
-
import { useTableRefresh as
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
86
|
+
import { ApTitle as yr } from "./src/business/ap-title/index.mjs";
|
|
87
|
+
import { usePageListApTable as Mr } from "./src/business/hooks/usePageListApTable.mjs";
|
|
88
|
+
import { useTableRefresh as Nr } from "./src/business/hooks/useTableRefresh.mjs";
|
|
89
|
+
import { computedRecords as wr, flattenColumns as Rr, formatDataIndex as vr, formatNumber as Er } from "./src/business/ap-summary/utils.mjs";
|
|
90
|
+
import { ApSummary as Kr } from "./src/business/ap-summary/index.mjs";
|
|
91
|
+
import { useTablePaging as Wr } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
92
|
+
import { default as Ur } from "./src/ap-table/ap-table.vue.mjs";
|
|
93
|
+
import { default as $r } from "./src/editable-table/index.vue.mjs";
|
|
94
|
+
import { default as qr } from "./src/editable-table/form-item.vue.mjs";
|
|
95
|
+
import { default as Jr } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
96
|
+
import { useMessage as Xr } from "./src/hooks/useMessage.mjs";
|
|
97
|
+
import { useControllableValue as Zr } from "./src/hooks/useControllableValue.mjs";
|
|
96
98
|
const p = {
|
|
97
99
|
install: (r) => {
|
|
98
100
|
for (const t in e) {
|
|
@@ -102,7 +104,7 @@ const p = {
|
|
|
102
104
|
}
|
|
103
105
|
};
|
|
104
106
|
export {
|
|
105
|
-
|
|
107
|
+
k as APConfigProvider,
|
|
106
108
|
Be as ApActionButton,
|
|
107
109
|
ae as ApActionGroup,
|
|
108
110
|
Xo as ApActionItem,
|
|
@@ -115,7 +117,7 @@ export {
|
|
|
115
117
|
ve as ApButton,
|
|
116
118
|
_e as ApButtonGroup,
|
|
117
119
|
er as ApCard,
|
|
118
|
-
|
|
120
|
+
Jr as ApDescriptions,
|
|
119
121
|
De as ApDownLoadNeedNameKeyDefault,
|
|
120
122
|
Ge as ApDownload,
|
|
121
123
|
tr as ApExpandAlert,
|
|
@@ -125,16 +127,16 @@ export {
|
|
|
125
127
|
Do as ApFieldCheckbox,
|
|
126
128
|
Go as ApFieldDate,
|
|
127
129
|
vo as ApFieldDateRange,
|
|
128
|
-
|
|
130
|
+
yo as ApFieldNumber,
|
|
129
131
|
Oo as ApFieldPassword,
|
|
130
|
-
|
|
132
|
+
Mo as ApFieldRadio,
|
|
131
133
|
jo as ApFieldRate,
|
|
132
134
|
Vo as ApFieldSegmented,
|
|
133
135
|
Bo as ApFieldSelect,
|
|
134
136
|
Ho as ApFieldSlider,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
No as ApFieldSwitch,
|
|
138
|
+
Co as ApFieldText,
|
|
139
|
+
wo as ApFieldTextArea,
|
|
138
140
|
oo as ApForm,
|
|
139
141
|
Ao as ApFormDependency,
|
|
140
142
|
Fo as ApFormDrawerForm,
|
|
@@ -160,36 +162,41 @@ export {
|
|
|
160
162
|
nr as ApLabel,
|
|
161
163
|
cr as ApLabelGroup,
|
|
162
164
|
Ir as ApLadder,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
165
|
+
we as ApList,
|
|
166
|
+
Ne as ApModal,
|
|
167
|
+
gr as ApSelectLayout,
|
|
166
168
|
hr as ApStatus,
|
|
167
169
|
Gr as ApStatusGroup,
|
|
168
|
-
|
|
170
|
+
Kr as ApSummary,
|
|
171
|
+
Ur as ApTable,
|
|
169
172
|
He as ApTableModal,
|
|
170
173
|
Ae as ApTag,
|
|
171
174
|
ne as ApTagGroup,
|
|
172
|
-
|
|
175
|
+
yr as ApTitle,
|
|
173
176
|
Oe as ApTransformDataHelper,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
Ce as ApUpload,
|
|
178
|
+
ye as CheckCard,
|
|
179
|
+
Me as CheckCardGroup,
|
|
180
|
+
M as ConfigProvider,
|
|
178
181
|
fe as DictCode,
|
|
179
|
-
|
|
180
|
-
|
|
182
|
+
$r as EditableTable,
|
|
183
|
+
qr as EditableTableFormItem,
|
|
181
184
|
Te as NeedNameKeyDefault,
|
|
182
185
|
se as WorkOrderModal,
|
|
183
186
|
zo as adminToken,
|
|
184
187
|
Jo as aplusToken,
|
|
185
188
|
b as buildLocaleContext,
|
|
186
189
|
T as buildTranslator,
|
|
190
|
+
wr as computedRecords,
|
|
187
191
|
u as configProviderContextKey,
|
|
188
192
|
x as configProviderProps,
|
|
189
193
|
de as createWorkOrderModal,
|
|
190
194
|
p as default,
|
|
191
195
|
h as defaultNamespace,
|
|
192
|
-
|
|
196
|
+
Rr as flattenColumns,
|
|
197
|
+
vr as formatDataIndex,
|
|
198
|
+
Er as formatNumber,
|
|
199
|
+
P as globalConfigCached,
|
|
193
200
|
dr as handleExportDownload,
|
|
194
201
|
i as keysOf,
|
|
195
202
|
me as langMap,
|
|
@@ -198,16 +205,16 @@ export {
|
|
|
198
205
|
G as namespaceContextKey,
|
|
199
206
|
l as pathMap,
|
|
200
207
|
n as provideGlobalConfig,
|
|
201
|
-
|
|
202
|
-
|
|
208
|
+
C as translate,
|
|
209
|
+
Zr as useControllableValue,
|
|
203
210
|
S as useGetDerivedNamespace,
|
|
204
211
|
c as useGlobalConfig,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
212
|
+
g as useLocale,
|
|
213
|
+
Xr as useMessage,
|
|
214
|
+
y as useNamespace,
|
|
215
|
+
Mr as usePageListApTable,
|
|
209
216
|
Ve as useTableModal,
|
|
210
|
-
|
|
211
|
-
|
|
217
|
+
Wr as useTablePaging,
|
|
218
|
+
Nr as useTableRefresh,
|
|
212
219
|
je as useTableSelectModal
|
|
213
220
|
};
|
|
@@ -6,6 +6,7 @@ import { RangePickerProps } from 'ant-design-vue/es/date-picker/dayjs';
|
|
|
6
6
|
import { LiteralUnion } from '../type';
|
|
7
7
|
import { InputPasswordProps } from './text/input-password-props';
|
|
8
8
|
import { ZoneAlias } from '@aplus-frontend/utils';
|
|
9
|
+
import { SelectValue } from 'ant-design-vue/es/select';
|
|
9
10
|
export type FieldMode = 'read' | 'edit';
|
|
10
11
|
export type BasicApFieldProps<FieldPropsType = any> = {
|
|
11
12
|
mode?: FieldMode;
|
|
@@ -117,6 +118,11 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
|
|
|
117
118
|
* 是否延迟请求选项列表
|
|
118
119
|
*/
|
|
119
120
|
lazy?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* 选中之前调用,如果返回false,则不更新值,支持异步
|
|
123
|
+
* @returns
|
|
124
|
+
*/
|
|
125
|
+
onBeforeSelect?: (newVal: SelectValue) => boolean | Promise<boolean>;
|
|
120
126
|
};
|
|
121
127
|
export type ApFieldSelectExpose = {
|
|
122
128
|
focus: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as T, ref as p, onMounted as _, computed as y, unref as u, openBlock as
|
|
2
|
-
import { debounce as W, isFunction as
|
|
1
|
+
import { defineComponent as T, ref as p, onMounted as _, computed as y, unref as u, openBlock as S, createElementBlock as R, toDisplayString as U, createBlock as z, mergeProps as D, createSlots as L, renderList as K, withCtx as w, renderSlot as H, normalizeProps as $, guardReactiveProps as j, createVNode as E } from "vue";
|
|
2
|
+
import { debounce as W, isFunction as B, isArray as G, isNil as J, omit as Q } from "lodash-unified";
|
|
3
3
|
import { Select as X, Spin as Y } from "ant-design-vue";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
5
|
import { omitUndefined as Z } from "../../utils/index.mjs";
|
|
@@ -90,13 +90,14 @@ const te = { key: 0 }, se = /* @__PURE__ */ T({
|
|
|
90
90
|
"onUpdate:value": {},
|
|
91
91
|
searchMode: { default: "filter" },
|
|
92
92
|
refetchOnFocus: { type: Boolean, default: !1 },
|
|
93
|
-
lazy: { type: Boolean, default: !1 }
|
|
93
|
+
lazy: { type: Boolean, default: !1 },
|
|
94
|
+
onBeforeSelect: {}
|
|
94
95
|
},
|
|
95
96
|
emits: ["update:value"],
|
|
96
|
-
setup(
|
|
97
|
+
setup(g, { expose: F, emit: b }) {
|
|
97
98
|
let n = 0;
|
|
98
99
|
const C = W((o) => {
|
|
99
|
-
if (!
|
|
100
|
+
if (!B(e.request))
|
|
100
101
|
return;
|
|
101
102
|
n += 1;
|
|
102
103
|
const t = n;
|
|
@@ -105,13 +106,13 @@ const te = { key: 0 }, se = /* @__PURE__ */ T({
|
|
|
105
106
|
}).finally(() => {
|
|
106
107
|
r.value = !1;
|
|
107
108
|
});
|
|
108
|
-
}, 300), e =
|
|
109
|
+
}, 300), e = g, N = (o, t) => {
|
|
109
110
|
var a;
|
|
110
111
|
const l = ((a = e.fieldNames) == null ? void 0 : a.label) || "label";
|
|
111
112
|
return typeof (t == null ? void 0 : t[l]) == "string" && t[l].indexOf(o) > -1;
|
|
112
113
|
}, i = p((e == null ? void 0 : e.options) || []), s = p(), r = p((e == null ? void 0 : e.loading) || !1), x = b;
|
|
113
114
|
async function c(o = !0) {
|
|
114
|
-
if (!
|
|
115
|
+
if (!B(e.request))
|
|
115
116
|
return;
|
|
116
117
|
r.value = !0, n += 1;
|
|
117
118
|
const t = n;
|
|
@@ -136,7 +137,7 @@ const te = { key: 0 }, se = /* @__PURE__ */ T({
|
|
|
136
137
|
}
|
|
137
138
|
c();
|
|
138
139
|
});
|
|
139
|
-
const { value: m, updateValue:
|
|
140
|
+
const { value: m, updateValue: V } = oe(e, x, { beforeUpdateValue: e.onBeforeSelect }), O = ee("Select", e), P = y(() => {
|
|
140
141
|
var d, v;
|
|
141
142
|
const o = u(m);
|
|
142
143
|
if (!o)
|
|
@@ -176,7 +177,7 @@ const te = { key: 0 }, se = /* @__PURE__ */ T({
|
|
|
176
177
|
"onFocus"
|
|
177
178
|
])
|
|
178
179
|
),
|
|
179
|
-
placeholder: u(
|
|
180
|
+
placeholder: u(O),
|
|
180
181
|
...l
|
|
181
182
|
};
|
|
182
183
|
});
|
|
@@ -192,7 +193,7 @@ const te = { key: 0 }, se = /* @__PURE__ */ T({
|
|
|
192
193
|
focus: q,
|
|
193
194
|
blur: A,
|
|
194
195
|
request: c
|
|
195
|
-
}), (o, t) => o.mode === "read" ? (
|
|
196
|
+
}), (o, t) => o.mode === "read" ? (S(), R("span", te, U(P.value), 1)) : (S(), z(u(X), D({
|
|
196
197
|
key: 1,
|
|
197
198
|
"allow-clear": "",
|
|
198
199
|
ref_key: "selectRef",
|
|
@@ -200,20 +201,20 @@ const te = { key: 0 }, se = /* @__PURE__ */ T({
|
|
|
200
201
|
}, k.value, {
|
|
201
202
|
mode: o.multiple ? "multiple" : void 0,
|
|
202
203
|
value: u(m),
|
|
203
|
-
"onUpdate:value": u(
|
|
204
|
+
"onUpdate:value": u(V),
|
|
204
205
|
options: i.value,
|
|
205
206
|
loading: r.value,
|
|
206
207
|
onFocus: I
|
|
207
208
|
}), L({ _: 2 }, [
|
|
208
209
|
K(o.$slots, (l, a) => ({
|
|
209
210
|
name: a,
|
|
210
|
-
fn:
|
|
211
|
+
fn: w((d) => [
|
|
211
212
|
H(o.$slots, a, $(j(d || {})))
|
|
212
213
|
])
|
|
213
214
|
})),
|
|
214
215
|
r.value ? {
|
|
215
216
|
name: "notFoundContent",
|
|
216
|
-
fn:
|
|
217
|
+
fn: w(() => [
|
|
217
218
|
E(u(Y), { size: "small" })
|
|
218
219
|
]),
|
|
219
220
|
key: "0"
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { isFunction as
|
|
5
|
-
import { apFormItemColPropKeys as
|
|
6
|
-
import { QuestionCircleOutlined as
|
|
1
|
+
import { defineComponent as O, useSlots as $, ref as f, onMounted as j, computed as b, unref as l, watch as q, cloneVNode as E, openBlock as F, createBlock as g, mergeProps as K, createSlots as Q, withCtx as i, resolveDynamicComponent as U, createCommentVNode as G, createElementVNode as h, normalizeClass as H, createVNode as B, normalizeStyle as J, toDisplayString as M, renderList as W, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
|
|
2
|
+
import { Form as ee, Tooltip as oe } from "ant-design-vue";
|
|
3
|
+
import { useToken as le } from "ant-design-vue/es/theme/internal";
|
|
4
|
+
import { isFunction as C, cloneDeep as te, isArray as ae, omit as N } from "lodash-unified";
|
|
5
|
+
import { apFormItemColPropKeys as re } from "../constant.mjs";
|
|
6
|
+
import { QuestionCircleOutlined as ne } from "@ant-design/icons-vue";
|
|
7
7
|
import "../../config-provider/index.mjs";
|
|
8
|
-
import { useInjectForm as
|
|
9
|
-
import { isPromise as
|
|
10
|
-
import {
|
|
11
|
-
|
|
8
|
+
import { useInjectForm as ie } from "../context.mjs";
|
|
9
|
+
import { isPromise as se } from "@fruits-chain/utils";
|
|
10
|
+
import { getSingleVNode as ue, getValidVNodeList as me } from "../../utils/slot.mjs";
|
|
11
|
+
import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
const fe = ["title"], Ne = /* @__PURE__ */ O({
|
|
12
13
|
name: "ApFormItem",
|
|
13
14
|
__name: "index",
|
|
14
15
|
props: {
|
|
@@ -52,58 +53,57 @@ const de = ["title"], Ce = /* @__PURE__ */ j({
|
|
|
52
53
|
_signal: {},
|
|
53
54
|
transform: {}
|
|
54
55
|
},
|
|
55
|
-
setup(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
fe(e) && (e = await e), f == null || f.registerField({
|
|
56
|
+
setup(k, { expose: w }) {
|
|
57
|
+
const o = k, r = $(), { model: s, updateModel: u, internalInstance: m } = ie(), { m: p, b: P } = de("ap-form-item"), d = f(!1), n = f(), [, S] = le();
|
|
58
|
+
j(async () => {
|
|
59
|
+
let e = C(o.initialValue) ? o.initialValue() : o.initialValue;
|
|
60
|
+
se(e) && (e = await e), m == null || m.registerField({
|
|
61
61
|
name: o.name,
|
|
62
|
-
initialValue:
|
|
62
|
+
initialValue: te(e),
|
|
63
63
|
transform: o.transform
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
|
-
const c =
|
|
67
|
-
|
|
66
|
+
const c = b(() => o.name ? ae(o.name) ? o.name.reduce((e, t) => e == null ? void 0 : e[t], l(s)) : s == null ? void 0 : s.value[o.name] : null), v = f(ue(r.default));
|
|
67
|
+
q(
|
|
68
68
|
() => {
|
|
69
69
|
var e;
|
|
70
70
|
return (e = r.default) == null ? void 0 : e.call(r);
|
|
71
71
|
},
|
|
72
72
|
(e) => {
|
|
73
|
-
v.value = e
|
|
73
|
+
v.value = me(e)[0];
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
|
-
function
|
|
77
|
-
|
|
76
|
+
function x(e) {
|
|
77
|
+
u == null || u(o.name, e);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
79
|
+
function I() {
|
|
80
|
+
d.value = !0;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
|
|
82
|
+
function _() {
|
|
83
|
+
d.value = !1;
|
|
84
84
|
}
|
|
85
|
-
const y =
|
|
85
|
+
const y = b(() => {
|
|
86
86
|
var t, a;
|
|
87
87
|
if (!o.name)
|
|
88
88
|
return (t = r.default()) == null ? void 0 : t[0];
|
|
89
89
|
const e = l(v);
|
|
90
|
-
return e ?
|
|
90
|
+
return e ? E(e, {
|
|
91
91
|
[o.valuePropName]: l(c),
|
|
92
|
-
[`onUpdate:${o.valuePropName}`]:
|
|
92
|
+
[`onUpdate:${o.valuePropName}`]: x,
|
|
93
93
|
bordered: o.bordered ? !1 : (a = e == null ? void 0 : e.props) == null ? void 0 : a.bordered,
|
|
94
|
-
onFocus:
|
|
95
|
-
onBlur:
|
|
94
|
+
onFocus: I,
|
|
95
|
+
onBlur: _
|
|
96
96
|
}) : null;
|
|
97
97
|
});
|
|
98
|
-
function
|
|
98
|
+
function z() {
|
|
99
99
|
var e;
|
|
100
100
|
(e = n.value) == null || e.onFieldBlur();
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function A() {
|
|
103
103
|
var e;
|
|
104
104
|
(e = n.value) == null || e.onFieldChange();
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function D() {
|
|
107
107
|
var e;
|
|
108
108
|
(e = n.value) == null || e.clearValidate();
|
|
109
109
|
}
|
|
@@ -111,47 +111,47 @@ const de = ["title"], Ce = /* @__PURE__ */ j({
|
|
|
111
111
|
var e;
|
|
112
112
|
(e = n.value) == null || e.resetField();
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function R(e = !1) {
|
|
115
115
|
const t = l(c);
|
|
116
116
|
if (!e || !o.transform)
|
|
117
117
|
return t;
|
|
118
|
-
const a =
|
|
118
|
+
const a = C(o.transform) ? o.transform : o.transform.transformer;
|
|
119
119
|
return o.transform ? a(t) : t;
|
|
120
120
|
}
|
|
121
121
|
return w({
|
|
122
|
-
onFieldBlur:
|
|
123
|
-
onFieldChange:
|
|
124
|
-
clearValidate:
|
|
122
|
+
onFieldBlur: z,
|
|
123
|
+
onFieldChange: A,
|
|
124
|
+
clearValidate: D,
|
|
125
125
|
resetField: L,
|
|
126
|
-
getFieldValue:
|
|
127
|
-
}), (e, t) => (
|
|
126
|
+
getFieldValue: R
|
|
127
|
+
}), (e, t) => (F(), g(l(ee).Item, K({
|
|
128
128
|
ref_key: "formItemRef",
|
|
129
129
|
ref: n
|
|
130
|
-
}, l(
|
|
130
|
+
}, l(N)(o, [...l(re), "tooltip", "label"]), {
|
|
131
131
|
class: {
|
|
132
132
|
[l(p)("bordered")]: e.bordered,
|
|
133
|
-
[l(p)("focused")]: e.bordered &&
|
|
134
|
-
[l(
|
|
133
|
+
[l(p)("focused")]: e.bordered && d.value,
|
|
134
|
+
[l(P)()]: !0
|
|
135
135
|
},
|
|
136
136
|
colon: e.bordered ? !1 : o.colon
|
|
137
|
-
}),
|
|
137
|
+
}), Q({
|
|
138
138
|
default: i(() => [
|
|
139
|
-
y.value ? (
|
|
139
|
+
y.value ? (F(), g(U(y.value), { key: 0 })) : G("", !0)
|
|
140
140
|
]),
|
|
141
141
|
_: 2
|
|
142
142
|
}, [
|
|
143
143
|
o.tooltip ? {
|
|
144
144
|
name: "tooltip",
|
|
145
145
|
fn: i(({ class: a }) => [
|
|
146
|
-
|
|
147
|
-
class:
|
|
146
|
+
h("span", {
|
|
147
|
+
class: H(a)
|
|
148
148
|
}, [
|
|
149
|
-
|
|
149
|
+
B(l(oe), {
|
|
150
150
|
title: o.tooltip
|
|
151
151
|
}, {
|
|
152
152
|
default: i(() => [
|
|
153
|
-
|
|
154
|
-
style:
|
|
153
|
+
B(l(ne), {
|
|
154
|
+
style: J({ color: l(S).colorPrimary })
|
|
155
155
|
}, null, 8, ["style"])
|
|
156
156
|
]),
|
|
157
157
|
_: 1
|
|
@@ -163,26 +163,26 @@ const de = ["title"], Ce = /* @__PURE__ */ j({
|
|
|
163
163
|
e.label ? {
|
|
164
164
|
name: "label",
|
|
165
165
|
fn: i(() => [
|
|
166
|
-
|
|
166
|
+
h("span", {
|
|
167
167
|
title: e.label,
|
|
168
168
|
style: {
|
|
169
169
|
whiteSpace: "nowrap",
|
|
170
170
|
overflow: "hidden",
|
|
171
171
|
textOverflow: "ellipsis"
|
|
172
172
|
}
|
|
173
|
-
},
|
|
173
|
+
}, M(e.label), 9, fe)
|
|
174
174
|
]),
|
|
175
175
|
key: "1"
|
|
176
176
|
} : void 0,
|
|
177
|
-
|
|
178
|
-
name:
|
|
179
|
-
fn: i((
|
|
180
|
-
|
|
177
|
+
W(l(N)(r, "default"), (a, V) => ({
|
|
178
|
+
name: V,
|
|
179
|
+
fn: i((T) => [
|
|
180
|
+
X(e.$slots, V, Y(Z(T || {})))
|
|
181
181
|
])
|
|
182
182
|
}))
|
|
183
183
|
]), 1040, ["class", "colon"]));
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
export {
|
|
187
|
-
|
|
187
|
+
Ne as default
|
|
188
188
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import '@aplus-frontend/ui-theme/dist/ap-form/item-text.css';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import '@aplus-frontend/ui-theme/src/ap-form/item-text.less';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui-theme/dist/ap-form/item-text-group.css';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui-theme/src/ap-form/item-text-group.less';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SizeType } from 'ant-design-vue/es/config-provider';
|
|
1
2
|
import { ApFieldCheckboxProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldNumberProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldTextAreaProps, ApFieldTextPasswordProps, ApFieldTextProps } from '../../ap-field';
|
|
2
3
|
import { ApFormItemProps } from '../interface';
|
|
3
4
|
export type ApFormItemTextProps = ApFormItemProps & {
|
|
@@ -47,3 +48,13 @@ export type ApFormItemCheckboxProps = Omit<ApFormItemProps, 'bordered'> & {
|
|
|
47
48
|
field?: Omit<ApFieldCheckboxProps, 'value' | 'onUpdate:value'>;
|
|
48
49
|
disabled?: boolean;
|
|
49
50
|
};
|
|
51
|
+
export type ApFormItemTextGroupProps = {
|
|
52
|
+
/**
|
|
53
|
+
* ApFormItem 控件所有支持的
|
|
54
|
+
*/
|
|
55
|
+
size?: SizeType;
|
|
56
|
+
/**
|
|
57
|
+
* 是否启用紧凑模式
|
|
58
|
+
*/
|
|
59
|
+
compact?: boolean;
|
|
60
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ApFormItemTextGroupProps } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
type ApFormItemTextSlots = {
|
|
4
|
+
default: any;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
slots: Readonly<ApFormItemTextSlots> & ApFormItemTextSlots;
|
|
8
|
+
refs: {};
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFormItemTextGroupProps>, {
|
|
13
|
+
compact: boolean;
|
|
14
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFormItemTextGroupProps>, {
|
|
15
|
+
compact: boolean;
|
|
16
|
+
}>>>, {
|
|
17
|
+
compact: boolean;
|
|
18
|
+
}, {}>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithDefaults<P, D> = {
|
|
22
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
23
|
+
default: D[K];
|
|
24
|
+
}> : P[K];
|
|
25
|
+
};
|
|
26
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
+
type __VLS_TypePropsToOption<T> = {
|
|
28
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
+
} : {
|
|
31
|
+
type: PropType<T[K]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
36
|
+
new (): {
|
|
37
|
+
$slots: S;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
type __VLS_PrettifyLocal<T> = {
|
|
41
|
+
[K in keyof T]: T[K];
|
|
42
|
+
} & {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as a, openBlock as m, createBlock as s, unref as o, mergeProps as c, withCtx as n, renderSlot as u } from "vue";
|
|
2
|
+
import { Input as l } from "ant-design-vue";
|
|
3
|
+
import "../../../config-provider/index.mjs";
|
|
4
|
+
import { useNamespace as f } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
const B = /* @__PURE__ */ a({
|
|
6
|
+
name: "ApFormItemTextGroup",
|
|
7
|
+
__name: "group",
|
|
8
|
+
props: {
|
|
9
|
+
size: {},
|
|
10
|
+
compact: { type: Boolean, default: !1 }
|
|
11
|
+
},
|
|
12
|
+
setup(t) {
|
|
13
|
+
const { b: p } = f("ap-form-item-text-group"), r = t;
|
|
14
|
+
return (e, i) => (m(), s(o(l).Group, c({
|
|
15
|
+
class: e.$props.compact ? o(p)("compact") : null
|
|
16
|
+
}, r), {
|
|
17
|
+
default: n(() => [
|
|
18
|
+
u(e.$slots, "default")
|
|
19
|
+
]),
|
|
20
|
+
_: 3
|
|
21
|
+
}, 16, ["class"]));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
B as default
|
|
26
|
+
};
|