@aplus-frontend/ui 0.0.1 → 0.0.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/src/ap-field/date/index.vue.d.ts +63 -5
- package/es/src/ap-field/date/index.vue.mjs +115 -46
- package/es/src/ap-field/date-range/index.vue.d.ts +68 -6
- package/es/src/ap-field/date-range/index.vue.mjs +135 -62
- package/es/src/ap-field/interface.d.ts +3 -7
- package/es/src/ap-field/select/index.vue.d.ts +45 -179
- package/es/src/ap-field/select/index.vue.mjs +137 -66
- package/es/src/ap-form/items/date/index.vue.mjs +27 -29
- package/es/src/ap-form/items/date-range/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/date-range/index.vue.mjs +27 -29
- package/es/src/ap-form/items/interface.d.ts +1 -1
- package/es/src/ap-form/items/select/index.vue.mjs +32 -32
- package/es/src/ap-table/ap-table.vue.d.ts +12 -8
- package/es/src/ap-table/ap-table.vue.mjs +88 -78
- package/es/src/ap-table/constants.d.ts +3092 -1827
- package/es/src/ap-table/hooks/use-table-paging.mjs +23 -23
- package/es/src/ap-table/interface.d.ts +5 -9
- package/es/src/ap-table/utils.d.ts +18 -0
- package/es/src/ap-table/utils.mjs +45 -17
- package/es/src/theme/antd-global-overwrite/admin/button.css +0 -11
- package/es/src/theme/antd-global-overwrite/admin/index.css +0 -11
- package/es/src/theme/antd-global-overwrite/aplus/button.css +0 -11
- package/es/src/theme/antd-global-overwrite/aplus/index.css +0 -11
- package/es/src/utils/index.d.ts +8 -0
- package/es/src/utils/index.mjs +40 -32
- package/es/src/work-order-modal/work-order-modal.vue.mjs +6 -8
- package/lib/src/ap-field/date/index.vue.d.ts +63 -5
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +68 -6
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +3 -7
- package/lib/src/ap-field/select/index.vue.d.ts +45 -179
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/interface.d.ts +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +12 -8
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +3092 -1827
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +5 -9
- package/lib/src/ap-table/utils.d.ts +18 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/button.css +0 -11
- package/lib/src/theme/antd-global-overwrite/admin/index.css +0 -11
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +0 -11
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +0 -11
- package/lib/src/utils/index.d.ts +8 -0
- package/lib/src/utils/index.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +3 -3
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { DefaultOptionType, SelectValue, LabeledValue } from 'ant-design-vue/es/select';
|
|
2
1
|
import { ApFieldSelectProps, FieldMode } from '../interface';
|
|
3
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType
|
|
4
|
-
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
|
-
import { ButtonSize } from 'ant-design-vue/es/button';
|
|
6
|
-
import { VueNode } from 'ant-design-vue/es/_util/type';
|
|
7
|
-
import { SelectHandler, FieldNames, FilterFunc } from 'ant-design-vue/es/vc-select/Select';
|
|
8
|
-
import { RenderDOMFunc, DropdownRender, CustomTagProps } from 'ant-design-vue/es/vc-select/BaseSelect';
|
|
9
|
-
import { AlignType } from 'ant-design-vue/es/vc-trigger/interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
10
3
|
|
|
11
4
|
type ApFieldSelectSlots = {
|
|
12
5
|
notFoundContent: any;
|
|
@@ -25,190 +18,63 @@ type ApFieldSelectSlots = {
|
|
|
25
18
|
declare function focus(): void;
|
|
26
19
|
declare function blur(): void;
|
|
27
20
|
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldSelectProps>, {
|
|
28
|
-
fieldProps: () => {};
|
|
29
|
-
emptyText: string;
|
|
30
21
|
mode: string;
|
|
22
|
+
emptyText: string;
|
|
23
|
+
bordered: undefined;
|
|
24
|
+
open: undefined;
|
|
25
|
+
disabled: undefined;
|
|
26
|
+
autofocus: undefined;
|
|
27
|
+
virtual: undefined;
|
|
28
|
+
loading: undefined;
|
|
29
|
+
allowClear: undefined;
|
|
30
|
+
showSearch: undefined;
|
|
31
|
+
defaultOpen: undefined;
|
|
32
|
+
showArrow: undefined;
|
|
33
|
+
autoClearSearchValue: undefined;
|
|
34
|
+
defaultActiveFirstOption: undefined;
|
|
35
|
+
labelInValue: undefined;
|
|
36
|
+
multiple: undefined;
|
|
31
37
|
}>, {
|
|
32
38
|
focus: typeof focus;
|
|
33
39
|
blur: typeof blur;
|
|
34
40
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
35
41
|
"update:value": (...args: any[]) => void;
|
|
36
42
|
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFieldSelectProps>, {
|
|
37
|
-
fieldProps: () => {};
|
|
38
|
-
emptyText: string;
|
|
39
43
|
mode: string;
|
|
44
|
+
emptyText: string;
|
|
45
|
+
bordered: undefined;
|
|
46
|
+
open: undefined;
|
|
47
|
+
disabled: undefined;
|
|
48
|
+
autofocus: undefined;
|
|
49
|
+
virtual: undefined;
|
|
50
|
+
loading: undefined;
|
|
51
|
+
allowClear: undefined;
|
|
52
|
+
showSearch: undefined;
|
|
53
|
+
defaultOpen: undefined;
|
|
54
|
+
showArrow: undefined;
|
|
55
|
+
autoClearSearchValue: undefined;
|
|
56
|
+
defaultActiveFirstOption: undefined;
|
|
57
|
+
labelInValue: undefined;
|
|
58
|
+
multiple: undefined;
|
|
40
59
|
}>>> & {
|
|
41
60
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
42
61
|
}, {
|
|
62
|
+
disabled: boolean;
|
|
63
|
+
loading: boolean;
|
|
64
|
+
open: boolean;
|
|
65
|
+
autofocus: boolean;
|
|
66
|
+
multiple: boolean;
|
|
43
67
|
mode: FieldMode;
|
|
68
|
+
virtual: boolean;
|
|
69
|
+
bordered: boolean;
|
|
70
|
+
allowClear: boolean;
|
|
71
|
+
showSearch: boolean;
|
|
72
|
+
defaultOpen: boolean;
|
|
73
|
+
showArrow: boolean;
|
|
74
|
+
autoClearSearchValue: boolean;
|
|
75
|
+
defaultActiveFirstOption: boolean;
|
|
76
|
+
labelInValue: boolean;
|
|
44
77
|
emptyText: string;
|
|
45
|
-
fieldProps: Omit<Partial< ExtractPropTypes<{
|
|
46
|
-
value: {
|
|
47
|
-
type: PropType<SelectValue>;
|
|
48
|
-
default: SelectValue;
|
|
49
|
-
};
|
|
50
|
-
defaultValue: {
|
|
51
|
-
type: PropType<SelectValue>;
|
|
52
|
-
default: SelectValue;
|
|
53
|
-
};
|
|
54
|
-
notFoundContent: VueTypeValidableDef<any>;
|
|
55
|
-
suffixIcon: VueTypeValidableDef<any>;
|
|
56
|
-
itemIcon: VueTypeValidableDef<any>;
|
|
57
|
-
size: {
|
|
58
|
-
type: PropType<ButtonSize>;
|
|
59
|
-
default: ButtonSize;
|
|
60
|
-
};
|
|
61
|
-
mode: {
|
|
62
|
-
type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
|
|
63
|
-
default: "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE";
|
|
64
|
-
};
|
|
65
|
-
bordered: {
|
|
66
|
-
type: BooleanConstructor;
|
|
67
|
-
default: boolean;
|
|
68
|
-
};
|
|
69
|
-
transitionName: StringConstructor;
|
|
70
|
-
choiceTransitionName: {
|
|
71
|
-
type: PropType<"">;
|
|
72
|
-
default: "";
|
|
73
|
-
};
|
|
74
|
-
popupClassName: StringConstructor;
|
|
75
|
-
dropdownClassName: StringConstructor;
|
|
76
|
-
placement: {
|
|
77
|
-
type: PropType<"bottomLeft" | "bottomRight" | "topLeft" | "topRight">;
|
|
78
|
-
default: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
|
|
79
|
-
};
|
|
80
|
-
status: {
|
|
81
|
-
type: PropType<"" | "error" | "warning">;
|
|
82
|
-
default: "" | "error" | "warning";
|
|
83
|
-
};
|
|
84
|
-
'onUpdate:value': {
|
|
85
|
-
type: PropType<(val: SelectValue) => void>;
|
|
86
|
-
default: (val: SelectValue) => void;
|
|
87
|
-
};
|
|
88
|
-
children: PropType< VueNode[]>;
|
|
89
|
-
listHeight: NumberConstructor;
|
|
90
|
-
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
91
|
-
onMouseleave: PropType<(e: MouseEvent) => void>;
|
|
92
|
-
tabindex: NumberConstructor;
|
|
93
|
-
onClick: PropType<(e: MouseEvent) => void>;
|
|
94
|
-
onFocus: {
|
|
95
|
-
type: PropType<(e: FocusEvent) => void>;
|
|
96
|
-
};
|
|
97
|
-
onBlur: {
|
|
98
|
-
type: PropType<(e: FocusEvent) => void>;
|
|
99
|
-
};
|
|
100
|
-
onChange: PropType<(value: SelectValue, option: DefaultOptionType | DefaultOptionType[]) => void>;
|
|
101
|
-
onKeydown: PropType<(e: KeyboardEvent) => void>;
|
|
102
|
-
onKeyup: PropType<(e: KeyboardEvent) => void>;
|
|
103
|
-
onMousedown: PropType<(e: MouseEvent) => void>;
|
|
104
|
-
onSelect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
|
|
105
|
-
open: {
|
|
106
|
-
type: BooleanConstructor;
|
|
107
|
-
default: any;
|
|
108
|
-
};
|
|
109
|
-
animation: StringConstructor;
|
|
110
|
-
direction: {
|
|
111
|
-
type: PropType<"ltr" | "rtl">;
|
|
112
|
-
};
|
|
113
|
-
disabled: {
|
|
114
|
-
type: BooleanConstructor;
|
|
115
|
-
default: any;
|
|
116
|
-
};
|
|
117
|
-
prefixCls: StringConstructor;
|
|
118
|
-
id: StringConstructor;
|
|
119
|
-
autofocus: BooleanConstructor;
|
|
120
|
-
getPopupContainer: {
|
|
121
|
-
type: PropType<RenderDOMFunc>;
|
|
122
|
-
};
|
|
123
|
-
virtual: {
|
|
124
|
-
type: BooleanConstructor;
|
|
125
|
-
default: any;
|
|
126
|
-
};
|
|
127
|
-
dropdownMatchSelectWidth: {
|
|
128
|
-
type: PropType<number | boolean>;
|
|
129
|
-
default: any;
|
|
130
|
-
};
|
|
131
|
-
options: PropType<DefaultOptionType[]>;
|
|
132
|
-
showAction: {
|
|
133
|
-
type: PropType<("click" | "focus")[]>;
|
|
134
|
-
};
|
|
135
|
-
placeholder: VueTypeValidableDef<any>;
|
|
136
|
-
onDeselect: PropType<SelectHandler<(string | number) | LabeledValue, DefaultOptionType>>;
|
|
137
|
-
loading: {
|
|
138
|
-
type: BooleanConstructor;
|
|
139
|
-
default: any;
|
|
140
|
-
};
|
|
141
|
-
clearIcon: VueTypeValidableDef<any>;
|
|
142
|
-
allowClear: {
|
|
143
|
-
type: BooleanConstructor;
|
|
144
|
-
default: any;
|
|
145
|
-
};
|
|
146
|
-
onSearch: PropType<(value: string) => void>;
|
|
147
|
-
fieldNames: PropType<FieldNames>;
|
|
148
|
-
dropdownStyle: {
|
|
149
|
-
type: PropType<CSSProperties>;
|
|
150
|
-
};
|
|
151
|
-
dropdownRender: {
|
|
152
|
-
type: PropType<DropdownRender>;
|
|
153
|
-
};
|
|
154
|
-
dropdownAlign: PropType<AlignType>;
|
|
155
|
-
showSearch: {
|
|
156
|
-
type: BooleanConstructor;
|
|
157
|
-
default: any;
|
|
158
|
-
};
|
|
159
|
-
searchValue: StringConstructor;
|
|
160
|
-
onInputKeyDown: PropType<(e: KeyboardEvent) => void>;
|
|
161
|
-
removeIcon: VueTypeValidableDef<any>;
|
|
162
|
-
maxTagCount: {
|
|
163
|
-
type: PropType<number | "responsive">;
|
|
164
|
-
};
|
|
165
|
-
maxTagTextLength: NumberConstructor;
|
|
166
|
-
maxTagPlaceholder: VueTypeValidableDef<any>;
|
|
167
|
-
tokenSeparators: {
|
|
168
|
-
type: PropType<string[]>;
|
|
169
|
-
};
|
|
170
|
-
tagRender: {
|
|
171
|
-
type: PropType<(props: CustomTagProps) => any>;
|
|
172
|
-
};
|
|
173
|
-
optionLabelRender: {
|
|
174
|
-
type: PropType<(option: Record<string, any>) => any>;
|
|
175
|
-
};
|
|
176
|
-
onClear: PropType<() => void>;
|
|
177
|
-
defaultOpen: {
|
|
178
|
-
type: BooleanConstructor;
|
|
179
|
-
default: any;
|
|
180
|
-
};
|
|
181
|
-
onDropdownVisibleChange: {
|
|
182
|
-
type: PropType<(open: boolean) => void>;
|
|
183
|
-
};
|
|
184
|
-
showArrow: {
|
|
185
|
-
type: BooleanConstructor;
|
|
186
|
-
default: any;
|
|
187
|
-
};
|
|
188
|
-
onPopupScroll: PropType<(e: UIEvent) => void>;
|
|
189
|
-
menuItemSelectedIcon: VueTypeValidableDef<any>;
|
|
190
|
-
listItemHeight: NumberConstructor;
|
|
191
|
-
inputValue: StringConstructor;
|
|
192
|
-
autoClearSearchValue: {
|
|
193
|
-
type: BooleanConstructor;
|
|
194
|
-
default: any;
|
|
195
|
-
};
|
|
196
|
-
filterOption: {
|
|
197
|
-
type: PropType<boolean | FilterFunc<DefaultOptionType>>;
|
|
198
|
-
default: any;
|
|
199
|
-
};
|
|
200
|
-
filterSort: PropType<(optionA: DefaultOptionType, optionB: DefaultOptionType) => number>;
|
|
201
|
-
optionFilterProp: StringConstructor;
|
|
202
|
-
optionLabelProp: StringConstructor;
|
|
203
|
-
defaultActiveFirstOption: {
|
|
204
|
-
type: BooleanConstructor;
|
|
205
|
-
default: any;
|
|
206
|
-
};
|
|
207
|
-
labelInValue: {
|
|
208
|
-
type: BooleanConstructor;
|
|
209
|
-
default: any;
|
|
210
|
-
};
|
|
211
|
-
}>>, "mode" | "value" | "onUpdate:value" | "onSearch">;
|
|
212
78
|
}, {}>, Readonly<ApFieldSelectSlots> & ApFieldSelectSlots>;
|
|
213
79
|
export default _default;
|
|
214
80
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,108 +1,179 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { debounce as
|
|
3
|
-
import { Select as
|
|
1
|
+
import { defineComponent as P, ref as c, onMounted as k, computed as p, unref as l, openBlock as m, createElementBlock as A, toDisplayString as O, createBlock as T, mergeProps as M, createSlots as N, renderList as _, withCtx as v, renderSlot as R, normalizeProps as q, guardReactiveProps as U, createVNode as D } from "vue";
|
|
2
|
+
import { debounce as L, isFunction as h, isArray as z, omit as K, isNil as H } from "lodash-unified";
|
|
3
|
+
import { Select as $, Spin as j } from "ant-design-vue";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { omitUndefined as E } from "../../utils/index.mjs";
|
|
6
|
+
import { useControllableValue as W } from "../../hooks/useControllableValue.mjs";
|
|
7
|
+
const G = { key: 0 }, oe = /* @__PURE__ */ P({
|
|
7
8
|
name: "ApFieldSelect",
|
|
8
9
|
__name: "index",
|
|
9
10
|
props: {
|
|
10
11
|
mode: { default: "edit" },
|
|
11
|
-
|
|
12
|
+
defaultValue: {},
|
|
13
|
+
notFoundContent: {},
|
|
14
|
+
suffixIcon: {},
|
|
15
|
+
itemIcon: {},
|
|
16
|
+
size: {},
|
|
17
|
+
bordered: { type: Boolean, default: void 0 },
|
|
18
|
+
transitionName: {},
|
|
19
|
+
choiceTransitionName: {},
|
|
20
|
+
popupClassName: {},
|
|
21
|
+
dropdownClassName: {},
|
|
22
|
+
placement: {},
|
|
23
|
+
status: {},
|
|
24
|
+
children: {},
|
|
25
|
+
listHeight: {},
|
|
26
|
+
onMouseenter: {},
|
|
27
|
+
onMouseleave: {},
|
|
28
|
+
tabindex: {},
|
|
29
|
+
onClick: {},
|
|
30
|
+
onFocus: {},
|
|
31
|
+
onBlur: {},
|
|
32
|
+
onChange: {},
|
|
33
|
+
onKeydown: {},
|
|
34
|
+
onKeyup: {},
|
|
35
|
+
onMousedown: {},
|
|
36
|
+
onSelect: {},
|
|
37
|
+
open: { type: Boolean, default: void 0 },
|
|
38
|
+
animation: {},
|
|
39
|
+
direction: {},
|
|
40
|
+
disabled: { type: Boolean, default: void 0 },
|
|
41
|
+
prefixCls: {},
|
|
42
|
+
id: {},
|
|
43
|
+
autofocus: { type: Boolean, default: void 0 },
|
|
44
|
+
getPopupContainer: {},
|
|
45
|
+
virtual: { type: Boolean, default: void 0 },
|
|
46
|
+
dropdownMatchSelectWidth: {},
|
|
47
|
+
options: {},
|
|
48
|
+
showAction: {},
|
|
49
|
+
placeholder: {},
|
|
50
|
+
onDeselect: {},
|
|
51
|
+
loading: { type: Boolean, default: void 0 },
|
|
52
|
+
clearIcon: {},
|
|
53
|
+
allowClear: { type: Boolean, default: void 0 },
|
|
54
|
+
fieldNames: {},
|
|
55
|
+
dropdownStyle: {},
|
|
56
|
+
dropdownRender: {},
|
|
57
|
+
dropdownAlign: {},
|
|
58
|
+
showSearch: { type: Boolean, default: void 0 },
|
|
59
|
+
searchValue: {},
|
|
60
|
+
onInputKeyDown: {},
|
|
61
|
+
removeIcon: {},
|
|
62
|
+
maxTagCount: {},
|
|
63
|
+
maxTagTextLength: {},
|
|
64
|
+
maxTagPlaceholder: {},
|
|
65
|
+
tokenSeparators: {},
|
|
66
|
+
tagRender: {},
|
|
67
|
+
optionLabelRender: {},
|
|
68
|
+
onClear: {},
|
|
69
|
+
defaultOpen: { type: Boolean, default: void 0 },
|
|
70
|
+
onDropdownVisibleChange: {},
|
|
71
|
+
showArrow: { type: Boolean, default: void 0 },
|
|
72
|
+
onPopupScroll: {},
|
|
73
|
+
menuItemSelectedIcon: {},
|
|
74
|
+
listItemHeight: {},
|
|
75
|
+
inputValue: {},
|
|
76
|
+
autoClearSearchValue: { type: Boolean, default: void 0 },
|
|
77
|
+
filterOption: {},
|
|
78
|
+
filterSort: {},
|
|
79
|
+
optionFilterProp: {},
|
|
80
|
+
optionLabelProp: {},
|
|
81
|
+
defaultActiveFirstOption: { type: Boolean, default: void 0 },
|
|
82
|
+
labelInValue: { type: Boolean, default: void 0 },
|
|
12
83
|
emptyText: { default: "-" },
|
|
13
84
|
request: {},
|
|
14
|
-
multiple: { type: Boolean },
|
|
85
|
+
multiple: { type: Boolean, default: void 0 },
|
|
15
86
|
value: {},
|
|
16
87
|
"onUpdate:value": {}
|
|
17
88
|
},
|
|
18
89
|
emits: ["update:value"],
|
|
19
|
-
setup(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (!P(t.request))
|
|
90
|
+
setup(y, { expose: w, emit: g }) {
|
|
91
|
+
let a = 0;
|
|
92
|
+
const S = (o, t) => typeof (t == null ? void 0 : t.label) == "string" && t.label.indexOf(o) > -1, B = L((o) => {
|
|
93
|
+
if (!h(e.request))
|
|
24
94
|
return;
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
95
|
+
a += 1;
|
|
96
|
+
const t = a;
|
|
97
|
+
r.value = [], n.value = !0, e.request(o).then((i) => {
|
|
98
|
+
a === t && (r.value = i);
|
|
29
99
|
}).finally(() => {
|
|
30
100
|
n.value = !1;
|
|
31
101
|
});
|
|
32
|
-
}, 300),
|
|
33
|
-
|
|
34
|
-
if (
|
|
35
|
-
n.value = !0,
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
102
|
+
}, 300), e = y, r = c((e == null ? void 0 : e.options) || []), d = c(), n = c((e == null ? void 0 : e.loading) || !1), C = g;
|
|
103
|
+
k(() => {
|
|
104
|
+
if (h(e.request)) {
|
|
105
|
+
n.value = !0, a += 1;
|
|
106
|
+
const o = a;
|
|
107
|
+
e.request().then((t) => {
|
|
108
|
+
o === a && (r.value = t);
|
|
39
109
|
}).finally(() => {
|
|
40
110
|
n.value = !1;
|
|
41
111
|
});
|
|
42
112
|
}
|
|
43
113
|
});
|
|
44
|
-
const { value:
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
47
|
-
return
|
|
48
|
-
if (
|
|
49
|
-
return
|
|
50
|
-
(
|
|
51
|
-
var
|
|
52
|
-
return (
|
|
114
|
+
const { value: f, updateValue: b } = W(e, C), x = p(() => {
|
|
115
|
+
const o = l(f);
|
|
116
|
+
if (!o)
|
|
117
|
+
return e.emptyText;
|
|
118
|
+
if (z(o))
|
|
119
|
+
return o.map(
|
|
120
|
+
(i) => {
|
|
121
|
+
var u;
|
|
122
|
+
return (u = l(r).find((s) => s.value === i)) == null ? void 0 : u.label;
|
|
53
123
|
}
|
|
54
|
-
).filter(Boolean).join("、") ||
|
|
55
|
-
const
|
|
56
|
-
return (
|
|
57
|
-
}),
|
|
58
|
-
|
|
59
|
-
const l = !!((o = t.fieldProps) != null && o.showSearch) ? {
|
|
124
|
+
).filter(Boolean).join("、") || e.emptyText;
|
|
125
|
+
const t = l(r).find((i) => i.value === o);
|
|
126
|
+
return (t == null ? void 0 : t.label) || e.emptyText;
|
|
127
|
+
}), F = p(() => {
|
|
128
|
+
const t = !!(e != null && e.showSearch) ? {
|
|
60
129
|
showArrow: !1,
|
|
61
130
|
defaultActiveFirstOption: !1,
|
|
62
|
-
onSearch:
|
|
131
|
+
onSearch: B,
|
|
63
132
|
notFoundContent: n.value ? void 0 : null
|
|
64
133
|
} : {
|
|
65
134
|
showArrow: !0
|
|
66
135
|
};
|
|
67
136
|
return {
|
|
68
|
-
...
|
|
69
|
-
|
|
70
|
-
|
|
137
|
+
...E(
|
|
138
|
+
K(e, ["mode", "value", "onUpdate:value", "onSearch"])
|
|
139
|
+
),
|
|
140
|
+
...t,
|
|
141
|
+
filterOption: e.showSearch ? !1 : H(e == null ? void 0 : e.filterOption) ? S : e == null ? void 0 : e.filterOption
|
|
71
142
|
};
|
|
72
143
|
});
|
|
73
|
-
function
|
|
74
|
-
var
|
|
75
|
-
(
|
|
144
|
+
function I() {
|
|
145
|
+
var o;
|
|
146
|
+
(o = d.value) == null || o.focus();
|
|
76
147
|
}
|
|
77
|
-
function
|
|
78
|
-
var
|
|
79
|
-
(
|
|
148
|
+
function V() {
|
|
149
|
+
var o;
|
|
150
|
+
(o = d.value) == null || o.blur();
|
|
80
151
|
}
|
|
81
|
-
return
|
|
82
|
-
focus:
|
|
83
|
-
blur:
|
|
84
|
-
}), (
|
|
152
|
+
return w({
|
|
153
|
+
focus: I,
|
|
154
|
+
blur: V
|
|
155
|
+
}), (o, t) => o.mode === "read" ? (m(), A("span", G, O(x.value), 1)) : (m(), T(l($), M({
|
|
85
156
|
key: 1,
|
|
86
157
|
"allow-clear": "",
|
|
87
158
|
ref_key: "selectRef",
|
|
88
|
-
ref:
|
|
89
|
-
},
|
|
90
|
-
mode:
|
|
91
|
-
value:
|
|
92
|
-
"onUpdate:value":
|
|
93
|
-
options:
|
|
159
|
+
ref: d
|
|
160
|
+
}, F.value, {
|
|
161
|
+
mode: o.multiple ? "multiple" : void 0,
|
|
162
|
+
value: l(f),
|
|
163
|
+
"onUpdate:value": l(b),
|
|
164
|
+
options: r.value,
|
|
94
165
|
loading: n.value
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
|
-
name:
|
|
98
|
-
fn:
|
|
99
|
-
|
|
166
|
+
}), N({ _: 2 }, [
|
|
167
|
+
_(o.$slots, (i, u) => ({
|
|
168
|
+
name: u,
|
|
169
|
+
fn: v((s) => [
|
|
170
|
+
R(o.$slots, u, q(U(s || {})))
|
|
100
171
|
])
|
|
101
172
|
})),
|
|
102
173
|
n.value ? {
|
|
103
174
|
name: "notFoundContent",
|
|
104
|
-
fn:
|
|
105
|
-
|
|
175
|
+
fn: v(() => [
|
|
176
|
+
D(l(j), { size: "small" })
|
|
106
177
|
]),
|
|
107
178
|
key: "0"
|
|
108
179
|
} : void 0
|
|
@@ -110,5 +181,5 @@ const K = { key: 0 }, ee = /* @__PURE__ */ B({
|
|
|
110
181
|
}
|
|
111
182
|
});
|
|
112
183
|
export {
|
|
113
|
-
|
|
184
|
+
oe as default
|
|
114
185
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as n, computed as s, openBlock as f, createBlock as m, normalizeProps as l, guardReactiveProps as a, unref as u, withCtx as t, createVNode as c, createSlots as b, renderList as h, renderSlot as B } from "vue";
|
|
2
2
|
import "../../ap-form-item.vue2.mjs";
|
|
3
3
|
import "../../../ap-field/date/index.vue2.mjs";
|
|
4
|
-
import { omit as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import { isUndefined as _, omit as y } from "lodash-unified";
|
|
5
|
+
import v from "../../ap-form-item.vue.mjs";
|
|
6
|
+
import x from "../../../ap-field/date/index.vue.mjs";
|
|
7
|
+
const A = /* @__PURE__ */ n({
|
|
8
8
|
name: "ApFormItemDate",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -48,33 +48,31 @@ const L = /* @__PURE__ */ u({
|
|
|
48
48
|
placeholder: {},
|
|
49
49
|
disabled: { type: Boolean, default: !1 }
|
|
50
50
|
},
|
|
51
|
-
setup(
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
];
|
|
73
|
-
}),
|
|
51
|
+
setup(d) {
|
|
52
|
+
const e = d, p = s(() => {
|
|
53
|
+
var o;
|
|
54
|
+
return {
|
|
55
|
+
placeholder: e.placeholder,
|
|
56
|
+
disabled: e.disabled,
|
|
57
|
+
...e.field,
|
|
58
|
+
bordered: e.bordered ? !1 : _((o = e.field) == null ? void 0 : o.bordered) ? !0 : e.field.bordered
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
return (o, g) => (f(), m(v, l(a(u(y)(e, ["field", "placeholder", "disabled"]))), {
|
|
62
|
+
default: t(() => [
|
|
63
|
+
c(x, l(a(p.value)), b({ _: 2 }, [
|
|
64
|
+
h(o.$slots, (C, r) => ({
|
|
65
|
+
name: r,
|
|
66
|
+
fn: t((i) => [
|
|
67
|
+
B(o.$slots, r, l(a(i || {})))
|
|
68
|
+
])
|
|
69
|
+
}))
|
|
70
|
+
]), 1040)
|
|
71
|
+
]),
|
|
74
72
|
_: 3
|
|
75
73
|
}, 16));
|
|
76
74
|
}
|
|
77
75
|
});
|
|
78
76
|
export {
|
|
79
|
-
|
|
77
|
+
A as default
|
|
80
78
|
};
|
|
@@ -33,7 +33,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
33
33
|
}>>>, {
|
|
34
34
|
disabled: boolean;
|
|
35
35
|
required: boolean;
|
|
36
|
-
field: Omit< ApFieldDateRangeProps, "value">;
|
|
36
|
+
field: Omit< ApFieldDateRangeProps, "value" | "onUpdate:value">;
|
|
37
37
|
colon: boolean;
|
|
38
38
|
hasFeedback: boolean;
|
|
39
39
|
autoLink: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, computed as m, openBlock as u, createBlock as c, normalizeProps as a, guardReactiveProps as r, unref as d, withCtx as n, createVNode as b, createSlots as h, renderList as B, renderSlot as _ } from "vue";
|
|
2
2
|
import "../../ap-form-item.vue2.mjs";
|
|
3
3
|
import "../../../ap-field/index.mjs";
|
|
4
|
-
import { omit as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
4
|
+
import { isUndefined as y, omit as g } from "lodash-unified";
|
|
5
|
+
import v from "../../ap-form-item.vue.mjs";
|
|
6
|
+
import x from "../../../ap-field/date-range/index.vue.mjs";
|
|
7
|
+
const w = /* @__PURE__ */ f({
|
|
8
8
|
name: "ApFormItemDateRange",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -48,33 +48,31 @@ const L = /* @__PURE__ */ u({
|
|
|
48
48
|
placeholder: {},
|
|
49
49
|
disabled: { type: Boolean, default: !1 }
|
|
50
50
|
},
|
|
51
|
-
setup(
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
];
|
|
73
|
-
}),
|
|
51
|
+
setup(p) {
|
|
52
|
+
const e = p, i = m(() => {
|
|
53
|
+
var o, l;
|
|
54
|
+
return {
|
|
55
|
+
placeholder: e.placeholder,
|
|
56
|
+
disabled: e.disabled,
|
|
57
|
+
...e.field,
|
|
58
|
+
bordered: e.bordered ? !1 : y((o = e.field) == null ? void 0 : o.bordered) ? !0 : (l = e.field) == null ? void 0 : l.bordered
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
return (o, l) => (u(), c(v, a(r(d(g)(e, ["field", "placeholder", "disabled"]))), {
|
|
62
|
+
default: n(() => [
|
|
63
|
+
b(d(x), a(r(i.value)), h({ _: 2 }, [
|
|
64
|
+
B(o.$slots, (C, t) => ({
|
|
65
|
+
name: t,
|
|
66
|
+
fn: n((s) => [
|
|
67
|
+
_(o.$slots, t, a(r(s || {})))
|
|
68
|
+
])
|
|
69
|
+
}))
|
|
70
|
+
]), 1040)
|
|
71
|
+
]),
|
|
74
72
|
_: 3
|
|
75
73
|
}, 16));
|
|
76
74
|
}
|
|
77
75
|
});
|
|
78
76
|
export {
|
|
79
|
-
|
|
77
|
+
w as default
|
|
80
78
|
};
|
|
@@ -22,7 +22,7 @@ export type ApFormItemDateProps = ApFormItemProps & {
|
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
};
|
|
24
24
|
export type ApFormItemDateRangeProps = ApFormItemProps & {
|
|
25
|
-
field?: Omit<ApFieldDateRangeProps, 'value'>;
|
|
25
|
+
field?: Omit<ApFieldDateRangeProps, 'value' | 'onUpdate:value'>;
|
|
26
26
|
placeholder?: [string, string];
|
|
27
27
|
disabled?: boolean;
|
|
28
28
|
};
|