@opentiny/vue-renderless 3.21.2 → 3.23.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/amount/index.js +4 -4
- package/anchor/index.js +1 -1
- package/async-flowchart/index.js +1 -1
- package/autocomplete/index.js +4 -1
- package/autocomplete/vue.js +3 -3
- package/base-select/index.js +20 -21
- package/base-select/vue.js +2 -2
- package/calendar/index.js +2 -2
- package/calendar-bar/index.js +2 -2
- package/calendar-bar/vue.js +1 -1
- package/calendar-view/index.js +91 -25
- package/calendar-view/vue.js +6 -4
- package/card/index.js +1 -1
- package/card-template/index.js +1 -1
- package/carousel/index.js +4 -4
- package/carousel/vue.js +1 -1
- package/cascader/index.js +21 -11
- package/cascader/vue.js +6 -5
- package/cascader-menu/vue.js +2 -2
- package/cascader-mobile/index.js +1 -1
- package/cascader-node/vue.js +11 -1
- package/cascader-panel/index.js +4 -4
- package/cascader-panel/node.js +3 -4
- package/cascader-panel/vue.js +1 -1
- package/cascader-select/column-index.js +2 -2
- package/cascader-view/index.js +1 -1
- package/chart-bar/index.js +1 -1
- package/chart-candle/index.js +1 -1
- package/chart-core/deps/utils.js +6 -6
- package/chart-core/index.js +1 -1
- package/chart-funnel/index.js +1 -1
- package/chart-gauge/index.js +1 -1
- package/chart-line/index.js +1 -1
- package/chart-map/index.js +1 -1
- package/chart-pie/index.js +1 -1
- package/chart-radar/index.js +1 -1
- package/chart-sankey/index.js +1 -1
- package/chart-scatter/index.js +1 -1
- package/chart-waterfall/index.js +1 -1
- package/chart-wordcloud/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/collapse-item/vue.js +1 -1
- package/column-list-item/index.js +1 -1
- package/common/deps/dom.js +20 -196
- package/common/deps/infinite-scroll.js +4 -43
- package/common/deps/popup-manager.js +1 -200
- package/container/index.js +2 -2
- package/crop/index.js +3 -3
- package/currency/index.js +2 -2
- package/date-panel/index.js +82 -26
- package/date-panel/vue.js +53 -21
- package/date-picker/vue.js +1 -1
- package/date-picker-mobile/index.js +1 -1
- package/date-range/index.js +74 -37
- package/date-range/vue.js +27 -23
- package/date-table/index.js +8 -5
- package/date-table/vue.js +1 -1
- package/dialog-box/index.js +3 -3
- package/dialog-box/vue.js +1 -1
- package/dialog-select/index.js +15 -4
- package/dialog-select/vue.js +7 -4
- package/drawer/index.js +2 -2
- package/drop-times/index.js +1 -1
- package/dropdown/index.js +11 -3
- package/dropdown/vue.js +2 -2
- package/dropdown-item/index.js +1 -1
- package/dropdown-item/mf.js +1 -1
- package/dropdown-menu/index.js +1 -1
- package/espace/vue.js +2 -2
- package/fall-menu/index.js +3 -3
- package/file-upload/index.js +16 -13
- package/file-upload/vue.js +2 -2
- package/filter/vue.js +1 -1
- package/filter-panel/vue.js +1 -2
- package/floating-button/index.js +1 -1
- package/flowchart/index.js +3 -3
- package/flowchart/vue.js +1 -1
- package/fluent-editor/index.js +5 -7
- package/fluent-editor/options.js +2 -2
- package/form/index.js +20 -2
- package/form-item/index.js +6 -6
- package/fullscreen/index.js +1 -1
- package/fullscreen/vue.js +1 -1
- package/grid/plugins/export.js +8 -2
- package/grid/plugins/exportExcel.js +3 -3
- package/grid/plugins/resize.js +2 -2
- package/grid/static/base/helperEqualCompare.js +1 -1
- package/grid/static/base/isPlainObject.js +1 -1
- package/grid/utils/common.js +2 -2
- package/grid/utils/dom.js +12 -7
- package/grid/utils/event.js +4 -4
- package/hrapprover/index.js +1 -1
- package/image/index.js +3 -3
- package/image-viewer/index.js +4 -6
- package/image-viewer/vue.js +1 -1
- package/input/index.js +2 -2
- package/input/vue.js +1 -1
- package/ip-address/index.js +17 -21
- package/ip-address/vue.js +1 -1
- package/link-menu/index.js +1 -1
- package/link-menu/vue.js +1 -1
- package/load-list/index.js +1 -1
- package/load-list/vue.js +4 -4
- package/loading/index.js +2 -2
- package/menu/vue.js +1 -1
- package/milestone/index.js +6 -45
- package/modal/index.js +5 -5
- package/month-range/index.js +48 -5
- package/month-range/vue.js +19 -15
- package/month-table/index.js +5 -5
- package/month-table/vue.js +1 -1
- package/nav-menu/index.js +7 -7
- package/notify/index.js +3 -3
- package/number-animation/index.js +53 -0
- package/number-animation/vue.js +27 -0
- package/numeric/index.js +5 -5
- package/option/index.js +1 -1
- package/option/vue.js +2 -1
- package/package.json +3 -2
- package/pager/index.js +28 -16
- package/pager/vue.js +27 -16
- package/panel/index.js +1 -1
- package/picker/index.js +28 -23
- package/picker/vue.js +6 -6
- package/picker-column/index.js +1 -1
- package/pop-upload/vue.js +1 -1
- package/popconfirm/vue.js +1 -1
- package/popeditor/index.js +6 -6
- package/popeditor/vue.js +2 -2
- package/popover/index.js +3 -3
- package/popover/vue.js +1 -1
- package/popup/index.js +3 -3
- package/pull-refresh/index.js +1 -1
- package/pull-refresh-mobile-first/index.js +1 -1
- package/pull-refresh-mobile-first/vue.js +4 -4
- package/quarter-panel/index.js +2 -2
- package/quarter-panel/vue.js +1 -1
- package/radio-group/index.js +1 -1
- package/rate/index.js +1 -1
- package/rate/vue.js +1 -1
- package/recycle-scroller/index.js +2 -2
- package/recycle-scroller/vue.js +1 -1
- package/rich-text/index.js +1 -1
- package/rich-text/table-module.js +2 -2
- package/river/river.js +1 -1
- package/river/vue.js +1 -1
- package/scrollbar/vue-bar.js +1 -1
- package/scrollbar/vue.js +1 -1
- package/search/index.js +3 -3
- package/select/index.js +26 -22
- package/select/vue.js +8 -7
- package/select-dropdown/vue.js +5 -5
- package/selected-box/index.js +1 -1
- package/signature/index.js +1 -1
- package/signature/vue.js +2 -2
- package/skeleton/index.js +1 -1
- package/slider/index.js +4 -4
- package/slider-button-group/slide-button.js +2 -2
- package/split/index.js +2 -2
- package/split/vue.js +1 -1
- package/statistic/index.js +1 -1
- package/steps/index.js +2 -3
- package/steps/slide-bar.js +2 -2
- package/sticky/vue.js +4 -4
- package/tab-bar/index.js +2 -2
- package/tab-item-mf/vue.js +1 -1
- package/tab-nav/index.js +4 -4
- package/tabbar/index.js +1 -1
- package/tabbar/vue.js +1 -1
- package/tabbar-item/index.js +1 -1
- package/tabs-mf/index.js +9 -5
- package/tabs-mf/vue-bar.js +5 -4
- package/tabs-mf/vue-swipe.js +1 -1
- package/tabs-mf/vue.js +2 -2
- package/tabs-mf/wheel.js +3 -3
- package/tag-group/vue.js +2 -2
- package/tall-storage/index.js +1 -1
- package/tall-storage/vue.js +1 -1
- package/time/index.js +1 -1
- package/time/vue.js +1 -1
- package/time-line/index.js +1 -1
- package/time-line-new/index.js +1 -1
- package/time-panel/index.js +2 -2
- package/time-panel/vue.js +1 -1
- package/time-range/index.js +1 -1
- package/time-range/vue.js +1 -1
- package/time-spinner/index.js +4 -4
- package/time-spinner/vue.js +1 -1
- package/timeline-item/index.js +1 -1
- package/toggle-menu/index.js +1 -1
- package/tooltip/index.js +2 -2
- package/tooltip/vue.js +2 -2
- package/top-box/index.js +3 -3
- package/transfer/index.js +42 -1
- package/transfer/vue.js +64 -24
- package/transfer-panel/index.js +6 -1
- package/tree/index.js +9 -9
- package/tree/vue.js +2 -2
- package/tree-node/index.js +1 -1
- package/tree-node/vue.js +1 -1
- package/tree-select/index.js +68 -22
- package/tree-select/vue.js +27 -3
- package/types/async-flowchart.type.d.ts +2 -14
- package/types/breadcrumb-item.type.d.ts +5 -1
- package/types/breadcrumb.type.d.ts +5 -1
- package/types/button-group.type.d.ts +5 -1
- package/types/button.type.d.ts +2 -2
- package/types/cascader.type.d.ts +6 -1
- package/types/date-table.type.d.ts +1 -120
- package/types/dropdown.type.d.ts +1 -1
- package/types/label.type.d.ts +1 -53
- package/types/loading.type.d.ts +12 -0
- package/types/numeric.type.d.ts +3 -22
- package/types/pager.type.d.ts +12 -7
- package/types/popconfirm.type.d.ts +2 -0
- package/types/steps.type.d.ts +1 -0
- package/types/tag-group.type.d.ts +2 -14
- package/types/tag.type.d.ts +4 -4
- package/types/tooltip.type.d.ts +3 -13
- package/types/transfer.type.d.ts +3 -0
- package/types/user-head.type.d.ts +0 -4
- package/upload/index.js +1 -1
- package/upload-list/index.js +1 -1
- package/upload-list/vue.js +4 -4
- package/user/index.js +7 -7
- package/user/vue.js +15 -2
- package/user-contact/vue.js +2 -2
- package/virtual-scroll-box/index.js +2 -2
- package/wizard/index.js +3 -3
- package/year-range/index.js +61 -11
- package/year-range/vue.js +33 -20
- package/year-table/index.js +10 -5
- package/avatar/index.js +0 -30
- package/avatar/vue.js +0 -22
- package/common/array.js +0 -115
- package/common/bigInt.js +0 -315
- package/common/browser.js +0 -81
- package/common/calendar/calendar.js +0 -97
- package/common/dataset/index.js +0 -99
- package/common/date.js +0 -354
- package/common/decimal.js +0 -155
- package/common/deps/ResizeObserver.js +0 -456
- package/common/deps/after-leave.js +0 -27
- package/common/deps/clickoutside.js +0 -75
- package/common/deps/date-util.js +0 -255
- package/common/deps/date.js +0 -286
- package/common/deps/debounce.js +0 -8
- package/common/deps/eSpaceCtrl.js +0 -304
- package/common/deps/fastdom/async.js +0 -41
- package/common/deps/fastdom/index.js +0 -9
- package/common/deps/fastdom/sandbox.js +0 -53
- package/common/deps/fastdom/singleton.js +0 -88
- package/common/deps/fullscreen/apis.js +0 -143
- package/common/deps/fullscreen/screenfull.js +0 -165
- package/common/deps/memorize.js +0 -124
- package/common/deps/observe-visibility.js +0 -106
- package/common/deps/popper.js +0 -616
- package/common/deps/repeat-click.js +0 -29
- package/common/deps/resize-event.js +0 -39
- package/common/deps/scroll-into-view.js +0 -29
- package/common/deps/scrollbar-width.js +0 -33
- package/common/deps/throttle.js +0 -45
- package/common/deps/touch-emulator.js +0 -103
- package/common/deps/touch.js +0 -37
- package/common/deps/tree-model/node.js +0 -475
- package/common/deps/tree-model/tree-store.js +0 -312
- package/common/deps/tree-model/util.js +0 -24
- package/common/deps/upload-ajax.js +0 -81
- package/common/deps/useEventListener.js +0 -54
- package/common/deps/useInstanceSlots.js +0 -22
- package/common/deps/useRect.js +0 -25
- package/common/deps/useRelation.js +0 -89
- package/common/deps/useTouch.js +0 -68
- package/common/deps/useUserAgent.js +0 -16
- package/common/deps/useWindowSize.js +0 -23
- package/common/deps/vue-emitter.js +0 -34
- package/common/deps/vue-popper.js +0 -180
- package/common/deps/vue-popup.js +0 -138
- package/common/event.js +0 -46
- package/common/form/const.js +0 -10
- package/common/function.js +0 -28
- package/common/global.js +0 -11
- package/common/index.js +0 -259
- package/common/object.js +0 -227
- package/common/prop-util.js +0 -43
- package/common/runtime.js +0 -79
- package/common/string.js +0 -417
- package/common/type.js +0 -66
- package/common/validate/index.js +0 -10
- package/common/validate/messages.js +0 -65
- package/common/validate/rules/enum.js +0 -12
- package/common/validate/rules/index.js +0 -18
- package/common/validate/rules/pattern.js +0 -20
- package/common/validate/rules/range.js +0 -52
- package/common/validate/rules/required.js +0 -11
- package/common/validate/rules/type.js +0 -100
- package/common/validate/rules/whitespace.js +0 -10
- package/common/validate/schema.js +0 -290
- package/common/validate/util.js +0 -211
- package/common/validate/validations/array.js +0 -22
- package/common/validate/validations/date.js +0 -31
- package/common/validate/validations/enum.js +0 -22
- package/common/validate/validations/float.js +0 -22
- package/common/validate/validations/index.js +0 -46
- package/common/validate/validations/integer.js +0 -22
- package/common/validate/validations/method.js +0 -21
- package/common/validate/validations/number.js +0 -25
- package/common/validate/validations/pattern.js +0 -21
- package/common/validate/validations/required.js +0 -11
- package/common/validate/validations/string.js +0 -33
- package/common/validate/validations/type.js +0 -29
- package/index-bar/index.js +0 -66
- package/index-bar/vue.js +0 -73
- package/index-bar-anchor/vue.js +0 -16
- package/label/index.js +0 -56
- package/label/vue.js +0 -26
- package/list/index.js +0 -13
- package/list/vue.js +0 -17
- package/mask/index.js +0 -13
- package/mask/vue.js +0 -18
- package/mini-picker/index.js +0 -165
- package/mini-picker/vue.js +0 -122
- package/multi-select/index.js +0 -394
- package/multi-select/vue.js +0 -113
- package/multi-select-item/index.js +0 -23
- package/multi-select-item/vue.js +0 -31
- package/toast/index.js +0 -7
- package/toast/vue.js +0 -19
- package/types/toast.type.d.ts +0 -63
- package/wheel/index.js +0 -165
- package/wheel/vue.js +0 -79
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import "../../chunk-G2ADBYYC.js";
|
|
2
|
-
import { on, isServer } from "./dom";
|
|
3
|
-
let width;
|
|
4
|
-
let height;
|
|
5
|
-
const useWindowSize = (ref) => () => {
|
|
6
|
-
if (!width) {
|
|
7
|
-
width = ref(0);
|
|
8
|
-
height = ref(0);
|
|
9
|
-
if (!isServer) {
|
|
10
|
-
const update = () => {
|
|
11
|
-
width.value = window.innerWidth;
|
|
12
|
-
height.value = window.innerHeight;
|
|
13
|
-
};
|
|
14
|
-
update();
|
|
15
|
-
on(window, "resize", update, { passive: true });
|
|
16
|
-
on(window, "orientationchange", update, { passive: true });
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return { width, height };
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
useWindowSize
|
|
23
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import "../../chunk-G2ADBYYC.js";
|
|
2
|
-
var vue_emitter_default = (vm) => {
|
|
3
|
-
const broadcast = (vm2, componentName, eventName, params) => {
|
|
4
|
-
vm2.$children.forEach((child) => {
|
|
5
|
-
const name = child.$options.componentName;
|
|
6
|
-
if (name === componentName) {
|
|
7
|
-
child.$emit(eventName, params);
|
|
8
|
-
} else {
|
|
9
|
-
broadcast(child, componentName, eventName, params);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
return {
|
|
14
|
-
dispatch(componentName, eventName, params) {
|
|
15
|
-
let parent = vm.$parent || vm.$root;
|
|
16
|
-
let name = parent.$options.componentName;
|
|
17
|
-
while (parent && !parent.$attrs.novalid && (!name || name !== componentName)) {
|
|
18
|
-
parent = parent.$parent;
|
|
19
|
-
if (parent) {
|
|
20
|
-
name = parent.$options.componentName;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (parent) {
|
|
24
|
-
parent.$emit.apply(parent, [eventName].concat(params));
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
broadcast(componentName, eventName, params) {
|
|
28
|
-
broadcast(vm, componentName, eventName, params);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
vue_emitter_default as default
|
|
34
|
-
};
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__spreadValues
|
|
3
|
-
} from "../../chunk-G2ADBYYC.js";
|
|
4
|
-
import PopupManager from "./popup-manager";
|
|
5
|
-
import PopperJS from "./popper";
|
|
6
|
-
import { on, off, isDisplayNone } from "./dom";
|
|
7
|
-
const stop = (e) => e.stopPropagation();
|
|
8
|
-
const isServer = typeof window === "undefined";
|
|
9
|
-
const getReference = ({ state, props, vm, slots }) => {
|
|
10
|
-
let reference = state.referenceElm || props.reference || vm.$refs.reference && vm.$refs.reference.$el || vm.$refs.reference;
|
|
11
|
-
if (!reference && slots.reference && slots.reference()[0]) {
|
|
12
|
-
state.referenceElm = slots.reference()[0].elm || slots.reference()[0].el;
|
|
13
|
-
reference = state.referenceElm;
|
|
14
|
-
}
|
|
15
|
-
return reference;
|
|
16
|
-
};
|
|
17
|
-
const getReferMaxZIndex = (reference) => {
|
|
18
|
-
if (!reference || !reference.nodeType)
|
|
19
|
-
return;
|
|
20
|
-
let getZIndex = (dom) => parseInt(window.getComputedStyle(dom).zIndex, 10) || 0;
|
|
21
|
-
let max = getZIndex(reference);
|
|
22
|
-
let z;
|
|
23
|
-
do {
|
|
24
|
-
reference = reference.parentNode;
|
|
25
|
-
if (reference && reference instanceof ShadowRoot && reference.host) {
|
|
26
|
-
reference = reference.host;
|
|
27
|
-
}
|
|
28
|
-
if (reference) {
|
|
29
|
-
z = getZIndex(reference);
|
|
30
|
-
} else {
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
max = z > max ? z : max;
|
|
34
|
-
} while (reference !== document.body);
|
|
35
|
-
return max + 1 + "";
|
|
36
|
-
};
|
|
37
|
-
var vue_popper_default = (options) => {
|
|
38
|
-
const {
|
|
39
|
-
parent,
|
|
40
|
-
emit,
|
|
41
|
-
nextTick,
|
|
42
|
-
onBeforeUnmount,
|
|
43
|
-
onDeactivated,
|
|
44
|
-
props,
|
|
45
|
-
watch,
|
|
46
|
-
reactive,
|
|
47
|
-
vm,
|
|
48
|
-
slots,
|
|
49
|
-
toRefs,
|
|
50
|
-
popperVmRef
|
|
51
|
-
} = options;
|
|
52
|
-
const state = reactive({
|
|
53
|
-
popperJS: null,
|
|
54
|
-
appended: false,
|
|
55
|
-
// arrow 是否添加
|
|
56
|
-
popperElm: null,
|
|
57
|
-
showPopper: props.manual ? Boolean(props.modelValue) : false,
|
|
58
|
-
referenceElm: null,
|
|
59
|
-
currentPlacement: ""
|
|
60
|
-
});
|
|
61
|
-
const appendArrow = (el) => {
|
|
62
|
-
if (state.appended) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
state.appended = true;
|
|
66
|
-
const div = document.createElement("div");
|
|
67
|
-
div.setAttribute("x-arrow", "");
|
|
68
|
-
div.className = "popper__arrow";
|
|
69
|
-
el.appendChild(div);
|
|
70
|
-
};
|
|
71
|
-
const followHide = (popperInstance) => {
|
|
72
|
-
const { followReferenceHide = true } = (props == null ? void 0 : props.popperOptions) || {};
|
|
73
|
-
const { _popper: popper, _reference: reference } = popperInstance;
|
|
74
|
-
if (followReferenceHide && isDisplayNone(reference)) {
|
|
75
|
-
popper.style.display = "none";
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const nextZIndex = (reference) => {
|
|
79
|
-
return props.zIndex === "relative" ? getReferMaxZIndex(reference) : PopupManager.nextZIndex();
|
|
80
|
-
};
|
|
81
|
-
const createPopper = (dom) => {
|
|
82
|
-
if (isServer) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
state.currentPlacement = state.currentPlacement || props.placement;
|
|
86
|
-
if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(state.currentPlacement)) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
const options2 = props.popperOptions || { gpuAcceleration: false };
|
|
90
|
-
state.popperElm = state.popperElm || props.popper || vm.$refs.popper || popperVmRef.popper || dom;
|
|
91
|
-
const popper = state.popperElm;
|
|
92
|
-
let reference = getReference({ state, props, vm, slots });
|
|
93
|
-
if (!popper || !reference || reference.nodeType !== Node.ELEMENT_NODE) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (props.visibleArrow) {
|
|
97
|
-
appendArrow(popper);
|
|
98
|
-
}
|
|
99
|
-
if (props.appendToBody || props.popperAppendToBody) {
|
|
100
|
-
document.body.appendChild(state.popperElm);
|
|
101
|
-
} else {
|
|
102
|
-
parent && parent.$el && parent.$el.appendChild(state.popperElm);
|
|
103
|
-
options2.forceAbsolute = true;
|
|
104
|
-
}
|
|
105
|
-
options2.placement = state.currentPlacement;
|
|
106
|
-
options2.offset = props.offset || 0;
|
|
107
|
-
options2.arrowOffset = props.arrowOffset || 0;
|
|
108
|
-
options2.adjustArrow = props.adjustArrow || false;
|
|
109
|
-
options2.appendToBody = props.appendToBody || props.popperAppendToBody;
|
|
110
|
-
state.popperJS = new PopperJS(reference, popper, options2);
|
|
111
|
-
emit("created", state);
|
|
112
|
-
if (typeof options2.onUpdate === "function") {
|
|
113
|
-
state.popperJS.onUpdate(options2.onUpdate);
|
|
114
|
-
}
|
|
115
|
-
state.popperJS._popper.style.zIndex = nextZIndex(state.popperJS._reference);
|
|
116
|
-
followHide(state.popperJS);
|
|
117
|
-
on(state.popperElm, "click", stop);
|
|
118
|
-
};
|
|
119
|
-
const updatePopper = (popperElmOrTrue) => {
|
|
120
|
-
if (popperElmOrTrue && popperElmOrTrue !== true) {
|
|
121
|
-
state.popperElm = popperElmOrTrue;
|
|
122
|
-
}
|
|
123
|
-
const popperJS = state.popperJS;
|
|
124
|
-
if (popperJS) {
|
|
125
|
-
popperJS._reference = getReference({ state, props, vm, slots });
|
|
126
|
-
popperJS.update();
|
|
127
|
-
if (popperJS._popper && popperElmOrTrue !== true) {
|
|
128
|
-
popperJS._popper.style.zIndex = nextZIndex(popperJS._reference);
|
|
129
|
-
followHide(state.popperJS);
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
createPopper(popperElmOrTrue && popperElmOrTrue !== true ? popperElmOrTrue : void 0);
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
const doDestroy = (forceDestroy) => {
|
|
136
|
-
if (!state.popperJS || state.showPopper && !forceDestroy) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
state.popperJS.destroy();
|
|
140
|
-
state.popperJS = null;
|
|
141
|
-
};
|
|
142
|
-
const destroyPopper = (remove) => {
|
|
143
|
-
if (remove) {
|
|
144
|
-
if (state.popperElm && state.popperElm.parentNode === document.body) {
|
|
145
|
-
off(state.popperElm, "click", stop);
|
|
146
|
-
state.popperElm.remove();
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
watch(
|
|
151
|
-
() => state.showPopper,
|
|
152
|
-
(val) => {
|
|
153
|
-
if (props.disabled) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
if (val) {
|
|
157
|
-
nextTick(updatePopper);
|
|
158
|
-
}
|
|
159
|
-
props.trigger === "manual" && emit("update:modelValue", val);
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
onBeforeUnmount(() => {
|
|
163
|
-
nextTick(() => {
|
|
164
|
-
doDestroy(true);
|
|
165
|
-
if (props.appendToBody || props.popperAppendToBody) {
|
|
166
|
-
destroyPopper("remove");
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
onDeactivated(() => {
|
|
171
|
-
doDestroy(true);
|
|
172
|
-
if (props.appendToBody || props.popperAppendToBody) {
|
|
173
|
-
destroyPopper("remove");
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
return __spreadValues({ updatePopper, destroyPopper, doDestroy }, toRefs(state));
|
|
177
|
-
};
|
|
178
|
-
export {
|
|
179
|
-
vue_popper_default as default
|
|
180
|
-
};
|
package/common/deps/vue-popup.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__spreadValues
|
|
3
|
-
} from "../../chunk-G2ADBYYC.js";
|
|
4
|
-
import { merge } from "../object";
|
|
5
|
-
import PopupManager from "./popup-manager";
|
|
6
|
-
import { addClass } from "./dom";
|
|
7
|
-
let idSeed = 1;
|
|
8
|
-
const isServer = typeof window === "undefined";
|
|
9
|
-
const setWatchFn = ({
|
|
10
|
-
onMounted,
|
|
11
|
-
onBeforeUnmount,
|
|
12
|
-
watch,
|
|
13
|
-
vm,
|
|
14
|
-
api,
|
|
15
|
-
props,
|
|
16
|
-
state,
|
|
17
|
-
nextTick
|
|
18
|
-
}) => {
|
|
19
|
-
onMounted(() => {
|
|
20
|
-
vm._popupId = `popup-${idSeed++}`;
|
|
21
|
-
PopupManager.register(vm._popupId, vm);
|
|
22
|
-
});
|
|
23
|
-
onBeforeUnmount(() => {
|
|
24
|
-
PopupManager.deregister(vm._popupId);
|
|
25
|
-
PopupManager.closeModal(vm._popupId);
|
|
26
|
-
});
|
|
27
|
-
watch(
|
|
28
|
-
() => props.visible,
|
|
29
|
-
(val) => {
|
|
30
|
-
if (val) {
|
|
31
|
-
if (vm._opening) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (state.rendered) {
|
|
35
|
-
api.open();
|
|
36
|
-
} else {
|
|
37
|
-
state.rendered = true;
|
|
38
|
-
nextTick(() => {
|
|
39
|
-
api.open();
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
api.close();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
const openFn = ({ state, vm }) => (options) => {
|
|
49
|
-
if (!state.rendered) {
|
|
50
|
-
state.rendered = true;
|
|
51
|
-
}
|
|
52
|
-
const props = merge({}, vm.$props || vm, options);
|
|
53
|
-
if (vm._closeTimer) {
|
|
54
|
-
clearTimeout(vm._closeTimer);
|
|
55
|
-
vm._closeTimer = null;
|
|
56
|
-
}
|
|
57
|
-
clearTimeout(vm._openTimer);
|
|
58
|
-
const doOpen = () => {
|
|
59
|
-
if (isServer || state.opened) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
vm._opening = true;
|
|
63
|
-
const dom = vm.$el;
|
|
64
|
-
const modal = props.modal;
|
|
65
|
-
const zIndex = props.zIndex;
|
|
66
|
-
if (zIndex) {
|
|
67
|
-
PopupManager.zIndex = zIndex;
|
|
68
|
-
}
|
|
69
|
-
if (modal) {
|
|
70
|
-
if (vm._closing) {
|
|
71
|
-
PopupManager.closeModal(vm._popupId);
|
|
72
|
-
vm._closing = false;
|
|
73
|
-
}
|
|
74
|
-
PopupManager.openModal(
|
|
75
|
-
vm._popupId,
|
|
76
|
-
PopupManager.nextZIndex(),
|
|
77
|
-
props.modalAppendToBody ? void 0 : dom,
|
|
78
|
-
props.modalClass,
|
|
79
|
-
props.modalFade
|
|
80
|
-
);
|
|
81
|
-
if (props.lockScroll) {
|
|
82
|
-
PopupManager.fixBodyBorder();
|
|
83
|
-
addClass(document.body, PopupManager.popLockClass);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (getComputedStyle(dom).position === "static") {
|
|
87
|
-
dom.style.position = "absolute";
|
|
88
|
-
}
|
|
89
|
-
dom.style.zIndex = PopupManager.nextZIndex().toString();
|
|
90
|
-
state.opened = true;
|
|
91
|
-
vm._opening = false;
|
|
92
|
-
};
|
|
93
|
-
const openDelay = Number(props.openDelay);
|
|
94
|
-
if (openDelay > 0) {
|
|
95
|
-
vm._openTimer = setTimeout(() => {
|
|
96
|
-
vm._openTimer = null;
|
|
97
|
-
doOpen();
|
|
98
|
-
}, openDelay);
|
|
99
|
-
} else {
|
|
100
|
-
doOpen();
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
const closeFn = ({ state, vm }) => () => {
|
|
104
|
-
if (vm._openTimer !== null) {
|
|
105
|
-
clearTimeout(vm._openTimer);
|
|
106
|
-
vm._openTimer = null;
|
|
107
|
-
}
|
|
108
|
-
clearTimeout(vm._closeTimer);
|
|
109
|
-
const doClose = () => {
|
|
110
|
-
vm._closing = true;
|
|
111
|
-
state.opened = false;
|
|
112
|
-
PopupManager.closeModal(vm._popupId);
|
|
113
|
-
vm._closing = false;
|
|
114
|
-
};
|
|
115
|
-
const closeDelay = Number(vm.closeDelay);
|
|
116
|
-
if (closeDelay > 0) {
|
|
117
|
-
vm._closeTimer = setTimeout(() => {
|
|
118
|
-
vm._closeTimer = null;
|
|
119
|
-
doClose();
|
|
120
|
-
}, closeDelay);
|
|
121
|
-
} else {
|
|
122
|
-
doClose();
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
var vue_popup_default = (options) => {
|
|
126
|
-
const { api, nextTick, onBeforeUnmount, onMounted, props, reactive, toRefs, vm, watch } = options;
|
|
127
|
-
const state = reactive({
|
|
128
|
-
opened: false,
|
|
129
|
-
rendered: false
|
|
130
|
-
});
|
|
131
|
-
setWatchFn({ onMounted, onBeforeUnmount, watch, vm, api, props, state, nextTick });
|
|
132
|
-
const open = openFn({ state, vm });
|
|
133
|
-
const close = closeFn({ state, vm });
|
|
134
|
-
return __spreadValues({ open, close, PopupManager }, toRefs(state));
|
|
135
|
-
};
|
|
136
|
-
export {
|
|
137
|
-
vue_popup_default as default
|
|
138
|
-
};
|
package/common/event.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
const emitEvent = (emit, name, ...args) => {
|
|
3
|
-
let cancel = false;
|
|
4
|
-
if (typeof emit === "function" && typeof name === "string") {
|
|
5
|
-
const event = document.createEvent("HTMLEvents");
|
|
6
|
-
event.initEvent(name, false, true);
|
|
7
|
-
event.preventDefault = () => {
|
|
8
|
-
cancel = true;
|
|
9
|
-
};
|
|
10
|
-
args.unshift(event);
|
|
11
|
-
args.unshift(name);
|
|
12
|
-
emit.apply(null, args);
|
|
13
|
-
}
|
|
14
|
-
return !cancel;
|
|
15
|
-
};
|
|
16
|
-
const getActualTarget = (e) => {
|
|
17
|
-
if (!e || !e.target) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
return e.target.shadowRoot && e.composed ? e.composedPath()[0] || e.target : e.target;
|
|
21
|
-
};
|
|
22
|
-
const correctTarget = (event, target) => {
|
|
23
|
-
let newTarget;
|
|
24
|
-
if (event.target === null && target) {
|
|
25
|
-
newTarget = target;
|
|
26
|
-
} else {
|
|
27
|
-
const nodeList = event.composedPath();
|
|
28
|
-
if (event.target !== nodeList[0]) {
|
|
29
|
-
newTarget = nodeList[0];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (newTarget) {
|
|
33
|
-
Object.defineProperty(event, "target", {
|
|
34
|
-
get() {
|
|
35
|
-
return newTarget;
|
|
36
|
-
},
|
|
37
|
-
enumerable: true,
|
|
38
|
-
configurable: true
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
correctTarget,
|
|
44
|
-
emitEvent,
|
|
45
|
-
getActualTarget
|
|
46
|
-
};
|
package/common/form/const.js
DELETED
package/common/function.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import { isPromise } from "./type";
|
|
3
|
-
const noop = () => {
|
|
4
|
-
};
|
|
5
|
-
const callInterceptor = (interceptor, { args = [], done, canceled, error }) => {
|
|
6
|
-
if (interceptor) {
|
|
7
|
-
const returnVal = interceptor(...args);
|
|
8
|
-
if (isPromise(returnVal)) {
|
|
9
|
-
returnVal.then((value) => {
|
|
10
|
-
if (value) {
|
|
11
|
-
done();
|
|
12
|
-
} else if (canceled) {
|
|
13
|
-
canceled();
|
|
14
|
-
}
|
|
15
|
-
}).catch(error || noop);
|
|
16
|
-
} else if (returnVal) {
|
|
17
|
-
done();
|
|
18
|
-
} else if (canceled) {
|
|
19
|
-
canceled();
|
|
20
|
-
}
|
|
21
|
-
} else {
|
|
22
|
-
done();
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
callInterceptor,
|
|
27
|
-
noop
|
|
28
|
-
};
|
package/common/global.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
const globalConfig = {
|
|
3
|
-
viewportWindow: null
|
|
4
|
-
// 获取真实视口的window,解决在微前端中某些bug
|
|
5
|
-
};
|
|
6
|
-
const getViewportWindow = () => globalConfig.viewportWindow || window;
|
|
7
|
-
var global_default = globalConfig;
|
|
8
|
-
export {
|
|
9
|
-
global_default as default,
|
|
10
|
-
getViewportWindow
|
|
11
|
-
};
|