@aplus-frontend/ui 0.1.2 → 0.1.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 +42 -41
- package/es/src/ap-action/style/item-dropdown.css +1 -0
- package/es/src/ap-download/interface.d.ts +4 -1
- package/es/src/ap-field/text/index.vue.d.ts +5 -5
- package/es/src/ap-modal/type.d.ts +2 -2
- package/es/src/ap-modal/utils/createModal.mjs +35 -27
- package/es/src/ap-table/constants.d.ts +10 -10
- package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +37 -0
- package/es/src/business/ap-input-radio/ApInputRadio.vue.mjs +4 -0
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +59 -0
- package/es/src/business/ap-input-radio/index.d.ts +3 -0
- package/es/src/business/ap-input-radio/interface.d.ts +14 -0
- package/es/src/business/ap-input-radio/style.css +7 -0
- package/es/src/business/index.d.ts +152 -1
- package/es/src/business/index.mjs +15 -12
- package/es/src/editable-table/hooks/use-get-columns.mjs +46 -64
- package/es/src/editable-table/interface.d.ts +2 -3
- package/es/src/editable-table/utils.d.ts +1 -0
- package/es/src/editable-table/utils.mjs +75 -35
- package/es/src/index.mjs +188 -187
- package/es/src/theme/ap-action/item-dropdown.css +1 -0
- package/es/src/theme/ap-input-radio/ap-input-radio.css +7 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-action/style/item-dropdown.css +1 -0
- package/lib/src/ap-download/interface.d.ts +4 -1
- package/lib/src/ap-field/text/index.vue.d.ts +5 -5
- package/lib/src/ap-modal/type.d.ts +2 -2
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-table/constants.d.ts +10 -10
- package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +37 -0
- package/lib/src/business/ap-input-radio/ApInputRadio.vue.js +1 -0
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -0
- package/lib/src/business/ap-input-radio/index.d.ts +3 -0
- package/lib/src/business/ap-input-radio/interface.d.ts +14 -0
- package/lib/src/business/ap-input-radio/style.css +7 -0
- package/lib/src/business/index.d.ts +152 -1
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/interface.d.ts +2 -3
- package/lib/src/editable-table/utils.d.ts +1 -0
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-action/item-dropdown.css +1 -0
- package/lib/src/theme/ap-input-radio/ap-input-radio.css +7 -0
- package/package.json +4 -4
package/es/index.mjs
CHANGED
|
@@ -4,8 +4,8 @@ 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
5
|
import { configProviderContextKey as u, tableDefaultConfig as n } from "./src/config-provider/constants.mjs";
|
|
6
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
|
|
8
|
-
import { defaultNamespace as
|
|
7
|
+
import { buildLocaleContext as S, buildTranslator as I, localeContextKey as b, translate as g, useLocale as P } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
|
+
import { defaultNamespace as R, namespaceContextKey as h, useGetDerivedNamespace as v, useNamespace as M } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
9
|
import { ConfigProvider as k, globalConfigCached as w } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as L } from "./src/config-provider/index.mjs";
|
|
11
11
|
import { Scrollbar as E } from "./src/scroll-bar/index.mjs";
|
|
@@ -20,9 +20,9 @@ import { useDescription as no } from "./src/description/use-description.mjs";
|
|
|
20
20
|
import { Description as co } from "./src/description/index.mjs";
|
|
21
21
|
import { useComponentRegister as To } from "./src/pro-form/hooks/use-component-register.mjs";
|
|
22
22
|
import { useForm as So } from "./src/pro-form/hooks/use-form.mjs";
|
|
23
|
-
import { isComponentFormSchema as
|
|
23
|
+
import { isComponentFormSchema as bo, isSlotFormSchema as go } from "./src/pro-form/types/form.mjs";
|
|
24
24
|
import { Field as Do } from "./src/pro-form/index.mjs";
|
|
25
|
-
import { default as
|
|
25
|
+
import { default as ho } 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 ko } from "./src/pro-form/components/api-select.vue.mjs";
|
|
28
28
|
import { default as Bo } from "./src/pro-form/components/api-transfer.vue.mjs";
|
|
@@ -45,9 +45,9 @@ import { createPrompt as ne } from "./src/prompt/index.mjs";
|
|
|
45
45
|
import { Dropdown as ce } from "./src/dropdown/index.mjs";
|
|
46
46
|
import { default as Te } from "./src/pro-table/pro-table.vue.mjs";
|
|
47
47
|
import { default as Se } from "./src/pro-table/components/table-action.vue.mjs";
|
|
48
|
-
import { default as
|
|
48
|
+
import { default as be } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
|
|
49
49
|
import { default as Pe } from "./src/pro-table/components/table-image.vue.mjs";
|
|
50
|
-
import { useTable as
|
|
50
|
+
import { useTable as Re } from "./src/pro-table/hooks/use-table.mjs";
|
|
51
51
|
import { ApFormItemText as ve } from "./src/ap-form/items/text/index.mjs";
|
|
52
52
|
import { default as Ge } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
53
53
|
import { default as we } from "./src/ap-form/items/number/index.vue.mjs";
|
|
@@ -72,9 +72,9 @@ import { default as nr } from "./src/ap-field/number/index.vue.mjs";
|
|
|
72
72
|
import { default as cr } from "./src/ap-field/radio/index.vue.mjs";
|
|
73
73
|
import { default as Tr } from "./src/ap-field/switch/index.vue.mjs";
|
|
74
74
|
import { default as Sr } from "./src/ap-field/text-area/index.vue.mjs";
|
|
75
|
-
import { default as
|
|
75
|
+
import { default as br } from "./src/ap-field/date-range/index.vue.mjs";
|
|
76
76
|
import { default as Pr } from "./src/ap-field/select/index.vue.mjs";
|
|
77
|
-
import { default as
|
|
77
|
+
import { default as Rr } from "./src/ap-field/text/password.vue.mjs";
|
|
78
78
|
import { default as vr } from "./src/ap-field/slider/index.vue.mjs";
|
|
79
79
|
import { default as Gr } from "./src/ap-field/segmented/index.vue.mjs";
|
|
80
80
|
import { default as wr } from "./src/ap-field/rate/index.vue.mjs";
|
|
@@ -98,17 +98,17 @@ import { NeedNameKeyDefault as ut } from "./src/ap-upload/apUploadTypes.mjs";
|
|
|
98
98
|
import { default as At } from "./src/ap-upload/apUpload.vue.mjs";
|
|
99
99
|
import { default as Ft } from "./src/ap-download/ap-download.vue.mjs";
|
|
100
100
|
import { CheckCard as Ct } from "./src/check-card/index.mjs";
|
|
101
|
-
import { default as
|
|
101
|
+
import { default as It } from "./src/check-card/group.vue.mjs";
|
|
102
102
|
import { ApModal as gt } from "./src/ap-modal/index.mjs";
|
|
103
103
|
import { default as Dt } from "./src/ap-list/index.vue.mjs";
|
|
104
|
-
import { ApExpandAlert as
|
|
105
|
-
import { useTablePaging as
|
|
106
|
-
import { default as
|
|
107
|
-
import { default as
|
|
108
|
-
import { default as
|
|
109
|
-
import { default as
|
|
110
|
-
import { useMessage as
|
|
111
|
-
import { useControllableValue as
|
|
104
|
+
import { ApExpandAlert as ht, ApExportGroup as vt, ApInputRadio as Mt, ApLabel as Gt, ApSelectLayout as kt, ApStatus as wt, ApStatusGroup as Bt, ApTitle as Lt } from "./src/business/index.mjs";
|
|
105
|
+
import { useTablePaging as Et } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
106
|
+
import { default as Xt } from "./src/ap-table/ap-table.vue.mjs";
|
|
107
|
+
import { default as Yt } from "./src/editable-table/index.vue.mjs";
|
|
108
|
+
import { default as Ht } from "./src/editable-table/form-item.vue.mjs";
|
|
109
|
+
import { default as zt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
110
|
+
import { useMessage as Vt } from "./src/hooks/useMessage.mjs";
|
|
111
|
+
import { useControllableValue as jt } from "./src/hooks/useControllableValue.mjs";
|
|
112
112
|
const p = {
|
|
113
113
|
install: (r) => {
|
|
114
114
|
for (const t in e) {
|
|
@@ -126,16 +126,16 @@ export {
|
|
|
126
126
|
Or as ApActionItemPopconfirm,
|
|
127
127
|
Qr as ApCustomColumn,
|
|
128
128
|
_r as ApCustomSelect,
|
|
129
|
-
|
|
129
|
+
zt as ApDescriptions,
|
|
130
130
|
Ft as ApDownload,
|
|
131
|
-
|
|
131
|
+
ht as ApExpandAlert,
|
|
132
132
|
vt as ApExportGroup,
|
|
133
133
|
fr as ApField,
|
|
134
134
|
dr as ApFieldCheckbox,
|
|
135
135
|
ir as ApFieldDate,
|
|
136
|
-
|
|
136
|
+
br as ApFieldDateRange,
|
|
137
137
|
nr as ApFieldNumber,
|
|
138
|
-
|
|
138
|
+
Rr as ApFieldPassword,
|
|
139
139
|
cr as ApFieldRadio,
|
|
140
140
|
wr as ApFieldRate,
|
|
141
141
|
Gr as ApFieldSegmented,
|
|
@@ -161,18 +161,19 @@ export {
|
|
|
161
161
|
ar as ApFormModalForm,
|
|
162
162
|
rr as ApFormSearchForm,
|
|
163
163
|
xt as ApInfoLayout,
|
|
164
|
-
Mt as
|
|
164
|
+
Mt as ApInputRadio,
|
|
165
|
+
Gt as ApLabel,
|
|
165
166
|
Dt as ApList,
|
|
166
167
|
gt as ApModal,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
kt as ApSelectLayout,
|
|
169
|
+
wt as ApStatus,
|
|
170
|
+
Bt as ApStatusGroup,
|
|
171
|
+
Xt as ApTable,
|
|
171
172
|
mt as ApTag,
|
|
172
173
|
st as ApTagGroup,
|
|
173
|
-
|
|
174
|
+
Lt as ApTitle,
|
|
174
175
|
At as ApUpload,
|
|
175
|
-
|
|
176
|
+
ho as ApiCascader,
|
|
176
177
|
Mo as ApiRadioGroup,
|
|
177
178
|
ko as ApiSelect,
|
|
178
179
|
Bo as ApiTransfer,
|
|
@@ -184,7 +185,7 @@ export {
|
|
|
184
185
|
j as BasicHelp,
|
|
185
186
|
q as BasicTitle,
|
|
186
187
|
Ct as CheckCard,
|
|
187
|
-
|
|
188
|
+
It as CheckCardGroup,
|
|
188
189
|
X as CollapseContainer,
|
|
189
190
|
Q as CollapseTransition,
|
|
190
191
|
k as ConfigProvider,
|
|
@@ -195,9 +196,9 @@ export {
|
|
|
195
196
|
co as Description,
|
|
196
197
|
et as DictCode,
|
|
197
198
|
ce as Dropdown,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
be as EditTableHeaderIcon,
|
|
200
|
+
Yt as EditableTable,
|
|
201
|
+
Ht as EditableTableFormItem,
|
|
201
202
|
_ as ExpandTransition,
|
|
202
203
|
oo as ExpandXTransition,
|
|
203
204
|
eo as FadeTransition,
|
|
@@ -232,38 +233,38 @@ export {
|
|
|
232
233
|
Lr as adminToken,
|
|
233
234
|
yr as aplusToken,
|
|
234
235
|
S as buildLocaleContext,
|
|
235
|
-
|
|
236
|
+
I as buildTranslator,
|
|
236
237
|
u as configProviderContextKey,
|
|
237
238
|
x as configProviderProps,
|
|
238
239
|
ne as createPrompt,
|
|
239
240
|
tt as createWorkOrderModal,
|
|
240
241
|
p as default,
|
|
241
|
-
|
|
242
|
+
R as defaultNamespace,
|
|
242
243
|
U as en,
|
|
243
244
|
$r as generateTableList,
|
|
244
245
|
w as globalConfigCached,
|
|
245
|
-
|
|
246
|
+
bo as isComponentFormSchema,
|
|
246
247
|
go as isSlotFormSchema,
|
|
247
248
|
c as keysOf,
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
b as localeContextKey,
|
|
250
|
+
h as namespaceContextKey,
|
|
250
251
|
F as provideGlobalConfig,
|
|
251
252
|
n as tableDefaultConfig,
|
|
252
253
|
g as translate,
|
|
253
254
|
qr as useCacheColumnSetting,
|
|
254
255
|
To as useComponentRegister,
|
|
255
|
-
|
|
256
|
+
jt as useControllableValue,
|
|
256
257
|
no as useDescription,
|
|
257
258
|
So as useForm,
|
|
258
259
|
v as useGetDerivedNamespace,
|
|
259
260
|
T as useGlobalConfig,
|
|
260
261
|
P as useLocale,
|
|
261
|
-
|
|
262
|
+
Vt as useMessage,
|
|
262
263
|
te as useModal,
|
|
263
264
|
ee as useModalContext,
|
|
264
265
|
ae as useModalInner,
|
|
265
266
|
M as useNamespace,
|
|
266
|
-
|
|
267
|
-
|
|
267
|
+
Re as useTable,
|
|
268
|
+
Et as useTablePaging,
|
|
268
269
|
W as zhCn
|
|
269
270
|
};
|
|
@@ -2,11 +2,11 @@ import { ApFieldTextProps, FieldMode } from '../interface';
|
|
|
2
2
|
import { InputFocusOptions } from 'ant-design-vue/es/vc-input/utils/commonUtils';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
4
4
|
type ApFieldTextSlots = {
|
|
5
|
-
addonAfter
|
|
6
|
-
addonBefore
|
|
7
|
-
prefix
|
|
8
|
-
suffix
|
|
9
|
-
clearIcon
|
|
5
|
+
addonAfter?: any;
|
|
6
|
+
addonBefore?: any;
|
|
7
|
+
prefix?: any;
|
|
8
|
+
suffix?: any;
|
|
9
|
+
clearIcon?: any;
|
|
10
10
|
};
|
|
11
11
|
declare function __VLS_template(): Readonly<ApFieldTextSlots> & ApFieldTextSlots;
|
|
12
12
|
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApFieldTextProps>, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModalProps } from 'ant-design-vue';
|
|
2
2
|
export type CreateModalFuncProps = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer'> & Partial<{
|
|
3
|
-
onCancel: (
|
|
4
|
-
onOk: (
|
|
3
|
+
onCancel: (params: any) => void | Promise<unknown>;
|
|
4
|
+
onOk: (params: any) => void | Promise<unknown>;
|
|
5
5
|
getContainer: HTMLElement;
|
|
6
6
|
content: any;
|
|
7
7
|
}>;
|
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
import { render as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { globalConfigCached as
|
|
4
|
-
const
|
|
5
|
-
let
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { render as l, defineComponent as C, createVNode as h, mergeProps as g, h as O } from "vue";
|
|
2
|
+
import { ConfigProvider as k, Modal as y } from "ant-design-vue";
|
|
3
|
+
import { globalConfigCached as v } from "../../config-provider/config-provider.mjs";
|
|
4
|
+
const b = (i) => {
|
|
5
|
+
let p, n;
|
|
6
|
+
function d() {
|
|
7
|
+
p && p(!1), setTimeout(() => {
|
|
8
|
+
l(null, r), c.removeChild(r);
|
|
9
9
|
}, 500);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function m(e) {
|
|
12
12
|
n && n(e);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const f = /* @__PURE__ */ C({
|
|
15
15
|
data() {
|
|
16
16
|
return {
|
|
17
17
|
open: !0,
|
|
18
|
-
props:
|
|
18
|
+
props: i
|
|
19
19
|
};
|
|
20
20
|
},
|
|
21
21
|
methods: {
|
|
22
|
-
async handleCancel(
|
|
23
|
-
var o,
|
|
24
|
-
(
|
|
22
|
+
async handleCancel() {
|
|
23
|
+
var e, o, t, s, a;
|
|
24
|
+
if ((e = this.props) != null && e.onCancel) {
|
|
25
|
+
const u = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
|
|
26
|
+
await ((a = this.props) == null ? void 0 : a.onCancel(u));
|
|
27
|
+
}
|
|
28
|
+
d();
|
|
25
29
|
},
|
|
26
|
-
async handleOk(
|
|
27
|
-
var o;
|
|
30
|
+
async handleOk() {
|
|
31
|
+
var e, o, t, s;
|
|
28
32
|
try {
|
|
29
|
-
n({
|
|
33
|
+
if (n({
|
|
30
34
|
confirmLoading: !0
|
|
31
|
-
}), (
|
|
35
|
+
}), (e = this.props) != null && e.onOk) {
|
|
36
|
+
const a = ((s = (t = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : t.component) == null ? void 0 : s.exposed) ?? void 0;
|
|
37
|
+
await this.props.onOk(a);
|
|
38
|
+
}
|
|
39
|
+
n({
|
|
32
40
|
confirmLoading: !1
|
|
33
|
-
}),
|
|
41
|
+
}), d();
|
|
34
42
|
} catch {
|
|
35
43
|
n({
|
|
36
44
|
confirmLoading: !1
|
|
@@ -39,7 +47,7 @@ const L = (s) => {
|
|
|
39
47
|
}
|
|
40
48
|
},
|
|
41
49
|
created() {
|
|
42
|
-
|
|
50
|
+
p = (e) => {
|
|
43
51
|
this.open = e;
|
|
44
52
|
}, n = (e) => {
|
|
45
53
|
this.props = {
|
|
@@ -52,8 +60,8 @@ const L = (s) => {
|
|
|
52
60
|
const {
|
|
53
61
|
...e
|
|
54
62
|
} = this.props;
|
|
55
|
-
return delete e.onCancel, delete e.onOk,
|
|
56
|
-
default: () => [
|
|
63
|
+
return delete e.onCancel, delete e.onOk, h(k, v.value, {
|
|
64
|
+
default: () => [h(y, g({
|
|
57
65
|
open: this.open,
|
|
58
66
|
destroyOnClose: !0,
|
|
59
67
|
onCancel: this.handleCancel,
|
|
@@ -66,12 +74,12 @@ const L = (s) => {
|
|
|
66
74
|
})]
|
|
67
75
|
});
|
|
68
76
|
}
|
|
69
|
-
}),
|
|
70
|
-
return
|
|
71
|
-
destroy:
|
|
72
|
-
update:
|
|
77
|
+
}), c = i.getContainer || document.body, r = document.createElement("div");
|
|
78
|
+
return c.appendChild(r), l(O(f), r), {
|
|
79
|
+
destroy: d,
|
|
80
|
+
update: m
|
|
73
81
|
};
|
|
74
82
|
};
|
|
75
83
|
export {
|
|
76
|
-
|
|
84
|
+
b as createModal
|
|
77
85
|
};
|
|
@@ -14390,17 +14390,17 @@ export declare const apTableRenderItemMap: {
|
|
|
14390
14390
|
emptyText: string;
|
|
14391
14391
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
14392
14392
|
$slots: Readonly<{
|
|
14393
|
-
addonAfter
|
|
14394
|
-
addonBefore
|
|
14395
|
-
prefix
|
|
14396
|
-
suffix
|
|
14397
|
-
clearIcon
|
|
14393
|
+
addonAfter?: any;
|
|
14394
|
+
addonBefore?: any;
|
|
14395
|
+
prefix?: any;
|
|
14396
|
+
suffix?: any;
|
|
14397
|
+
clearIcon?: any;
|
|
14398
14398
|
}> & {
|
|
14399
|
-
addonAfter
|
|
14400
|
-
addonBefore
|
|
14401
|
-
prefix
|
|
14402
|
-
suffix
|
|
14403
|
-
clearIcon
|
|
14399
|
+
addonAfter?: any;
|
|
14400
|
+
addonBefore?: any;
|
|
14401
|
+
prefix?: any;
|
|
14402
|
+
suffix?: any;
|
|
14403
|
+
clearIcon?: any;
|
|
14404
14404
|
};
|
|
14405
14405
|
}) & {
|
|
14406
14406
|
Password: typeof ApFieldPassword;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ApInputRadioProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApInputRadioProps>, {
|
|
4
|
+
bordered: boolean;
|
|
5
|
+
controls: boolean;
|
|
6
|
+
stringMode: boolean;
|
|
7
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
8
|
+
"update:value": (...args: any[]) => void;
|
|
9
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApInputRadioProps>, {
|
|
10
|
+
bordered: boolean;
|
|
11
|
+
controls: boolean;
|
|
12
|
+
stringMode: boolean;
|
|
13
|
+
}>>> & {
|
|
14
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
bordered: boolean;
|
|
17
|
+
stringMode: boolean;
|
|
18
|
+
controls: boolean;
|
|
19
|
+
}, {}>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithDefaults<P, D> = {
|
|
22
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
23
|
+
default: D[K];
|
|
24
|
+
}> : P[K];
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Prettify<T> = {
|
|
27
|
+
[K in keyof T]: T[K];
|
|
28
|
+
} & {};
|
|
29
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
+
type __VLS_TypePropsToOption<T> = {
|
|
31
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
+
} : {
|
|
34
|
+
type: PropType<T[K]>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent as d, openBlock as f, createElementBlock as v, normalizeClass as g, unref as t, createVNode as a, mergeProps as C } from "vue";
|
|
2
|
+
import "../../config-provider/index.mjs";
|
|
3
|
+
import { Form as h, InputNumber as B, RadioGroup as I } from "ant-design-vue";
|
|
4
|
+
import { omit as b } from "lodash-unified";
|
|
5
|
+
import "./style.css";
|
|
6
|
+
import { useNamespace as _ } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const A = /* @__PURE__ */ d({
|
|
8
|
+
name: "ApInputRadio",
|
|
9
|
+
__name: "ApInputRadio",
|
|
10
|
+
props: {
|
|
11
|
+
disabled: { type: Boolean },
|
|
12
|
+
stringMode: { type: Boolean, default: !0 },
|
|
13
|
+
precision: {},
|
|
14
|
+
max: {},
|
|
15
|
+
min: {},
|
|
16
|
+
step: {},
|
|
17
|
+
bordered: { type: Boolean, default: !0 },
|
|
18
|
+
autofocus: { type: Boolean },
|
|
19
|
+
decimalSeparator: {},
|
|
20
|
+
controls: { type: Boolean, default: !0 },
|
|
21
|
+
formatter: {},
|
|
22
|
+
onInput: {},
|
|
23
|
+
onChange: {},
|
|
24
|
+
onPressEnter: {},
|
|
25
|
+
onStep: {},
|
|
26
|
+
onBlur: {},
|
|
27
|
+
onFocus: {},
|
|
28
|
+
value: {},
|
|
29
|
+
options: {}
|
|
30
|
+
},
|
|
31
|
+
emits: ["update:value"],
|
|
32
|
+
setup(r, { emit: u }) {
|
|
33
|
+
const p = h.useInjectFormItemContext(), o = r, { b: l, e: s } = _("ap-input-radio"), i = u, n = (e) => {
|
|
34
|
+
i("update:value", { ...o.value, ...e }), p.onFieldChange();
|
|
35
|
+
}, m = (e) => {
|
|
36
|
+
n({ inputval: e });
|
|
37
|
+
}, c = (e) => {
|
|
38
|
+
n({ radioVal: e.target.value });
|
|
39
|
+
};
|
|
40
|
+
return (e, x) => (f(), v("div", {
|
|
41
|
+
class: g([t(l)()])
|
|
42
|
+
}, [
|
|
43
|
+
a(t(B), C({
|
|
44
|
+
class: t(s)("input-number")
|
|
45
|
+
}, t(b)(o, ["value", "options"]), {
|
|
46
|
+
value: o.value.inputval,
|
|
47
|
+
onChange: m
|
|
48
|
+
}), null, 16, ["class", "value"]),
|
|
49
|
+
a(t(I), {
|
|
50
|
+
value: o.value.radioVal,
|
|
51
|
+
options: o.options,
|
|
52
|
+
onChange: c
|
|
53
|
+
}, null, 8, ["value", "options"])
|
|
54
|
+
], 2));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
A as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputNumberProps } from 'ant-design-vue/es/input-number';
|
|
2
|
+
type ApInputProps = Pick<InputNumberProps, 'disabled' | 'stringMode' | 'precision' | 'max' | 'min' | 'step' | 'bordered' | 'autofocus' | 'decimalSeparator' | 'controls' | 'formatter' | 'onInput' | 'onChange' | 'onPressEnter' | 'onStep' | 'onBlur' | 'onFocus'>;
|
|
3
|
+
type ApInputValyeName = 'inputval' | 'radioVal';
|
|
4
|
+
export type ApInputValType = {
|
|
5
|
+
value: Record<ApInputValyeName, string | number>;
|
|
6
|
+
};
|
|
7
|
+
export type ApInputRadioOptions = Array<{
|
|
8
|
+
value: string | number;
|
|
9
|
+
label: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type ApInputRadioProps = ApInputProps & ApInputValType & {
|
|
12
|
+
options: ApInputRadioOptions;
|
|
13
|
+
};
|
|
14
|
+
export {};
|