@aplus-frontend/ui 0.0.18 → 0.0.20
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 +26 -23
- package/es/src/ap-field/date/index.vue.d.ts +3 -1
- package/es/src/ap-field/date-range/index.vue.d.ts +3 -3
- package/es/src/ap-field/date-range/index.vue.mjs +1 -1
- package/es/src/ap-field/interface.d.ts +1 -1
- package/es/src/ap-form/ap-form-item.vue.d.ts +2 -8
- package/es/src/ap-form/ap-form-item.vue.mjs +61 -57
- package/es/src/ap-form/constant.d.ts +4 -0
- package/es/src/ap-form/constant.mjs +4 -3
- package/es/src/ap-form/interface.d.ts +10 -0
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +9 -2
- package/es/src/ap-form/items/checkbox/index.vue.mjs +20 -13
- package/es/src/ap-form/items/date/index.vue.d.ts +26 -14
- package/es/src/ap-form/items/date/index.vue.mjs +26 -18
- package/es/src/ap-form/items/date-range/index.vue.d.ts +24 -13
- package/es/src/ap-form/items/date-range/index.vue.mjs +27 -19
- package/es/src/ap-form/items/number/index.vue.d.ts +16 -9
- package/es/src/ap-form/items/number/index.vue.mjs +30 -22
- package/es/src/ap-form/items/radio/index.vue.d.ts +9 -2
- package/es/src/ap-form/items/radio/index.vue.mjs +21 -14
- package/es/src/ap-form/items/select/index.vue.d.ts +28 -15
- package/es/src/ap-form/items/select/index.vue.mjs +30 -22
- package/es/src/ap-form/items/switch/index.vue.d.ts +10 -6
- package/es/src/ap-form/items/switch/index.vue.mjs +25 -17
- package/es/src/ap-form/items/text/index.vue.d.ts +14 -8
- package/es/src/ap-form/items/text/index.vue2.mjs +32 -24
- package/es/src/ap-form/items/text/password.vue.d.ts +16 -9
- package/es/src/ap-form/items/text/password.vue.mjs +29 -21
- package/es/src/ap-form/items/text-area/index.vue.d.ts +9 -2
- package/es/src/ap-form/items/text-area/index.vue.mjs +24 -17
- package/es/src/ap-form/search-form/index.vue.mjs +1 -1
- package/es/src/ap-form/style/ap-form-item.css +11 -0
- package/es/src/ap-modal/index.d.ts +9 -0
- package/es/src/ap-modal/index.mjs +10 -0
- package/es/src/ap-modal/type.d.ts +13 -0
- package/es/src/ap-modal/type.mjs +1 -0
- package/es/src/ap-modal/utils/createModal.d.ts +3 -0
- package/es/src/ap-modal/utils/createModal.mjs +74 -0
- package/es/src/ap-modal/utils/index.d.ts +1 -0
- package/es/src/ap-modal/utils/index.mjs +4 -0
- package/es/src/ap-table/ap-table.vue.mjs +135 -124
- package/es/src/ap-table/constants.d.ts +2716 -1475
- package/es/src/ap-table/interface.d.ts +4 -0
- package/es/src/ap-table/style/ap-table.css +1 -0
- package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
- package/es/src/business/expandAlert/ApExpandAlert.vue.mjs +4 -0
- package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +113 -0
- package/es/src/business/expandAlert/interface.d.ts +26 -0
- package/es/src/business/expandAlert/style.css +42 -0
- package/es/src/business/index.d.ts +161 -1
- package/es/src/business/index.mjs +7 -4
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +194 -191
- package/es/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
- package/es/src/theme/ap-form/ap-form-item.css +11 -0
- package/es/src/theme/ap-table/ap-table.css +1 -0
- package/es/src/type.d.ts +3 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +3 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +3 -3
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +1 -1
- package/lib/src/ap-form/ap-form-item.vue.d.ts +2 -8
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/constant.d.ts +4 -0
- package/lib/src/ap-form/constant.js +1 -1
- package/lib/src/ap-form/interface.d.ts +10 -0
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +9 -2
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +26 -14
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +24 -13
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +16 -9
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.d.ts +9 -2
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +28 -15
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.d.ts +10 -6
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +14 -8
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +16 -9
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +9 -2
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/ap-form-item.css +11 -0
- package/lib/src/ap-modal/index.d.ts +9 -0
- package/lib/src/ap-modal/index.js +1 -0
- package/lib/src/ap-modal/type.d.ts +13 -0
- package/lib/src/ap-modal/type.js +1 -0
- package/lib/src/ap-modal/utils/createModal.d.ts +3 -0
- package/lib/src/ap-modal/utils/createModal.js +1 -0
- package/lib/src/ap-modal/utils/index.d.ts +1 -0
- package/lib/src/ap-modal/utils/index.js +1 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +2716 -1475
- package/lib/src/ap-table/interface.d.ts +4 -0
- package/lib/src/ap-table/style/ap-table.css +1 -0
- package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
- package/lib/src/business/expandAlert/ApExpandAlert.vue.js +1 -0
- package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -0
- package/lib/src/business/expandAlert/interface.d.ts +26 -0
- package/lib/src/business/expandAlert/style.css +42 -0
- package/lib/src/business/index.d.ts +161 -1
- package/lib/src/business/index.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
- package/lib/src/theme/ap-form/ap-form-item.css +11 -0
- package/lib/src/theme/ap-table/ap-table.css +1 -0
- package/lib/src/type.d.ts +3 -1
- package/package.json +2 -2
package/es/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { defaultNamespace as R, namespaceContextKey as h, useGetDerivedNamespace
|
|
|
9
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
|
-
import { CollapseContainer as
|
|
12
|
+
import { CollapseContainer as L, ScrollContainer as X } from "./src/container/index.mjs";
|
|
13
13
|
import { IconPicker as Y } from "./src/icon-picker/index.mjs";
|
|
14
14
|
import { default as H } from "./src/locale/lang/zh-cn.mjs";
|
|
15
15
|
import { default as z } from "./src/locale/lang/en.mjs";
|
|
@@ -28,7 +28,7 @@ import { default as Me } from "./src/pro-form/components/api-select.vue.mjs";
|
|
|
28
28
|
import { default as we } from "./src/pro-form/components/api-transfer.vue.mjs";
|
|
29
29
|
import { default as Ge } from "./src/pro-form/components/api-tree.vue.mjs";
|
|
30
30
|
import { default as ye } from "./src/pro-form/components/radio-button-group.vue.mjs";
|
|
31
|
-
import { default as
|
|
31
|
+
import { default as Le } from "./src/pro-form/pro-form.vue.mjs";
|
|
32
32
|
import { default as Ke } from "./src/pro-form/components/api-tree-select.vue.mjs";
|
|
33
33
|
import { default as Oe } from "./src/pro-form/table-form.vue.mjs";
|
|
34
34
|
import { default as We } from "./src/pro-form/table-form-inner.vue.mjs";
|
|
@@ -53,7 +53,7 @@ import { default as Mo } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
|
53
53
|
import { default as wo } from "./src/ap-form/items/number/index.vue.mjs";
|
|
54
54
|
import { default as Go } from "./src/ap-form/items/date/index.vue.mjs";
|
|
55
55
|
import { default as yo } from "./src/ap-form/items/date-range/index.vue.mjs";
|
|
56
|
-
import { default as
|
|
56
|
+
import { default as Lo } from "./src/ap-form/items/radio/index.vue.mjs";
|
|
57
57
|
import { default as Ko } from "./src/ap-form/items/select/index.vue.mjs";
|
|
58
58
|
import { default as Oo } from "./src/ap-form/items/switch/index.vue.mjs";
|
|
59
59
|
import { default as Wo } from "./src/ap-form/items/checkbox/index.vue.mjs";
|
|
@@ -79,7 +79,7 @@ import { default as hr } from "./src/ap-field/slider/index.vue.mjs";
|
|
|
79
79
|
import { default as Mr } from "./src/ap-field/segmented/index.vue.mjs";
|
|
80
80
|
import { default as wr } from "./src/ap-field/rate/index.vue.mjs";
|
|
81
81
|
import { adminToken as Gr, aplusToken as Nr } from "./src/design-token/index.mjs";
|
|
82
|
-
import { ApActionItem as
|
|
82
|
+
import { ApActionItem as Er } from "./src/ap-action/index.mjs";
|
|
83
83
|
import { default as Xr } from "./src/ap-action/item-modal/index.vue.mjs";
|
|
84
84
|
import { default as Yr } from "./src/ap-action/item-popconfirm/index.vue.mjs";
|
|
85
85
|
import { default as Hr } from "./src/ap-action/item-dropdown/index.vue.mjs";
|
|
@@ -99,13 +99,14 @@ import { default as ut } from "./src/ap-upload/apUpload.vue.mjs";
|
|
|
99
99
|
import { default as ct } from "./src/ap-download/ap-download.vue.mjs";
|
|
100
100
|
import { CheckCard as Tt } from "./src/check-card/index.mjs";
|
|
101
101
|
import { default as St } from "./src/check-card/group.vue.mjs";
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import { default as
|
|
106
|
-
import { default as
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
102
|
+
import { ApModal as bt } from "./src/ap-modal/index.mjs";
|
|
103
|
+
import { ApExpandAlert as Pt, ApLabel as Dt, ApTitle as Rt } from "./src/business/index.mjs";
|
|
104
|
+
import { useTablePaging as vt } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
105
|
+
import { default as kt } from "./src/ap-table/ap-table.vue.mjs";
|
|
106
|
+
import { default as Bt } from "./src/editable-table/index.vue.mjs";
|
|
107
|
+
import { default as Nt } from "./src/editable-table/form-item.vue.mjs";
|
|
108
|
+
import { useMessage as Et } from "./src/hooks/useMessage.mjs";
|
|
109
|
+
import { useControllableValue as Xt } from "./src/hooks/useControllableValue.mjs";
|
|
109
110
|
const p = {
|
|
110
111
|
install: (r) => {
|
|
111
112
|
for (const t in o) {
|
|
@@ -117,13 +118,14 @@ const p = {
|
|
|
117
118
|
export {
|
|
118
119
|
G as APConfigProvider,
|
|
119
120
|
zr as ApActionGroup,
|
|
120
|
-
|
|
121
|
+
Er as ApActionItem,
|
|
121
122
|
Hr as ApActionItemDropdown,
|
|
122
123
|
Xr as ApActionItemModal,
|
|
123
124
|
Yr as ApActionItemPopconfirm,
|
|
124
125
|
Jr as ApCustomColumn,
|
|
125
126
|
Zr as ApCustomSelect,
|
|
126
127
|
ct as ApDownload,
|
|
128
|
+
Pt as ApExpandAlert,
|
|
127
129
|
pr as ApField,
|
|
128
130
|
sr as ApFieldCheckbox,
|
|
129
131
|
xr as ApFieldDate,
|
|
@@ -145,7 +147,7 @@ export {
|
|
|
145
147
|
yo as ApFormItemDateRange,
|
|
146
148
|
Qo as ApFormItemGroup,
|
|
147
149
|
wo as ApFormItemNumber,
|
|
148
|
-
|
|
150
|
+
Lo as ApFormItemRadio,
|
|
149
151
|
Ko as ApFormItemSelect,
|
|
150
152
|
Oo as ApFormItemSwitch,
|
|
151
153
|
ho as ApFormItemText,
|
|
@@ -155,11 +157,12 @@ export {
|
|
|
155
157
|
tr as ApFormModalForm,
|
|
156
158
|
or as ApFormSearchForm,
|
|
157
159
|
dt as ApInfoLayout,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
Dt as ApLabel,
|
|
161
|
+
bt as ApModal,
|
|
162
|
+
kt as ApTable,
|
|
160
163
|
ft as ApTag,
|
|
161
164
|
lt as ApTagGroup,
|
|
162
|
-
|
|
165
|
+
Rt as ApTitle,
|
|
163
166
|
ut as ApUpload,
|
|
164
167
|
De as ApiCascader,
|
|
165
168
|
he as ApiRadioGroup,
|
|
@@ -174,7 +177,7 @@ export {
|
|
|
174
177
|
j as BasicTitle,
|
|
175
178
|
Tt as CheckCard,
|
|
176
179
|
St as CheckCardGroup,
|
|
177
|
-
|
|
180
|
+
L as CollapseContainer,
|
|
178
181
|
J as CollapseTransition,
|
|
179
182
|
w as ConfigProvider,
|
|
180
183
|
so as CountdownButton,
|
|
@@ -185,8 +188,8 @@ export {
|
|
|
185
188
|
et as DictCode,
|
|
186
189
|
Ao as Dropdown,
|
|
187
190
|
Io as EditTableHeaderIcon,
|
|
188
|
-
|
|
189
|
-
|
|
191
|
+
Bt as EditableTable,
|
|
192
|
+
Nt as EditableTableFormItem,
|
|
190
193
|
Z as ExpandTransition,
|
|
191
194
|
_ as ExpandXTransition,
|
|
192
195
|
ee as FadeTransition,
|
|
@@ -196,7 +199,7 @@ export {
|
|
|
196
199
|
Ue as ModalButton,
|
|
197
200
|
it as NeedNameKeyDefault,
|
|
198
201
|
$e as PopConfirmButton,
|
|
199
|
-
|
|
202
|
+
Le as ProForm,
|
|
200
203
|
Fo as ProTable,
|
|
201
204
|
Oe as ProTableForm,
|
|
202
205
|
We as ProTableFormInner,
|
|
@@ -240,18 +243,18 @@ export {
|
|
|
240
243
|
g as translate,
|
|
241
244
|
jr as useCacheColumnSetting,
|
|
242
245
|
ce as useComponentRegister,
|
|
243
|
-
|
|
246
|
+
Xt as useControllableValue,
|
|
244
247
|
ie as useDescription,
|
|
245
248
|
Te as useForm,
|
|
246
249
|
v as useGetDerivedNamespace,
|
|
247
250
|
T as useGlobalConfig,
|
|
248
251
|
P as useLocale,
|
|
249
|
-
|
|
252
|
+
Et as useMessage,
|
|
250
253
|
oo as useModal,
|
|
251
254
|
_e as useModalContext,
|
|
252
255
|
ro as useModalInner,
|
|
253
256
|
M as useNamespace,
|
|
254
257
|
Do as useTable,
|
|
255
|
-
|
|
258
|
+
vt as useTablePaging,
|
|
256
259
|
H as zhCn
|
|
257
260
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as dayjs } from 'dayjs';
|
|
2
2
|
import { ApFieldDateProps, FieldMode } from '../interface';
|
|
3
|
+
import { ApFormatPresetType } from './interface';
|
|
3
4
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, VNode, RendererNode, RendererElement, PropType } from 'vue';
|
|
5
|
+
import { LiteralUnion } from '../../type';
|
|
4
6
|
import { SharedTimeProps } from 'ant-design-vue/es/vc-picker/panels/TimePanel';
|
|
5
7
|
|
|
6
8
|
type ApFieldDataSlots = {
|
|
@@ -84,7 +86,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
84
86
|
}> | null;
|
|
85
87
|
allowClear: boolean;
|
|
86
88
|
defaultOpen: boolean;
|
|
87
|
-
format: string
|
|
89
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
88
90
|
inputReadOnly: boolean;
|
|
89
91
|
showToday: boolean;
|
|
90
92
|
showTime: boolean | SharedTimeProps<dayjs.Dayjs>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApFieldDateRangeProps, FieldMode } from '../interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ApFormatPresetType } from '../date/interface';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, VNode, RendererNode, RendererElement, PropType } from 'vue';
|
|
4
|
-
import {
|
|
4
|
+
import { LiteralUnion } from '../../type';
|
|
5
5
|
|
|
6
6
|
type ApFieldDateRangeSlots = {
|
|
7
7
|
suffixIcon?: any;
|
|
@@ -96,7 +96,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
96
96
|
}> | null | undefined)[] | VNode<RendererNode, RendererElement, {
|
|
97
97
|
[key: string]: any;
|
|
98
98
|
}> | null;
|
|
99
|
-
format:
|
|
99
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
100
100
|
inputReadOnly: boolean;
|
|
101
101
|
emptyText: string;
|
|
102
102
|
}, {}>, Readonly<ApFieldDateRangeSlots> & ApFieldDateRangeSlots>;
|
|
@@ -47,7 +47,6 @@ const fe = /* @__PURE__ */ x({
|
|
|
47
47
|
open: { type: Boolean, default: void 0 },
|
|
48
48
|
defaultOpen: { type: Boolean, default: void 0 },
|
|
49
49
|
inputReadOnly: { type: Boolean, default: void 0 },
|
|
50
|
-
format: { default: "Y-D" },
|
|
51
50
|
suffixIcon: { type: [Object, String, Number, Boolean, null, Array], default: void 0 },
|
|
52
51
|
clearIcon: { type: [Object, String, Number, Boolean, null, Array], default: void 0 },
|
|
53
52
|
getPopupContainer: {},
|
|
@@ -85,6 +84,7 @@ const fe = /* @__PURE__ */ x({
|
|
|
85
84
|
defaultValue: {},
|
|
86
85
|
onChange: {},
|
|
87
86
|
onOk: {},
|
|
87
|
+
format: { default: "Y-D" },
|
|
88
88
|
timezone: {}
|
|
89
89
|
},
|
|
90
90
|
emits: ["update:value"],
|
|
@@ -82,7 +82,7 @@ export type ApFieldTextAreaExpose = {
|
|
|
82
82
|
blur: () => void;
|
|
83
83
|
resizableTextArea: any;
|
|
84
84
|
};
|
|
85
|
-
export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'value' | 'onChange' | 'onPanelChange' | 'defaultValue' | 'onOk' | 'renderExtraFooter' | 'onUpdate:value' | 'mode'>> & {
|
|
85
|
+
export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'value' | 'onChange' | 'onPanelChange' | 'defaultValue' | 'onOk' | 'renderExtraFooter' | 'onUpdate:value' | 'mode' | 'format'>> & {
|
|
86
86
|
emptyText?: string;
|
|
87
87
|
value?: RangeValue<number> | null;
|
|
88
88
|
defaultValue?: RangeValue<number>;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { ApFormItemProps } from './interface';
|
|
2
|
-
import {
|
|
1
|
+
import { ApFormItemProps, ApFormItemSlots } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
3
|
|
|
4
|
-
type ApFormItemSlots = {
|
|
5
|
-
help: any;
|
|
6
|
-
label: any;
|
|
7
|
-
extra: any;
|
|
8
|
-
default(): VNode[];
|
|
9
|
-
};
|
|
10
4
|
declare function onFieldBlur(): void;
|
|
11
5
|
declare function onFieldChange(): void;
|
|
12
6
|
declare function clearValidate(): void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { isArray as
|
|
5
|
-
import { apFormItemColPropKeys as
|
|
6
|
-
import { QuestionCircleOutlined as
|
|
1
|
+
import { defineComponent as j, useSlots as q, ref as m, computed as B, unref as o, watch as D, cloneVNode as E, openBlock as h, createBlock as C, mergeProps as K, createSlots as O, withCtx as i, resolveDynamicComponent as Q, createCommentVNode as U, createElementVNode as w, normalizeClass as G, createVNode as g, normalizeStyle as H, renderList as J, renderSlot as W, normalizeProps as X, guardReactiveProps as Y } from "vue";
|
|
2
|
+
import { Form as Z, Tooltip as M } from "ant-design-vue";
|
|
3
|
+
import { useToken as ee } from "ant-design-vue/es/theme/internal";
|
|
4
|
+
import { isArray as oe, omit as k } from "lodash-unified";
|
|
5
|
+
import { apFormItemColPropKeys as te } from "./constant.mjs";
|
|
6
|
+
import { QuestionCircleOutlined as re } from "@ant-design/icons-vue";
|
|
7
7
|
import "../config-provider/index.mjs";
|
|
8
8
|
import { useInjectForm as le } from "./context.mjs";
|
|
9
9
|
import "./style/ap-form-item.css";
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const
|
|
10
|
+
import { useNamespace as ae } from "../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const ye = /* @__PURE__ */ j({
|
|
12
12
|
name: "ApFormItem",
|
|
13
13
|
__name: "ap-form-item",
|
|
14
14
|
props: {
|
|
@@ -51,87 +51,91 @@ const ve = /* @__PURE__ */ $({
|
|
|
51
51
|
},
|
|
52
52
|
setup(N, { expose: P }) {
|
|
53
53
|
var y, F;
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const t = N, r = q(), { model: u, updateModel: d } = le(), { m: f, b: x } = ae("ap-form-item"), s = m(!1), l = m(), [, V] = ee(), p = B(() => t.name ? oe(t.name) ? t.name.reduce((e, a) => e == null ? void 0 : e[a], o(u)) : u == null ? void 0 : u.value[t.name] : null), c = m((F = (y = r.default) == null ? void 0 : y.call(r)) == null ? void 0 : F[0]);
|
|
55
|
+
D(
|
|
56
56
|
() => {
|
|
57
57
|
var e;
|
|
58
|
-
return (e =
|
|
58
|
+
return (e = r.default) == null ? void 0 : e.call(r);
|
|
59
59
|
},
|
|
60
60
|
(e) => {
|
|
61
61
|
c.value = e == null ? void 0 : e[0];
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
function
|
|
65
|
-
d == null || d(
|
|
64
|
+
function I(e) {
|
|
65
|
+
d == null || d(t.name, e);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function S() {
|
|
68
68
|
s.value = !0;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function _() {
|
|
71
71
|
s.value = !1;
|
|
72
72
|
}
|
|
73
|
-
const v =
|
|
73
|
+
const v = B(() => {
|
|
74
74
|
var a, n;
|
|
75
|
-
if (!
|
|
76
|
-
return (a =
|
|
77
|
-
const e =
|
|
78
|
-
return e ?
|
|
79
|
-
[
|
|
80
|
-
[`onUpdate:${
|
|
81
|
-
bordered:
|
|
82
|
-
onFocus:
|
|
83
|
-
onBlur:
|
|
75
|
+
if (!t.name)
|
|
76
|
+
return (a = r.default()) == null ? void 0 : a[0];
|
|
77
|
+
const e = o(c);
|
|
78
|
+
return e ? E(e, {
|
|
79
|
+
[t.valuePropName]: o(p),
|
|
80
|
+
[`onUpdate:${t.valuePropName}`]: I,
|
|
81
|
+
bordered: t.bordered ? !1 : (n = e == null ? void 0 : e.props) == null ? void 0 : n.bordered,
|
|
82
|
+
onFocus: S,
|
|
83
|
+
onBlur: _
|
|
84
84
|
}) : null;
|
|
85
85
|
});
|
|
86
|
-
function _() {
|
|
87
|
-
var e;
|
|
88
|
-
(e = r.value) == null || e.onFieldBlur();
|
|
89
|
-
}
|
|
90
86
|
function z() {
|
|
91
87
|
var e;
|
|
92
|
-
(e =
|
|
88
|
+
(e = l.value) == null || e.onFieldBlur();
|
|
93
89
|
}
|
|
94
90
|
function A() {
|
|
95
91
|
var e;
|
|
96
|
-
(e =
|
|
92
|
+
(e = l.value) == null || e.onFieldChange();
|
|
97
93
|
}
|
|
98
94
|
function R() {
|
|
99
95
|
var e;
|
|
100
|
-
(e =
|
|
96
|
+
(e = l.value) == null || e.clearValidate();
|
|
101
97
|
}
|
|
102
98
|
function T() {
|
|
103
|
-
|
|
99
|
+
var e;
|
|
100
|
+
(e = l.value) == null || e.resetField();
|
|
101
|
+
}
|
|
102
|
+
function L() {
|
|
103
|
+
return o(p);
|
|
104
104
|
}
|
|
105
105
|
return P({
|
|
106
|
-
onFieldBlur:
|
|
107
|
-
onFieldChange:
|
|
108
|
-
clearValidate:
|
|
109
|
-
resetField:
|
|
110
|
-
getFieldValue:
|
|
111
|
-
}), (e, a) => (h(), C(
|
|
106
|
+
onFieldBlur: z,
|
|
107
|
+
onFieldChange: A,
|
|
108
|
+
clearValidate: R,
|
|
109
|
+
resetField: T,
|
|
110
|
+
getFieldValue: L
|
|
111
|
+
}), (e, a) => (h(), C(o(Z).Item, K({
|
|
112
112
|
ref_key: "formItemRef",
|
|
113
|
-
ref:
|
|
114
|
-
},
|
|
115
|
-
class: {
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
ref: l
|
|
114
|
+
}, o(k)(t, [...o(te), "tooltip"]), {
|
|
115
|
+
class: {
|
|
116
|
+
[o(f)("bordered")]: e.bordered,
|
|
117
|
+
[o(f)("focused")]: e.bordered && s.value,
|
|
118
|
+
[o(x)()]: !0
|
|
119
|
+
},
|
|
120
|
+
colon: e.bordered ? !1 : t.colon
|
|
121
|
+
}), O({
|
|
118
122
|
default: i(() => [
|
|
119
|
-
v.value ? (h(), C(
|
|
123
|
+
v.value ? (h(), C(Q(v.value), { key: 0 })) : U("", !0)
|
|
120
124
|
]),
|
|
121
125
|
_: 2
|
|
122
126
|
}, [
|
|
123
|
-
|
|
127
|
+
t.tooltip ? {
|
|
124
128
|
name: "tooltip",
|
|
125
129
|
fn: i(({ class: n }) => [
|
|
126
|
-
|
|
127
|
-
class:
|
|
130
|
+
w("span", {
|
|
131
|
+
class: G(n)
|
|
128
132
|
}, [
|
|
129
|
-
g(
|
|
130
|
-
title:
|
|
133
|
+
g(o(M), {
|
|
134
|
+
title: t.tooltip
|
|
131
135
|
}, {
|
|
132
136
|
default: i(() => [
|
|
133
|
-
g(
|
|
134
|
-
style:
|
|
137
|
+
g(o(re), {
|
|
138
|
+
style: H({ color: o(V).colorPrimary })
|
|
135
139
|
}, null, 8, ["style"])
|
|
136
140
|
]),
|
|
137
141
|
_: 1
|
|
@@ -140,15 +144,15 @@ const ve = /* @__PURE__ */ $({
|
|
|
140
144
|
]),
|
|
141
145
|
key: "0"
|
|
142
146
|
} : void 0,
|
|
143
|
-
|
|
144
|
-
name:
|
|
145
|
-
fn: i((
|
|
146
|
-
|
|
147
|
+
J(o(k)(r, "default"), (n, b) => ({
|
|
148
|
+
name: b,
|
|
149
|
+
fn: i(($) => [
|
|
150
|
+
W(e.$slots, b, X(Y($ || {})))
|
|
147
151
|
])
|
|
148
152
|
}))
|
|
149
153
|
]), 1040, ["class", "colon"]));
|
|
150
154
|
}
|
|
151
155
|
});
|
|
152
156
|
export {
|
|
153
|
-
|
|
157
|
+
ye as default
|
|
154
158
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = [
|
|
2
2
|
"flex",
|
|
3
3
|
"lg",
|
|
4
4
|
"md",
|
|
@@ -11,7 +11,8 @@ const l = [
|
|
|
11
11
|
"xl",
|
|
12
12
|
"xs",
|
|
13
13
|
"xxl"
|
|
14
|
-
];
|
|
14
|
+
], l = ["extra", "help", "label"];
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
e as apFormItemColPropKeys,
|
|
17
|
+
l as apFormItemSlotNames
|
|
17
18
|
};
|
|
@@ -2,6 +2,7 @@ import { ButtonProps, ColProps, FormItemProps, FormProps, ModalProps, RowProps }
|
|
|
2
2
|
import { FormItemExpose } from 'ant-design-vue/es/form/FormItem';
|
|
3
3
|
import { InternalNamePath, NamePath, ValidateOptions } from 'ant-design-vue/es/form/interface';
|
|
4
4
|
import { Recordable } from '../type';
|
|
5
|
+
import { VNode } from 'vue';
|
|
5
6
|
|
|
6
7
|
export type ApFormColProps = Omit<ColProps, 'prefixCls'>;
|
|
7
8
|
export type ApFormItemProps = FormItemProps & Partial<ApFormColProps> & {
|
|
@@ -78,3 +79,12 @@ export type ApFormModalFormProps = Omit<ApFormProps, 'onFinish'> & {
|
|
|
78
79
|
showCancel?: boolean;
|
|
79
80
|
};
|
|
80
81
|
export type ApFormModalFormExpose = ApFormExpose;
|
|
82
|
+
/**
|
|
83
|
+
* ApFormItem支持的插槽
|
|
84
|
+
*/
|
|
85
|
+
export type ApFormItemSlots = {
|
|
86
|
+
help: any;
|
|
87
|
+
label: any;
|
|
88
|
+
extra: any;
|
|
89
|
+
default(): VNode[];
|
|
90
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ApFormItemCheckboxProps } from '../interface';
|
|
2
|
+
import { ApFormItemSlots } from '../../interface';
|
|
2
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
4
|
import { ApFieldCheckboxProps } from '../../../ap-field';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
type ApFormItemCheckboxSlots = Omit<ApFormItemSlots, 'default'>;
|
|
7
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormItemCheckboxProps>, {
|
|
6
8
|
hasFeedback: boolean;
|
|
7
9
|
colon: undefined;
|
|
8
10
|
autoLink: boolean;
|
|
@@ -26,7 +28,7 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
26
28
|
hasFeedback: boolean;
|
|
27
29
|
autoLink: boolean;
|
|
28
30
|
validateFirst: boolean;
|
|
29
|
-
}, {}>;
|
|
31
|
+
}, {}>, Readonly<ApFormItemCheckboxSlots> & ApFormItemCheckboxSlots>;
|
|
30
32
|
export default _default;
|
|
31
33
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
32
34
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -45,3 +47,8 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
45
47
|
type __VLS_Prettify<T> = {
|
|
46
48
|
[K in keyof T]: T[K];
|
|
47
49
|
} & {};
|
|
50
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, useSlots as m, openBlock as u, createBlock as c, normalizeProps as a, guardReactiveProps as t, unref as o, createSlots as b, withCtx as r, createVNode as B, mergeProps as x, renderList as y, renderSlot as _ } from "vue";
|
|
2
2
|
import "../../ap-form-item.vue2.mjs";
|
|
3
3
|
import "../../../ap-field/index.mjs";
|
|
4
|
-
import { omit as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import { omit as d } from "lodash-unified";
|
|
5
|
+
import h from "../../ap-form-item.vue.mjs";
|
|
6
|
+
import v from "../../../ap-field/checkbox/index.vue.mjs";
|
|
7
|
+
const A = /* @__PURE__ */ f({
|
|
8
8
|
name: "ApFormItemCheckbox",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -46,16 +46,23 @@ const g = /* @__PURE__ */ t({
|
|
|
46
46
|
field: { default: () => ({}) },
|
|
47
47
|
disabled: { type: Boolean, default: !1 }
|
|
48
48
|
},
|
|
49
|
-
setup(
|
|
50
|
-
const
|
|
51
|
-
return (e,
|
|
52
|
-
default:
|
|
53
|
-
|
|
49
|
+
setup(s) {
|
|
50
|
+
const i = s, n = m();
|
|
51
|
+
return (e, g) => (u(), c(h, a(t(o(d)(i, ["field", "disabled"]))), b({
|
|
52
|
+
default: r(() => [
|
|
53
|
+
B(o(v), x({ disabled: e.disabled }, e.field), null, 16, ["disabled"])
|
|
54
54
|
]),
|
|
55
|
-
_:
|
|
56
|
-
},
|
|
55
|
+
_: 2
|
|
56
|
+
}, [
|
|
57
|
+
y(o(d)(n, "default"), (C, l) => ({
|
|
58
|
+
name: l,
|
|
59
|
+
fn: r((p) => [
|
|
60
|
+
_(e.$slots, l, a(t(p || {})))
|
|
61
|
+
])
|
|
62
|
+
}))
|
|
63
|
+
]), 1040));
|
|
57
64
|
}
|
|
58
65
|
});
|
|
59
66
|
export {
|
|
60
|
-
|
|
67
|
+
A as default
|
|
61
68
|
};
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import { ApFormItemDateProps } from '../interface';
|
|
2
|
+
import { ApFormItemSlots } from '../../interface';
|
|
2
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
4
|
import { ApFieldDateProps } from '../../..';
|
|
4
5
|
|
|
5
|
-
type ApFormItemDateSlots = {
|
|
6
|
-
dateRender: any;
|
|
7
|
-
suffixIcon?: any;
|
|
8
|
-
prevIcon?: any;
|
|
9
|
-
nextIcon?: any;
|
|
10
|
-
superPrevIcon?: any;
|
|
11
|
-
superNextIcon?: any;
|
|
12
|
-
renderExtraFooter?: any;
|
|
13
|
-
monthCellRender?: any;
|
|
14
|
-
monthCellContentRender?: any;
|
|
15
|
-
clearIcon?: any;
|
|
16
|
-
default?: any;
|
|
17
|
-
};
|
|
18
6
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormItemDateProps>, {
|
|
19
7
|
hasFeedback: boolean;
|
|
20
8
|
colon: undefined;
|
|
@@ -39,7 +27,31 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
39
27
|
hasFeedback: boolean;
|
|
40
28
|
autoLink: boolean;
|
|
41
29
|
validateFirst: boolean;
|
|
42
|
-
}, {}>, Readonly<
|
|
30
|
+
}, {}>, Readonly<{
|
|
31
|
+
dateRender: any;
|
|
32
|
+
suffixIcon?: any;
|
|
33
|
+
prevIcon?: any;
|
|
34
|
+
nextIcon?: any;
|
|
35
|
+
superPrevIcon?: any;
|
|
36
|
+
superNextIcon?: any;
|
|
37
|
+
renderExtraFooter?: any;
|
|
38
|
+
monthCellRender?: any;
|
|
39
|
+
monthCellContentRender?: any;
|
|
40
|
+
clearIcon?: any;
|
|
41
|
+
default?: any;
|
|
42
|
+
} & Omit<ApFormItemSlots, "default">> & {
|
|
43
|
+
dateRender: any;
|
|
44
|
+
suffixIcon?: any;
|
|
45
|
+
prevIcon?: any;
|
|
46
|
+
nextIcon?: any;
|
|
47
|
+
superPrevIcon?: any;
|
|
48
|
+
superNextIcon?: any;
|
|
49
|
+
renderExtraFooter?: any;
|
|
50
|
+
monthCellRender?: any;
|
|
51
|
+
monthCellContentRender?: any;
|
|
52
|
+
clearIcon?: any;
|
|
53
|
+
default?: any;
|
|
54
|
+
} & Omit<ApFormItemSlots, "default">>;
|
|
43
55
|
export default _default;
|
|
44
56
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
45
57
|
type __VLS_TypePropsToRuntimeProps<T> = {
|