@aplus-frontend/ui 0.0.1-beta.6 → 0.0.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +59 -49
- package/es/src/ap-action/constant.d.ts +0 -0
- package/es/src/ap-action/group/index.vue.d.ts +38 -0
- package/es/src/ap-action/group/index.vue.mjs +64 -0
- package/es/src/ap-action/group/index.vue2.mjs +4 -0
- package/es/src/ap-action/index.d.ts +14 -0
- package/es/src/ap-action/index.mjs +17 -0
- package/es/src/ap-action/interface.d.ts +81 -0
- package/es/src/ap-action/item/index.vue.d.ts +44 -0
- package/es/src/ap-action/item/index.vue.mjs +49 -0
- package/es/src/ap-action/item/index.vue2.mjs +4 -0
- package/es/src/ap-action/item-dropdown/index.vue.d.ts +57 -0
- package/es/src/ap-action/item-dropdown/index.vue.mjs +92 -0
- package/es/src/ap-action/item-dropdown/index.vue2.mjs +4 -0
- package/es/src/ap-action/item-modal/index.vue.d.ts +41 -0
- package/es/src/ap-action/item-modal/index.vue.mjs +34 -0
- package/es/src/ap-action/item-modal/index.vue2.mjs +4 -0
- package/es/src/ap-action/item-popconfirm/index.vue.d.ts +343 -0
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +37 -0
- package/es/src/ap-action/item-popconfirm/index.vue2.mjs +4 -0
- package/es/src/ap-action/style/item-dropdown.css +11 -0
- package/es/src/ap-action/style/item.css +28 -0
- package/es/src/ap-field/date/index.vue.d.ts +1 -1
- package/es/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/es/src/ap-field/interface.d.ts +3 -2
- package/es/src/ap-field/number/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-field/switch/index.vue.d.ts +1 -1
- package/es/src/ap-field/switch/index.vue.mjs +68 -39
- package/es/src/ap-field/text/index.vue.d.ts +3 -3
- package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
- package/es/src/ap-form/index.d.ts +76 -76
- package/es/src/base-button/index.d.ts +28 -28
- package/es/src/config-provider/config-provider.d.ts +4 -4
- package/es/src/config-provider/index.d.ts +12 -12
- package/es/src/count-down/index.d.ts +12 -12
- package/es/src/cropper/cropper-avatar.vue.d.ts +1 -1
- package/es/src/cropper/cropper-image.vue.d.ts +1 -1
- package/es/src/cropper/index.d.ts +42 -42
- package/es/src/description/description.vue.d.ts +1 -1
- package/es/src/description/index.d.ts +3 -3
- package/es/src/dropdown/dropdown.vue.d.ts +1 -1
- package/es/src/dropdown/index.d.ts +7 -7
- package/es/src/icon/index.d.ts +41 -41
- package/es/src/icon-picker/icon-picker.vue.d.ts +3 -3
- package/es/src/icon-picker/index.d.ts +45 -45
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +98 -88
- package/es/src/modal/basic.vue.d.ts +4 -3
- package/es/src/modal/basic.vue.mjs +53 -49
- package/es/src/modal/components/modal-footer.vue.d.ts +2 -2
- package/es/src/modal/components/modal.d.ts +2 -2
- package/es/src/modal/index.d.ts +10 -11
- package/es/src/modal/index.mjs +2 -3
- package/es/src/modal/props.mjs +1 -1
- package/es/src/modal/style/index.css +29 -30
- package/es/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-select.vue.d.ts +2 -2
- package/es/src/pro-form/components/api-transfer.vue.d.ts +1 -1
- package/es/src/pro-form/components/api-tree.vue.d.ts +1 -1
- package/es/src/pro-form/hooks/use-label-width.d.ts +8 -8
- package/es/src/pro-form/pro-form.vue.d.ts +1 -1
- package/es/src/strength-meter/index.d.ts +12 -12
- package/es/src/theme/ap-action/item-dropdown.css +11 -0
- package/es/src/theme/ap-action/item.css +28 -0
- package/es/src/theme/modal/index.css +29 -30
- package/lib/index.js +1 -1
- package/lib/src/ap-action/constant.d.ts +0 -0
- package/lib/src/ap-action/group/index.vue.d.ts +38 -0
- package/lib/src/ap-action/group/index.vue.js +1 -0
- package/lib/src/ap-action/group/index.vue2.js +1 -0
- package/lib/src/ap-action/index.d.ts +14 -0
- package/lib/src/ap-action/index.js +1 -0
- package/lib/src/ap-action/interface.d.ts +81 -0
- package/lib/src/ap-action/item/index.vue.d.ts +44 -0
- package/lib/src/ap-action/item/index.vue.js +1 -0
- package/lib/src/ap-action/item/index.vue2.js +1 -0
- package/lib/src/ap-action/item-dropdown/index.vue.d.ts +57 -0
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -0
- package/lib/src/ap-action/item-dropdown/index.vue2.js +1 -0
- package/lib/src/ap-action/item-modal/index.vue.d.ts +41 -0
- package/lib/src/ap-action/item-modal/index.vue.js +1 -0
- package/lib/src/ap-action/item-modal/index.vue2.js +1 -0
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +343 -0
- package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -0
- package/lib/src/ap-action/item-popconfirm/index.vue2.js +1 -0
- package/lib/src/ap-action/style/item-dropdown.css +11 -0
- package/lib/src/ap-action/style/item.css +28 -0
- package/lib/src/ap-field/date/index.vue.d.ts +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/lib/src/ap-field/interface.d.ts +3 -2
- package/lib/src/ap-field/number/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-field/switch/index.vue.d.ts +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +3 -3
- package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
- package/lib/src/ap-form/index.d.ts +76 -76
- package/lib/src/base-button/index.d.ts +28 -28
- package/lib/src/config-provider/config-provider.d.ts +4 -4
- package/lib/src/config-provider/index.d.ts +12 -12
- package/lib/src/count-down/index.d.ts +12 -12
- package/lib/src/cropper/cropper-avatar.vue.d.ts +1 -1
- package/lib/src/cropper/cropper-image.vue.d.ts +1 -1
- package/lib/src/cropper/index.d.ts +42 -42
- package/lib/src/description/description.vue.d.ts +1 -1
- package/lib/src/description/index.d.ts +3 -3
- package/lib/src/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/src/dropdown/index.d.ts +7 -7
- package/lib/src/icon/index.d.ts +41 -41
- package/lib/src/icon-picker/icon-picker.vue.d.ts +3 -3
- package/lib/src/icon-picker/index.d.ts +45 -45
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/modal/basic.vue.d.ts +4 -3
- package/lib/src/modal/basic.vue.js +1 -1
- package/lib/src/modal/components/modal-footer.vue.d.ts +2 -2
- package/lib/src/modal/components/modal.d.ts +2 -2
- package/lib/src/modal/index.d.ts +10 -11
- package/lib/src/modal/index.js +1 -1
- package/lib/src/modal/props.js +1 -1
- package/lib/src/modal/style/index.css +29 -30
- package/lib/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-select.vue.d.ts +2 -2
- package/lib/src/pro-form/components/api-transfer.vue.d.ts +1 -1
- package/lib/src/pro-form/components/api-tree.vue.d.ts +1 -1
- package/lib/src/pro-form/hooks/use-label-width.d.ts +8 -8
- package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
- package/lib/src/strength-meter/index.d.ts +12 -12
- package/lib/src/theme/ap-action/item-dropdown.css +11 -0
- package/lib/src/theme/ap-action/item.css +28 -0
- package/lib/src/theme/modal/index.css +29 -30
- package/package.json +3 -3
package/es/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as e from "./src/index.mjs";
|
|
2
2
|
import { useMessage as l } from "./src/hooks/useMessage.mjs";
|
|
3
3
|
import { useControllableValue as n } from "./src/hooks/useControllableValue.mjs";
|
|
4
|
-
import { Icon as
|
|
4
|
+
import { Icon as s, SvgIcon as d } from "./src/icon/index.mjs";
|
|
5
5
|
import { configProviderProps as u } from "./src/config-provider/config-provider-props.mjs";
|
|
6
|
-
import { configProviderContextKey as
|
|
6
|
+
import { configProviderContextKey as A, tableDefaultConfig as T } from "./src/config-provider/constants.mjs";
|
|
7
7
|
import { keysOf as S, provideGlobalConfig as F, useGlobalConfig as b } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
8
|
-
import { buildLocaleContext as
|
|
9
|
-
import { defaultNamespace as M, namespaceContextKey as
|
|
8
|
+
import { buildLocaleContext as g, buildTranslator as v, localeContextKey as P, translate as B, useLocale as R } from "./src/config-provider/hooks/use-locale.mjs";
|
|
9
|
+
import { defaultNamespace as M, namespaceContextKey as G, useGetDerivedNamespace as h, useNamespace as w } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
10
10
|
import { ConfigProvider as X } from "./src/config-provider/config-provider.mjs";
|
|
11
11
|
import { APConfigProvider as N } from "./src/config-provider/index.mjs";
|
|
12
12
|
import { Scrollbar as E } from "./src/scroll-bar/index.mjs";
|
|
@@ -16,16 +16,16 @@ import { default as $ } from "./src/locale/lang/zh-cn.mjs";
|
|
|
16
16
|
import { default as q } from "./src/locale/lang/en.mjs";
|
|
17
17
|
import { BasicArrow as Q, BasicHelp as U, BasicTitle as W } from "./src/basic/index.mjs";
|
|
18
18
|
import { default as _ } from "./src/transition/collapse-transition.vue.mjs";
|
|
19
|
-
import { ExpandTransition as eo, ExpandXTransition as ro, FadeTransition as to, ScaleRotateTransition as ao, ScaleTransition as po, ScrollXReverseTransition as fo, ScrollXTransition as lo, ScrollYReverseTransition as io, ScrollYTransition as no, SlideXReverseTransition as
|
|
20
|
-
import { useDescription as
|
|
21
|
-
import { Description as
|
|
19
|
+
import { ExpandTransition as eo, ExpandXTransition as ro, FadeTransition as to, ScaleRotateTransition as ao, ScaleTransition as po, ScrollXReverseTransition as fo, ScrollXTransition as lo, ScrollYReverseTransition as io, ScrollYTransition as no, SlideXReverseTransition as mo, SlideXTransition as so, SlideYReverseTransition as xo, SlideYTransition as uo } from "./src/transition/index.mjs";
|
|
20
|
+
import { useDescription as Ao } from "./src/description/use-description.mjs";
|
|
21
|
+
import { Description as Co } from "./src/description/index.mjs";
|
|
22
22
|
import { useForm as Fo } from "./src/pro-form/hooks/use-form.mjs";
|
|
23
|
-
import { isComponentFormSchema as
|
|
24
|
-
import { Field as
|
|
23
|
+
import { isComponentFormSchema as Io, isSlotFormSchema as go } from "./src/pro-form/types/form.mjs";
|
|
24
|
+
import { Field as Po } from "./src/pro-form/index.mjs";
|
|
25
25
|
import { default as Ro } 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
|
-
import { default as
|
|
28
|
-
import { default as
|
|
27
|
+
import { default as ho } from "./src/pro-form/components/api-select.vue.mjs";
|
|
28
|
+
import { default as ko } from "./src/pro-form/components/api-transfer.vue.mjs";
|
|
29
29
|
import { default as yo } from "./src/pro-form/components/api-tree.vue.mjs";
|
|
30
30
|
import { default as Yo } from "./src/pro-form/components/radio-button-group.vue.mjs";
|
|
31
31
|
import { default as Ko } from "./src/pro-form/pro-form.vue.mjs";
|
|
@@ -39,17 +39,17 @@ import { useModal as _o, useModalInner as oe } from "./src/modal/hooks/use-modal
|
|
|
39
39
|
import { BaseModal as re } from "./src/modal/index.mjs";
|
|
40
40
|
import { CropperAvatar as ae, CropperImage as pe } from "./src/cropper/index.mjs";
|
|
41
41
|
import { CountdownButton as le, CountdownInput as ie } from "./src/count-down/index.mjs";
|
|
42
|
-
import { createPrompt as
|
|
43
|
-
import { Dropdown as
|
|
42
|
+
import { createPrompt as me } from "./src/prompt/index.mjs";
|
|
43
|
+
import { Dropdown as de } from "./src/dropdown/index.mjs";
|
|
44
44
|
import { default as ue } from "./src/pro-table/pro-table.vue.mjs";
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
45
|
+
import { default as Ae } from "./src/pro-table/components/table-action.vue.mjs";
|
|
46
|
+
import { default as Ce } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
|
|
47
47
|
import { default as Fe } from "./src/pro-table/components/table-image.vue.mjs";
|
|
48
|
-
import { useTable as
|
|
49
|
-
import { ApForm as
|
|
48
|
+
import { useTable as Ie } from "./src/pro-table/hooks/use-table.mjs";
|
|
49
|
+
import { ApForm as ve, ApFormItem as Pe, ApFormItemGroup as Be } from "./src/ap-form/index.mjs";
|
|
50
50
|
import { default as De } from "./src/ap-field/text/index.vue.mjs";
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
51
|
+
import { default as Ge } from "./src/ap-field/checkbox/index.vue.mjs";
|
|
52
|
+
import { default as we } from "./src/ap-field/date/index.vue.mjs";
|
|
53
53
|
import { default as Xe } from "./src/ap-field/number/index.vue.mjs";
|
|
54
54
|
import { default as Ne } from "./src/ap-field/radio/index.vue.mjs";
|
|
55
55
|
import { default as Ee } from "./src/ap-field/switch/index.vue.mjs";
|
|
@@ -57,6 +57,11 @@ import { default as He } from "./src/ap-field/text-area/index.vue.mjs";
|
|
|
57
57
|
import { default as ze } from "./src/ap-field/date-range/index.vue.mjs";
|
|
58
58
|
import { default as Ve } from "./src/ap-field/select/index.vue.mjs";
|
|
59
59
|
import { adminToken as je, aplusToken as qe } from "./src/design-token/index.mjs";
|
|
60
|
+
import { ApActionItem as Qe } from "./src/ap-action/index.mjs";
|
|
61
|
+
import { default as We } from "./src/ap-action/item-modal/index.vue.mjs";
|
|
62
|
+
import { default as _e } from "./src/ap-action/item-popconfirm/index.vue.mjs";
|
|
63
|
+
import { default as er } from "./src/ap-action/item-dropdown/index.vue.mjs";
|
|
64
|
+
import { default as tr } from "./src/ap-action/group/index.vue.mjs";
|
|
60
65
|
const a = {
|
|
61
66
|
install: (r) => {
|
|
62
67
|
for (const t in e) {
|
|
@@ -67,8 +72,13 @@ const a = {
|
|
|
67
72
|
};
|
|
68
73
|
export {
|
|
69
74
|
N as APConfigProvider,
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
tr as ApActionGroup,
|
|
76
|
+
Qe as ApActionItem,
|
|
77
|
+
er as ApActionItemDropdown,
|
|
78
|
+
We as ApActionItemModal,
|
|
79
|
+
_e as ApActionItemPopconfirm,
|
|
80
|
+
Ge as ApFieldCheckbox,
|
|
81
|
+
we as ApFieldDate,
|
|
72
82
|
ze as ApFieldDateRange,
|
|
73
83
|
Xe as ApFieldNumber,
|
|
74
84
|
Ne as ApFieldRadio,
|
|
@@ -76,13 +86,13 @@ export {
|
|
|
76
86
|
Ee as ApFieldSwitch,
|
|
77
87
|
De as ApFieldText,
|
|
78
88
|
He as ApFieldTextArea,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
89
|
+
ve as ApForm,
|
|
90
|
+
Pe as ApFormItem,
|
|
91
|
+
Be as ApFormItemGroup,
|
|
82
92
|
Ro as ApiCascader,
|
|
83
93
|
Mo as ApiRadioGroup,
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
ho as ApiSelect,
|
|
95
|
+
ko as ApiTransfer,
|
|
86
96
|
yo as ApiTree,
|
|
87
97
|
Lo as ApiTreeSelect,
|
|
88
98
|
qo as BaseButton,
|
|
@@ -97,14 +107,14 @@ export {
|
|
|
97
107
|
ie as CountdownInput,
|
|
98
108
|
ae as CropperAvatar,
|
|
99
109
|
pe as CropperImage,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
110
|
+
Co as Description,
|
|
111
|
+
de as Dropdown,
|
|
112
|
+
Ce as EditTableHeaderIcon,
|
|
103
113
|
eo as ExpandTransition,
|
|
104
114
|
ro as ExpandXTransition,
|
|
105
115
|
to as FadeTransition,
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
Po as Field,
|
|
117
|
+
s as Icon,
|
|
108
118
|
O as IconPicker,
|
|
109
119
|
Oo as ModalButton,
|
|
110
120
|
$o as PopConfirmButton,
|
|
@@ -119,43 +129,43 @@ export {
|
|
|
119
129
|
io as ScrollYReverseTransition,
|
|
120
130
|
no as ScrollYTransition,
|
|
121
131
|
E as Scrollbar,
|
|
122
|
-
|
|
123
|
-
|
|
132
|
+
mo as SlideXReverseTransition,
|
|
133
|
+
so as SlideXTransition,
|
|
124
134
|
xo as SlideYReverseTransition,
|
|
125
135
|
uo as SlideYTransition,
|
|
126
136
|
Qo as StrengthMeter,
|
|
127
|
-
|
|
128
|
-
|
|
137
|
+
d as SvgIcon,
|
|
138
|
+
Ae as TableAction,
|
|
129
139
|
Fe as TableImg,
|
|
130
140
|
je as adminToken,
|
|
131
141
|
qe as aplusToken,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
142
|
+
g as buildLocaleContext,
|
|
143
|
+
v as buildTranslator,
|
|
144
|
+
A as configProviderContextKey,
|
|
135
145
|
u as configProviderProps,
|
|
136
|
-
|
|
146
|
+
me as createPrompt,
|
|
137
147
|
a as default,
|
|
138
148
|
M as defaultNamespace,
|
|
139
149
|
q as en,
|
|
140
|
-
|
|
141
|
-
|
|
150
|
+
Io as isComponentFormSchema,
|
|
151
|
+
go as isSlotFormSchema,
|
|
142
152
|
S as keysOf,
|
|
143
|
-
|
|
144
|
-
|
|
153
|
+
P as localeContextKey,
|
|
154
|
+
G as namespaceContextKey,
|
|
145
155
|
F as provideGlobalConfig,
|
|
146
|
-
|
|
147
|
-
|
|
156
|
+
T as tableDefaultConfig,
|
|
157
|
+
B as translate,
|
|
148
158
|
n as useControllableValue,
|
|
149
|
-
|
|
159
|
+
Ao as useDescription,
|
|
150
160
|
Fo as useForm,
|
|
151
|
-
|
|
161
|
+
h as useGetDerivedNamespace,
|
|
152
162
|
b as useGlobalConfig,
|
|
153
163
|
R as useLocale,
|
|
154
164
|
l as useMessage,
|
|
155
165
|
_o as useModal,
|
|
156
166
|
Wo as useModalContext,
|
|
157
167
|
oe as useModalInner,
|
|
158
|
-
|
|
159
|
-
|
|
168
|
+
w as useNamespace,
|
|
169
|
+
Ie as useTable,
|
|
160
170
|
$ as zhCn
|
|
161
171
|
};
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ApActionGroupProps, GroupActionTypes } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
import { Trigger } from 'ant-design-vue/es/dropdown/props';
|
|
4
|
+
|
|
5
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionGroupProps>, {
|
|
6
|
+
count: number;
|
|
7
|
+
trigger: () => string[];
|
|
8
|
+
placement: string;
|
|
9
|
+
actions: () => never[];
|
|
10
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionGroupProps>, {
|
|
11
|
+
count: number;
|
|
12
|
+
trigger: () => string[];
|
|
13
|
+
placement: string;
|
|
14
|
+
actions: () => never[];
|
|
15
|
+
}>>>, {
|
|
16
|
+
trigger: Trigger | Trigger[];
|
|
17
|
+
placement: "top" | "bottom" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "topCenter" | "bottomCenter";
|
|
18
|
+
actions: GroupActionTypes[];
|
|
19
|
+
count: number;
|
|
20
|
+
}, {}>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
24
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
25
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
26
|
+
} : {
|
|
27
|
+
type: PropType<T[K]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type __VLS_WithDefaults<P, D> = {
|
|
32
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
33
|
+
default: D[K];
|
|
34
|
+
}> : P[K];
|
|
35
|
+
};
|
|
36
|
+
type __VLS_Prettify<T> = {
|
|
37
|
+
[K in keyof T]: T[K];
|
|
38
|
+
} & {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as d, computed as i, openBlock as t, createBlock as r, unref as s, withCtx as u, createElementBlock as l, Fragment as f, renderList as h, mergeProps as n, createVNode as k, createCommentVNode as A } from "vue";
|
|
2
|
+
import { Space as w } from "ant-design-vue";
|
|
3
|
+
import { MoreOutlined as y } from "@ant-design/icons-vue";
|
|
4
|
+
import v from "../item/index.vue.mjs";
|
|
5
|
+
import $ from "../item-modal/index.vue.mjs";
|
|
6
|
+
import B from "../item-popconfirm/index.vue.mjs";
|
|
7
|
+
import m from "../item-dropdown/index.vue.mjs";
|
|
8
|
+
const z = /* @__PURE__ */ d({
|
|
9
|
+
name: "ApActionGroup",
|
|
10
|
+
__name: "index",
|
|
11
|
+
props: {
|
|
12
|
+
count: { default: 3 },
|
|
13
|
+
trigger: { default: () => ["hover"] },
|
|
14
|
+
placement: { default: "bottomRight" },
|
|
15
|
+
actions: { default: () => [] }
|
|
16
|
+
},
|
|
17
|
+
setup(p) {
|
|
18
|
+
const e = p, _ = i(() => e.actions.length > e.count), c = i(() => e.actions.length <= e.count ? {
|
|
19
|
+
showActions: e.actions,
|
|
20
|
+
menuActions: []
|
|
21
|
+
} : {
|
|
22
|
+
showActions: e.actions.slice(0, e.count - 1),
|
|
23
|
+
menuActions: e.actions.slice(e.count - 1)
|
|
24
|
+
});
|
|
25
|
+
return (a, C) => (t(), r(s(w), {
|
|
26
|
+
size: 16,
|
|
27
|
+
align: "center"
|
|
28
|
+
}, {
|
|
29
|
+
default: u(() => [
|
|
30
|
+
(t(!0), l(f, null, h(c.value.showActions, (o, g) => (t(), l(f, { key: g }, [
|
|
31
|
+
o.actions ? (t(), r(m, n({
|
|
32
|
+
key: 0,
|
|
33
|
+
ref_for: !0
|
|
34
|
+
}, o), null, 16)) : o.modalProps ? (t(), r($, n({
|
|
35
|
+
key: 1,
|
|
36
|
+
ref_for: !0
|
|
37
|
+
}, o), null, 16)) : o.popconfirmProps ? (t(), r(B, n({
|
|
38
|
+
key: 2,
|
|
39
|
+
ref_for: !0
|
|
40
|
+
}, o), null, 16)) : (t(), r(v, n({
|
|
41
|
+
key: 3,
|
|
42
|
+
ref_for: !0
|
|
43
|
+
}, o), null, 16))
|
|
44
|
+
], 64))), 128)),
|
|
45
|
+
_.value ? (t(), r(m, {
|
|
46
|
+
key: 0,
|
|
47
|
+
actions: c.value.menuActions,
|
|
48
|
+
"show-icon": !1,
|
|
49
|
+
placement: a.placement,
|
|
50
|
+
trigger: a.trigger
|
|
51
|
+
}, {
|
|
52
|
+
default: u(() => [
|
|
53
|
+
k(s(y), { rotate: 90 })
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["actions", "placement", "trigger"])) : A("", !0)
|
|
57
|
+
]),
|
|
58
|
+
_: 1
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
z as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as _ApActionItem } from './item/index.vue';
|
|
2
|
+
import { default as ApActionItemDropdown } from './item-dropdown/index.vue';
|
|
3
|
+
import { default as ApActionItemModal } from './item-modal/index.vue';
|
|
4
|
+
import { default as ApActionItemPopconfirm } from './item-popconfirm/index.vue';
|
|
5
|
+
import { default as ApActionGroup } from './group/index.vue';
|
|
6
|
+
|
|
7
|
+
type ApActionItemTypes = typeof _ApActionItem & {
|
|
8
|
+
Dropdown: typeof ApActionItemDropdown;
|
|
9
|
+
Modal: typeof ApActionItemModal;
|
|
10
|
+
Popconfirm: typeof ApActionItemPopconfirm;
|
|
11
|
+
};
|
|
12
|
+
declare const ApActionItem: ApActionItemTypes;
|
|
13
|
+
export * from './interface';
|
|
14
|
+
export { ApActionItem, ApActionItemModal, ApActionItemPopconfirm, ApActionItemDropdown, ApActionGroup };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import m from "./item/index.vue.mjs";
|
|
2
|
+
import i from "./item-dropdown/index.vue.mjs";
|
|
3
|
+
import t from "./item-modal/index.vue.mjs";
|
|
4
|
+
import p from "./item-popconfirm/index.vue.mjs";
|
|
5
|
+
import "vue";
|
|
6
|
+
import "ant-design-vue";
|
|
7
|
+
import "@ant-design/icons-vue";
|
|
8
|
+
const o = m;
|
|
9
|
+
o.Dropdown = i;
|
|
10
|
+
o.Modal = t;
|
|
11
|
+
o.Popconfirm = p;
|
|
12
|
+
export {
|
|
13
|
+
o as ApActionItem,
|
|
14
|
+
i as ApActionItemDropdown,
|
|
15
|
+
t as ApActionItemModal,
|
|
16
|
+
p as ApActionItemPopconfirm
|
|
17
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { DropdownProps, ModalFuncProps, PopconfirmProps } from 'ant-design-vue';
|
|
2
|
+
|
|
3
|
+
export type ActionColor = 'primary' | 'success' | 'error' | 'warn';
|
|
4
|
+
export type ApActionItemProps = {
|
|
5
|
+
/**
|
|
6
|
+
* 文本
|
|
7
|
+
*/
|
|
8
|
+
text?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 预定义文本颜色
|
|
11
|
+
*/
|
|
12
|
+
color?: ActionColor;
|
|
13
|
+
/**
|
|
14
|
+
* 是否禁用
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 是否可见
|
|
19
|
+
*/
|
|
20
|
+
visible?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 点击时的动作,支持异步
|
|
23
|
+
* @param e
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
onAction?: (e: MouseEvent) => Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* 基础点击事件
|
|
29
|
+
* @param e
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
onClick?: (e: MouseEvent) => void;
|
|
33
|
+
/**
|
|
34
|
+
* 是否显示loading效果
|
|
35
|
+
*/
|
|
36
|
+
loading?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type MixedActionTypes = ApActionItemProps | ApActionItemModalProps | ApActionItemPopconfirmProps;
|
|
39
|
+
export type GroupActionTypes = MixedActionTypes | ApActionItemDropdownProps;
|
|
40
|
+
export type ApActionItemDropdownProps = {
|
|
41
|
+
/**
|
|
42
|
+
* 触发下拉的行为
|
|
43
|
+
*/
|
|
44
|
+
trigger?: DropdownProps['trigger'];
|
|
45
|
+
/**
|
|
46
|
+
* 菜单弹出的位置
|
|
47
|
+
*/
|
|
48
|
+
placement?: DropdownProps['placement'];
|
|
49
|
+
/**
|
|
50
|
+
* 下拉菜单中的行为项配置
|
|
51
|
+
*/
|
|
52
|
+
actions?: MixedActionTypes[];
|
|
53
|
+
/**
|
|
54
|
+
* 是否显示向下的箭头
|
|
55
|
+
*/
|
|
56
|
+
showIcon?: boolean;
|
|
57
|
+
} & Omit<ApActionItemProps, 'onAction'>;
|
|
58
|
+
export type ApActionGroupProps = {
|
|
59
|
+
count?: number;
|
|
60
|
+
/**
|
|
61
|
+
* 触发下拉的行为
|
|
62
|
+
*/
|
|
63
|
+
trigger?: DropdownProps['trigger'];
|
|
64
|
+
/**
|
|
65
|
+
* 菜单弹出的位置
|
|
66
|
+
*/
|
|
67
|
+
placement?: DropdownProps['placement'];
|
|
68
|
+
/**
|
|
69
|
+
* 菜单项配置
|
|
70
|
+
*/
|
|
71
|
+
actions?: GroupActionTypes[];
|
|
72
|
+
};
|
|
73
|
+
export type ApActionItemModalProps = ApActionItemProps & {
|
|
74
|
+
/**
|
|
75
|
+
* 对话框的具体配置
|
|
76
|
+
*/
|
|
77
|
+
modalProps?: Omit<ModalFuncProps, 'type'>;
|
|
78
|
+
};
|
|
79
|
+
export type ApActionItemPopconfirmProps = ApActionItemProps & {
|
|
80
|
+
popconfirmProps?: PopconfirmProps;
|
|
81
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ApActionItemProps, ActionColor } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionItemProps>, {
|
|
5
|
+
color: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
visible: boolean;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionItemProps>, {
|
|
10
|
+
color: string;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
visible: boolean;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
}>>>, {
|
|
15
|
+
color: ActionColor;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
visible: boolean;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
}, {}>, {
|
|
20
|
+
default?(_: {}): any;
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
25
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
+
} : {
|
|
28
|
+
type: PropType<T[K]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type __VLS_WithDefaults<P, D> = {
|
|
33
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
34
|
+
default: D[K];
|
|
35
|
+
}> : P[K];
|
|
36
|
+
};
|
|
37
|
+
type __VLS_Prettify<T> = {
|
|
38
|
+
[K in keyof T]: T[K];
|
|
39
|
+
} & {};
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as p, ref as g, computed as r, unref as i, openBlock as s, createElementBlock as k, normalizeClass as C, createBlock as y, createCommentVNode as c, renderSlot as b, createTextVNode as v, toDisplayString as B } from "vue";
|
|
2
|
+
import "../../config-provider/index.mjs";
|
|
3
|
+
import x from "ant-design-vue/es/button/LoadingIcon";
|
|
4
|
+
import "../style/item.css";
|
|
5
|
+
import { useNamespace as A } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
const S = /* @__PURE__ */ p({
|
|
7
|
+
name: "ApActionItem",
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: {
|
|
10
|
+
text: {},
|
|
11
|
+
color: { default: "primary" },
|
|
12
|
+
disabled: { type: Boolean, default: !1 },
|
|
13
|
+
visible: { type: Boolean, default: !0 },
|
|
14
|
+
onAction: {},
|
|
15
|
+
onClick: {},
|
|
16
|
+
loading: { type: Boolean, default: !1 }
|
|
17
|
+
},
|
|
18
|
+
setup(u) {
|
|
19
|
+
const e = u, { b: d, m: t } = A("action-item"), n = g(!1);
|
|
20
|
+
function f(o) {
|
|
21
|
+
var a;
|
|
22
|
+
i(l) || ((a = e.onClick) == null || a.call(e, o), e.onAction && (n.value = !0, e.onAction(o).finally(() => n.value = !1)));
|
|
23
|
+
}
|
|
24
|
+
const l = r(() => e.loading || i(n)), m = r(() => [
|
|
25
|
+
d(),
|
|
26
|
+
t(e.color),
|
|
27
|
+
e.disabled ? t("disabled") : null,
|
|
28
|
+
l.value ? t("loading") : null
|
|
29
|
+
].filter(Boolean));
|
|
30
|
+
return (o, a) => o.visible ? (s(), k("span", {
|
|
31
|
+
key: 0,
|
|
32
|
+
onClick: f,
|
|
33
|
+
class: C(m.value)
|
|
34
|
+
}, [
|
|
35
|
+
l.value ? (s(), y(i(x), {
|
|
36
|
+
key: 0,
|
|
37
|
+
prefixCls: "btn",
|
|
38
|
+
existIcon: !1,
|
|
39
|
+
loading: ""
|
|
40
|
+
})) : c("", !0),
|
|
41
|
+
b(o.$slots, "default", {}, () => [
|
|
42
|
+
v(B(o.text || ""), 1)
|
|
43
|
+
])
|
|
44
|
+
], 2)) : c("", !0);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
S as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ApActionItemDropdownProps, ActionColor, MixedActionTypes } from '../interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
import { Trigger } from 'ant-design-vue/es/dropdown/props';
|
|
4
|
+
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionItemDropdownProps>, {
|
|
6
|
+
color: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
trigger: () => string[];
|
|
11
|
+
placement: string;
|
|
12
|
+
actions: () => never[];
|
|
13
|
+
showIcon: boolean;
|
|
14
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionItemDropdownProps>, {
|
|
15
|
+
color: string;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
visible: boolean;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
trigger: () => string[];
|
|
20
|
+
placement: string;
|
|
21
|
+
actions: () => never[];
|
|
22
|
+
showIcon: boolean;
|
|
23
|
+
}>>>, {
|
|
24
|
+
color: ActionColor;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
visible: boolean;
|
|
27
|
+
loading: boolean;
|
|
28
|
+
trigger: Trigger | Trigger[];
|
|
29
|
+
placement: "top" | "bottom" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "topCenter" | "bottomCenter";
|
|
30
|
+
showIcon: boolean;
|
|
31
|
+
actions: MixedActionTypes[];
|
|
32
|
+
}, {}>, {
|
|
33
|
+
default?(_: {}): any;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
38
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
39
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
40
|
+
} : {
|
|
41
|
+
type: PropType<T[K]>;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
type __VLS_WithDefaults<P, D> = {
|
|
46
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
47
|
+
default: D[K];
|
|
48
|
+
}> : P[K];
|
|
49
|
+
};
|
|
50
|
+
type __VLS_Prettify<T> = {
|
|
51
|
+
[K in keyof T]: T[K];
|
|
52
|
+
} & {};
|
|
53
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineComponent as _, ref as k, computed as w, openBlock as t, createBlock as l, unref as r, withCtx as n, createVNode as i, createElementBlock as v, Fragment as B, renderList as A, normalizeClass as s, mergeProps as f, createElementVNode as C, normalizeProps as P, guardReactiveProps as D, renderSlot as I, createCommentVNode as N } from "vue";
|
|
2
|
+
import { Dropdown as $, Menu as b, MenuItem as h } from "ant-design-vue";
|
|
3
|
+
import { DownOutlined as V } from "@ant-design/icons-vue";
|
|
4
|
+
import c from "../item/index.vue.mjs";
|
|
5
|
+
import z from "../item-modal/index.vue.mjs";
|
|
6
|
+
import E from "../item-popconfirm/index.vue.mjs";
|
|
7
|
+
import "../../config-provider/index.mjs";
|
|
8
|
+
import { omit as L } from "lodash-unified";
|
|
9
|
+
import "../style/item-dropdown.css";
|
|
10
|
+
import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const J = /* @__PURE__ */ _({
|
|
12
|
+
name: "ApActionItemDropDown",
|
|
13
|
+
__name: "index",
|
|
14
|
+
props: {
|
|
15
|
+
trigger: { default: () => ["hover"] },
|
|
16
|
+
placement: { default: "bottomLeft" },
|
|
17
|
+
actions: { default: () => [] },
|
|
18
|
+
showIcon: { type: Boolean, default: !0 },
|
|
19
|
+
text: {},
|
|
20
|
+
color: { default: "primary" },
|
|
21
|
+
disabled: { type: Boolean, default: !1 },
|
|
22
|
+
visible: { type: Boolean, default: !0 },
|
|
23
|
+
onClick: {},
|
|
24
|
+
loading: { type: Boolean, default: !1 }
|
|
25
|
+
},
|
|
26
|
+
setup(d) {
|
|
27
|
+
const u = d, m = k(!1), { e: p } = M("action-item-dropdown"), g = w(() => u.actions.map((o) => ({
|
|
28
|
+
...o,
|
|
29
|
+
onAction: async (a) => {
|
|
30
|
+
var e;
|
|
31
|
+
try {
|
|
32
|
+
await ((e = o.onAction) == null ? void 0 : e.call(o, a));
|
|
33
|
+
} finally {
|
|
34
|
+
m.value = !1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
})));
|
|
38
|
+
return (o, a) => (t(), l(r($), {
|
|
39
|
+
open: m.value,
|
|
40
|
+
"onUpdate:open": a[0] || (a[0] = (e) => m.value = e),
|
|
41
|
+
trigger: o.trigger,
|
|
42
|
+
placement: o.placement
|
|
43
|
+
}, {
|
|
44
|
+
overlay: n(() => [
|
|
45
|
+
i(r(b), null, {
|
|
46
|
+
default: n(() => [
|
|
47
|
+
(t(!0), v(B, null, A(g.value, (e, y) => (t(), l(r(h), {
|
|
48
|
+
key: y,
|
|
49
|
+
class: s(r(p)("item"))
|
|
50
|
+
}, {
|
|
51
|
+
default: n(() => [
|
|
52
|
+
e.modalProps ? (t(), l(z, f({
|
|
53
|
+
key: 0,
|
|
54
|
+
ref_for: !0
|
|
55
|
+
}, e), null, 16)) : e.popconfirmProps ? (t(), l(E, f({
|
|
56
|
+
key: 1,
|
|
57
|
+
ref_for: !0
|
|
58
|
+
}, e), null, 16)) : (t(), l(c, f({
|
|
59
|
+
key: 2,
|
|
60
|
+
ref_for: !0
|
|
61
|
+
}, e), null, 16))
|
|
62
|
+
]),
|
|
63
|
+
_: 2
|
|
64
|
+
}, 1032, ["class"]))), 128))
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
})
|
|
68
|
+
]),
|
|
69
|
+
default: n(() => [
|
|
70
|
+
C("span", {
|
|
71
|
+
class: s(r(p)("wrapper"))
|
|
72
|
+
}, [
|
|
73
|
+
i(c, P(D(r(L)(u, ["actions", "trigger", "placement"]))), {
|
|
74
|
+
default: n(() => [
|
|
75
|
+
I(o.$slots, "default")
|
|
76
|
+
]),
|
|
77
|
+
_: 3
|
|
78
|
+
}, 16),
|
|
79
|
+
o.showIcon ? (t(), l(r(V), {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: s(r(p)("icon")),
|
|
82
|
+
style: { color: "#0070ff" }
|
|
83
|
+
}, null, 8, ["class"])) : N("", !0)
|
|
84
|
+
], 2)
|
|
85
|
+
]),
|
|
86
|
+
_: 3
|
|
87
|
+
}, 8, ["open", "trigger", "placement"]));
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
J as default
|
|
92
|
+
};
|