@opentiny/vue-renderless 3.12.0 → 3.13.0-alpha.0
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/action-sheet/index.js +20 -13
- package/action-sheet/vue.js +8 -7
- package/alert/index.js +50 -1
- package/alert/vue.js +36 -9
- package/amount/index.js +100 -25
- package/amount/vue.js +102 -26
- package/anchor/index.js +1 -0
- package/area/index.js +8 -8
- package/area/vue.js +5 -5
- package/async-flowchart/index.js +16 -3
- package/autocomplete/index.js +58 -14
- package/autocomplete/vue.js +40 -12
- package/badge/index.js +12 -0
- package/badge/vue.js +6 -4
- package/breadcrumb/vue.js +3 -1
- package/breadcrumb-item/vue.js +6 -2
- package/button/index.js +5 -1
- package/calendar/index.js +2 -86
- package/calendar-bar/index.js +20 -6
- package/calendar-view/index.js +10 -12
- package/calendar-view/vue.js +17 -4
- package/cascader/index.js +80 -34
- package/cascader/vue.js +49 -19
- package/cascader-menu/index.js +7 -7
- package/cascader-menu/vue.js +2 -3
- package/cascader-mobile/index.js +37 -24
- package/cascader-mobile/vue.js +7 -1
- package/cascader-node/index.js +13 -1
- package/cascader-node/vue.js +15 -4
- package/cascader-panel/index.js +1 -1
- package/cascader-select/column-index.js +150 -0
- package/cascader-select/column.js +120 -0
- package/cascader-select/index.js +29 -165
- package/cascader-select/usePicker.js +251 -0
- package/cascader-select/useTouch.js +65 -0
- package/cascader-select/vue.js +35 -47
- package/cascader-view/index.js +1 -1
- package/cell/vue.js +2 -1
- package/chart-bar/index.js +2 -3
- package/chart-core/deps/constants.js +43 -43
- package/chart-core/index.js +1 -1
- package/chart-gauge/index.js +2 -2
- package/chart-heatmap/index.js +17 -10
- package/chart-line/index.js +8 -9
- package/chart-tree/index.js +2 -2
- package/chart-waterfall/index.js +4 -6
- package/checkbox/index.js +17 -0
- package/checkbox/vue.js +16 -7
- package/checkbox-group/vue.js +2 -0
- package/col/index.js +7 -2
- package/col/vue.js +1 -1
- package/collapse/index.js +3 -3
- package/color-select-panel/vue.js +0 -7
- package/column-list-item/index.js +17 -1
- package/column-list-item/vue.js +8 -3
- package/common/date.js +2 -0
- package/common/deps/dom.js +19 -4
- package/common/deps/popper.js +48 -5
- package/common/deps/touch-emulator.js +4 -1
- package/common/deps/tree-model/node.js +1 -1
- package/common/deps/tree-model/tree-store.js +2 -13
- package/common/deps/useRect.js +25 -0
- package/common/deps/vue-popper.js +22 -10
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/common/type.js +2 -1
- package/common/validate/rules/enum.js +1 -1
- package/common/validate/rules/pattern.js +2 -2
- package/common/validate/rules/range.js +8 -5
- package/common/validate/rules/required.js +1 -1
- package/common/validate/rules/type.js +5 -5
- package/common/validate/rules/whitespace.js +1 -1
- package/common/validate/util.js +15 -16
- package/common/validate/validations/integer.js +1 -1
- package/common/validate/validations/method.js +1 -1
- package/container/index.js +17 -1
- package/container/vue.js +12 -3
- package/currency/index.js +74 -7
- package/currency/vue.js +21 -5
- package/date-panel/index.js +16 -0
- package/date-panel/vue.js +8 -2
- package/date-picker-mobile/index.js +12 -0
- package/date-picker-mobile/vue.js +7 -1
- package/date-range/vue.js +12 -5
- package/date-table/index.js +5 -0
- package/date-table/vue.js +3 -1
- package/dialog-box/index.js +17 -6
- package/dialog-select/index.js +6 -3
- package/dialog-select/vue.js +8 -4
- package/drawer/index.js +26 -5
- package/drawer/vue.js +13 -7
- package/dropdown/index.js +7 -7
- package/dropdown/vue.js +6 -2
- package/dropdown-item/index.js +9 -1
- package/dropdown-item/mf.js +6 -10
- package/dropdown-item/vue.js +21 -8
- package/dropdown-menu/index.js +20 -7
- package/dropdown-menu/vue.js +4 -3
- package/exception/index.js +2 -7
- package/exception/vue.js +7 -10
- package/fall-menu/index.js +5 -1
- package/fall-menu/vue.js +13 -2
- package/file-upload/index.js +47 -12
- package/file-upload/vue.js +38 -8
- package/filter-box/index.js +1 -0
- package/floating-button/index.js +62 -16
- package/floating-button/vue.js +27 -9
- package/flowchart/index.js +134 -25
- package/flowchart/node.js +13 -4
- package/flowchart/vue.js +16 -4
- package/form/vue.js +3 -1
- package/form-item/index.js +4 -4
- package/form-item/vue.js +3 -1
- package/fullscreen/index.js +5 -5
- package/fullscreen/vue.js +3 -3
- package/grid/utils/common.js +10 -5
- package/grid/utils/dom.js +7 -1
- package/image/index.js +6 -0
- package/image/vue.js +6 -3
- package/image-viewer/index.js +62 -51
- package/image-viewer/vue.js +17 -5
- package/input/index.js +89 -22
- package/input/vue.js +52 -21
- package/ip-address/index.js +61 -19
- package/ip-address/vue.js +22 -4
- package/label/index.js +56 -0
- package/label/vue.js +26 -0
- package/link/vue.js +3 -1
- package/loading/vue.js +8 -2
- package/logout/index.js +1 -1
- package/mask/index.js +13 -0
- package/mask/vue.js +18 -0
- package/mind-map/index.js +47 -0
- package/mind-map/vue.js +53 -0
- package/multi-select/index.js +150 -10
- package/multi-select/vue.js +46 -11
- package/multi-select-item/index.js +17 -0
- package/multi-select-item/vue.js +31 -0
- package/numeric/index.js +51 -9
- package/numeric/vue.js +44 -14
- package/option/index.js +12 -5
- package/option/vue.js +15 -7
- package/option-group/index.js +3 -3
- package/package.json +1 -1
- package/pager/index.js +372 -0
- package/pager/vue.js +125 -2
- package/picker/index.js +253 -48
- package/picker/mb.js +42 -0
- package/picker/vue.js +70 -17
- package/picker-column/index.js +1 -1
- package/pop-upload/index.js +0 -2
- package/pop-upload/vue.js +3 -4
- package/popconfirm/index.js +3 -6
- package/popconfirm/vue.js +1 -1
- package/popeditor/index.js +55 -24
- package/popeditor/vue.js +15 -11
- package/popover/index.js +4 -4
- package/popover/vue.js +6 -6
- package/popup/index.js +3 -3
- package/popup/vue.js +5 -5
- package/pull-refresh/index.js +57 -65
- package/pull-refresh/vue.js +23 -7
- package/radio/index.js +0 -17
- package/radio/vue.js +4 -10
- package/rate/index.js +1 -1
- package/rate/vue.js +0 -2
- package/record/index.js +4 -1
- package/{rich-text-edtior → rich-text-editor}/index.js +2 -2
- package/{rich-text-edtior → rich-text-editor}/vue.js +2 -5
- package/scrollbar/index.js +11 -11
- package/scrollbar/vue-bar.js +3 -3
- package/scrollbar/vue.js +5 -5
- package/search/index.js +1 -1
- package/search/vue.js +3 -1
- package/select/index.js +185 -113
- package/select/vue.js +105 -20
- package/select-dropdown/index.js +62 -4
- package/select-dropdown/vue.js +85 -8
- package/select-view/index.js +3 -1
- package/signature/index.js +241 -0
- package/signature/vue.js +88 -0
- package/skeleton/index.js +14 -0
- package/skeleton/vue.js +15 -0
- package/skeleton-item/vue.js +15 -0
- package/slider/index.js +27 -7
- package/slider/vue.js +26 -7
- package/split/index.js +1 -1
- package/split/vue.js +4 -6
- package/standard-list-item/index.js +15 -1
- package/standard-list-item/vue.js +6 -5
- package/steps/index.js +25 -2
- package/steps/slide-bar.js +8 -1
- package/steps/vue.js +15 -3
- package/tab-item-mf/vue.js +14 -8
- package/tab-nav/index.js +9 -4
- package/tab-nav/vue.js +6 -2
- package/tabbar/vue.js +9 -3
- package/tabbar-item/vue.js +3 -2
- package/tabs/index.js +1 -1
- package/tabs/vue.js +1 -0
- package/tabs-mf/index.js +20 -6
- package/tabs-mf/vue-nav.js +26 -11
- package/tabs-mf/vue.js +7 -7
- package/tag/index.js +1 -1
- package/tag/vue.js +5 -1
- package/tag-group/index.js +2 -1
- package/tall-storage/index.js +4 -5
- package/time/index.js +4 -1
- package/time/vue.js +1 -1
- package/time-line/vue.js +1 -1
- package/time-picker-mobile/index.js +24 -5
- package/time-picker-mobile/vue.js +17 -7
- package/time-range/index.js +2 -0
- package/time-spinner/index.js +0 -3
- package/time-spinner/vue.js +2 -3
- package/timeline-item/vue.js +1 -1
- package/tooltip/index.js +1 -2
- package/tooltip/vue.js +3 -3
- package/transfer/index.js +20 -22
- package/transfer/vue.js +1 -6
- package/transfer-panel/vue.js +3 -5
- package/tree/index.js +21 -4
- package/tree/vue.js +10 -8
- package/tree-menu/index.js +27 -3
- package/tree-menu/vue.js +27 -14
- package/tree-node/index.js +12 -10
- package/tree-node/vue.js +6 -5
- package/types/action-menu.type.d.ts +5 -0
- package/types/action-sheet.type.d.ts +118 -1
- package/types/alert.type.d.ts +16 -1
- package/types/amount.type.d.ts +168 -1
- package/types/area.type.d.ts +134 -1
- package/types/async-flowchart.type.d.ts +72 -0
- package/types/autocomplete.type.d.ts +199 -1
- package/types/badge.type.d.ts +3 -1
- package/types/breadcrumb-item.type.d.ts +2 -0
- package/types/breadcrumb.type.d.ts +2 -0
- package/types/button.type.d.ts +5 -0
- package/types/cascader-menu.type.d.ts +3 -4
- package/types/cascader-node.type.d.ts +5 -2
- package/types/cascader-panel.type-2bd03be3.d.ts +241 -0
- package/types/cascader-panel.type.d.ts +3 -241
- package/types/cascader.type.d.ts +327 -1
- package/types/checkbox.type.d.ts +9 -0
- package/types/collapse.type.d.ts +19 -2
- package/types/date-picker.type.d.ts +33 -0
- package/types/dialog-box.type.d.ts +5 -1
- package/types/drawer.type.d.ts +132 -1
- package/types/{dropdown-item.type-bf83e929.d.ts → dropdown-item.type-8475a549.d.ts} +8 -14
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/dropdown.type.d.ts +2 -5
- package/types/fall-menu.type.d.ts +94 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-d0fd42f3.d.ts → form.type-d88482e4.d.ts} +3 -0
- package/types/form.type.d.ts +1 -1
- package/types/input.type.d.ts +23 -9
- package/types/ip-address.type.d.ts +160 -1
- package/types/label.type.d.ts +81 -0
- package/types/link.type.d.ts +6 -3
- package/types/mind-map.type.d.ts +20 -0
- package/types/modal.type.d.ts +4 -2
- package/types/numeric.type.d.ts +36 -9
- package/types/pager.type.d.ts +171 -1
- package/types/picker.type.d.ts +14 -0
- package/types/popconfirm.type.d.ts +85 -1
- package/types/popeditor.type.d.ts +4 -0
- package/types/popover.type.d.ts +3 -3
- package/types/radio.type.d.ts +0 -4
- package/types/rate.type.d.ts +236 -1
- package/types/search.type.d.ts +88 -1
- package/types/shared.type.d.ts +1 -1
- package/types/skeleton-item.type.d.ts +38 -0
- package/types/skeleton.type.d.ts +45 -0
- package/types/slider.type.d.ts +8 -1
- package/types/steps.type.d.ts +14 -3
- package/types/tab-item.type.d.ts +0 -1
- package/types/tab-nav.type.d.ts +6 -1
- package/types/tabs.type.d.ts +5 -0
- package/types/tag-group.type.d.ts +64 -1
- package/types/tag.type.d.ts +12 -0
- package/types/tooltip.type.d.ts +1 -1
- package/types/transfer.type.d.ts +183 -1
- package/types/tree-menu.type.d.ts +210 -1
- package/types/upload-dragger.type.d.ts +1 -1
- package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-1078fba2.d.ts} +27 -6
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/types/wizard.type.d.ts +1 -0
- package/upload/index.js +59 -29
- package/upload/vue.js +6 -4
- package/upload-list/index.js +14 -14
- package/upload-list/vue.js +5 -2
- package/user/index.js +5 -4
- package/user-head/index.js +1 -1
- package/wheel/index.js +3 -0
- package/wizard/vue.js +4 -2
package/calendar-view/index.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-G2ADBYYC.js";
|
|
4
|
-
import { cloneDeep } from "
|
|
5
|
-
import { getDirection } from "
|
|
6
|
-
import {
|
|
7
|
-
getDays,
|
|
8
|
-
lastMonth,
|
|
9
|
-
nextMonth,
|
|
10
|
-
getCalendar,
|
|
11
|
-
transformArray
|
|
12
|
-
} from "@opentiny/vue-renderless/common/calendar/calendar";
|
|
4
|
+
import { cloneDeep } from "../chart-core/deps/utils";
|
|
5
|
+
import { getDirection } from "../common/deps/touch";
|
|
6
|
+
import { getDays, lastMonth, nextMonth, getCalendar, transformArray } from "../common/calendar/calendar";
|
|
13
7
|
const getTime = (date) => new Date(date).getTime();
|
|
14
8
|
const newSchedule = ({ emit }) => (date) => emit("new-schedule", date);
|
|
15
9
|
const isShowNewSchedule = ({ props }) => (date) => props.showNewSchedule instanceof Function ? props.showNewSchedule(date) : false;
|
|
@@ -66,7 +60,7 @@ const isSelectedDate = ({ state }) => (day) => {
|
|
|
66
60
|
const getDayBgColor = ({ props }) => (day) => {
|
|
67
61
|
const date = day.year + "-" + day.month + "-" + day.value;
|
|
68
62
|
const isFunction = props.setDayBgColor instanceof Function;
|
|
69
|
-
const bgColor = isFunction ? props.setDayBgColor(date) : "";
|
|
63
|
+
const bgColor = isFunction ? props.setDayBgColor(date) : "white";
|
|
70
64
|
return bgColor;
|
|
71
65
|
};
|
|
72
66
|
const parseDate = (time) => {
|
|
@@ -201,7 +195,9 @@ const selectDay = ({ state, emit }) => (day, i) => {
|
|
|
201
195
|
} else {
|
|
202
196
|
state.selectedDates.push(date);
|
|
203
197
|
}
|
|
198
|
+
emit("update:modelValue", state.selectedDates);
|
|
204
199
|
emit("selected-date-change", state.selectedDates);
|
|
200
|
+
emit("date-click", date);
|
|
205
201
|
} else {
|
|
206
202
|
if (day.isNext) {
|
|
207
203
|
const { year, month } = nextMonth(state.activeYear, state.activeMonth);
|
|
@@ -215,6 +211,8 @@ const selectDay = ({ state, emit }) => (day, i) => {
|
|
|
215
211
|
}
|
|
216
212
|
state.selectedDate = day.value.toString().length > 2 ? day.value : `${state.activeYear}-${state.activeMonth}-${day.value}`;
|
|
217
213
|
state.showSelectedDateEvents = true;
|
|
214
|
+
emit("update:modelValue", state.selectedDate);
|
|
215
|
+
emit("date-click", state.selectedDate);
|
|
218
216
|
}
|
|
219
217
|
};
|
|
220
218
|
const getEventByMonth = ({ state }) => (year, month) => {
|
|
@@ -230,7 +228,7 @@ const getEventByMonth = ({ state }) => (year, month) => {
|
|
|
230
228
|
day: state.weekDays[new Date(date).getDay()],
|
|
231
229
|
events: []
|
|
232
230
|
};
|
|
233
|
-
state.events.
|
|
231
|
+
state.events.forEach((item) => {
|
|
234
232
|
if (eventInThisTime(item, startTime, endTime)) {
|
|
235
233
|
obj.events.push(item);
|
|
236
234
|
state.monthEventsLength += 1;
|
|
@@ -276,7 +274,7 @@ const getEventByDate = ({ state }) => (date, events) => {
|
|
|
276
274
|
const endTime = getTime(date + " " + state.dayEndTime);
|
|
277
275
|
state.curWeekEvents[date] = [];
|
|
278
276
|
events ? events = [] : state.curWeekEvents[date] = [];
|
|
279
|
-
state.events.
|
|
277
|
+
state.events.forEach((item) => {
|
|
280
278
|
if (eventInThisTime(item, startTime, endTime)) {
|
|
281
279
|
events ? events.push(item) : state.curWeekEvents[date].push(item);
|
|
282
280
|
}
|
package/calendar-view/vue.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
touchmove,
|
|
41
41
|
touchend
|
|
42
42
|
} from "./index";
|
|
43
|
-
import throttle from "
|
|
43
|
+
import throttle from "../common/deps/throttle";
|
|
44
44
|
const api = [
|
|
45
45
|
"state",
|
|
46
46
|
"renderProxy",
|
|
@@ -135,6 +135,19 @@ const initState = ({ reactive, props, computed, api: api2, images, modesIcon })
|
|
|
135
135
|
return state;
|
|
136
136
|
};
|
|
137
137
|
const initWatch = ({ watch, props, state, emit, api: api2, nextTick }) => {
|
|
138
|
+
watch(
|
|
139
|
+
() => props.modelValue,
|
|
140
|
+
(value) => {
|
|
141
|
+
if (value) {
|
|
142
|
+
if (props.multiSelect && Array.isArray(value)) {
|
|
143
|
+
state.selectedDates = value;
|
|
144
|
+
} else {
|
|
145
|
+
state.selectedDate = value;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{ immediate: true, deep: true }
|
|
150
|
+
);
|
|
138
151
|
watch(
|
|
139
152
|
() => props.mode,
|
|
140
153
|
() => {
|
|
@@ -151,9 +164,6 @@ const initWatch = ({ watch, props, state, emit, api: api2, nextTick }) => {
|
|
|
151
164
|
watch(
|
|
152
165
|
() => state.selectedDate,
|
|
153
166
|
() => {
|
|
154
|
-
if (state.mode === "month") {
|
|
155
|
-
api2.getEventByDate(state.selectedDate, state.selectedDateEvents);
|
|
156
|
-
}
|
|
157
167
|
emit("selected-date-change", state.selectedDate);
|
|
158
168
|
},
|
|
159
169
|
{ deep: true }
|
|
@@ -184,6 +194,9 @@ const initWatch = ({ watch, props, state, emit, api: api2, nextTick }) => {
|
|
|
184
194
|
});
|
|
185
195
|
}
|
|
186
196
|
);
|
|
197
|
+
addWatch({ watch, props, state, emit, api: api2 });
|
|
198
|
+
};
|
|
199
|
+
const addWatch = ({ watch, props, state, emit, api: api2 }) => {
|
|
187
200
|
watch(
|
|
188
201
|
() => props.month,
|
|
189
202
|
(val, oldVal) => {
|
package/cascader/index.js
CHANGED
|
@@ -50,12 +50,25 @@ const watchValue = ({ api, state }) => (value) => {
|
|
|
50
50
|
setTimeout(api.computePresentContent);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
const watchCheckedValue = ({
|
|
53
|
+
const watchCheckedValue = ({
|
|
54
|
+
nextTick,
|
|
55
|
+
constants,
|
|
56
|
+
dispatch,
|
|
57
|
+
api,
|
|
58
|
+
emit,
|
|
59
|
+
state
|
|
60
|
+
}) => (value) => {
|
|
61
|
+
state.presentText = state.presentTags.length ? "" : null;
|
|
54
62
|
const { checkStrictly, multiple } = state.config;
|
|
55
63
|
api.computePresentContent();
|
|
56
64
|
if (!multiple && !checkStrictly && state.dropDownVisible) {
|
|
57
65
|
api.toggleDropDownVisible(false);
|
|
58
66
|
}
|
|
67
|
+
nextTick(() => {
|
|
68
|
+
dispatch(constants.COMPONENT_NAME.FormItem, constants.EVENT_NAME.FormBlur, [
|
|
69
|
+
state.multiple ? state.presentText : state.inputValue
|
|
70
|
+
]);
|
|
71
|
+
});
|
|
59
72
|
emit("update:modelValue", value);
|
|
60
73
|
emit("change", value);
|
|
61
74
|
setTimeout(api.updateStyle);
|
|
@@ -85,10 +98,16 @@ const isEmpty = (val) => {
|
|
|
85
98
|
}
|
|
86
99
|
return false;
|
|
87
100
|
};
|
|
88
|
-
const selfMounted = ({
|
|
89
|
-
|
|
101
|
+
const selfMounted = ({
|
|
102
|
+
api,
|
|
103
|
+
parent,
|
|
104
|
+
props,
|
|
105
|
+
vm,
|
|
106
|
+
state
|
|
107
|
+
}) => () => {
|
|
108
|
+
const { input } = vm.$refs;
|
|
90
109
|
const inputSizeMap = { medium: 36, small: 32, mini: 28 };
|
|
91
|
-
input && (input.$parent.popperElm = refs.popper);
|
|
110
|
+
input && (input.$parent.popperElm = vm.$refs.popper);
|
|
92
111
|
if (input && input.$el) {
|
|
93
112
|
state.inputInitialHeight = input.$el.offsetHeight || inputSizeMap[state.realSize] || 30;
|
|
94
113
|
}
|
|
@@ -111,11 +130,16 @@ const selfMounted = ({ api, parent, props, refs, state }) => () => {
|
|
|
111
130
|
});
|
|
112
131
|
addResizeListener(parent.$el, api.updateStyle);
|
|
113
132
|
};
|
|
114
|
-
const toggleDropDownVisible = ({
|
|
133
|
+
const toggleDropDownVisible = ({
|
|
134
|
+
emit,
|
|
135
|
+
vm,
|
|
136
|
+
state,
|
|
137
|
+
updatePopper
|
|
138
|
+
}) => (visible) => {
|
|
115
139
|
if (state.isDisabled) {
|
|
116
140
|
return;
|
|
117
141
|
}
|
|
118
|
-
const { input } = refs;
|
|
142
|
+
const { input } = vm.$refs;
|
|
119
143
|
visible = !isNull(visible) ? visible : !state.dropDownVisible;
|
|
120
144
|
if (visible !== state.dropDownVisible) {
|
|
121
145
|
state.dropDownVisible = visible;
|
|
@@ -152,21 +176,18 @@ const handleKeyDown = ({ api }) => (event) => {
|
|
|
152
176
|
const handleFocus = (emit) => (e) => {
|
|
153
177
|
emit("focus", e);
|
|
154
178
|
};
|
|
155
|
-
const handleBlur = ({
|
|
179
|
+
const handleBlur = ({ emit, api, props }) => (e) => {
|
|
156
180
|
if (props.filterable) {
|
|
157
181
|
api.computePresentContent();
|
|
158
182
|
}
|
|
159
|
-
dispatch(constants.COMPONENT_NAME.FormItem, constants.EVENT_NAME.FormBlur, [
|
|
160
|
-
state.multiple ? state.presentText : state.inputValue
|
|
161
|
-
]);
|
|
162
183
|
emit("blur", e);
|
|
163
184
|
};
|
|
164
|
-
const handleInput = ({ api, state,
|
|
185
|
+
const handleInput = ({ api, state, vm }) => (val, event) => {
|
|
165
186
|
event = event || window.event;
|
|
166
187
|
if (!event) {
|
|
167
188
|
return;
|
|
168
189
|
}
|
|
169
|
-
const reference = refs.reference;
|
|
190
|
+
const reference = vm.$refs.reference;
|
|
170
191
|
const key = "init-flag";
|
|
171
192
|
const value = "true";
|
|
172
193
|
const isIE = browser.name === "ie";
|
|
@@ -185,7 +206,7 @@ const handleInput = ({ api, state, refs }) => (val, event) => {
|
|
|
185
206
|
state.filtering = false;
|
|
186
207
|
}
|
|
187
208
|
};
|
|
188
|
-
const handleClear = (state) => () => {
|
|
209
|
+
const handleClear = (state) => (_event) => {
|
|
189
210
|
state.presentText = "";
|
|
190
211
|
state.panel.clearCheckedNodes();
|
|
191
212
|
};
|
|
@@ -194,13 +215,13 @@ const handleExpandChange = ({ constants, dispatch, emit, nextTick, state, update
|
|
|
194
215
|
dispatch(constants.COMPONENT_NAME.FormItem, constants.EVENT_NAME.FormBlur, [
|
|
195
216
|
state.multiple ? state.presentText : state.inputValue
|
|
196
217
|
]);
|
|
197
|
-
updatePopper(state.panel.$parent);
|
|
218
|
+
updatePopper(state.panel.$parent.$el);
|
|
198
219
|
});
|
|
199
220
|
emit("expand-change", value);
|
|
200
221
|
emit("active-item-change", value);
|
|
201
222
|
};
|
|
202
|
-
const focusFirstNode = ({
|
|
203
|
-
const { popper, suggestionPanel } = refs;
|
|
223
|
+
const focusFirstNode = ({ vm, state }) => () => {
|
|
224
|
+
const { popper, suggestionPanel } = vm.$refs;
|
|
204
225
|
let firstNode = null;
|
|
205
226
|
if (state.filtering && suggestionPanel) {
|
|
206
227
|
firstNode = suggestionPanel.$el.querySelector(CASCADER.SugItem);
|
|
@@ -246,13 +267,19 @@ const computePresentTags = ({ api, props, state }) => () => {
|
|
|
246
267
|
}
|
|
247
268
|
state.checkedNodes = checkedNodes;
|
|
248
269
|
state.presentTags = tags;
|
|
270
|
+
state.inputValue = null;
|
|
271
|
+
state.presentText = null;
|
|
249
272
|
if (props.hoverExpand) {
|
|
250
273
|
api.calcCollapseTags();
|
|
251
274
|
}
|
|
252
275
|
};
|
|
253
|
-
const calcCollapseTags = ({
|
|
276
|
+
const calcCollapseTags = ({
|
|
277
|
+
state,
|
|
278
|
+
vm,
|
|
279
|
+
nextTick
|
|
280
|
+
}) => () => {
|
|
254
281
|
nextTick(() => {
|
|
255
|
-
const content = refs["tags-content"];
|
|
282
|
+
const content = vm.$refs["tags-content"];
|
|
256
283
|
if (state.inputHover || state.dropDownVisible) {
|
|
257
284
|
return state.isHidden = true;
|
|
258
285
|
}
|
|
@@ -268,7 +295,7 @@ const calcCollapseTags = ({ state, refs, nextTick }) => () => {
|
|
|
268
295
|
const collapseTagWidth = tagsLength && parseFloat(collapseTagContentWidth) + parseFloat(marginRight) + parseFloat(marginLeft);
|
|
269
296
|
const tags = Array.from(content.querySelectorAll(".tiny-tag"));
|
|
270
297
|
let { total, dom, idx } = { total: collapseTagWidth, dom: null, idx: 0 };
|
|
271
|
-
tags.
|
|
298
|
+
tags.forEach((tag, index) => {
|
|
272
299
|
if (tag !== tagsLength) {
|
|
273
300
|
const { width: tagContentWidth, marginRight: marginRight2, marginLeft: marginLeft2 } = tag && window.getComputedStyle(tag);
|
|
274
301
|
total += parseFloat(tagContentWidth) + parseFloat(marginRight2) + parseFloat(marginLeft2);
|
|
@@ -292,17 +319,17 @@ const calcCollapseTags = ({ state, refs, nextTick }) => () => {
|
|
|
292
319
|
}
|
|
293
320
|
});
|
|
294
321
|
};
|
|
295
|
-
const watchInputHover = ({
|
|
322
|
+
const watchInputHover = ({ vm }) => (newVal) => {
|
|
296
323
|
const [inputHover, dropDownVisible] = newVal;
|
|
297
324
|
if (!inputHover && !dropDownVisible) {
|
|
298
|
-
const content = refs["tags-content"];
|
|
325
|
+
const content = vm.$refs["tags-content"];
|
|
299
326
|
content && content.scrollTo({ top: 0, left: 0 });
|
|
300
327
|
}
|
|
301
328
|
};
|
|
302
|
-
const handleMouseenter = ({
|
|
329
|
+
const handleMouseenter = ({ vm, state }) => ($event) => {
|
|
303
330
|
const dom = $event.target;
|
|
304
331
|
const textNode = dom && dom.querySelector("span");
|
|
305
|
-
const { tooltip } = refs;
|
|
332
|
+
const { tooltip } = vm.$refs;
|
|
306
333
|
if (textNode && tooltip && textNode.scrollWidth > textNode.offsetWidth) {
|
|
307
334
|
const text = textNode.textContent;
|
|
308
335
|
tooltip.state.referenceElm = dom;
|
|
@@ -314,7 +341,12 @@ const handleMouseenter = ({ refs, state }) => ($event) => {
|
|
|
314
341
|
}
|
|
315
342
|
};
|
|
316
343
|
const handleMouseleave = ({ state }) => () => state.tooltipVisible = false;
|
|
317
|
-
const getSuggestions = ({
|
|
344
|
+
const getSuggestions = ({
|
|
345
|
+
nextTick,
|
|
346
|
+
props,
|
|
347
|
+
state,
|
|
348
|
+
updatePopper
|
|
349
|
+
}) => () => {
|
|
318
350
|
let filterMethod = null;
|
|
319
351
|
if (!(props.filterMethod && typeof props.filterMethod === "function")) {
|
|
320
352
|
filterMethod = (node, keyword) => ~node.text.indexOf(keyword);
|
|
@@ -325,8 +357,9 @@ const getSuggestions = ({ nextTick, props, state, updatePopper }) => () => {
|
|
|
325
357
|
if (node.isDisabled) {
|
|
326
358
|
return false;
|
|
327
359
|
}
|
|
360
|
+
;
|
|
328
361
|
node.text = node.getText(props.showAllLevels, props.separator) || "";
|
|
329
|
-
return filterMethod(node, state.inputValue);
|
|
362
|
+
return filterMethod == null ? void 0 : filterMethod(node, state.inputValue);
|
|
330
363
|
});
|
|
331
364
|
if (state.multiple) {
|
|
332
365
|
state.presentTags.forEach((tag) => {
|
|
@@ -390,16 +423,17 @@ const deleteTag = ({ emit, state }) => (index) => {
|
|
|
390
423
|
state.checkedValue = state.checkedValue.filter((n, i) => i !== index);
|
|
391
424
|
emit("remove-tag", val);
|
|
392
425
|
};
|
|
393
|
-
const updateStyle = ({ parent,
|
|
426
|
+
const updateStyle = ({ parent, vm, state, updatePopper, nextTick, props }) => () => {
|
|
394
427
|
const $el = parent.$el;
|
|
395
|
-
const { suggestionPanel } = refs;
|
|
428
|
+
const { suggestionPanel } = vm.$refs;
|
|
396
429
|
const inputInner = $el.querySelector(CASCADER.InputClass);
|
|
397
430
|
if (!inputInner) {
|
|
398
431
|
return;
|
|
399
432
|
}
|
|
400
433
|
const tags = $el.querySelector(CASCADER.TagClass);
|
|
401
434
|
let suggestionPanelEl = null;
|
|
402
|
-
if (suggestionPanel
|
|
435
|
+
if (suggestionPanel) {
|
|
436
|
+
suggestionPanelEl = suggestionPanel.$el;
|
|
403
437
|
const suggestionList = suggestionPanelEl.querySelector(CASCADER.ListClass);
|
|
404
438
|
suggestionList.style.minWidth = inputInner.offsetWidth + "px";
|
|
405
439
|
}
|
|
@@ -415,21 +449,28 @@ const updateStyle = ({ parent, refs, state, updatePopper, nextTick, props }) =>
|
|
|
415
449
|
updatePopper();
|
|
416
450
|
} else {
|
|
417
451
|
nextTick(() => {
|
|
418
|
-
if (state.
|
|
452
|
+
if (state.multiple && state.isDisplayOnly) {
|
|
419
453
|
inputInner.style.height = "auto";
|
|
420
454
|
}
|
|
421
455
|
});
|
|
422
456
|
}
|
|
423
457
|
};
|
|
424
458
|
const getCheckedNodes = (state) => (leafOnly) => state.panel.getCheckedNodes(leafOnly, state.checkedValue);
|
|
425
|
-
const setInputHeightToTag = ({
|
|
459
|
+
const setInputHeightToTag = ({
|
|
460
|
+
nextTick,
|
|
461
|
+
parent,
|
|
462
|
+
state
|
|
463
|
+
}) => () => {
|
|
426
464
|
nextTick(() => {
|
|
465
|
+
var _a;
|
|
427
466
|
const parentEl = parent.$el;
|
|
428
|
-
const height = parentEl.querySelector(CASCADER.TagClass).offsetHeight + 6 + "px";
|
|
467
|
+
const height = ((_a = parentEl == null ? void 0 : parentEl.querySelector(CASCADER.TagClass)) == null ? void 0 : _a.offsetHeight) + 6 + "px";
|
|
429
468
|
if (!state.isDisplayOnly) {
|
|
430
|
-
parentEl.querySelector(CASCADER.InputClass)
|
|
469
|
+
const inputDom = parentEl == null ? void 0 : parentEl.querySelector(CASCADER.InputClass);
|
|
470
|
+
inputDom && (inputDom.style.height = height);
|
|
431
471
|
} else {
|
|
432
|
-
parentEl.querySelector(CASCADER.InputClass)
|
|
472
|
+
const inputDom = parentEl == null ? void 0 : parentEl.querySelector(CASCADER.InputClass);
|
|
473
|
+
inputDom && (inputDom.style.height = "auto");
|
|
433
474
|
}
|
|
434
475
|
});
|
|
435
476
|
};
|
|
@@ -449,7 +490,12 @@ const handleBeforeUpdate = ({ props, api, state }) => () => {
|
|
|
449
490
|
api.computePresentContent();
|
|
450
491
|
}
|
|
451
492
|
};
|
|
452
|
-
const showPlaceholder = ({
|
|
493
|
+
const showPlaceholder = ({
|
|
494
|
+
props,
|
|
495
|
+
state,
|
|
496
|
+
t,
|
|
497
|
+
constants
|
|
498
|
+
}) => () => {
|
|
453
499
|
let placeholder = null;
|
|
454
500
|
placeholder = state.multiple && state.presentTags.length || state.present ? "" : props.placeholder || t(constants.placeholder);
|
|
455
501
|
return placeholder;
|
package/cascader/vue.js
CHANGED
|
@@ -58,7 +58,17 @@ const api = [
|
|
|
58
58
|
"handleMouseenter",
|
|
59
59
|
"handleMouseleave"
|
|
60
60
|
];
|
|
61
|
-
const initState = ({
|
|
61
|
+
const initState = ({
|
|
62
|
+
reactive,
|
|
63
|
+
props,
|
|
64
|
+
computed,
|
|
65
|
+
parent,
|
|
66
|
+
api: api2,
|
|
67
|
+
t,
|
|
68
|
+
constants,
|
|
69
|
+
vm,
|
|
70
|
+
inject
|
|
71
|
+
}) => {
|
|
62
72
|
const state = reactive({
|
|
63
73
|
showAutoWidth: inject("showAutoWidth", null),
|
|
64
74
|
/** popper 元素是否显示。 它是通过v-show 绑定到页面上,造成隐藏时,popperJs并没有destory,有一定的性能影响 */
|
|
@@ -85,7 +95,7 @@ const initState = ({ reactive, props, computed, parent, api: api2, t, constants,
|
|
|
85
95
|
leafOnly: computed(() => !state.config.checkStrictly),
|
|
86
96
|
readonly: computed(() => !props.filterable || state.multiple),
|
|
87
97
|
clearBtnVisible: computed(() => api2.computClearVisible()),
|
|
88
|
-
panel: computed(() => refs.panel),
|
|
98
|
+
panel: computed(() => vm.$refs.panel),
|
|
89
99
|
placeholder: computed(() => props.placeholder || t(constants.placeholder)),
|
|
90
100
|
inputValues: computed(() => state.multiple ? state.presentText : state.inputValue),
|
|
91
101
|
collapseTagsLength: 0,
|
|
@@ -95,7 +105,19 @@ const initState = ({ reactive, props, computed, parent, api: api2, t, constants,
|
|
|
95
105
|
});
|
|
96
106
|
return state;
|
|
97
107
|
};
|
|
98
|
-
const initApi = ({
|
|
108
|
+
const initApi = ({
|
|
109
|
+
api: api2,
|
|
110
|
+
state,
|
|
111
|
+
constants,
|
|
112
|
+
dispatch,
|
|
113
|
+
emit,
|
|
114
|
+
vm,
|
|
115
|
+
props,
|
|
116
|
+
updatePopper,
|
|
117
|
+
nextTick,
|
|
118
|
+
parent,
|
|
119
|
+
t
|
|
120
|
+
}) => {
|
|
99
121
|
Object.assign(api2, {
|
|
100
122
|
state,
|
|
101
123
|
handleFocus: handleFocus(emit),
|
|
@@ -103,10 +125,10 @@ const initApi = ({ api: api2, state, constants, dispatch, emit, refs, props, upd
|
|
|
103
125
|
getCheckedNodes: getCheckedNodes(state),
|
|
104
126
|
deleteTag: deleteTag({ emit, state }),
|
|
105
127
|
handleDropdownLeave: handleDropdownLeave(state),
|
|
106
|
-
focusFirstNode: focusFirstNode({
|
|
128
|
+
focusFirstNode: focusFirstNode({ vm, state }),
|
|
107
129
|
computClearVisible: computClearVisible({ props, state }),
|
|
108
130
|
showPlaceholder: showPlaceholder({ props, state, t, constants }),
|
|
109
|
-
updateStyle: updateStyle({ parent,
|
|
131
|
+
updateStyle: updateStyle({ parent, vm, state, updatePopper, nextTick, props }),
|
|
110
132
|
getSuggestions: getSuggestions({ nextTick, props, state, updatePopper }),
|
|
111
133
|
handleExpandChange: handleExpandChange({ constants, emit, dispatch, nextTick, state, updatePopper }),
|
|
112
134
|
getConfig: getConfig({ parent, props }),
|
|
@@ -115,23 +137,30 @@ const initApi = ({ api: api2, state, constants, dispatch, emit, refs, props, upd
|
|
|
115
137
|
handleDelete: handleDelete({ api: api2, state }),
|
|
116
138
|
computePresentText: computePresentText({ props, state }),
|
|
117
139
|
handleSuggestionKeyDown: handleSuggestionKeyDown({ api: api2 }),
|
|
118
|
-
handleInput: handleInput({ api: api2, state,
|
|
140
|
+
handleInput: handleInput({ api: api2, state, vm }),
|
|
119
141
|
handleKeyDown: handleKeyDown({ api: api2 }),
|
|
120
142
|
watchValue: watchValue({ api: api2, state }),
|
|
121
143
|
computePresentTags: computePresentTags({ api: api2, props, state }),
|
|
122
144
|
computePresentContent: computePresentContent({ api: api2, state }),
|
|
123
|
-
watchCheckedValue: watchCheckedValue({ api: api2, emit, state }),
|
|
124
|
-
toggleDropDownVisible: toggleDropDownVisible({ emit,
|
|
125
|
-
selfMounted: selfMounted({ api: api2, parent, props,
|
|
145
|
+
watchCheckedValue: watchCheckedValue({ constants, dispatch, api: api2, nextTick, emit, state }),
|
|
146
|
+
toggleDropDownVisible: toggleDropDownVisible({ emit, vm, state, updatePopper }),
|
|
147
|
+
selfMounted: selfMounted({ api: api2, parent, props, vm, state }),
|
|
126
148
|
handleBeforeUpdate: handleBeforeUpdate({ props, api: api2, state }),
|
|
127
|
-
handleBlur: handleBlur({
|
|
128
|
-
calcCollapseTags: calcCollapseTags({
|
|
129
|
-
watchInputHover: watchInputHover({
|
|
130
|
-
handleMouseenter: handleMouseenter({
|
|
149
|
+
handleBlur: handleBlur({ emit, api: api2, props }),
|
|
150
|
+
calcCollapseTags: calcCollapseTags({ vm, state, nextTick }),
|
|
151
|
+
watchInputHover: watchInputHover({ vm }),
|
|
152
|
+
handleMouseenter: handleMouseenter({ vm, state }),
|
|
131
153
|
handleMouseleave: handleMouseleave({ state })
|
|
132
154
|
});
|
|
133
155
|
};
|
|
134
|
-
const initWatch = ({
|
|
156
|
+
const initWatch = ({
|
|
157
|
+
watch,
|
|
158
|
+
state,
|
|
159
|
+
api: api2,
|
|
160
|
+
props,
|
|
161
|
+
nextTick,
|
|
162
|
+
updatePopper
|
|
163
|
+
}) => {
|
|
135
164
|
watch(() => state.disabled, api2.computePresentContent);
|
|
136
165
|
watch(() => props.modelValue, api2.watchValue);
|
|
137
166
|
watch(() => state.checkedValue, api2.watchCheckedValue);
|
|
@@ -165,7 +194,7 @@ const initWatch = ({ watch, state, api: api2, props, nextTick, updatePopper }) =
|
|
|
165
194
|
);
|
|
166
195
|
watch([() => state.inputHover, () => state.dropDownVisible], api2.watchInputHover);
|
|
167
196
|
};
|
|
168
|
-
const renderless = (props, { computed, onMounted, onBeforeUnmount, onDeactivated, onUpdated, onBeforeUpdate, reactive, toRefs, watch, inject }, { t,
|
|
197
|
+
const renderless = (props, { computed, onMounted, onBeforeUnmount, onDeactivated, onUpdated, onBeforeUpdate, reactive, toRefs, watch, inject }, { t, emit, nextTick, constants, parent, slots, dispatch, vm }) => {
|
|
169
198
|
parent.tinyForm = parent.tinyForm || inject("form", null);
|
|
170
199
|
const { updatePopper } = userPopper({
|
|
171
200
|
reactive,
|
|
@@ -174,26 +203,27 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, onDeactivated
|
|
|
174
203
|
props: __spreadProps(__spreadValues({}, props), {
|
|
175
204
|
placement: DATEPICKER.PlacementMap.left,
|
|
176
205
|
popperOptions: { boundariesPadding: 0, gpuAcceleration: false },
|
|
177
|
-
visibleArrow:
|
|
206
|
+
visibleArrow: false,
|
|
178
207
|
offset: 0,
|
|
179
208
|
boundariesPadding: 5,
|
|
180
209
|
arrowOffset: 35
|
|
181
210
|
}),
|
|
182
211
|
toRefs,
|
|
183
|
-
|
|
212
|
+
vm,
|
|
184
213
|
slots,
|
|
185
214
|
nextTick,
|
|
186
215
|
onBeforeUnmount,
|
|
187
216
|
onDeactivated
|
|
188
217
|
});
|
|
189
218
|
const api2 = {};
|
|
190
|
-
const state = initState({ reactive, props, computed, parent, api: api2, t, constants,
|
|
191
|
-
initApi({ api: api2, state, constants, dispatch, emit,
|
|
219
|
+
const state = initState({ reactive, props, computed, parent, api: api2, t, constants, vm, inject });
|
|
220
|
+
initApi({ api: api2, state, constants, dispatch, emit, vm, props, updatePopper, nextTick, parent, t });
|
|
192
221
|
initWatch({ watch, state, api: api2, props, nextTick, updatePopper });
|
|
193
222
|
onBeforeUpdate(api2.handleBeforeUpdate);
|
|
194
223
|
onUpdated(api2.updateStyle);
|
|
195
224
|
onMounted(api2.selfMounted);
|
|
196
225
|
parent.$on("handle-clear", (event) => {
|
|
226
|
+
;
|
|
197
227
|
api2.handleClear(event);
|
|
198
228
|
});
|
|
199
229
|
onBeforeUnmount(() => removeResizeListener(parent.$el, api2.updateStyle));
|
package/cascader-menu/index.js
CHANGED
|
@@ -3,11 +3,11 @@ const handleExpand = (state) => (e) => state.activeNode = e.target;
|
|
|
3
3
|
const handleMouseMove = ({
|
|
4
4
|
api,
|
|
5
5
|
parent,
|
|
6
|
-
|
|
6
|
+
vm,
|
|
7
7
|
state,
|
|
8
8
|
svg
|
|
9
9
|
}) => (e) => {
|
|
10
|
-
const
|
|
10
|
+
const hoverZone = vm.$refs.hoverZone;
|
|
11
11
|
if (!state.activeNode || !hoverZone) {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
@@ -15,9 +15,9 @@ const handleMouseMove = ({
|
|
|
15
15
|
if (state.hoverTimer) {
|
|
16
16
|
clearTimeout(state.hoverTimer);
|
|
17
17
|
}
|
|
18
|
-
const { left } = refs.cascaderMenu.$parent.$el.getBoundingClientRect();
|
|
18
|
+
const { left } = vm.$refs.cascaderMenu.$parent.$el.getBoundingClientRect();
|
|
19
19
|
const startX = e.clientX - left;
|
|
20
|
-
const { offsetWidth, offsetHeight } = refs.cascaderMenu.$parent.$el;
|
|
20
|
+
const { offsetWidth, offsetHeight } = vm.$refs.cascaderMenu.$parent.$el;
|
|
21
21
|
const top = state.activeNode.offsetTop;
|
|
22
22
|
const bottom = top + state.activeNode.offsetHeight;
|
|
23
23
|
hoverZone.innerHTML = `
|
|
@@ -25,11 +25,11 @@ const handleMouseMove = ({
|
|
|
25
25
|
${svg}${startX} ${bottom} L${offsetWidth} ${offsetHeight} V${bottom} Z" />
|
|
26
26
|
`;
|
|
27
27
|
} else if (!state.hoverTimer) {
|
|
28
|
-
state.hoverTimer = setTimeout(api.clearHoverZone, parent.state.config.hoverThreshold);
|
|
28
|
+
state.hoverTimer = setTimeout(api.clearHoverZone, parent.$parent.state.config.hoverThreshold);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
const clearHoverZone = (
|
|
32
|
-
const { hoverZone } = refs;
|
|
31
|
+
const clearHoverZone = ({ vm }) => () => {
|
|
32
|
+
const { hoverZone } = vm.$refs.hoverZone;
|
|
33
33
|
if (!hoverZone) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
package/cascader-menu/vue.js
CHANGED
|
@@ -4,7 +4,6 @@ import { CASCADER } from "../common";
|
|
|
4
4
|
import { random } from "../common/string";
|
|
5
5
|
const api = ["state", "handleMouseMove", "handleExpand"];
|
|
6
6
|
const renderless = (props, { computed, reactive }, { vm, parent }) => {
|
|
7
|
-
const refs = vm.$refs;
|
|
8
7
|
const api2 = {};
|
|
9
8
|
const state = reactive({
|
|
10
9
|
activeNode: null,
|
|
@@ -15,9 +14,9 @@ const renderless = (props, { computed, reactive }, { vm, parent }) => {
|
|
|
15
14
|
});
|
|
16
15
|
Object.assign(api2, {
|
|
17
16
|
state,
|
|
18
|
-
clearHoverZone: clearHoverZone(
|
|
17
|
+
clearHoverZone: clearHoverZone({ vm }),
|
|
19
18
|
handleExpand: handleExpand(state),
|
|
20
|
-
handleMouseMove: handleMouseMove({ api: api2, parent,
|
|
19
|
+
handleMouseMove: handleMouseMove({ api: api2, parent, vm, state, svg: CASCADER.SvgStr })
|
|
21
20
|
});
|
|
22
21
|
return api2;
|
|
23
22
|
};
|