@aplus-frontend/ui 7.17.1-beta.0 → 7.17.2
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 +29 -31
- package/es/src/ag-grid/editable/form-item.vue.mjs +48 -48
- package/es/src/ap-field/cascader/index.vue.mjs +82 -130
- package/es/src/ap-field/cascader/read.vue2.mjs +36 -35
- package/es/src/ap-field/checkbox/index.vue.d.ts +18 -1
- package/es/src/ap-field/checkbox/index.vue.mjs +42 -43
- package/es/src/ap-field/checkbox/read.vue2.mjs +1 -1
- package/es/src/ap-field/date/index.vue.mjs +48 -48
- package/es/src/ap-field/date/read.vue2.mjs +1 -1
- package/es/src/ap-field/date-range/index.vue.mjs +31 -31
- package/es/src/ap-field/date-range/read.vue2.mjs +1 -1
- package/es/src/ap-field/interface.d.ts +13 -23
- package/es/src/ap-field/number/index.vue.mjs +36 -34
- package/es/src/ap-field/number/read.vue2.mjs +1 -1
- package/es/src/ap-field/radio/index.vue.mjs +34 -42
- package/es/src/ap-field/radio/read.vue2.mjs +1 -1
- package/es/src/ap-field/rate/index.vue.mjs +23 -23
- package/es/src/ap-field/second/index.vue.mjs +27 -29
- package/es/src/ap-field/second/read.vue2.mjs +2 -2
- package/es/src/ap-field/segmented/index.vue.mjs +37 -37
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.mjs +147 -136
- package/es/src/ap-field/select/read.vue2.mjs +2 -1
- package/es/src/ap-field/slider/index.vue.mjs +35 -37
- package/es/src/ap-field/switch/index.vue.mjs +38 -38
- package/es/src/ap-field/switch/read.vue2.mjs +3 -3
- package/es/src/ap-field/text/index.vue.d.ts +478 -3
- package/es/src/ap-field/text/index.vue2.mjs +47 -46
- package/es/src/ap-field/text/password.vue.d.ts +549 -3
- package/es/src/ap-field/text/password.vue.mjs +61 -56
- package/es/src/ap-field/text/read-password.vue2.mjs +16 -16
- package/es/src/ap-field/text/read.vue2.mjs +1 -1
- package/es/src/ap-field/text-area/index.vue.mjs +29 -31
- package/es/src/ap-field/text-area/read.vue2.mjs +1 -1
- package/es/src/ap-field/tree-select/index.vue.mjs +47 -47
- package/es/src/ap-field/tree-select/read.vue2.mjs +3 -3
- package/es/src/ap-form/drawer-form/index.vue.mjs +99 -90
- package/es/src/ap-form/hooks/use-regist-form.d.ts +7 -0
- package/es/src/ap-form/hooks/use-regist-form.mjs +24 -0
- package/es/src/ap-form/interface.d.ts +18 -0
- package/es/src/ap-form/item/index.vue.d.ts +6 -6
- package/es/src/ap-form/item/index.vue.mjs +85 -94
- package/es/src/ap-form/item-group/index.vue.mjs +14 -14
- package/es/src/ap-form/items/cascader/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
- package/es/src/ap-form/items/date/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/date-range/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +10 -8
- package/es/src/ap-form/items/switch/index.vue.d.ts +3 -3
- package/es/src/ap-form/items/text/index.vue.d.ts +476 -4
- package/es/src/ap-form/items/text/password.vue.d.ts +547 -4
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-form/list/index.vue.mjs +29 -34
- package/es/src/ap-form/modal-form/index.vue.mjs +77 -68
- package/es/src/ap-form/set/index.vue.d.ts +2 -4
- package/es/src/ap-form/set/index.vue.mjs +23 -18
- package/es/src/ap-grid/index.vue.mjs +1 -1
- package/es/src/ap-table/constants.d.ts +600 -37
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/business/batch-input-group/index.vue.d.ts +240 -3
- package/es/src/business/batch-input-group/index.vue.mjs +1 -1
- package/es/src/check-card/index.vue2.mjs +61 -64
- package/es/src/hooks/index.d.ts +0 -1
- package/es/src/hooks/index.mjs +10 -12
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-field/cascader/index.vue.js +1 -1
- package/lib/src/ap-field/cascader/read.vue2.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.d.ts +18 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/interface.d.ts +13 -23
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/number/read.vue2.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/radio/read.vue2.js +1 -1
- package/lib/src/ap-field/rate/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/switch/read.vue2.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +478 -3
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +549 -3
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-field/tree-select/read.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/hooks/use-regist-form.d.ts +7 -0
- package/lib/src/ap-form/hooks/use-regist-form.js +1 -0
- package/lib/src/ap-form/interface.d.ts +18 -0
- package/lib/src/ap-form/item/index.vue.d.ts +6 -6
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/cascader/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +159 -47
- package/lib/src/ap-form/items/date/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +10 -8
- package/lib/src/ap-form/items/switch/index.vue.d.ts +3 -3
- package/lib/src/ap-form/items/text/index.vue.d.ts +476 -4
- package/lib/src/ap-form/items/text/password.vue.d.ts +547 -4
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/list/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/set/index.vue.d.ts +2 -4
- package/lib/src/ap-form/set/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +600 -37
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/business/batch-input-group/index.vue.d.ts +240 -3
- package/lib/src/business/batch-input-group/index.vue.js +1 -1
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/hooks/index.d.ts +0 -1
- package/lib/src/hooks/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/es/src/hooks/useMessage.d.ts +0 -62
- package/es/src/hooks/useMessage.mjs +0 -86
- package/lib/src/hooks/useMessage.d.ts +0 -62
- package/lib/src/hooks/useMessage.js +0 -1
|
@@ -60,7 +60,7 @@ export declare function getFieldProps<RecordType = any>(fieldProps: ApColumnType
|
|
|
60
60
|
* @param item
|
|
61
61
|
* @returns
|
|
62
62
|
*/
|
|
63
|
-
export declare function getTableRenderType(item: ApColumnType | EditableColumnType): "number" | "select" | "date" | "checkbox" | "radio" | "text" | "cascader" | "treeSelect" | "textArea" | "status" | "password" | "switch" | "
|
|
63
|
+
export declare function getTableRenderType(item: ApColumnType | EditableColumnType): "number" | "select" | "date" | "checkbox" | "radio" | "text" | "cascader" | "treeSelect" | "textArea" | "status" | "password" | "switch" | "action" | "index" | "dateRange";
|
|
64
64
|
export declare function getTableCellRenderNode(renderType: keyof typeof apTableRenderItemMap, renderProps: any, record: any, extraRenderMap?: Record<string, ValueTypeRenderConfig>): any;
|
|
65
65
|
/**
|
|
66
66
|
* 获取查询表单最终渲染的节点
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { BatchInputGroupProps } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps,
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
|
|
3
3
|
import { FieldMode, ApFieldTextProps } from '../../ap-field';
|
|
4
|
-
import { ButtonSize } from '@aplus-frontend/antdv/es/button';
|
|
4
|
+
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
5
5
|
import { FocusEventHandler, ChangeEventHandler, CompositionEventHandler, KeyboardEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
6
6
|
import { ShowCountProps } from '@aplus-frontend/antdv/es/vc-input/inputProps';
|
|
7
|
+
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
8
|
+
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
7
9
|
import { InputFocusOptions } from '@aplus-frontend/antdv/es/vc-input/utils/commonUtils';
|
|
8
10
|
import { OnCleanup } from '@vue/reactivity';
|
|
9
11
|
declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -29,6 +31,7 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
|
|
|
29
31
|
readonly mode?: FieldMode | undefined;
|
|
30
32
|
readonly class?: unknown;
|
|
31
33
|
readonly style?: unknown;
|
|
34
|
+
readonly emptyText?: string | undefined;
|
|
32
35
|
readonly type?: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "image" | "url" | "email" | "datetime-local" | "file" | "password" | "tel" | undefined;
|
|
33
36
|
readonly variant?: "filled" | "outlined" | "borderless" | "underlined" | undefined;
|
|
34
37
|
readonly lazy?: boolean | undefined;
|
|
@@ -74,7 +77,6 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
|
|
|
74
77
|
readonly suffix?: any;
|
|
75
78
|
readonly clearIcon?: any;
|
|
76
79
|
readonly allowClear?: boolean | undefined;
|
|
77
|
-
readonly emptyText?: string | undefined;
|
|
78
80
|
readonly beforeInput?: ((nextVal: string) => string) | undefined;
|
|
79
81
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
80
82
|
$attrs: {
|
|
@@ -82,6 +84,241 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
|
|
|
82
84
|
};
|
|
83
85
|
$refs: {
|
|
84
86
|
[x: string]: unknown;
|
|
87
|
+
} & {
|
|
88
|
+
inputRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
89
|
+
variant: {
|
|
90
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
91
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
92
|
+
};
|
|
93
|
+
size: {
|
|
94
|
+
type: PropType<SizeType>;
|
|
95
|
+
};
|
|
96
|
+
value: {
|
|
97
|
+
type: PropType<string | number>;
|
|
98
|
+
default: any;
|
|
99
|
+
};
|
|
100
|
+
name: StringConstructor;
|
|
101
|
+
type: {
|
|
102
|
+
type: PropType<"number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel">;
|
|
103
|
+
default: "number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel";
|
|
104
|
+
};
|
|
105
|
+
onCompositionend: PropType<CompositionEventHandler>;
|
|
106
|
+
onCompositionstart: PropType<CompositionEventHandler>;
|
|
107
|
+
onFocus: PropType<FocusEventHandler>;
|
|
108
|
+
onBlur: PropType<FocusEventHandler>;
|
|
109
|
+
onChange: PropType<ChangeEventHandler>;
|
|
110
|
+
onInput: PropType<ChangeEventHandler>;
|
|
111
|
+
onKeydown: PropType<KeyboardEventHandler>;
|
|
112
|
+
onKeyup: PropType<KeyboardEventHandler>;
|
|
113
|
+
onMousedown: {
|
|
114
|
+
type: PropType<MouseEventHandler>;
|
|
115
|
+
default: any;
|
|
116
|
+
};
|
|
117
|
+
focused: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: any;
|
|
120
|
+
};
|
|
121
|
+
hidden: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: any;
|
|
124
|
+
};
|
|
125
|
+
disabled: {
|
|
126
|
+
type: BooleanConstructor;
|
|
127
|
+
default: any;
|
|
128
|
+
};
|
|
129
|
+
prefixCls: StringConstructor;
|
|
130
|
+
id: StringConstructor;
|
|
131
|
+
readonly: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: any;
|
|
134
|
+
};
|
|
135
|
+
autofocus: {
|
|
136
|
+
type: BooleanConstructor;
|
|
137
|
+
default: any;
|
|
138
|
+
};
|
|
139
|
+
autocomplete: StringConstructor;
|
|
140
|
+
placeholder: {
|
|
141
|
+
type: PropType<string | number>;
|
|
142
|
+
};
|
|
143
|
+
lazy: {
|
|
144
|
+
type: BooleanConstructor;
|
|
145
|
+
default: boolean;
|
|
146
|
+
};
|
|
147
|
+
maxlength: NumberConstructor;
|
|
148
|
+
loading: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: any;
|
|
151
|
+
};
|
|
152
|
+
bordered: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: any;
|
|
155
|
+
};
|
|
156
|
+
showCount: {
|
|
157
|
+
type: PropType<boolean | ShowCountProps>;
|
|
158
|
+
};
|
|
159
|
+
htmlSize: NumberConstructor;
|
|
160
|
+
onPressEnter: PropType<KeyboardEventHandler>;
|
|
161
|
+
onMouseUp: {
|
|
162
|
+
type: PropType<MouseEventHandler>;
|
|
163
|
+
default: any;
|
|
164
|
+
};
|
|
165
|
+
onRawInput: PropType<ChangeEventHandler>;
|
|
166
|
+
'onUpdate:value': PropType<(val: string) => void>;
|
|
167
|
+
valueModifiers: ObjectConstructor;
|
|
168
|
+
status: PropType<"" | "error" | "warning">;
|
|
169
|
+
defaultValue: {
|
|
170
|
+
type: PropType<string | number>;
|
|
171
|
+
default: any;
|
|
172
|
+
};
|
|
173
|
+
inputElement: VueTypeValidableDef<any>;
|
|
174
|
+
triggerFocus: PropType<() => void>;
|
|
175
|
+
handleReset: PropType<MouseEventHandler>;
|
|
176
|
+
addonBefore: VueTypeValidableDef<any>;
|
|
177
|
+
addonAfter: VueTypeValidableDef<any>;
|
|
178
|
+
prefix: VueTypeValidableDef<any>;
|
|
179
|
+
suffix: VueTypeValidableDef<any>;
|
|
180
|
+
clearIcon: VueTypeValidableDef<any>;
|
|
181
|
+
allowClear: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: any;
|
|
184
|
+
};
|
|
185
|
+
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
186
|
+
value: string | number;
|
|
187
|
+
type: "number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel";
|
|
188
|
+
onMousedown: MouseEventHandler;
|
|
189
|
+
focused: boolean;
|
|
190
|
+
hidden: boolean;
|
|
191
|
+
disabled: boolean;
|
|
192
|
+
readonly: boolean;
|
|
193
|
+
autofocus: boolean;
|
|
194
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
195
|
+
lazy: boolean;
|
|
196
|
+
loading: boolean;
|
|
197
|
+
bordered: boolean;
|
|
198
|
+
onMouseUp: MouseEventHandler;
|
|
199
|
+
defaultValue: string | number;
|
|
200
|
+
allowClear: boolean;
|
|
201
|
+
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
202
|
+
P: {};
|
|
203
|
+
B: {};
|
|
204
|
+
D: {};
|
|
205
|
+
C: {};
|
|
206
|
+
M: {};
|
|
207
|
+
Defaults: {};
|
|
208
|
+
}, Readonly< ExtractPropTypes<{
|
|
209
|
+
variant: {
|
|
210
|
+
type: PropType<"filled" | "outlined" | "borderless" | "underlined">;
|
|
211
|
+
default: "filled" | "outlined" | "borderless" | "underlined";
|
|
212
|
+
};
|
|
213
|
+
size: {
|
|
214
|
+
type: PropType<SizeType>;
|
|
215
|
+
};
|
|
216
|
+
value: {
|
|
217
|
+
type: PropType<string | number>;
|
|
218
|
+
default: any;
|
|
219
|
+
};
|
|
220
|
+
name: StringConstructor;
|
|
221
|
+
type: {
|
|
222
|
+
type: PropType<"number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel">;
|
|
223
|
+
default: "number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel";
|
|
224
|
+
};
|
|
225
|
+
onCompositionend: PropType<CompositionEventHandler>;
|
|
226
|
+
onCompositionstart: PropType<CompositionEventHandler>;
|
|
227
|
+
onFocus: PropType<FocusEventHandler>;
|
|
228
|
+
onBlur: PropType<FocusEventHandler>;
|
|
229
|
+
onChange: PropType<ChangeEventHandler>;
|
|
230
|
+
onInput: PropType<ChangeEventHandler>;
|
|
231
|
+
onKeydown: PropType<KeyboardEventHandler>;
|
|
232
|
+
onKeyup: PropType<KeyboardEventHandler>;
|
|
233
|
+
onMousedown: {
|
|
234
|
+
type: PropType<MouseEventHandler>;
|
|
235
|
+
default: any;
|
|
236
|
+
};
|
|
237
|
+
focused: {
|
|
238
|
+
type: BooleanConstructor;
|
|
239
|
+
default: any;
|
|
240
|
+
};
|
|
241
|
+
hidden: {
|
|
242
|
+
type: BooleanConstructor;
|
|
243
|
+
default: any;
|
|
244
|
+
};
|
|
245
|
+
disabled: {
|
|
246
|
+
type: BooleanConstructor;
|
|
247
|
+
default: any;
|
|
248
|
+
};
|
|
249
|
+
prefixCls: StringConstructor;
|
|
250
|
+
id: StringConstructor;
|
|
251
|
+
readonly: {
|
|
252
|
+
type: BooleanConstructor;
|
|
253
|
+
default: any;
|
|
254
|
+
};
|
|
255
|
+
autofocus: {
|
|
256
|
+
type: BooleanConstructor;
|
|
257
|
+
default: any;
|
|
258
|
+
};
|
|
259
|
+
autocomplete: StringConstructor;
|
|
260
|
+
placeholder: {
|
|
261
|
+
type: PropType<string | number>;
|
|
262
|
+
};
|
|
263
|
+
lazy: {
|
|
264
|
+
type: BooleanConstructor;
|
|
265
|
+
default: boolean;
|
|
266
|
+
};
|
|
267
|
+
maxlength: NumberConstructor;
|
|
268
|
+
loading: {
|
|
269
|
+
type: BooleanConstructor;
|
|
270
|
+
default: any;
|
|
271
|
+
};
|
|
272
|
+
bordered: {
|
|
273
|
+
type: BooleanConstructor;
|
|
274
|
+
default: any;
|
|
275
|
+
};
|
|
276
|
+
showCount: {
|
|
277
|
+
type: PropType<boolean | ShowCountProps>;
|
|
278
|
+
};
|
|
279
|
+
htmlSize: NumberConstructor;
|
|
280
|
+
onPressEnter: PropType<KeyboardEventHandler>;
|
|
281
|
+
onMouseUp: {
|
|
282
|
+
type: PropType<MouseEventHandler>;
|
|
283
|
+
default: any;
|
|
284
|
+
};
|
|
285
|
+
onRawInput: PropType<ChangeEventHandler>;
|
|
286
|
+
'onUpdate:value': PropType<(val: string) => void>;
|
|
287
|
+
valueModifiers: ObjectConstructor;
|
|
288
|
+
status: PropType<"" | "error" | "warning">;
|
|
289
|
+
defaultValue: {
|
|
290
|
+
type: PropType<string | number>;
|
|
291
|
+
default: any;
|
|
292
|
+
};
|
|
293
|
+
inputElement: VueTypeValidableDef<any>;
|
|
294
|
+
triggerFocus: PropType<() => void>;
|
|
295
|
+
handleReset: PropType<MouseEventHandler>;
|
|
296
|
+
addonBefore: VueTypeValidableDef<any>;
|
|
297
|
+
addonAfter: VueTypeValidableDef<any>;
|
|
298
|
+
prefix: VueTypeValidableDef<any>;
|
|
299
|
+
suffix: VueTypeValidableDef<any>;
|
|
300
|
+
clearIcon: VueTypeValidableDef<any>;
|
|
301
|
+
allowClear: {
|
|
302
|
+
type: BooleanConstructor;
|
|
303
|
+
default: any;
|
|
304
|
+
};
|
|
305
|
+
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
306
|
+
value: string | number;
|
|
307
|
+
type: "number" | "reset" | "submit" | "button" | "time" | "image" | "text" | "search" | "hidden" | "color" | "checkbox" | "radio" | "range" | "date" | "url" | "email" | "week" | "month" | "datetime-local" | "file" | "password" | "tel";
|
|
308
|
+
onMousedown: MouseEventHandler;
|
|
309
|
+
focused: boolean;
|
|
310
|
+
hidden: boolean;
|
|
311
|
+
disabled: boolean;
|
|
312
|
+
readonly: boolean;
|
|
313
|
+
autofocus: boolean;
|
|
314
|
+
variant: "filled" | "outlined" | "borderless" | "underlined";
|
|
315
|
+
lazy: boolean;
|
|
316
|
+
loading: boolean;
|
|
317
|
+
bordered: boolean;
|
|
318
|
+
onMouseUp: MouseEventHandler;
|
|
319
|
+
defaultValue: string | number;
|
|
320
|
+
allowClear: boolean;
|
|
321
|
+
}> | null;
|
|
85
322
|
};
|
|
86
323
|
$slots: Readonly<{
|
|
87
324
|
[name: string]: Slot<any> | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("@aplus-frontend/antdv"),w=require("lodash-unified");require("../../ap-field/index.js");const N=require("../../ap-field/hooks/use-default-placeholder.js");require("../../config-provider/index.js");require("../../hooks/index.js");require("../../utils/index.js");require("./popover-input/index.vue.js");const j=require("./style/index.js"),R=require("./utils.js"),L=require("../../hooks/useControllableValue.js"),O=require("../../config-provider/hooks/use-locale.js"),z=require("../../config-provider/hooks/use-namespace.js"),E=require("../../utils/is.js"),T=require("../../ap-field/select/index.vue.js"),M=require("../../ap-field/text/index.js"),D=require("./popover-input/index.vue2.js"),c="GROUP_SEARCH_ALL",K=e.defineComponent({name:"BatchInputGroup",__name:"index",props:{style:{type:[Boolean,null,String,Object,Array]},inputStyle:{type:[Boolean,null,String,Object,Array]},options:{},hasAll:{type:Boolean,default:!0},value:{},"onUpdate:value":{},popoverPlacement:{default:"left"},maxNum:{default:200},getPopupContainer:{},mode:{default:"edit"},class:{},variant:{},size:{},name:{},type:{default:"text"},onCompositionend:{},onCompositionstart:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onKeydown:{},onKeyup:{},onMousedown:{},focused:{type:Boolean},hidden:{type:Boolean},disabled:{type:Boolean},prefixCls:{},id:{},readonly:{type:Boolean},autofocus:{type:Boolean},autocomplete:{},placeholder:{},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onMouseUp:{},onRawInput:{},valueModifiers:{},status:{},defaultValue:{},inputElement:{},triggerFocus:{},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("@aplus-frontend/antdv"),w=require("lodash-unified");require("../../ap-field/index.js");const N=require("../../ap-field/hooks/use-default-placeholder.js");require("../../config-provider/index.js");require("../../hooks/index.js");require("../../utils/index.js");require("./popover-input/index.vue.js");const j=require("./style/index.js"),R=require("./utils.js"),L=require("../../hooks/useControllableValue.js"),O=require("../../config-provider/hooks/use-locale.js"),z=require("../../config-provider/hooks/use-namespace.js"),E=require("../../utils/is.js"),T=require("../../ap-field/select/index.vue.js"),M=require("../../ap-field/text/index.js"),D=require("./popover-input/index.vue2.js"),c="GROUP_SEARCH_ALL",K=e.defineComponent({name:"BatchInputGroup",__name:"index",props:{style:{type:[Boolean,null,String,Object,Array]},inputStyle:{type:[Boolean,null,String,Object,Array]},options:{},hasAll:{type:Boolean,default:!0},value:{},"onUpdate:value":{},popoverPlacement:{default:"left"},maxNum:{default:200},getPopupContainer:{},mode:{default:"edit"},class:{},emptyText:{default:"--"},variant:{},size:{},name:{},type:{default:"text"},onCompositionend:{},onCompositionstart:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onKeydown:{},onKeyup:{},onMousedown:{},focused:{type:Boolean},hidden:{type:Boolean},disabled:{type:Boolean},prefixCls:{},id:{},readonly:{type:Boolean},autofocus:{type:Boolean},autocomplete:{},placeholder:{},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onMouseUp:{},onRawInput:{},valueModifiers:{},status:{},defaultValue:{},inputElement:{},triggerFocus:{},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},beforeInput:{}},emits:["update:value"],setup(h,{emit:g}){const n=h,B=N.useDefaultPlaceholder("Text",n),C=g,{value:u,updateValue:a}=L.useControllableValue(n,C),i=e.ref(),d=e.ref(),{t:b}=O.useLocale(),{b:q}=z.useNamespace("batch-input-group"),f=j.default("batch-input-group"),r=y.Form.useInjectFormItemContext(),A=e.computed(()=>n.options?n.options.length>1&&n.hasAll?[{value:c,label:b("ap.common.all")},...n.options]:n.options:[]),V=e.computed(()=>n.options?n.options.map(t=>t.value):[]),x=e.computed(()=>e.unref(u)?.value?.length?e.unref(u).value.join(","):""),_=e.computed(()=>e.unref(u)?.value?.length?e.unref(u).value.join(`
|
|
2
2
|
`):""),I=e.computed(()=>{const t=e.unref(u)?.key;if(t?.length)return t.length===1||!n.hasAll?t[0]:c}),S=e.computed(()=>{const t=e.unref(u)?.key;return!t||t?.length<=1||n.hasAll===!1?e.unref(B):(n.options||[]).filter(o=>t.includes(o.value)).map(o=>o.label).join("/")});function k(t){const l=e.unref(u)||{},o=t===c?e.unref(V):E.isDef(t)?[t]:[];a({...l,key:o}),r.onFieldChange()}function F(t){const l=e.unref(u)||{},o=t.target.value||"";let p=R.splitValue(o,",",",",n.maxNum);if(o!==p){const v=d.value?.$el?.querySelector("input");v&&(v.value=p)}let s=p.split(",");s.length===1&&s[0]===""&&(s=[]),a({...l,value:s}),r.onFieldChange()}function P(t){const l=e.unref(u)||{};let o=t.split(/,|\n/);a({...l,value:o}),r.onFieldChange()}function m(){const t=e.unref(u)||{},l=t.value?.filter(Boolean);a({...t,value:l}),r.onFieldChange()}function U(t){m(),n.onBlur?.(t)}return(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:i,class:e.normalizeClass([e.unref(q)(),e.unref(f)]),onFocus:l[0]||(l[0]=(...o)=>t.onFocus&&t.onFocus(...o)),onBlur:l[1]||(l[1]=(...o)=>t.onBlur&&t.onBlur(...o))},[e.createVNode(e.unref(y.Space).Compact,{block:""},{default:e.withCtx(()=>[t.options?.length?(e.openBlock(),e.createBlock(e.unref(T.default),{key:0,style:e.normalizeStyle(t.style),options:A.value,value:I.value,"allow-clear":!1,"dropdown-match-select-width":!1,disabled:t.disabled,"get-popup-container":()=>i.value,"onUpdate:value":k},null,8,["style","options","value","disabled","get-popup-container"])):e.createCommentVNode("",!0),e.createVNode(e.unref(M.ApFieldText),e.mergeProps(e.unref(w.omit)(n,["style","value","onUpdate:value","inputStyle","hasAll","options","onBlur"]),{ref_key:"inputRef",ref:d,style:t.inputStyle,value:x.value,placeholder:S.value,onInput:F,onBlur:U}),{suffix:e.withCtx(()=>[e.createVNode(D.default,{_parent:i.value,value:_.value,disabled:t.disabled,placement:n.popoverPlacement,"max-num":t.maxNum,class:e.normalizeClass(e.unref(f)),"get-popup-container":t.getPopupContainer,"onUpdate:value":P,onClose:m},null,8,["_parent","value","disabled","placement","max-num","class","get-popup-container"])]),_:1},16,["style","value","placeholder"])]),_:1})],34))}});exports.default=K;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),S=require("@aplus-frontend/antdv"),V=require("lodash-unified");require("../render/index.js");require("../config-provider/index.js");require("../hooks/index.js");const q=require("./checked.svg.js"),N=require("./context.js"),P=require("./style/index.js"),_=require("../config-provider/hooks/use-namespace.js"),w=require("../hooks/useControllableValue.js"),m=require("../render/render.js"),E=["src"],T=e.defineComponent({name:"CheckCard",__name:"index",props:{bordered:{type:Boolean,default:!0},disabled:{type:Boolean},loading:{type:Boolean},size:{default:"middle"},stopPropagation:{type:[Boolean,Function],default:!1},indicatorSize:{default:void 0},style:{default:void 0},checked:{type:Boolean,default:void 0},"onUpdate:checked":{},defaultChecked:{type:Boolean},value:{type:[String,Number,Boolean]},title:{},content:{}},emits:["update:checked"],setup(v,{emit:k}){const l=v,{b:g,m:u,e:c,em:d}=_.useNamespace("check-card"),h=P.default("check-card"),b=k,r=N.useInjectCheckCard(),{value:o,updateValue:i}=w.useControllableValue(l,b,{valuePropName:"checked",defaultValuePropName:"defaultChecked"}),a=e.computed(()=>{const t={...l},n=e.unref(r);return n&&(t.disabled=t.disabled||n.disabled,t.bordered=t.bordered||n.bordered,t.loading=t.loading||n.loading,t.size=t.size||n.size,t.indicatorSize=t.indicatorSize||n.indicatorSize,t.stopPropagation=t.stopPropagation||n.stopPropagation,t.style=t.style?t.style:n.style),t}),y=e.computed(()=>{const t=e.unref(a);return[g(),u(t.size),e.unref(o)?u("checked"):null,t.bordered?u("bordered"):null,t.disabled?u("disabled"):null,h.value]}),C=e.computed(()=>{const t=e.unref(a);return{...t.style||{},"--check-card-indicator-size":`${t.indicatorSize||14}px`}});function s(t,n){return t==null?null:V.isFunction(t)?t(n):e.createVNode(e.Fragment,null,[t])}const f=e.computed(()=>s(l.title,e.unref(o))),p=e.computed(()=>s(l.content,e.unref(o)));function B(t){const n=e.unref(a).stopPropagation;return n?n===!0?t.target!==t.currentTarget:n(t):!1}function z(t){B(t)||a.value.loading||a.value.disabled||(r.value?r.value?.toggleOption?.(l.value):i(!e.unref(o)))}return e.watch(()=>r.value,t=>{if(!t)return;const n=t.multiple?(t.value||[]).includes(l.value):t.value===l.value;i(n)},{immediate:!0}),e.watchEffect(t=>{r.value?.registerValue?.(l.value),t(()=>r.value?.cancelValue?.(l.value))}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(C.value),class:e.normalizeClass(y.value),onClick:e.withModifiers(z,["stop"])},[a.value.loading?(e.openBlock(),e.createBlock(e.unref(S.Skeleton),{key:0,active:""})):e.renderSlot(t.$slots,"default",{key:1,checked:e.unref(o)},()=>[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(c)("title"),a.value.disabled?e.unref(d)("title","disabled"):null])},[e.createVNode(e.unref(m.default),{node:f.value},null,8,["node"])],2)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(c)("content"),a.value.disabled?e.unref(d)("content","disabled"):null])},[e.createVNode(e.unref(m.default),{node:p.value},null,8,["node"])],2)):e.createCommentVNode("",!0)]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(c)("checked-icon"))},[e.createElementVNode("img",{src:e.unref(q.default)},null,8,E)],2)):e.createCommentVNode("",!0)],6))}});exports.default=T;
|
package/lib/src/hooks/index.d.ts
CHANGED
package/lib/src/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useControllableValue.js"),u=require("./useManualRef.js"),l=require("./useThrottleRef.js"),s=require("./useFullScreen.js"),r=require("./useResize.js");exports.useControllableValue=e.useControllableValue;exports.useManualRef=u.useManualRef;exports.useThrottleRef=l.useThrottleRef;exports.useFullScreen=s.useFullScreen;exports.useResize=r.useResize;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.17.
|
|
1
|
+
declare const _default: "7.17.2";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.17.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.17.2";exports.default=e;
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ModalFuncProps } from '@aplus-frontend/antdv/lib/modal/Modal';
|
|
2
|
-
import { NotificationArgsProps, ConfigProps } from '@aplus-frontend/antdv/lib/notification';
|
|
3
|
-
import { ModalFuncProps } from '@aplus-frontend/antdv';
|
|
4
|
-
import { MessageApi } from '@aplus-frontend/antdv/es/message';
|
|
5
|
-
export interface NotifyApi {
|
|
6
|
-
info(config: NotificationArgsProps): void;
|
|
7
|
-
success(config: NotificationArgsProps): void;
|
|
8
|
-
error(config: NotificationArgsProps): void;
|
|
9
|
-
warn(config: NotificationArgsProps): void;
|
|
10
|
-
warning(config: NotificationArgsProps): void;
|
|
11
|
-
open(args: NotificationArgsProps): void;
|
|
12
|
-
close(key: string): void;
|
|
13
|
-
config(options: ConfigProps): void;
|
|
14
|
-
destroy(): void;
|
|
15
|
-
}
|
|
16
|
-
export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
17
|
-
export declare type IconType = 'success' | 'info' | 'error' | 'warning';
|
|
18
|
-
export interface ModalOptionsEx extends Omit<ModalFuncProps, 'iconType'> {
|
|
19
|
-
iconType: 'warning' | 'success' | 'error' | 'info';
|
|
20
|
-
}
|
|
21
|
-
export type ModalOptionsPartial = Partial<ModalOptionsEx> & Pick<ModalOptionsEx, 'content'>;
|
|
22
|
-
/**
|
|
23
|
-
* @description: Create confirmation box
|
|
24
|
-
*/
|
|
25
|
-
declare function createConfirm(options: ModalOptionsEx): {
|
|
26
|
-
destroy: () => void;
|
|
27
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
28
|
-
};
|
|
29
|
-
declare function createSuccessModal(options: ModalOptionsPartial): {
|
|
30
|
-
destroy: () => void;
|
|
31
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
32
|
-
};
|
|
33
|
-
declare function createErrorModal(options: ModalOptionsPartial): {
|
|
34
|
-
destroy: () => void;
|
|
35
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
36
|
-
};
|
|
37
|
-
declare function createInfoModal(options: ModalOptionsPartial): {
|
|
38
|
-
destroy: () => void;
|
|
39
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
40
|
-
};
|
|
41
|
-
declare function createWarningModal(options: ModalOptionsPartial): {
|
|
42
|
-
destroy: () => void;
|
|
43
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
44
|
-
};
|
|
45
|
-
declare function createModal(options: ModalOptionsPartial, type: IconType): {
|
|
46
|
-
destroy: () => void;
|
|
47
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @description: message
|
|
51
|
-
*/
|
|
52
|
-
export declare function useMessage(): {
|
|
53
|
-
createMessage: MessageApi;
|
|
54
|
-
notification: NotifyApi;
|
|
55
|
-
createConfirm: typeof createConfirm;
|
|
56
|
-
createSuccessModal: typeof createSuccessModal;
|
|
57
|
-
createErrorModal: typeof createErrorModal;
|
|
58
|
-
createInfoModal: typeof createInfoModal;
|
|
59
|
-
createWarningModal: typeof createWarningModal;
|
|
60
|
-
createModal: typeof createModal;
|
|
61
|
-
};
|
|
62
|
-
export {};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { createVNode as o } from "vue";
|
|
2
|
-
import { InfoCircleFilled as c, CheckCircleFilled as s, CloseCircleFilled as f } from "@ant-design/icons-vue";
|
|
3
|
-
import { Modal as r, notification as i, message as d } from "@aplus-frontend/antdv";
|
|
4
|
-
import { isString as m } from "lodash-unified";
|
|
5
|
-
import "../config-provider/index.mjs";
|
|
6
|
-
import { useLocale as g } from "../config-provider/hooks/use-locale.mjs";
|
|
7
|
-
function l(e) {
|
|
8
|
-
return e === "warning" ? o(c, {
|
|
9
|
-
class: "modal-icon-warning"
|
|
10
|
-
}, null) : e === "success" ? o(s, {
|
|
11
|
-
class: "modal-icon-success"
|
|
12
|
-
}, null) : e === "info" ? o(c, {
|
|
13
|
-
class: "modal-icon-info"
|
|
14
|
-
}, null) : o(f, {
|
|
15
|
-
class: "modal-icon-error"
|
|
16
|
-
}, null);
|
|
17
|
-
}
|
|
18
|
-
function a({
|
|
19
|
-
content: e
|
|
20
|
-
}) {
|
|
21
|
-
return m(e) ? o("div", {
|
|
22
|
-
innerHTML: `<div>${e}</div>`
|
|
23
|
-
}, null) : e;
|
|
24
|
-
}
|
|
25
|
-
function p(e) {
|
|
26
|
-
const n = e.iconType || "warning";
|
|
27
|
-
Reflect.deleteProperty(e, "iconType");
|
|
28
|
-
const u = {
|
|
29
|
-
centered: !0,
|
|
30
|
-
icon: l(n),
|
|
31
|
-
...e,
|
|
32
|
-
content: a(e)
|
|
33
|
-
};
|
|
34
|
-
return r.confirm(u);
|
|
35
|
-
}
|
|
36
|
-
const M = () => {
|
|
37
|
-
const {
|
|
38
|
-
t: e
|
|
39
|
-
} = g();
|
|
40
|
-
return {
|
|
41
|
-
okText: e("ap.common.okText"),
|
|
42
|
-
centered: !0
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
function t(e, n) {
|
|
46
|
-
return {
|
|
47
|
-
...M(),
|
|
48
|
-
...e,
|
|
49
|
-
content: a(e),
|
|
50
|
-
icon: l(n)
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function C(e) {
|
|
54
|
-
return r.success(t(e, "success"));
|
|
55
|
-
}
|
|
56
|
-
function w(e) {
|
|
57
|
-
return r.error(t(e, "error"));
|
|
58
|
-
}
|
|
59
|
-
function T(e) {
|
|
60
|
-
return r.info(t(e, "info"));
|
|
61
|
-
}
|
|
62
|
-
function k(e) {
|
|
63
|
-
return r.warning(t(e, "warning"));
|
|
64
|
-
}
|
|
65
|
-
function v(e, n) {
|
|
66
|
-
return r[n](t(e, n));
|
|
67
|
-
}
|
|
68
|
-
i.config({
|
|
69
|
-
placement: "topRight",
|
|
70
|
-
duration: 3
|
|
71
|
-
});
|
|
72
|
-
function R() {
|
|
73
|
-
return {
|
|
74
|
-
createMessage: d,
|
|
75
|
-
notification: i,
|
|
76
|
-
createConfirm: p,
|
|
77
|
-
createSuccessModal: C,
|
|
78
|
-
createErrorModal: w,
|
|
79
|
-
createInfoModal: T,
|
|
80
|
-
createWarningModal: k,
|
|
81
|
-
createModal: v
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
export {
|
|
85
|
-
R as useMessage
|
|
86
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ModalFuncProps } from '@aplus-frontend/antdv/lib/modal/Modal';
|
|
2
|
-
import { NotificationArgsProps, ConfigProps } from '@aplus-frontend/antdv/lib/notification';
|
|
3
|
-
import { ModalFuncProps } from '@aplus-frontend/antdv';
|
|
4
|
-
import { MessageApi } from '@aplus-frontend/antdv/es/message';
|
|
5
|
-
export interface NotifyApi {
|
|
6
|
-
info(config: NotificationArgsProps): void;
|
|
7
|
-
success(config: NotificationArgsProps): void;
|
|
8
|
-
error(config: NotificationArgsProps): void;
|
|
9
|
-
warn(config: NotificationArgsProps): void;
|
|
10
|
-
warning(config: NotificationArgsProps): void;
|
|
11
|
-
open(args: NotificationArgsProps): void;
|
|
12
|
-
close(key: string): void;
|
|
13
|
-
config(options: ConfigProps): void;
|
|
14
|
-
destroy(): void;
|
|
15
|
-
}
|
|
16
|
-
export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
17
|
-
export declare type IconType = 'success' | 'info' | 'error' | 'warning';
|
|
18
|
-
export interface ModalOptionsEx extends Omit<ModalFuncProps, 'iconType'> {
|
|
19
|
-
iconType: 'warning' | 'success' | 'error' | 'info';
|
|
20
|
-
}
|
|
21
|
-
export type ModalOptionsPartial = Partial<ModalOptionsEx> & Pick<ModalOptionsEx, 'content'>;
|
|
22
|
-
/**
|
|
23
|
-
* @description: Create confirmation box
|
|
24
|
-
*/
|
|
25
|
-
declare function createConfirm(options: ModalOptionsEx): {
|
|
26
|
-
destroy: () => void;
|
|
27
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
28
|
-
};
|
|
29
|
-
declare function createSuccessModal(options: ModalOptionsPartial): {
|
|
30
|
-
destroy: () => void;
|
|
31
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
32
|
-
};
|
|
33
|
-
declare function createErrorModal(options: ModalOptionsPartial): {
|
|
34
|
-
destroy: () => void;
|
|
35
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
36
|
-
};
|
|
37
|
-
declare function createInfoModal(options: ModalOptionsPartial): {
|
|
38
|
-
destroy: () => void;
|
|
39
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
40
|
-
};
|
|
41
|
-
declare function createWarningModal(options: ModalOptionsPartial): {
|
|
42
|
-
destroy: () => void;
|
|
43
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
44
|
-
};
|
|
45
|
-
declare function createModal(options: ModalOptionsPartial, type: IconType): {
|
|
46
|
-
destroy: () => void;
|
|
47
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @description: message
|
|
51
|
-
*/
|
|
52
|
-
export declare function useMessage(): {
|
|
53
|
-
createMessage: MessageApi;
|
|
54
|
-
notification: NotifyApi;
|
|
55
|
-
createConfirm: typeof createConfirm;
|
|
56
|
-
createSuccessModal: typeof createSuccessModal;
|
|
57
|
-
createErrorModal: typeof createErrorModal;
|
|
58
|
-
createInfoModal: typeof createInfoModal;
|
|
59
|
-
createWarningModal: typeof createWarningModal;
|
|
60
|
-
createModal: typeof createModal;
|
|
61
|
-
};
|
|
62
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("@ant-design/icons-vue"),n=require("@aplus-frontend/antdv"),u=require("lodash-unified");require("../config-provider/index.js");const s=require("../config-provider/hooks/use-locale.js");function i(e){return e==="warning"?o.createVNode(c.InfoCircleFilled,{class:"modal-icon-warning"},null):e==="success"?o.createVNode(c.CheckCircleFilled,{class:"modal-icon-success"},null):e==="info"?o.createVNode(c.InfoCircleFilled,{class:"modal-icon-info"},null):o.createVNode(c.CloseCircleFilled,{class:"modal-icon-error"},null)}function a({content:e}){return u.isString(e)?o.createVNode("div",{innerHTML:`<div>${e}</div>`},null):e}function d(e){const r=e.iconType||"warning";Reflect.deleteProperty(e,"iconType");const l={centered:!0,icon:i(r),...e,content:a(e)};return n.Modal.confirm(l)}const f=()=>{const{t:e}=s.useLocale();return{okText:e("ap.common.okText"),centered:!0}};function t(e,r){return{...f(),...e,content:a(e),icon:i(r)}}function g(e){return n.Modal.success(t(e,"success"))}function M(e){return n.Modal.error(t(e,"error"))}function m(e){return n.Modal.info(t(e,"info"))}function C(e){return n.Modal.warning(t(e,"warning"))}function q(e,r){return n.Modal[r](t(e,r))}n.notification.config({placement:"topRight",duration:3});function v(){return{createMessage:n.message,notification:n.notification,createConfirm:d,createSuccessModal:g,createErrorModal:M,createInfoModal:m,createWarningModal:C,createModal:q}}exports.useMessage=v;
|