vue-devui 1.0.0-pre.0 → 1.0.0-rc.10
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/README.md +149 -187
- package/alert/index.es.js +74 -45
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +8182 -296
- package/auto-complete/index.umd.js +29 -1
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +153 -146
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +30 -5
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5741 -127
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +59 -35
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +8060 -255
- package/checkbox/index.umd.js +27 -1
- package/checkbox/style.css +1 -1
- package/{accordion → collapse}/index.d.ts +0 -0
- package/collapse/index.es.js +379 -0
- package/collapse/index.umd.js +1 -0
- package/{anchor → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.es.js +5 -7
- package/countdown/index.umd.js +1 -1
- package/date-picker/index.es.js +8159 -288
- package/date-picker/index.umd.js +27 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +31 -4
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +297 -181
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +525 -154
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +1039 -1175
- package/form/index.umd.js +15 -15
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +42 -21
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +101 -86
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +197 -56
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +55 -31
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +8066 -144
- package/input/index.umd.js +27 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +269 -183
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +40 -25
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +74 -35
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/modal/index.es.js +412 -204
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +307 -57
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/RadioButton.js +3 -0
- package/nuxt/components/Tab.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/autoCompleteProps.js +3 -0
- package/nuxt/components/avatarProps.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/cardProps.js +3 -0
- package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
- package/nuxt/components/checkboxGroupProps.js +3 -0
- package/nuxt/components/checkboxProps.js +3 -0
- package/nuxt/components/colProps.js +3 -0
- package/nuxt/components/colPropsBaseClass.js +3 -0
- package/nuxt/components/colPropsBaseStyle.js +3 -0
- package/nuxt/components/collapseItemProps.js +3 -0
- package/nuxt/components/collapseProps.js +3 -0
- package/nuxt/components/countdownProps.js +3 -0
- package/nuxt/components/editableSelectProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +3 -0
- package/nuxt/components/imagePreviewProps.js +3 -0
- package/nuxt/components/inputProps.js +3 -0
- package/nuxt/components/loadingProps.js +3 -0
- package/nuxt/components/modalProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/progressProps.js +3 -0
- package/nuxt/components/rateProps.js +3 -0
- package/nuxt/components/resultProps.js +3 -0
- package/nuxt/components/rowProps.js +3 -0
- package/nuxt/components/screenSizes.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/skeletonProps.js +3 -0
- package/nuxt/components/sliderProps.js +3 -0
- package/nuxt/components/splitterProps.js +3 -0
- package/nuxt/components/statisticProps.js +3 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/nuxt/components/switchProps.js +3 -0
- package/nuxt/components/tabsProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/nuxt/components/textareaProps.js +3 -0
- package/nuxt/components/timeAxisProps.js +3 -0
- package/nuxt/components/treeProps.js +3 -0
- package/overlay/index.es.js +127 -149
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +10 -44
- package/pagination/index.es.js +158 -148
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.es.js +317 -246
- package/popover/index.umd.js +15 -15
- package/popover/style.css +1 -1
- package/progress/index.es.js +110 -56
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +7964 -157
- package/radio/index.umd.js +27 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +77 -55
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +184 -57
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/ripple/index.es.js +47 -42
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +3644 -1122
- package/search/index.umd.js +18 -18
- package/search/style.css +1 -1
- package/select/index.es.js +9144 -597
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +63 -41
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +109 -75
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +469 -349
- package/splitter/index.umd.js +15 -15
- package/splitter/style.css +1 -1
- package/statistic/index.es.js +7 -18
- package/statistic/index.umd.js +1 -1
- package/status/index.es.js +27 -6
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +7794 -64
- package/switch/index.umd.js +27 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +10119 -1206
- package/table/index.umd.js +27 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +342 -141
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +49 -24
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +7913 -83
- package/textarea/index.umd.js +35 -1
- package/textarea/style.css +1 -1
- package/{anchor → timeline}/index.d.ts +0 -0
- package/timeline/index.es.js +425 -0
- package/timeline/index.umd.js +1 -0
- package/{back-top → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +308 -236
- package/tooltip/index.umd.js +15 -15
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +4189 -1851
- package/tree/index.umd.js +18 -18
- package/tree/style.css +1 -1
- package/upload/index.es.js +380 -123
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +18121 -23161
- package/vue-devui.umd.js +25 -15
- package/accordion/index.es.js +0 -720
- package/accordion/index.umd.js +0 -1
- package/accordion/package.json +0 -7
- package/accordion/style.css +0 -1
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/style.css +0 -1
- package/back-top/index.d.ts +0 -7
- package/back-top/index.es.js +0 -128
- package/back-top/index.umd.js +0 -1
- package/back-top/style.css +0 -1
- package/breadcrumb/index.d.ts +0 -7
- package/breadcrumb/index.es.js +0 -127
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/package.json +0 -7
- package/breadcrumb/style.css +0 -1
- package/carousel/index.d.ts +0 -7
- package/carousel/index.es.js +0 -329
- package/carousel/index.umd.js +0 -1
- package/carousel/package.json +0 -7
- package/carousel/style.css +0 -1
- package/cascader/index.d.ts +0 -7
- package/cascader/index.es.js +0 -5963
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.d.ts +0 -7
- package/color-picker/index.es.js +0 -8187
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/comment/index.d.ts +0 -7
- package/comment/index.es.js +0 -86
- package/comment/index.umd.js +0 -1
- package/comment/package.json +0 -7
- package/comment/style.css +0 -1
- package/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/package.json +0 -7
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -331
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/list/index.d.ts +0 -7
- package/list/index.es.js +0 -39
- package/list/index.umd.js +0 -1
- package/list/package.json +0 -7
- package/list/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/List.js +0 -3
- package/nuxt/components/ListItem.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/TagInput.js +0 -3
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/TimePicker.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/overlayEmits.js +0 -3
- package/nuxt/components/overlayProps.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -258
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -239
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/tag-input/index.d.ts +0 -7
- package/tag-input/index.es.js +0 -329
- package/tag-input/index.umd.js +0 -1
- package/tag-input/package.json +0 -7
- package/tag-input/style.css +0 -1
- package/time-axis/index.d.ts +0 -7
- package/time-axis/index.es.js +0 -299
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1237
- package/time-picker/index.umd.js +0 -1
- package/time-picker/package.json +0 -7
- package/time-picker/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7608
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -623
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/popover/index.es.js
CHANGED
|
@@ -1,76 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, nextTick, unref, mergeProps, toRefs, Fragment } from "vue";
|
|
21
|
-
import { offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
22
|
-
var overlay = "";
|
|
23
|
-
function _isSlot(s) {
|
|
24
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
25
|
-
}
|
|
26
|
-
const CommonOverlay = defineComponent({
|
|
27
|
-
setup(props, ctx) {
|
|
28
|
-
return () => {
|
|
29
|
-
let _slot;
|
|
30
|
-
return createVNode(Teleport, {
|
|
31
|
-
"to": "#d-overlay-anchor"
|
|
32
|
-
}, {
|
|
33
|
-
default: () => [createVNode(Transition, {
|
|
34
|
-
"name": "devui-overlay-fade"
|
|
35
|
-
}, _isSlot(_slot = renderSlot(ctx.slots, "default")) ? _slot : {
|
|
36
|
-
default: () => [_slot]
|
|
37
|
-
})]
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
const overlayProps = {
|
|
43
|
-
visible: {
|
|
44
|
-
type: Boolean
|
|
45
|
-
},
|
|
46
|
-
backgroundBlock: {
|
|
1
|
+
import { watch, onUnmounted, defineComponent, toRefs, createVNode, Transition, mergeProps, ref, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, provide, Teleport } from "vue";
|
|
2
|
+
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
3
|
+
const fixedOverlayProps = {
|
|
4
|
+
modelValue: {
|
|
47
5
|
type: Boolean,
|
|
48
6
|
default: false
|
|
49
7
|
},
|
|
50
|
-
|
|
51
|
-
type: String,
|
|
52
|
-
default: ""
|
|
53
|
-
},
|
|
54
|
-
backgroundStyle: {
|
|
55
|
-
type: [String, Object]
|
|
56
|
-
},
|
|
57
|
-
onBackdropClick: {
|
|
58
|
-
type: Function
|
|
59
|
-
},
|
|
60
|
-
backdropClose: {
|
|
8
|
+
lockScroll: {
|
|
61
9
|
type: Boolean,
|
|
62
10
|
default: true
|
|
63
11
|
},
|
|
64
|
-
|
|
12
|
+
closeOnClickOverlay: {
|
|
65
13
|
type: Boolean,
|
|
66
14
|
default: true
|
|
67
15
|
}
|
|
68
16
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
17
|
+
function lockScroll() {
|
|
18
|
+
if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
|
|
19
|
+
const scrollTop = document.documentElement.scrollTop;
|
|
20
|
+
const style = document.documentElement.getAttribute("style");
|
|
21
|
+
document.documentElement.style.position = "fixed";
|
|
22
|
+
document.documentElement.style.top = `-${scrollTop}px`;
|
|
23
|
+
document.documentElement.style.width = document.documentElement.style.width || "100%";
|
|
24
|
+
document.documentElement.style.overflowY = "scroll";
|
|
25
|
+
return () => {
|
|
26
|
+
if (style) {
|
|
27
|
+
document.documentElement.setAttribute("style", style);
|
|
28
|
+
} else {
|
|
29
|
+
document.documentElement.removeAttribute("style");
|
|
30
|
+
}
|
|
31
|
+
document.documentElement.scrollTop = scrollTop;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
function useFixedOverlay(props, ctx) {
|
|
37
|
+
let lockScrollCb;
|
|
38
|
+
const onClick = (event) => {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
ctx.emit("click", event);
|
|
41
|
+
if (props.closeOnClickOverlay) {
|
|
42
|
+
ctx.emit("update:modelValue", false);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const removeBodyAdditions = () => {
|
|
46
|
+
lockScrollCb == null ? void 0 : lockScrollCb();
|
|
47
|
+
};
|
|
48
|
+
watch(() => props.modelValue, (val) => {
|
|
49
|
+
if (val) {
|
|
50
|
+
props.lockScroll && (lockScrollCb = lockScroll());
|
|
51
|
+
} else {
|
|
52
|
+
removeBodyAdditions();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
onUnmounted(removeBodyAdditions);
|
|
56
|
+
return { onClick };
|
|
57
|
+
}
|
|
58
|
+
function createBem(namespace, element, modifier) {
|
|
59
|
+
let cls = namespace;
|
|
60
|
+
if (element) {
|
|
61
|
+
cls += `__${element}`;
|
|
62
|
+
}
|
|
63
|
+
if (modifier) {
|
|
64
|
+
cls += `--${modifier}`;
|
|
65
|
+
}
|
|
66
|
+
return cls;
|
|
67
|
+
}
|
|
68
|
+
function useNamespace(block, needDot = false) {
|
|
69
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
70
|
+
const b = () => createBem(namespace);
|
|
71
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
72
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
73
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
74
|
+
return {
|
|
75
|
+
b,
|
|
76
|
+
e,
|
|
77
|
+
m,
|
|
78
|
+
em
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
var fixedOverlay = "";
|
|
82
|
+
defineComponent({
|
|
83
|
+
name: "DFixedOverlay",
|
|
84
|
+
inheritAttrs: false,
|
|
85
|
+
props: fixedOverlayProps,
|
|
86
|
+
emits: ["update:modelValue", "click"],
|
|
87
|
+
setup(props, ctx) {
|
|
88
|
+
const {
|
|
89
|
+
modelValue
|
|
90
|
+
} = toRefs(props);
|
|
91
|
+
const ns2 = useNamespace("fixed-overlay");
|
|
92
|
+
const {
|
|
93
|
+
onClick
|
|
94
|
+
} = useFixedOverlay(props, ctx);
|
|
95
|
+
return () => createVNode(Transition, {
|
|
96
|
+
"name": ns2.m("fade")
|
|
97
|
+
}, {
|
|
98
|
+
default: () => {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
return [modelValue.value && createVNode("div", mergeProps({
|
|
101
|
+
"class": ns2.b()
|
|
102
|
+
}, ctx.attrs, {
|
|
103
|
+
"onClick": onClick
|
|
104
|
+
}), [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
74
107
|
}
|
|
75
108
|
});
|
|
76
109
|
const flexibleOverlayProps = {
|
|
@@ -90,6 +123,9 @@ const flexibleOverlayProps = {
|
|
|
90
123
|
type: [Number, Object],
|
|
91
124
|
default: 8
|
|
92
125
|
},
|
|
126
|
+
shiftOffset: {
|
|
127
|
+
type: Number
|
|
128
|
+
},
|
|
93
129
|
align: {
|
|
94
130
|
type: String,
|
|
95
131
|
default: null
|
|
@@ -103,80 +139,6 @@ const flexibleOverlayProps = {
|
|
|
103
139
|
default: true
|
|
104
140
|
}
|
|
105
141
|
};
|
|
106
|
-
function useOverlayLogic(props, ctx) {
|
|
107
|
-
const backgroundClass = computed(() => {
|
|
108
|
-
return [
|
|
109
|
-
"devui-overlay-background",
|
|
110
|
-
props.backgroundClass,
|
|
111
|
-
!props.hasBackdrop ? "devui-overlay-background__disabled" : "devui-overlay-background__color"
|
|
112
|
-
];
|
|
113
|
-
});
|
|
114
|
-
const overlayClass = computed(() => {
|
|
115
|
-
return "devui-overlay";
|
|
116
|
-
});
|
|
117
|
-
const handleBackdropClick = (event) => {
|
|
118
|
-
var _a;
|
|
119
|
-
event.preventDefault();
|
|
120
|
-
(_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
|
|
121
|
-
if (props.backdropClose) {
|
|
122
|
-
ctx.emit("update:visible", false);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
const handleOverlayBubbleCancel = (event) => event.cancelBubble = true;
|
|
126
|
-
onMounted(() => {
|
|
127
|
-
const body = document.body;
|
|
128
|
-
const originOverflow = body.style.overflow;
|
|
129
|
-
const originPosition = body.style.position;
|
|
130
|
-
watch([() => props.visible, () => props.backgroundBlock], ([visible, backgroundBlock]) => {
|
|
131
|
-
if (backgroundBlock) {
|
|
132
|
-
const top = body.getBoundingClientRect().y;
|
|
133
|
-
if (visible) {
|
|
134
|
-
body.style.overflowY = "scroll";
|
|
135
|
-
body.style.position = visible ? "fixed" : "";
|
|
136
|
-
body.style.top = `${top}px`;
|
|
137
|
-
} else {
|
|
138
|
-
body.style.overflowY = originOverflow;
|
|
139
|
-
body.style.position = originPosition;
|
|
140
|
-
body.style.top = "";
|
|
141
|
-
window.scrollTo(0, -top);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
onUnmounted(() => {
|
|
146
|
-
document.body.style.overflow = originOverflow;
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
return {
|
|
150
|
-
backgroundClass,
|
|
151
|
-
overlayClass,
|
|
152
|
-
handleBackdropClick,
|
|
153
|
-
handleOverlayBubbleCancel
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
defineComponent({
|
|
157
|
-
name: "DFixedOverlay",
|
|
158
|
-
props: fixedOverlayProps,
|
|
159
|
-
emits: overlayEmits,
|
|
160
|
-
setup(props, ctx) {
|
|
161
|
-
const {
|
|
162
|
-
backgroundClass,
|
|
163
|
-
overlayClass,
|
|
164
|
-
handleBackdropClick,
|
|
165
|
-
handleOverlayBubbleCancel
|
|
166
|
-
} = useOverlayLogic(props, ctx);
|
|
167
|
-
return () => createVNode(CommonOverlay, null, {
|
|
168
|
-
default: () => [props.visible && createVNode("div", {
|
|
169
|
-
"class": backgroundClass.value,
|
|
170
|
-
"style": props.backgroundStyle,
|
|
171
|
-
"onClick": handleBackdropClick
|
|
172
|
-
}, [createVNode("div", {
|
|
173
|
-
"class": overlayClass.value,
|
|
174
|
-
"style": props.overlayStyle,
|
|
175
|
-
"onClick": handleOverlayBubbleCancel
|
|
176
|
-
}, [renderSlot(ctx.slots, "default")])])]
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
142
|
function getScrollParent(element) {
|
|
181
143
|
const overflowRegex = /(auto|scroll|hidden)/;
|
|
182
144
|
for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
|
|
@@ -209,6 +171,7 @@ function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
|
209
171
|
function useOverlay(props, emit) {
|
|
210
172
|
const overlayRef = ref();
|
|
211
173
|
const arrowRef = ref();
|
|
174
|
+
let originParent = null;
|
|
212
175
|
const updateArrowPosition = (arrowEl, placement, point, overlayEl) => {
|
|
213
176
|
const { x, y } = adjustArrowPosition(props.isArrowCenter, point, placement, overlayEl.getBoundingClientRect());
|
|
214
177
|
const staticSide = {
|
|
@@ -237,34 +200,43 @@ function useOverlay(props, emit) {
|
|
|
237
200
|
})
|
|
238
201
|
];
|
|
239
202
|
props.showArrow && middleware.push(arrow({ element: arrowEl }));
|
|
203
|
+
props.shiftOffset !== void 0 && middleware.push(shift());
|
|
240
204
|
const { x, y, placement, middlewareData } = await computePosition(hostEl, overlayEl, {
|
|
241
205
|
strategy: "fixed",
|
|
242
206
|
middleware
|
|
243
207
|
});
|
|
208
|
+
let applyX = x;
|
|
209
|
+
let applyY = y;
|
|
210
|
+
if (props.shiftOffset !== void 0) {
|
|
211
|
+
const { x: shiftX, y: shiftY } = middlewareData.shift;
|
|
212
|
+
shiftX < 0 && (applyX -= props.shiftOffset);
|
|
213
|
+
shiftX > 0 && (applyX += props.shiftOffset);
|
|
214
|
+
shiftY < 0 && (applyY -= props.shiftOffset);
|
|
215
|
+
shiftY > 0 && (applyY += props.shiftOffset);
|
|
216
|
+
}
|
|
244
217
|
emit("positionChange", placement);
|
|
245
|
-
Object.assign(overlayEl.style, { top: `${
|
|
218
|
+
Object.assign(overlayEl.style, { top: `${applyY}px`, left: `${applyX}px` });
|
|
246
219
|
props.showArrow && updateArrowPosition(arrowEl, placement, middlewareData.arrow, overlayEl);
|
|
247
220
|
};
|
|
248
221
|
watch(() => props.modelValue, () => {
|
|
249
|
-
const originParent = getScrollParent(props.origin);
|
|
250
222
|
if (props.modelValue && props.origin) {
|
|
223
|
+
originParent = getScrollParent(props.origin);
|
|
251
224
|
nextTick(updatePosition);
|
|
252
|
-
originParent.addEventListener("scroll", updatePosition);
|
|
225
|
+
originParent == null ? void 0 : originParent.addEventListener("scroll", updatePosition);
|
|
253
226
|
originParent !== window && window.addEventListener("scroll", updatePosition);
|
|
254
227
|
window.addEventListener("resize", updatePosition);
|
|
255
228
|
} else {
|
|
256
|
-
originParent.removeEventListener("scroll", updatePosition);
|
|
229
|
+
originParent == null ? void 0 : originParent.removeEventListener("scroll", updatePosition);
|
|
257
230
|
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
258
231
|
window.removeEventListener("resize", updatePosition);
|
|
259
232
|
}
|
|
260
233
|
});
|
|
261
234
|
onUnmounted(() => {
|
|
262
|
-
|
|
263
|
-
originParent.removeEventListener("scroll", updatePosition);
|
|
235
|
+
originParent == null ? void 0 : originParent.removeEventListener("scroll", updatePosition);
|
|
264
236
|
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
265
237
|
window.removeEventListener("resize", updatePosition);
|
|
266
238
|
});
|
|
267
|
-
return { arrowRef, overlayRef };
|
|
239
|
+
return { arrowRef, overlayRef, updatePosition };
|
|
268
240
|
}
|
|
269
241
|
var flexibleOverlay = "";
|
|
270
242
|
const FlexibleOverlay = defineComponent({
|
|
@@ -275,24 +247,86 @@ const FlexibleOverlay = defineComponent({
|
|
|
275
247
|
setup(props, {
|
|
276
248
|
slots,
|
|
277
249
|
attrs,
|
|
278
|
-
emit
|
|
250
|
+
emit,
|
|
251
|
+
expose
|
|
279
252
|
}) {
|
|
253
|
+
const ns2 = useNamespace("flexible-overlay");
|
|
280
254
|
const {
|
|
281
255
|
arrowRef,
|
|
282
|
-
overlayRef
|
|
256
|
+
overlayRef,
|
|
257
|
+
updatePosition
|
|
283
258
|
} = useOverlay(props, emit);
|
|
259
|
+
expose({
|
|
260
|
+
updatePosition
|
|
261
|
+
});
|
|
284
262
|
return () => {
|
|
285
263
|
var _a;
|
|
286
264
|
return props.modelValue && createVNode("div", mergeProps({
|
|
287
265
|
"ref": overlayRef,
|
|
288
|
-
"class":
|
|
266
|
+
"class": ns2.b()
|
|
289
267
|
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), props.showArrow && createVNode("div", {
|
|
290
268
|
"ref": arrowRef,
|
|
291
|
-
"class": "
|
|
269
|
+
"class": ns2.e("arrow")
|
|
292
270
|
}, null)]);
|
|
293
271
|
};
|
|
294
272
|
}
|
|
295
273
|
});
|
|
274
|
+
const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
|
|
275
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
276
|
+
const ns$1 = useNamespace("popper-trigger");
|
|
277
|
+
function wrapContent(content) {
|
|
278
|
+
return h("span", { class: ns$1.b() }, content);
|
|
279
|
+
}
|
|
280
|
+
function getFirstValidChild(nodes) {
|
|
281
|
+
for (const child of nodes) {
|
|
282
|
+
if (isObject(child)) {
|
|
283
|
+
if (child.type === Comment) {
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
if (child.type === "svg" || child.type === Text) {
|
|
287
|
+
return wrapContent(child);
|
|
288
|
+
}
|
|
289
|
+
if (child.type === Fragment) {
|
|
290
|
+
return getFirstValidChild(child.children);
|
|
291
|
+
}
|
|
292
|
+
return child;
|
|
293
|
+
}
|
|
294
|
+
return wrapContent(child);
|
|
295
|
+
}
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
var PopperTrigger = defineComponent({
|
|
299
|
+
name: "DPopperTrigger",
|
|
300
|
+
setup(_, ctx) {
|
|
301
|
+
const {
|
|
302
|
+
slots,
|
|
303
|
+
attrs
|
|
304
|
+
} = ctx;
|
|
305
|
+
return () => {
|
|
306
|
+
var _a;
|
|
307
|
+
const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots, attrs);
|
|
308
|
+
const triggerRef = inject(POPPER_TRIGGER_TOKEN);
|
|
309
|
+
if (!defaultSlot) {
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
312
|
+
const firstValidChild = getFirstValidChild(defaultSlot);
|
|
313
|
+
if (!firstValidChild) {
|
|
314
|
+
return null;
|
|
315
|
+
}
|
|
316
|
+
return withDirectives(cloneVNode(firstValidChild, attrs), [[{
|
|
317
|
+
mounted(el) {
|
|
318
|
+
triggerRef.value = el;
|
|
319
|
+
},
|
|
320
|
+
updated(el) {
|
|
321
|
+
triggerRef.value = el;
|
|
322
|
+
},
|
|
323
|
+
unmounted() {
|
|
324
|
+
triggerRef.value = null;
|
|
325
|
+
}
|
|
326
|
+
}]]);
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
});
|
|
296
330
|
const popoverProps = {
|
|
297
331
|
isOpen: {
|
|
298
332
|
type: Boolean,
|
|
@@ -333,6 +367,10 @@ const popoverProps = {
|
|
|
333
367
|
mouseLeaveDelay: {
|
|
334
368
|
type: Number,
|
|
335
369
|
default: 100
|
|
370
|
+
},
|
|
371
|
+
disabled: {
|
|
372
|
+
type: Boolean,
|
|
373
|
+
default: false
|
|
336
374
|
}
|
|
337
375
|
};
|
|
338
376
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -1032,7 +1070,7 @@ var lodash = { exports: {} };
|
|
|
1032
1070
|
}
|
|
1033
1071
|
var runInContext = function runInContext2(context) {
|
|
1034
1072
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
1035
|
-
var Array2 = context.Array, Date = context.Date,
|
|
1073
|
+
var Array2 = context.Array, Date = context.Date, Error = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError = context.TypeError;
|
|
1036
1074
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
1037
1075
|
var coreJsData = context["__core-js_shared__"];
|
|
1038
1076
|
var funcToString = funcProto.toString;
|
|
@@ -1046,7 +1084,7 @@ var lodash = { exports: {} };
|
|
|
1046
1084
|
var objectCtorString = funcToString.call(Object2);
|
|
1047
1085
|
var oldDash = root._;
|
|
1048
1086
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
1049
|
-
var
|
|
1087
|
+
var Buffer = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
|
|
1050
1088
|
var defineProperty = function() {
|
|
1051
1089
|
try {
|
|
1052
1090
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -1056,12 +1094,12 @@ var lodash = { exports: {} };
|
|
|
1056
1094
|
}
|
|
1057
1095
|
}();
|
|
1058
1096
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
1059
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer =
|
|
1060
|
-
var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"),
|
|
1061
|
-
var metaMap =
|
|
1097
|
+
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
1098
|
+
var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
1099
|
+
var metaMap = WeakMap && new WeakMap();
|
|
1062
1100
|
var realNames = {};
|
|
1063
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(
|
|
1064
|
-
var symbolProto =
|
|
1101
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
|
1102
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
1065
1103
|
function lodash2(value) {
|
|
1066
1104
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
1067
1105
|
if (value instanceof LodashWrapper) {
|
|
@@ -1077,7 +1115,7 @@ var lodash = { exports: {} };
|
|
|
1077
1115
|
function object() {
|
|
1078
1116
|
}
|
|
1079
1117
|
return function(proto) {
|
|
1080
|
-
if (!
|
|
1118
|
+
if (!isObject2(proto)) {
|
|
1081
1119
|
return {};
|
|
1082
1120
|
}
|
|
1083
1121
|
if (objectCreate) {
|
|
@@ -1439,7 +1477,7 @@ var lodash = { exports: {} };
|
|
|
1439
1477
|
if (result2 !== undefined$1) {
|
|
1440
1478
|
return result2;
|
|
1441
1479
|
}
|
|
1442
|
-
if (!
|
|
1480
|
+
if (!isObject2(value)) {
|
|
1443
1481
|
return value;
|
|
1444
1482
|
}
|
|
1445
1483
|
var isArr = isArray(value);
|
|
@@ -1513,7 +1551,7 @@ var lodash = { exports: {} };
|
|
|
1513
1551
|
}
|
|
1514
1552
|
function baseDelay(func, wait, args) {
|
|
1515
1553
|
if (typeof func != "function") {
|
|
1516
|
-
throw new
|
|
1554
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1517
1555
|
}
|
|
1518
1556
|
return setTimeout(function() {
|
|
1519
1557
|
func.apply(undefined$1, args);
|
|
@@ -1786,7 +1824,7 @@ var lodash = { exports: {} };
|
|
|
1786
1824
|
return true;
|
|
1787
1825
|
}
|
|
1788
1826
|
function baseIsNative(value) {
|
|
1789
|
-
if (!
|
|
1827
|
+
if (!isObject2(value) || isMasked(value)) {
|
|
1790
1828
|
return false;
|
|
1791
1829
|
}
|
|
1792
1830
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
@@ -1826,7 +1864,7 @@ var lodash = { exports: {} };
|
|
|
1826
1864
|
return result2;
|
|
1827
1865
|
}
|
|
1828
1866
|
function baseKeysIn(object) {
|
|
1829
|
-
if (!
|
|
1867
|
+
if (!isObject2(object)) {
|
|
1830
1868
|
return nativeKeysIn(object);
|
|
1831
1869
|
}
|
|
1832
1870
|
var isProto = isPrototype(object), result2 = [];
|
|
@@ -1871,7 +1909,7 @@ var lodash = { exports: {} };
|
|
|
1871
1909
|
}
|
|
1872
1910
|
baseFor(source, function(srcValue, key) {
|
|
1873
1911
|
stack || (stack = new Stack());
|
|
1874
|
-
if (
|
|
1912
|
+
if (isObject2(srcValue)) {
|
|
1875
1913
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1876
1914
|
} else {
|
|
1877
1915
|
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
|
|
@@ -1911,7 +1949,7 @@ var lodash = { exports: {} };
|
|
|
1911
1949
|
newValue = objValue;
|
|
1912
1950
|
if (isArguments(objValue)) {
|
|
1913
1951
|
newValue = toPlainObject(objValue);
|
|
1914
|
-
} else if (!
|
|
1952
|
+
} else if (!isObject2(objValue) || isFunction(objValue)) {
|
|
1915
1953
|
newValue = initCloneObject(srcValue);
|
|
1916
1954
|
}
|
|
1917
1955
|
} else {
|
|
@@ -2050,7 +2088,7 @@ var lodash = { exports: {} };
|
|
|
2050
2088
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
2051
2089
|
}
|
|
2052
2090
|
function baseSet(object, path, value, customizer) {
|
|
2053
|
-
if (!
|
|
2091
|
+
if (!isObject2(object)) {
|
|
2054
2092
|
return object;
|
|
2055
2093
|
}
|
|
2056
2094
|
path = castPath(path, object);
|
|
@@ -2064,7 +2102,7 @@ var lodash = { exports: {} };
|
|
|
2064
2102
|
var objValue = nested[key];
|
|
2065
2103
|
newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
|
|
2066
2104
|
if (newValue === undefined$1) {
|
|
2067
|
-
newValue =
|
|
2105
|
+
newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
|
|
2068
2106
|
}
|
|
2069
2107
|
}
|
|
2070
2108
|
assignValue(nested, key, newValue);
|
|
@@ -2308,7 +2346,7 @@ var lodash = { exports: {} };
|
|
|
2308
2346
|
}
|
|
2309
2347
|
function cloneArrayBuffer(arrayBuffer) {
|
|
2310
2348
|
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2311
|
-
new
|
|
2349
|
+
new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
|
|
2312
2350
|
return result2;
|
|
2313
2351
|
}
|
|
2314
2352
|
function cloneDataView(dataView, isDeep) {
|
|
@@ -2514,7 +2552,7 @@ var lodash = { exports: {} };
|
|
|
2514
2552
|
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
|
2515
2553
|
}
|
|
2516
2554
|
var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
|
|
2517
|
-
return
|
|
2555
|
+
return isObject2(result2) ? result2 : thisBinding;
|
|
2518
2556
|
};
|
|
2519
2557
|
}
|
|
2520
2558
|
function createCurry(func, bitmask, arity) {
|
|
@@ -2557,7 +2595,7 @@ var lodash = { exports: {} };
|
|
|
2557
2595
|
while (index2--) {
|
|
2558
2596
|
var func = funcs[index2];
|
|
2559
2597
|
if (typeof func != "function") {
|
|
2560
|
-
throw new
|
|
2598
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2561
2599
|
}
|
|
2562
2600
|
if (prereq && !wrapper && getFuncName(func) == "wrapper") {
|
|
2563
2601
|
var wrapper = new LodashWrapper([], true);
|
|
@@ -2770,7 +2808,7 @@ var lodash = { exports: {} };
|
|
|
2770
2808
|
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
|
|
2771
2809
|
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
|
|
2772
2810
|
if (!isBindKey && typeof func != "function") {
|
|
2773
|
-
throw new
|
|
2811
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2774
2812
|
}
|
|
2775
2813
|
var length = partials ? partials.length : 0;
|
|
2776
2814
|
if (!length) {
|
|
@@ -2828,7 +2866,7 @@ var lodash = { exports: {} };
|
|
|
2828
2866
|
return objValue;
|
|
2829
2867
|
}
|
|
2830
2868
|
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|
2831
|
-
if (
|
|
2869
|
+
if (isObject2(objValue) && isObject2(srcValue)) {
|
|
2832
2870
|
stack.set(srcValue, objValue);
|
|
2833
2871
|
baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
|
|
2834
2872
|
stack["delete"](srcValue);
|
|
@@ -2890,7 +2928,7 @@ var lodash = { exports: {} };
|
|
|
2890
2928
|
object = object.buffer;
|
|
2891
2929
|
other = other.buffer;
|
|
2892
2930
|
case arrayBufferTag:
|
|
2893
|
-
if (object.byteLength != other.byteLength || !equalFunc(new
|
|
2931
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
|
2894
2932
|
return false;
|
|
2895
2933
|
}
|
|
2896
2934
|
return true;
|
|
@@ -3052,7 +3090,7 @@ var lodash = { exports: {} };
|
|
|
3052
3090
|
return result2;
|
|
3053
3091
|
};
|
|
3054
3092
|
var getTag = baseGetTag;
|
|
3055
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag ||
|
|
3093
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
3056
3094
|
getTag = function(value) {
|
|
3057
3095
|
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
|
3058
3096
|
if (ctorString) {
|
|
@@ -3176,7 +3214,7 @@ var lodash = { exports: {} };
|
|
|
3176
3214
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
3177
3215
|
}
|
|
3178
3216
|
function isIterateeCall(value, index2, object) {
|
|
3179
|
-
if (!
|
|
3217
|
+
if (!isObject2(object)) {
|
|
3180
3218
|
return false;
|
|
3181
3219
|
}
|
|
3182
3220
|
var type = typeof index2;
|
|
@@ -3219,7 +3257,7 @@ var lodash = { exports: {} };
|
|
|
3219
3257
|
return value === proto;
|
|
3220
3258
|
}
|
|
3221
3259
|
function isStrictComparable(value) {
|
|
3222
|
-
return value === value && !
|
|
3260
|
+
return value === value && !isObject2(value);
|
|
3223
3261
|
}
|
|
3224
3262
|
function matchesStrictComparable(key, srcValue) {
|
|
3225
3263
|
return function(object) {
|
|
@@ -4037,7 +4075,7 @@ var lodash = { exports: {} };
|
|
|
4037
4075
|
};
|
|
4038
4076
|
function after(n, func) {
|
|
4039
4077
|
if (typeof func != "function") {
|
|
4040
|
-
throw new
|
|
4078
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4041
4079
|
}
|
|
4042
4080
|
n = toInteger(n);
|
|
4043
4081
|
return function() {
|
|
@@ -4054,7 +4092,7 @@ var lodash = { exports: {} };
|
|
|
4054
4092
|
function before(n, func) {
|
|
4055
4093
|
var result2;
|
|
4056
4094
|
if (typeof func != "function") {
|
|
4057
|
-
throw new
|
|
4095
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4058
4096
|
}
|
|
4059
4097
|
n = toInteger(n);
|
|
4060
4098
|
return function() {
|
|
@@ -4098,10 +4136,10 @@ var lodash = { exports: {} };
|
|
|
4098
4136
|
function debounce(func, wait, options) {
|
|
4099
4137
|
var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
4100
4138
|
if (typeof func != "function") {
|
|
4101
|
-
throw new
|
|
4139
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4102
4140
|
}
|
|
4103
4141
|
wait = toNumber(wait) || 0;
|
|
4104
|
-
if (
|
|
4142
|
+
if (isObject2(options)) {
|
|
4105
4143
|
leading = !!options.leading;
|
|
4106
4144
|
maxing = "maxWait" in options;
|
|
4107
4145
|
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -4187,7 +4225,7 @@ var lodash = { exports: {} };
|
|
|
4187
4225
|
}
|
|
4188
4226
|
function memoize(func, resolver) {
|
|
4189
4227
|
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
4190
|
-
throw new
|
|
4228
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4191
4229
|
}
|
|
4192
4230
|
var memoized = function() {
|
|
4193
4231
|
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
@@ -4204,7 +4242,7 @@ var lodash = { exports: {} };
|
|
|
4204
4242
|
memoize.Cache = MapCache;
|
|
4205
4243
|
function negate(predicate) {
|
|
4206
4244
|
if (typeof predicate != "function") {
|
|
4207
|
-
throw new
|
|
4245
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4208
4246
|
}
|
|
4209
4247
|
return function() {
|
|
4210
4248
|
var args = arguments;
|
|
@@ -4248,14 +4286,14 @@ var lodash = { exports: {} };
|
|
|
4248
4286
|
});
|
|
4249
4287
|
function rest(func, start) {
|
|
4250
4288
|
if (typeof func != "function") {
|
|
4251
|
-
throw new
|
|
4289
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4252
4290
|
}
|
|
4253
4291
|
start = start === undefined$1 ? start : toInteger(start);
|
|
4254
4292
|
return baseRest(func, start);
|
|
4255
4293
|
}
|
|
4256
4294
|
function spread(func, start) {
|
|
4257
4295
|
if (typeof func != "function") {
|
|
4258
|
-
throw new
|
|
4296
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4259
4297
|
}
|
|
4260
4298
|
start = start == null ? 0 : nativeMax(toInteger(start), 0);
|
|
4261
4299
|
return baseRest(function(args) {
|
|
@@ -4269,9 +4307,9 @@ var lodash = { exports: {} };
|
|
|
4269
4307
|
function throttle(func, wait, options) {
|
|
4270
4308
|
var leading = true, trailing = true;
|
|
4271
4309
|
if (typeof func != "function") {
|
|
4272
|
-
throw new
|
|
4310
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4273
4311
|
}
|
|
4274
|
-
if (
|
|
4312
|
+
if (isObject2(options)) {
|
|
4275
4313
|
leading = "leading" in options ? !!options.leading : leading;
|
|
4276
4314
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
4277
4315
|
}
|
|
@@ -4379,7 +4417,7 @@ var lodash = { exports: {} };
|
|
|
4379
4417
|
return typeof value == "number" && nativeIsFinite(value);
|
|
4380
4418
|
}
|
|
4381
4419
|
function isFunction(value) {
|
|
4382
|
-
if (!
|
|
4420
|
+
if (!isObject2(value)) {
|
|
4383
4421
|
return false;
|
|
4384
4422
|
}
|
|
4385
4423
|
var tag = baseGetTag(value);
|
|
@@ -4391,7 +4429,7 @@ var lodash = { exports: {} };
|
|
|
4391
4429
|
function isLength(value) {
|
|
4392
4430
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
4393
4431
|
}
|
|
4394
|
-
function
|
|
4432
|
+
function isObject2(value) {
|
|
4395
4433
|
var type = typeof value;
|
|
4396
4434
|
return value != null && (type == "object" || type == "function");
|
|
4397
4435
|
}
|
|
@@ -4411,7 +4449,7 @@ var lodash = { exports: {} };
|
|
|
4411
4449
|
}
|
|
4412
4450
|
function isNative(value) {
|
|
4413
4451
|
if (isMaskable(value)) {
|
|
4414
|
-
throw new
|
|
4452
|
+
throw new Error(CORE_ERROR_TEXT);
|
|
4415
4453
|
}
|
|
4416
4454
|
return baseIsNative(value);
|
|
4417
4455
|
}
|
|
@@ -4498,9 +4536,9 @@ var lodash = { exports: {} };
|
|
|
4498
4536
|
if (isSymbol(value)) {
|
|
4499
4537
|
return NAN;
|
|
4500
4538
|
}
|
|
4501
|
-
if (
|
|
4539
|
+
if (isObject2(value)) {
|
|
4502
4540
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
4503
|
-
value =
|
|
4541
|
+
value = isObject2(other) ? other + "" : other;
|
|
4504
4542
|
}
|
|
4505
4543
|
if (typeof value != "string") {
|
|
4506
4544
|
return value === 0 ? value : +value;
|
|
@@ -4721,7 +4759,7 @@ var lodash = { exports: {} };
|
|
|
4721
4759
|
var Ctor = object && object.constructor;
|
|
4722
4760
|
if (isArrLike) {
|
|
4723
4761
|
accumulator = isArr ? new Ctor() : [];
|
|
4724
|
-
} else if (
|
|
4762
|
+
} else if (isObject2(object)) {
|
|
4725
4763
|
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
|
4726
4764
|
} else {
|
|
4727
4765
|
accumulator = {};
|
|
@@ -4949,7 +4987,7 @@ var lodash = { exports: {} };
|
|
|
4949
4987
|
if (!variable) {
|
|
4950
4988
|
source = "with (obj) {\n" + source + "\n}\n";
|
|
4951
4989
|
} else if (reForbiddenIdentifierChars.test(variable)) {
|
|
4952
|
-
throw new
|
|
4990
|
+
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
|
|
4953
4991
|
}
|
|
4954
4992
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
|
|
4955
4993
|
source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
|
|
@@ -5003,7 +5041,7 @@ var lodash = { exports: {} };
|
|
|
5003
5041
|
}
|
|
5004
5042
|
function truncate(string, options) {
|
|
5005
5043
|
var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
|
|
5006
|
-
if (
|
|
5044
|
+
if (isObject2(options)) {
|
|
5007
5045
|
var separator = "separator" in options ? options.separator : separator;
|
|
5008
5046
|
length = "length" in options ? toInteger(options.length) : length;
|
|
5009
5047
|
omission = "omission" in options ? baseToString(options.omission) : omission;
|
|
@@ -5068,7 +5106,7 @@ var lodash = { exports: {} };
|
|
|
5068
5106
|
try {
|
|
5069
5107
|
return apply(func, undefined$1, args);
|
|
5070
5108
|
} catch (e) {
|
|
5071
|
-
return isError(e) ? e : new
|
|
5109
|
+
return isError(e) ? e : new Error(e);
|
|
5072
5110
|
}
|
|
5073
5111
|
});
|
|
5074
5112
|
var bindAll = flatRest(function(object, methodNames) {
|
|
@@ -5082,7 +5120,7 @@ var lodash = { exports: {} };
|
|
|
5082
5120
|
var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
|
|
5083
5121
|
pairs = !length ? [] : arrayMap(pairs, function(pair) {
|
|
5084
5122
|
if (typeof pair[1] != "function") {
|
|
5085
|
-
throw new
|
|
5123
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
5086
5124
|
}
|
|
5087
5125
|
return [toIteratee(pair[0]), pair[1]];
|
|
5088
5126
|
});
|
|
@@ -5133,13 +5171,13 @@ var lodash = { exports: {} };
|
|
|
5133
5171
|
});
|
|
5134
5172
|
function mixin(object, source, options) {
|
|
5135
5173
|
var props = keys(source), methodNames = baseFunctions(source, props);
|
|
5136
|
-
if (options == null && !(
|
|
5174
|
+
if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
|
|
5137
5175
|
options = source;
|
|
5138
5176
|
source = object;
|
|
5139
5177
|
object = this;
|
|
5140
5178
|
methodNames = baseFunctions(source, keys(source));
|
|
5141
5179
|
}
|
|
5142
|
-
var chain2 = !(
|
|
5180
|
+
var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
|
|
5143
5181
|
arrayEach(methodNames, function(methodName) {
|
|
5144
5182
|
var func = source[methodName];
|
|
5145
5183
|
object[methodName] = func;
|
|
@@ -5485,7 +5523,7 @@ var lodash = { exports: {} };
|
|
|
5485
5523
|
lodash2.isNil = isNil;
|
|
5486
5524
|
lodash2.isNull = isNull;
|
|
5487
5525
|
lodash2.isNumber = isNumber;
|
|
5488
|
-
lodash2.isObject =
|
|
5526
|
+
lodash2.isObject = isObject2;
|
|
5489
5527
|
lodash2.isObjectLike = isObjectLike;
|
|
5490
5528
|
lodash2.isPlainObject = isPlainObject;
|
|
5491
5529
|
lodash2.isRegExp = isRegExp;
|
|
@@ -5760,8 +5798,8 @@ function usePopover(props, visible, placement, origin, popoverRef) {
|
|
|
5760
5798
|
transformOrigin: TransformOriginMap[placement.value]
|
|
5761
5799
|
}));
|
|
5762
5800
|
const onDocumentClick = (e) => {
|
|
5763
|
-
var _a;
|
|
5764
|
-
if (!origin.value.contains(e.target) && !((
|
|
5801
|
+
var _a, _b;
|
|
5802
|
+
if (!((_a = origin.value) == null ? void 0 : _a.contains(e.target)) && !((_b = popoverRef.value.$el) == null ? void 0 : _b.contains(e.target))) {
|
|
5765
5803
|
visible.value = false;
|
|
5766
5804
|
}
|
|
5767
5805
|
};
|
|
@@ -5781,11 +5819,16 @@ function usePopover(props, visible, placement, origin, popoverRef) {
|
|
|
5781
5819
|
return { overlayStyles };
|
|
5782
5820
|
}
|
|
5783
5821
|
function usePopoverEvent(props, visible, origin) {
|
|
5784
|
-
const { trigger, position, mouseEnterDelay, mouseLeaveDelay } = toRefs(props);
|
|
5822
|
+
const { trigger, position, mouseEnterDelay, mouseLeaveDelay, disabled } = toRefs(props);
|
|
5785
5823
|
const isClick = computed(() => trigger.value === "click");
|
|
5786
5824
|
const placement = ref(position.value[0].split("-")[0]);
|
|
5787
5825
|
const isEnter = ref(false);
|
|
5788
|
-
const onClick = () =>
|
|
5826
|
+
const onClick = () => {
|
|
5827
|
+
if (disabled.value) {
|
|
5828
|
+
return;
|
|
5829
|
+
}
|
|
5830
|
+
isClick.value && (visible.value = !visible.value);
|
|
5831
|
+
};
|
|
5789
5832
|
const enter = lodash.exports.debounce(() => {
|
|
5790
5833
|
isEnter.value && (visible.value = true);
|
|
5791
5834
|
}, mouseEnterDelay.value);
|
|
@@ -5793,6 +5836,9 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
5793
5836
|
!isEnter.value && (visible.value = false);
|
|
5794
5837
|
}, mouseLeaveDelay.value);
|
|
5795
5838
|
const onMouseenter = () => {
|
|
5839
|
+
if (disabled.value) {
|
|
5840
|
+
return;
|
|
5841
|
+
}
|
|
5796
5842
|
if (!isClick.value) {
|
|
5797
5843
|
isEnter.value = true;
|
|
5798
5844
|
enter();
|
|
@@ -5804,6 +5850,15 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
5804
5850
|
leave();
|
|
5805
5851
|
}
|
|
5806
5852
|
};
|
|
5853
|
+
const quickLeave = () => {
|
|
5854
|
+
isEnter.value = false;
|
|
5855
|
+
visible.value = false;
|
|
5856
|
+
};
|
|
5857
|
+
watch(disabled, (newVal) => {
|
|
5858
|
+
if (newVal && visible.value) {
|
|
5859
|
+
quickLeave();
|
|
5860
|
+
}
|
|
5861
|
+
});
|
|
5807
5862
|
const handlePositionChange = (pos) => {
|
|
5808
5863
|
placement.value = pos.split("-")[0];
|
|
5809
5864
|
};
|
|
@@ -5815,11 +5870,12 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
5815
5870
|
origin.value.addEventListener("mouseleave", onMouseleave);
|
|
5816
5871
|
}
|
|
5817
5872
|
});
|
|
5818
|
-
return { placement, handlePositionChange };
|
|
5873
|
+
return { placement, handlePositionChange, onMouseenter, onMouseleave };
|
|
5819
5874
|
}
|
|
5875
|
+
const ns = useNamespace("popover");
|
|
5820
5876
|
function SuccessIcon() {
|
|
5821
5877
|
return createVNode("svg", {
|
|
5822
|
-
"class": "
|
|
5878
|
+
"class": [ns.e("icon"), ns.em("icon", "success")],
|
|
5823
5879
|
"viewBox": "0 0 16 16",
|
|
5824
5880
|
"version": "1.1",
|
|
5825
5881
|
"xmlns": "http://www.w3.org/2000/svg"
|
|
@@ -5843,7 +5899,7 @@ function SuccessIcon() {
|
|
|
5843
5899
|
}
|
|
5844
5900
|
function WarningIcon() {
|
|
5845
5901
|
return createVNode("svg", {
|
|
5846
|
-
"class": "
|
|
5902
|
+
"class": [ns.e("icon"), ns.em("icon", "warning")],
|
|
5847
5903
|
"viewBox": "0 0 16 16",
|
|
5848
5904
|
"version": "1.1",
|
|
5849
5905
|
"xmlns": "http://www.w3.org/2000/svg"
|
|
@@ -5853,14 +5909,14 @@ function WarningIcon() {
|
|
|
5853
5909
|
"fill": "none",
|
|
5854
5910
|
"fill-rule": "evenodd"
|
|
5855
5911
|
}, [createVNode("polygon", {
|
|
5856
|
-
"points": "7.5 1.74501946 1.39184847 13.5954649 7.08947368
|
|
5912
|
+
"points": "7.5 1.74501946 1.39184847 13.5954649 7.08947368 14.2207621 13.9973698 13.5954649 10.9383683 5.61273879 8.40084114 1.27624313"
|
|
5857
5913
|
}, null), createVNode("path", {
|
|
5858
|
-
"d": "M8.51325441,0.127397589 C8.70423071,0.228333932
|
|
5914
|
+
"d": "M8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 Z M8.87894737,11.2105263 L7.08947368,11.2105263 L7.08947368,13 L8.87894737,13 L8.87894737,11.2105263 Z M8.96842105,4.5 L7,4.5 L7.08947368,9.86842105 L8.87894737,9.86842105 L8.96842105,4.5 Z"
|
|
5859
5915
|
}, null)])]);
|
|
5860
5916
|
}
|
|
5861
5917
|
function InfoIcon() {
|
|
5862
5918
|
return createVNode("svg", {
|
|
5863
|
-
"class": "
|
|
5919
|
+
"class": [ns.e("icon"), ns.em("icon", "info")],
|
|
5864
5920
|
"viewBox": "0 0 16 16",
|
|
5865
5921
|
"version": "1.1",
|
|
5866
5922
|
"xmlns": "http://www.w3.org/2000/svg"
|
|
@@ -5876,12 +5932,12 @@ function InfoIcon() {
|
|
|
5876
5932
|
}, null), createVNode("g", {
|
|
5877
5933
|
"stroke-width": "1"
|
|
5878
5934
|
}, [createVNode("path", {
|
|
5879
|
-
"d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16
|
|
5935
|
+
"d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,5 L7,5 L7,3 L9,3 L9,5 Z M9,12.6 L7,12.6 L7,6.6 L9,6.6 L9,12.6 Z"
|
|
5880
5936
|
}, null)])])]);
|
|
5881
5937
|
}
|
|
5882
5938
|
function ErrorIcon() {
|
|
5883
5939
|
return createVNode("svg", {
|
|
5884
|
-
"class": "
|
|
5940
|
+
"class": [ns.e("icon"), ns.em("icon", "error")],
|
|
5885
5941
|
"width": "16px",
|
|
5886
5942
|
"height": "16px",
|
|
5887
5943
|
"viewBox": "0 0 16 16",
|
|
@@ -5897,7 +5953,7 @@ function ErrorIcon() {
|
|
|
5897
5953
|
"cy": "8",
|
|
5898
5954
|
"r": "7"
|
|
5899
5955
|
}, null), createVNode("path", {
|
|
5900
|
-
"d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8
|
|
5956
|
+
"d": "M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z",
|
|
5901
5957
|
"fill-rule": "nonzero"
|
|
5902
5958
|
}, null)])]);
|
|
5903
5959
|
}
|
|
@@ -5910,8 +5966,9 @@ var PopoverIcon = defineComponent({
|
|
|
5910
5966
|
}
|
|
5911
5967
|
},
|
|
5912
5968
|
setup(props) {
|
|
5969
|
+
const ns2 = useNamespace("popover");
|
|
5913
5970
|
return () => props.type && props.type !== "default" && createVNode("span", {
|
|
5914
|
-
"class": "
|
|
5971
|
+
"class": ns2.e("icon-wrap")
|
|
5915
5972
|
}, [props.type === "success" && createVNode(SuccessIcon, null, null), props.type === "warning" && createVNode(WarningIcon, null, null), props.type === "info" && createVNode(InfoIcon, null, null), props.type === "error" && createVNode(ErrorIcon, null, null)]);
|
|
5916
5973
|
}
|
|
5917
5974
|
});
|
|
@@ -5920,9 +5977,11 @@ var Popover = defineComponent({
|
|
|
5920
5977
|
name: "DPopover",
|
|
5921
5978
|
inheritAttrs: false,
|
|
5922
5979
|
props: popoverProps,
|
|
5980
|
+
emits: ["show", "hide"],
|
|
5923
5981
|
setup(props, {
|
|
5924
5982
|
slots,
|
|
5925
|
-
attrs
|
|
5983
|
+
attrs,
|
|
5984
|
+
emit
|
|
5926
5985
|
}) {
|
|
5927
5986
|
const {
|
|
5928
5987
|
content,
|
|
@@ -5937,47 +5996,59 @@ var Popover = defineComponent({
|
|
|
5937
5996
|
const visible = ref(false);
|
|
5938
5997
|
const {
|
|
5939
5998
|
placement,
|
|
5940
|
-
handlePositionChange
|
|
5999
|
+
handlePositionChange,
|
|
6000
|
+
onMouseenter,
|
|
6001
|
+
onMouseleave
|
|
5941
6002
|
} = usePopoverEvent(props, visible, origin);
|
|
5942
6003
|
const {
|
|
5943
6004
|
overlayStyles
|
|
5944
6005
|
} = usePopover(props, visible, placement, origin, popoverRef);
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
"
|
|
5950
|
-
}
|
|
5951
|
-
"
|
|
6006
|
+
const ns2 = useNamespace("popover");
|
|
6007
|
+
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
6008
|
+
watch(visible, (newVal) => {
|
|
6009
|
+
if (newVal) {
|
|
6010
|
+
emit("show");
|
|
6011
|
+
} else {
|
|
6012
|
+
emit("hide");
|
|
6013
|
+
}
|
|
6014
|
+
});
|
|
6015
|
+
return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
|
|
6016
|
+
default: () => {
|
|
6017
|
+
var _a;
|
|
6018
|
+
return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
|
|
6019
|
+
}
|
|
6020
|
+
}), createVNode(Teleport, {
|
|
6021
|
+
"to": "body"
|
|
6022
|
+
}, {
|
|
6023
|
+
default: () => [createVNode(Transition, {
|
|
6024
|
+
"name": showAnimation.value ? ns2.m(`fade-${placement.value}`) : ""
|
|
5952
6025
|
}, {
|
|
5953
|
-
default: () => [createVNode(
|
|
5954
|
-
"
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
}
|
|
5977
|
-
})]
|
|
6026
|
+
default: () => [createVNode(FlexibleOverlay, mergeProps({
|
|
6027
|
+
"modelValue": visible.value,
|
|
6028
|
+
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
6029
|
+
"ref": popoverRef,
|
|
6030
|
+
"origin": origin.value,
|
|
6031
|
+
"position": position.value,
|
|
6032
|
+
"align": align.value,
|
|
6033
|
+
"offset": offset2.value,
|
|
6034
|
+
"class": [ns2.e("content"), popType.value !== "default" ? "is-icon" : ""],
|
|
6035
|
+
"show-arrow": true,
|
|
6036
|
+
"is-arrow-center": false,
|
|
6037
|
+
"style": overlayStyles.value
|
|
6038
|
+
}, attrs, {
|
|
6039
|
+
"onPositionChange": handlePositionChange,
|
|
6040
|
+
"onMouseenter": onMouseenter,
|
|
6041
|
+
"onMouseleave": onMouseleave
|
|
6042
|
+
}), {
|
|
6043
|
+
default: () => {
|
|
6044
|
+
var _a;
|
|
6045
|
+
return [createVNode(PopoverIcon, {
|
|
6046
|
+
"type": popType.value
|
|
6047
|
+
}, null), ((_a = slots.content) == null ? void 0 : _a.call(slots)) || createVNode("span", null, [content.value])];
|
|
6048
|
+
}
|
|
5978
6049
|
})]
|
|
5979
|
-
})]
|
|
5980
|
-
};
|
|
6050
|
+
})]
|
|
6051
|
+
})]);
|
|
5981
6052
|
}
|
|
5982
6053
|
});
|
|
5983
6054
|
var index = {
|