@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.
Files changed (45) hide show
  1. package/es/index.mjs +42 -41
  2. package/es/src/ap-action/style/item-dropdown.css +1 -0
  3. package/es/src/ap-download/interface.d.ts +4 -1
  4. package/es/src/ap-field/text/index.vue.d.ts +5 -5
  5. package/es/src/ap-modal/type.d.ts +2 -2
  6. package/es/src/ap-modal/utils/createModal.mjs +35 -27
  7. package/es/src/ap-table/constants.d.ts +10 -10
  8. package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +37 -0
  9. package/es/src/business/ap-input-radio/ApInputRadio.vue.mjs +4 -0
  10. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +59 -0
  11. package/es/src/business/ap-input-radio/index.d.ts +3 -0
  12. package/es/src/business/ap-input-radio/interface.d.ts +14 -0
  13. package/es/src/business/ap-input-radio/style.css +7 -0
  14. package/es/src/business/index.d.ts +152 -1
  15. package/es/src/business/index.mjs +15 -12
  16. package/es/src/editable-table/hooks/use-get-columns.mjs +46 -64
  17. package/es/src/editable-table/interface.d.ts +2 -3
  18. package/es/src/editable-table/utils.d.ts +1 -0
  19. package/es/src/editable-table/utils.mjs +75 -35
  20. package/es/src/index.mjs +188 -187
  21. package/es/src/theme/ap-action/item-dropdown.css +1 -0
  22. package/es/src/theme/ap-input-radio/ap-input-radio.css +7 -0
  23. package/lib/index.js +1 -1
  24. package/lib/src/ap-action/style/item-dropdown.css +1 -0
  25. package/lib/src/ap-download/interface.d.ts +4 -1
  26. package/lib/src/ap-field/text/index.vue.d.ts +5 -5
  27. package/lib/src/ap-modal/type.d.ts +2 -2
  28. package/lib/src/ap-modal/utils/createModal.js +1 -1
  29. package/lib/src/ap-table/constants.d.ts +10 -10
  30. package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +37 -0
  31. package/lib/src/business/ap-input-radio/ApInputRadio.vue.js +1 -0
  32. package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -0
  33. package/lib/src/business/ap-input-radio/index.d.ts +3 -0
  34. package/lib/src/business/ap-input-radio/interface.d.ts +14 -0
  35. package/lib/src/business/ap-input-radio/style.css +7 -0
  36. package/lib/src/business/index.d.ts +152 -1
  37. package/lib/src/business/index.js +1 -1
  38. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  39. package/lib/src/editable-table/interface.d.ts +2 -3
  40. package/lib/src/editable-table/utils.d.ts +1 -0
  41. package/lib/src/editable-table/utils.js +1 -1
  42. package/lib/src/index.js +1 -1
  43. package/lib/src/theme/ap-action/item-dropdown.css +1 -0
  44. package/lib/src/theme/ap-input-radio/ap-input-radio.css +7 -0
  45. 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 b, localeContextKey as I, translate as g, useLocale as P } from "./src/config-provider/hooks/use-locale.mjs";
8
- import { defaultNamespace as h, namespaceContextKey as R, useGetDerivedNamespace as v, useNamespace as M } from "./src/config-provider/hooks/use-namespace.mjs";
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 Io, isSlotFormSchema as go } from "./src/pro-form/types/form.mjs";
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 Ro } from "./src/pro-form/components/api-cascader.vue.mjs";
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 Ie } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
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 he } from "./src/pro-table/hooks/use-table.mjs";
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 Ir } from "./src/ap-field/date-range/index.vue.mjs";
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 hr } from "./src/ap-field/text/password.vue.mjs";
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 bt } from "./src/check-card/group.vue.mjs";
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 Rt, ApExportGroup as vt, ApLabel as Mt, ApSelectLayout as Gt, ApStatus as kt, ApStatusGroup as wt, ApTitle as Bt } from "./src/business/index.mjs";
105
- import { useTablePaging as yt } from "./src/ap-table/hooks/use-table-paging.mjs";
106
- import { default as Nt } from "./src/ap-table/ap-table.vue.mjs";
107
- import { default as Kt } from "./src/editable-table/index.vue.mjs";
108
- import { default as Ot } from "./src/editable-table/form-item.vue.mjs";
109
- import { default as Wt } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
110
- import { useMessage as Ut } from "./src/hooks/useMessage.mjs";
111
- import { useControllableValue as $t } from "./src/hooks/useControllableValue.mjs";
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
- Wt as ApDescriptions,
129
+ zt as ApDescriptions,
130
130
  Ft as ApDownload,
131
- Rt as ApExpandAlert,
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
- Ir as ApFieldDateRange,
136
+ br as ApFieldDateRange,
137
137
  nr as ApFieldNumber,
138
- hr as ApFieldPassword,
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 ApLabel,
164
+ Mt as ApInputRadio,
165
+ Gt as ApLabel,
165
166
  Dt as ApList,
166
167
  gt as ApModal,
167
- Gt as ApSelectLayout,
168
- kt as ApStatus,
169
- wt as ApStatusGroup,
170
- Nt as ApTable,
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
- Bt as ApTitle,
174
+ Lt as ApTitle,
174
175
  At as ApUpload,
175
- Ro as ApiCascader,
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
- bt as CheckCardGroup,
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
- Ie as EditTableHeaderIcon,
199
- Kt as EditableTable,
200
- Ot as EditableTableFormItem,
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
- b as buildTranslator,
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
- h as defaultNamespace,
242
+ R as defaultNamespace,
242
243
  U as en,
243
244
  $r as generateTableList,
244
245
  w as globalConfigCached,
245
- Io as isComponentFormSchema,
246
+ bo as isComponentFormSchema,
246
247
  go as isSlotFormSchema,
247
248
  c as keysOf,
248
- I as localeContextKey,
249
- R as namespaceContextKey,
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
- $t as useControllableValue,
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
- Ut as useMessage,
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
- he as useTable,
267
- yt as useTablePaging,
267
+ Re as useTable,
268
+ Et as useTablePaging,
268
269
  W as zhCn
269
270
  };
@@ -10,4 +10,5 @@
10
10
  color: #0070ff;
11
11
  margin-left: 4px;
12
12
  font-size: 14px;
13
+ display: inline-flex;
13
14
  }
@@ -17,6 +17,9 @@ export interface ApDownLoadProps {
17
17
  * @default false
18
18
  */
19
19
  disabled?: boolean;
20
- fileName: string;
20
+ fileName: Array<string> | string | Array<{
21
+ path: string;
22
+ fileName: string;
23
+ }>;
21
24
  getOssAccess: () => Promise<accessCreate>;
22
25
  }
@@ -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: any;
6
- addonBefore: any;
7
- prefix: any;
8
- suffix: any;
9
- clearIcon: any;
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: (e: MouseEvent) => void | Promise<unknown>;
4
- onOk: (e: MouseEvent) => void | Promise<unknown>;
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 p, defineComponent as f, createVNode as l, mergeProps as m, h as u } from "vue";
2
- import { ConfigProvider as C, Modal as g } from "ant-design-vue";
3
- import { globalConfigCached as O } from "../../config-provider/config-provider.mjs";
4
- const L = (s) => {
5
- let r, n;
6
- function a() {
7
- r && r(!1), setTimeout(() => {
8
- p(null, t), i.removeChild(t);
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 c(e) {
11
+ function m(e) {
12
12
  n && n(e);
13
13
  }
14
- const h = /* @__PURE__ */ f({
14
+ const f = /* @__PURE__ */ C({
15
15
  data() {
16
16
  return {
17
17
  open: !0,
18
- props: s
18
+ props: i
19
19
  };
20
20
  },
21
21
  methods: {
22
- async handleCancel(e) {
23
- var o, d;
24
- (o = this.props) != null && o.onCancel && await ((d = this.props) == null ? void 0 : d.onCancel(e)), a();
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(e) {
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
- }), (o = this.props) != null && o.onOk && await this.props.onOk(e), n({
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
- }), a();
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
- r = (e) => {
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, l(C, O.value, {
56
- default: () => [l(g, m({
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
- }), i = s.getContainer || document.body, t = document.createElement("div");
70
- return i.appendChild(t), p(u(h), t), {
71
- destroy: a,
72
- update: c
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
- L as createModal
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: any;
14394
- addonBefore: any;
14395
- prefix: any;
14396
- suffix: any;
14397
- clearIcon: any;
14393
+ addonAfter?: any;
14394
+ addonBefore?: any;
14395
+ prefix?: any;
14396
+ suffix?: any;
14397
+ clearIcon?: any;
14398
14398
  }> & {
14399
- addonAfter: any;
14400
- addonBefore: any;
14401
- prefix: any;
14402
- suffix: any;
14403
- clearIcon: any;
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,4 @@
1
+ import f from "./ApInputRadio.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -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,3 @@
1
+ import { default as ApInputRadio } from './ApInputRadio.vue';
2
+ export * from './interface';
3
+ export { ApInputRadio };
@@ -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 {};
@@ -0,0 +1,7 @@
1
+ .aplus-ap-input-radio {
2
+ display: flex;
3
+ align-items: center;
4
+ }
5
+ .aplus-ap-input-radio__input-number {
6
+ margin-right: 16px;
7
+ }