vue-devui 1.0.0-pre.0 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -187
- package/alert/index.es.js +28 -30
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +67 -82
- package/auto-complete/index.umd.js +3 -1
- package/auto-complete/style.css +1 -1
- package/badge/index.es.js +1 -1
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +39 -40
- package/button/index.umd.js +1 -1
- package/countdown/index.es.js +2 -1
- package/editable-select/index.es.js +122 -163
- package/editable-select/index.umd.js +1 -1
- package/fullscreen/index.es.js +13 -16
- package/fullscreen/index.umd.js +1 -1
- package/icon/index.es.js +39 -57
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +2 -1
- package/modal/index.es.js +81 -76
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +38 -40
- package/notification/index.umd.js +1 -1
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.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/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +2 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/overlay/index.es.js +44 -37
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +8 -43
- package/pagination/index.es.js +10 -12
- package/pagination/index.umd.js +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +46 -39
- package/popover/index.umd.js +6 -6
- package/popover/style.css +1 -1
- package/progress/index.es.js +1 -1
- package/progress/index.umd.js +1 -1
- package/progress/style.css +1 -1
- package/radio/index.es.js +11 -11
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/read-tip/index.es.js +6 -3
- package/result/index.es.js +38 -53
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +47 -42
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +2 -5
- package/search/index.umd.js +4 -4
- package/skeleton/index.es.js +17 -17
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +60 -59
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +215 -160
- package/splitter/index.umd.js +11 -11
- package/splitter/style.css +1 -1
- package/status/index.es.js +1 -4
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/tag/index.es.js +15 -18
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/tag-input/index.es.js +4 -2
- package/{accordion → timeline}/index.d.ts +0 -0
- package/{time-axis → timeline}/index.es.js +65 -78
- package/timeline/index.umd.js +1 -0
- package/{anchor → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/upload/index.es.js +38 -40
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +1478 -1196
- package/vue-devui.umd.js +19 -17
- 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.d.ts +0 -7
- 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/package.json +0 -7
- 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/date-picker/index.d.ts +0 -7
- package/date-picker/index.es.js +0 -1171
- package/date-picker/index.umd.js +0 -1
- package/date-picker/package.json +0 -7
- package/date-picker/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/drawer/index.d.ts +0 -7
- package/drawer/index.es.js +0 -234
- package/drawer/index.umd.js +0 -1
- package/drawer/package.json +0 -7
- package/drawer/style.css +0 -1
- package/dropdown/index.d.ts +0 -7
- package/dropdown/index.es.js +0 -638
- package/dropdown/index.umd.js +0 -1
- package/dropdown/package.json +0 -7
- package/dropdown/style.css +0 -1
- package/form/index.d.ts +0 -7
- package/form/index.es.js +0 -7865
- package/form/index.umd.js +0 -27
- package/form/package.json +0 -7
- package/form/style.css +0 -1
- 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/input-number/index.d.ts +0 -7
- package/input-number/index.es.js +0 -240
- package/input-number/index.umd.js +0 -1
- package/input-number/package.json +0 -7
- package/input-number/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/Column.js +0 -3
- package/nuxt/components/DatePicker.js +0 -3
- package/nuxt/components/Drawer.js +0 -3
- package/nuxt/components/DrawerService.js +0 -3
- package/nuxt/components/Dropdown.js +0 -3
- package/nuxt/components/DropdownMenu.js +0 -3
- package/nuxt/components/Form.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormItem.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/FormOperation.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/InputNumber.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/Select.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/StickSlider.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/Table.js +0 -3
- package/nuxt/components/Tabs.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/Tooltip.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/Tree.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/dropdownMenuProps.js +0 -3
- package/nuxt/components/tooltipProps.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/select/index.d.ts +0 -7
- package/select/index.es.js +0 -706
- package/select/index.umd.js +0 -1
- package/select/package.json +0 -7
- package/select/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/table/index.d.ts +0 -7
- package/table/index.es.js +0 -1969
- package/table/index.umd.js +0 -1
- package/table/package.json +0 -7
- package/table/style.css +0 -1
- package/tabs/index.d.ts +0 -7
- package/tabs/index.es.js +0 -194
- package/tabs/index.umd.js +0 -1
- package/tabs/package.json +0 -7
- package/tabs/style.css +0 -1
- package/time-axis/index.d.ts +0 -7
- 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/tooltip/index.d.ts +0 -7
- package/tooltip/index.es.js +0 -5828
- package/tooltip/index.umd.js +0 -27
- package/tooltip/package.json +0 -7
- package/tooltip/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/index.d.ts +0 -7
- package/tree/index.es.js +0 -6490
- package/tree/index.umd.js +0 -27
- package/tree/package.json +0 -7
- package/tree/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/splitter/index.es.js
CHANGED
|
@@ -21,27 +21,9 @@ var __publicField = (obj, key, value) => {
|
|
|
21
21
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
22
|
return value;
|
|
23
23
|
};
|
|
24
|
-
import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref,
|
|
25
|
-
import { offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
26
|
-
|
|
27
|
-
orientation: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: "horizontal"
|
|
30
|
-
},
|
|
31
|
-
splitBarSize: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "2px"
|
|
34
|
-
},
|
|
35
|
-
disabledBarSize: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: "1px"
|
|
38
|
-
},
|
|
39
|
-
showCollapseButton: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: true
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
var overlay = "";
|
|
24
|
+
import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, toRefs, Fragment, inject, reactive, withDirectives, provide, resolveComponent, onUpdated } from "vue";
|
|
25
|
+
import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
26
|
+
var baseOverlay = "";
|
|
45
27
|
function _isSlot(s) {
|
|
46
28
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
47
29
|
}
|
|
@@ -88,43 +70,13 @@ const overlayProps = {
|
|
|
88
70
|
default: true
|
|
89
71
|
}
|
|
90
72
|
};
|
|
91
|
-
const overlayEmits = ["update:visible", "backdropClick"];
|
|
92
73
|
const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
93
74
|
overlayStyle: {
|
|
94
75
|
type: [String, Object],
|
|
95
76
|
default: void 0
|
|
96
77
|
}
|
|
97
78
|
});
|
|
98
|
-
const
|
|
99
|
-
modelValue: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
default: false
|
|
102
|
-
},
|
|
103
|
-
origin: {
|
|
104
|
-
type: Object,
|
|
105
|
-
require: true
|
|
106
|
-
},
|
|
107
|
-
position: {
|
|
108
|
-
type: Array,
|
|
109
|
-
default: ["bottom"]
|
|
110
|
-
},
|
|
111
|
-
offset: {
|
|
112
|
-
type: [Number, Object],
|
|
113
|
-
default: 8
|
|
114
|
-
},
|
|
115
|
-
align: {
|
|
116
|
-
type: String,
|
|
117
|
-
default: null
|
|
118
|
-
},
|
|
119
|
-
showArrow: {
|
|
120
|
-
type: Boolean,
|
|
121
|
-
default: false
|
|
122
|
-
},
|
|
123
|
-
isArrowCenter: {
|
|
124
|
-
type: Boolean,
|
|
125
|
-
default: true
|
|
126
|
-
}
|
|
127
|
-
};
|
|
79
|
+
const overlayEmits = ["update:visible", "backdropClick"];
|
|
128
80
|
function useOverlayLogic(props, ctx) {
|
|
129
81
|
const backgroundClass = computed(() => {
|
|
130
82
|
return [
|
|
@@ -175,6 +127,7 @@ function useOverlayLogic(props, ctx) {
|
|
|
175
127
|
handleOverlayBubbleCancel
|
|
176
128
|
};
|
|
177
129
|
}
|
|
130
|
+
var fixedOverlay = "";
|
|
178
131
|
defineComponent({
|
|
179
132
|
name: "DFixedOverlay",
|
|
180
133
|
props: fixedOverlayProps,
|
|
@@ -199,6 +152,36 @@ defineComponent({
|
|
|
199
152
|
});
|
|
200
153
|
}
|
|
201
154
|
});
|
|
155
|
+
const flexibleOverlayProps = {
|
|
156
|
+
modelValue: {
|
|
157
|
+
type: Boolean,
|
|
158
|
+
default: false
|
|
159
|
+
},
|
|
160
|
+
origin: {
|
|
161
|
+
type: Object,
|
|
162
|
+
require: true
|
|
163
|
+
},
|
|
164
|
+
position: {
|
|
165
|
+
type: Array,
|
|
166
|
+
default: ["bottom"]
|
|
167
|
+
},
|
|
168
|
+
offset: {
|
|
169
|
+
type: [Number, Object],
|
|
170
|
+
default: 8
|
|
171
|
+
},
|
|
172
|
+
align: {
|
|
173
|
+
type: String,
|
|
174
|
+
default: null
|
|
175
|
+
},
|
|
176
|
+
showArrow: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
default: false
|
|
179
|
+
},
|
|
180
|
+
isArrowCenter: {
|
|
181
|
+
type: Boolean,
|
|
182
|
+
default: true
|
|
183
|
+
}
|
|
184
|
+
};
|
|
202
185
|
function getScrollParent(element) {
|
|
203
186
|
const overflowRegex = /(auto|scroll|hidden)/;
|
|
204
187
|
for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
|
|
@@ -252,6 +235,7 @@ function useOverlay(props, emit) {
|
|
|
252
235
|
const overlayEl = unref(overlayRef.value);
|
|
253
236
|
const arrowEl = unref(arrowRef.value);
|
|
254
237
|
const middleware = [
|
|
238
|
+
shift(),
|
|
255
239
|
offset(props.offset),
|
|
256
240
|
autoPlacement({
|
|
257
241
|
alignment: props.align,
|
|
@@ -286,7 +270,7 @@ function useOverlay(props, emit) {
|
|
|
286
270
|
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
287
271
|
window.removeEventListener("resize", updatePosition);
|
|
288
272
|
});
|
|
289
|
-
return { arrowRef, overlayRef };
|
|
273
|
+
return { arrowRef, overlayRef, updatePosition };
|
|
290
274
|
}
|
|
291
275
|
var flexibleOverlay = "";
|
|
292
276
|
const FlexibleOverlay = defineComponent({
|
|
@@ -297,12 +281,17 @@ const FlexibleOverlay = defineComponent({
|
|
|
297
281
|
setup(props, {
|
|
298
282
|
slots,
|
|
299
283
|
attrs,
|
|
300
|
-
emit
|
|
284
|
+
emit,
|
|
285
|
+
expose
|
|
301
286
|
}) {
|
|
302
287
|
const {
|
|
303
288
|
arrowRef,
|
|
304
|
-
overlayRef
|
|
289
|
+
overlayRef,
|
|
290
|
+
updatePosition
|
|
305
291
|
} = useOverlay(props, emit);
|
|
292
|
+
expose({
|
|
293
|
+
updatePosition
|
|
294
|
+
});
|
|
306
295
|
return () => {
|
|
307
296
|
var _a;
|
|
308
297
|
return props.modelValue && createVNode("div", mergeProps({
|
|
@@ -5876,57 +5865,58 @@ function removeClass(el, className) {
|
|
|
5876
5865
|
}
|
|
5877
5866
|
}
|
|
5878
5867
|
}
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
}
|
|
5891
|
-
};
|
|
5892
|
-
function bindEvent(el) {
|
|
5893
|
-
bind(el, "mousedown", onMousedown);
|
|
5868
|
+
function normalizeEvent(evt) {
|
|
5869
|
+
return {
|
|
5870
|
+
pageX: evt.pageX,
|
|
5871
|
+
pageY: evt.pageY,
|
|
5872
|
+
clientX: evt.clientX,
|
|
5873
|
+
clientY: evt.clientY,
|
|
5874
|
+
offsetX: evt.offsetX,
|
|
5875
|
+
offsetY: evt.offsetY,
|
|
5876
|
+
type: evt.type,
|
|
5877
|
+
originalEvent: evt
|
|
5878
|
+
};
|
|
5894
5879
|
}
|
|
5895
|
-
function bind(el,
|
|
5896
|
-
el.addEventListener && el.addEventListener(
|
|
5880
|
+
function bind(el, eventName, callback) {
|
|
5881
|
+
el.addEventListener && el.addEventListener(eventName, callback);
|
|
5897
5882
|
}
|
|
5898
|
-
function unbind(el,
|
|
5899
|
-
el.removeEventListener && el.removeEventListener(
|
|
5883
|
+
function unbind(el, eventName, callback) {
|
|
5884
|
+
el.removeEventListener && el.removeEventListener(eventName, callback);
|
|
5900
5885
|
}
|
|
5901
5886
|
function onMousedown(e) {
|
|
5902
5887
|
var _a;
|
|
5903
|
-
const
|
|
5904
|
-
if (
|
|
5888
|
+
const resizeProps = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.resizeProps;
|
|
5889
|
+
if (!resizeProps) {
|
|
5905
5890
|
return;
|
|
5906
|
-
bind(document, "mousemove", onMousemove);
|
|
5907
|
-
bind(document, "mouseup", onMouseup);
|
|
5908
|
-
$value.onPressEvent(normalizeEvent(e));
|
|
5909
|
-
function onMousemove(e2) {
|
|
5910
|
-
$value.onDragEvent(normalizeEvent(e2));
|
|
5911
5891
|
}
|
|
5912
|
-
function
|
|
5892
|
+
function onMousemove(evt) {
|
|
5893
|
+
resizeProps.onDragEvent(normalizeEvent(evt));
|
|
5894
|
+
}
|
|
5895
|
+
function onMouseup(evt) {
|
|
5913
5896
|
unbind(document, "mousemove", onMousemove);
|
|
5914
5897
|
unbind(document, "mouseup", onMouseup);
|
|
5915
|
-
|
|
5898
|
+
resizeProps.onReleaseEvent(normalizeEvent(evt));
|
|
5916
5899
|
}
|
|
5900
|
+
bind(document, "mousemove", onMousemove);
|
|
5901
|
+
bind(document, "mouseup", onMouseup);
|
|
5902
|
+
resizeProps.onPressEvent(normalizeEvent(e));
|
|
5917
5903
|
}
|
|
5918
|
-
function
|
|
5919
|
-
|
|
5920
|
-
pageX: e.pageX,
|
|
5921
|
-
pageY: e.pageY,
|
|
5922
|
-
clientX: e.clientX,
|
|
5923
|
-
clientY: e.clientY,
|
|
5924
|
-
offsetX: e.offsetX,
|
|
5925
|
-
offsetY: e.offsetY,
|
|
5926
|
-
type: e.type,
|
|
5927
|
-
originalEvent: e
|
|
5928
|
-
};
|
|
5904
|
+
function bindEvent(el) {
|
|
5905
|
+
bind(el, "mousedown", onMousedown);
|
|
5929
5906
|
}
|
|
5907
|
+
const resize = {
|
|
5908
|
+
mounted(el, { value }) {
|
|
5909
|
+
el.resizeProps = value;
|
|
5910
|
+
if (value.enableResize) {
|
|
5911
|
+
bindEvent(el);
|
|
5912
|
+
}
|
|
5913
|
+
},
|
|
5914
|
+
unmounted(el, { value }) {
|
|
5915
|
+
if (value.enableResize) {
|
|
5916
|
+
unbind(el, "mousedown", onMousedown);
|
|
5917
|
+
}
|
|
5918
|
+
}
|
|
5919
|
+
};
|
|
5930
5920
|
const splitterBarProps = {
|
|
5931
5921
|
index: {
|
|
5932
5922
|
type: Number
|
|
@@ -5970,10 +5960,13 @@ var DSplitterBar = defineComponent({
|
|
|
5970
5960
|
}, {
|
|
5971
5961
|
immediate: true
|
|
5972
5962
|
});
|
|
5973
|
-
watch([() => store.state.panes, domRef], ([
|
|
5963
|
+
watch([() => store == null ? void 0 : store.state.panes, domRef], ([, ele]) => {
|
|
5964
|
+
if (!store || !props || props.index === void 0) {
|
|
5965
|
+
return;
|
|
5966
|
+
}
|
|
5974
5967
|
if (!store.isStaticBar(props.index)) {
|
|
5975
5968
|
state.wrapperClass += " resizable";
|
|
5976
|
-
} else {
|
|
5969
|
+
} else if (ele) {
|
|
5977
5970
|
setStyle(ele, {
|
|
5978
5971
|
flexBasis: props.disabledBarSize
|
|
5979
5972
|
});
|
|
@@ -5981,59 +5974,10 @@ var DSplitterBar = defineComponent({
|
|
|
5981
5974
|
}, {
|
|
5982
5975
|
deep: true
|
|
5983
5976
|
});
|
|
5984
|
-
const coordinate = {
|
|
5985
|
-
pageX: 0,
|
|
5986
|
-
pageY: 0,
|
|
5987
|
-
originalX: 0,
|
|
5988
|
-
originalY: 0
|
|
5989
|
-
};
|
|
5990
|
-
let initState;
|
|
5991
|
-
const resizeProp = {
|
|
5992
|
-
enableResize: true,
|
|
5993
|
-
onPressEvent: function({
|
|
5994
|
-
originalEvent
|
|
5995
|
-
}) {
|
|
5996
|
-
originalEvent.stopPropagation();
|
|
5997
|
-
if (!store.isResizable(props.index))
|
|
5998
|
-
return;
|
|
5999
|
-
initState = store.dragState(props.index);
|
|
6000
|
-
coordinate.originalX = originalEvent.pageX;
|
|
6001
|
-
coordinate.originalY = originalEvent.pageY;
|
|
6002
|
-
},
|
|
6003
|
-
onDragEvent: function({
|
|
6004
|
-
originalEvent
|
|
6005
|
-
}) {
|
|
6006
|
-
originalEvent.stopPropagation();
|
|
6007
|
-
if (!store.isResizable(props.index))
|
|
6008
|
-
return;
|
|
6009
|
-
coordinate.pageX = originalEvent.pageX;
|
|
6010
|
-
coordinate.pageY = originalEvent.pageY;
|
|
6011
|
-
let distance;
|
|
6012
|
-
if (props.orientation === "vertical") {
|
|
6013
|
-
distance = coordinate.pageY - coordinate.originalY;
|
|
6014
|
-
} else {
|
|
6015
|
-
distance = coordinate.pageX - coordinate.originalX;
|
|
6016
|
-
}
|
|
6017
|
-
store.setSize(initState, distance);
|
|
6018
|
-
},
|
|
6019
|
-
onReleaseEvent: function({
|
|
6020
|
-
originalEvent
|
|
6021
|
-
}) {
|
|
6022
|
-
originalEvent.stopPropagation();
|
|
6023
|
-
if (!store.isResizable(props.index))
|
|
6024
|
-
return;
|
|
6025
|
-
coordinate.pageX = originalEvent.pageX;
|
|
6026
|
-
coordinate.pageY = originalEvent.pageY;
|
|
6027
|
-
let distance;
|
|
6028
|
-
if (props.orientation === "vertical") {
|
|
6029
|
-
distance = coordinate.pageY - coordinate.originalY;
|
|
6030
|
-
} else {
|
|
6031
|
-
distance = coordinate.pageX - coordinate.originalX;
|
|
6032
|
-
}
|
|
6033
|
-
store.setSize(initState, distance);
|
|
6034
|
-
}
|
|
6035
|
-
};
|
|
6036
5977
|
const queryPanes = (index2, nearIndex) => {
|
|
5978
|
+
if (!store) {
|
|
5979
|
+
return {};
|
|
5980
|
+
}
|
|
6037
5981
|
const pane = store.getPane(index2);
|
|
6038
5982
|
const nearPane = store.getPane(nearIndex);
|
|
6039
5983
|
return {
|
|
@@ -6045,7 +5989,7 @@ var DSplitterBar = defineComponent({
|
|
|
6045
5989
|
var _a, _b, _c, _d;
|
|
6046
5990
|
const isCollapsible = ((_b = (_a = pane == null ? void 0 : pane.component) == null ? void 0 : _a.props) == null ? void 0 : _b.collapsible) && showIcon;
|
|
6047
5991
|
const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
|
|
6048
|
-
const isNearPaneCollapsed = nearPane.collapsed;
|
|
5992
|
+
const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
|
|
6049
5993
|
return {
|
|
6050
5994
|
"devui-collapse": isCollapsible,
|
|
6051
5995
|
collapsed: isCollapsed,
|
|
@@ -6054,6 +5998,9 @@ var DSplitterBar = defineComponent({
|
|
|
6054
5998
|
};
|
|
6055
5999
|
const prevClass = computed(() => {
|
|
6056
6000
|
var _a, _b;
|
|
6001
|
+
if (!props || props.index === void 0) {
|
|
6002
|
+
return {};
|
|
6003
|
+
}
|
|
6057
6004
|
const {
|
|
6058
6005
|
pane,
|
|
6059
6006
|
nearPane
|
|
@@ -6063,6 +6010,9 @@ var DSplitterBar = defineComponent({
|
|
|
6063
6010
|
});
|
|
6064
6011
|
const nextClass = computed(() => {
|
|
6065
6012
|
var _a, _b;
|
|
6013
|
+
if (!store || !props || props.index === void 0) {
|
|
6014
|
+
return {};
|
|
6015
|
+
}
|
|
6066
6016
|
const {
|
|
6067
6017
|
pane,
|
|
6068
6018
|
nearPane
|
|
@@ -6072,6 +6022,9 @@ var DSplitterBar = defineComponent({
|
|
|
6072
6022
|
});
|
|
6073
6023
|
const toggleResize = () => {
|
|
6074
6024
|
var _a, _b, _c, _d;
|
|
6025
|
+
if (!domRef.value || !props || props.index === void 0) {
|
|
6026
|
+
return;
|
|
6027
|
+
}
|
|
6075
6028
|
const {
|
|
6076
6029
|
pane,
|
|
6077
6030
|
nearPane
|
|
@@ -6084,10 +6037,16 @@ var DSplitterBar = defineComponent({
|
|
|
6084
6037
|
}
|
|
6085
6038
|
};
|
|
6086
6039
|
const handleCollapsePrePane = (lockStatus) => {
|
|
6040
|
+
if (!store || !props || props.index === void 0) {
|
|
6041
|
+
return;
|
|
6042
|
+
}
|
|
6087
6043
|
store.tooglePane(props.index, props.index + 1, lockStatus);
|
|
6088
6044
|
toggleResize();
|
|
6089
6045
|
};
|
|
6090
6046
|
const handleCollapseNextPane = (lockStatus) => {
|
|
6047
|
+
if (!store || !props || props.index === void 0) {
|
|
6048
|
+
return;
|
|
6049
|
+
}
|
|
6091
6050
|
store.tooglePane(props.index + 1, props.index, lockStatus);
|
|
6092
6051
|
toggleResize();
|
|
6093
6052
|
};
|
|
@@ -6095,11 +6054,78 @@ var DSplitterBar = defineComponent({
|
|
|
6095
6054
|
handleCollapsePrePane(true);
|
|
6096
6055
|
handleCollapseNextPane(true);
|
|
6097
6056
|
};
|
|
6057
|
+
const coordinate = {
|
|
6058
|
+
pageX: 0,
|
|
6059
|
+
pageY: 0,
|
|
6060
|
+
originalX: 0,
|
|
6061
|
+
originalY: 0
|
|
6062
|
+
};
|
|
6063
|
+
let initState;
|
|
6064
|
+
const resizeProp = {
|
|
6065
|
+
enableResize: true,
|
|
6066
|
+
onPressEvent: function({
|
|
6067
|
+
originalEvent
|
|
6068
|
+
}) {
|
|
6069
|
+
originalEvent.stopPropagation();
|
|
6070
|
+
if (!store || !props || props.index === void 0) {
|
|
6071
|
+
return;
|
|
6072
|
+
}
|
|
6073
|
+
if (!store.isResizable(props.index)) {
|
|
6074
|
+
return;
|
|
6075
|
+
}
|
|
6076
|
+
initState = store.dragState(props.index);
|
|
6077
|
+
coordinate.originalX = originalEvent.pageX;
|
|
6078
|
+
coordinate.originalY = originalEvent.pageY;
|
|
6079
|
+
},
|
|
6080
|
+
onDragEvent: function({
|
|
6081
|
+
originalEvent
|
|
6082
|
+
}) {
|
|
6083
|
+
originalEvent.stopPropagation();
|
|
6084
|
+
if (!store || !props || props.index === void 0) {
|
|
6085
|
+
return;
|
|
6086
|
+
}
|
|
6087
|
+
if (!store.isResizable(props.index)) {
|
|
6088
|
+
return;
|
|
6089
|
+
}
|
|
6090
|
+
coordinate.pageX = originalEvent.pageX;
|
|
6091
|
+
coordinate.pageY = originalEvent.pageY;
|
|
6092
|
+
let distance;
|
|
6093
|
+
if (props.orientation === "vertical") {
|
|
6094
|
+
distance = coordinate.pageY - coordinate.originalY;
|
|
6095
|
+
} else {
|
|
6096
|
+
distance = coordinate.pageX - coordinate.originalX;
|
|
6097
|
+
}
|
|
6098
|
+
store.setSize(initState, distance);
|
|
6099
|
+
},
|
|
6100
|
+
onReleaseEvent: function({
|
|
6101
|
+
originalEvent
|
|
6102
|
+
}) {
|
|
6103
|
+
originalEvent.stopPropagation();
|
|
6104
|
+
if (!store || !props || props.index === void 0) {
|
|
6105
|
+
return;
|
|
6106
|
+
}
|
|
6107
|
+
if (!store.isResizable(props.index)) {
|
|
6108
|
+
return;
|
|
6109
|
+
}
|
|
6110
|
+
coordinate.pageX = originalEvent.pageX;
|
|
6111
|
+
coordinate.pageY = originalEvent.pageY;
|
|
6112
|
+
let distance;
|
|
6113
|
+
if (props.orientation === "vertical") {
|
|
6114
|
+
distance = coordinate.pageY - coordinate.originalY;
|
|
6115
|
+
} else {
|
|
6116
|
+
distance = coordinate.pageX - coordinate.originalX;
|
|
6117
|
+
}
|
|
6118
|
+
store.setSize(initState, distance);
|
|
6119
|
+
}
|
|
6120
|
+
};
|
|
6098
6121
|
onMounted(() => {
|
|
6099
6122
|
initialCollapseStatus();
|
|
6100
6123
|
});
|
|
6101
6124
|
const renderCollapsedTip = () => {
|
|
6102
6125
|
var _a, _b, _c, _d;
|
|
6126
|
+
if (!props || props.index === void 0) {
|
|
6127
|
+
return "\u6536\u8D77";
|
|
6128
|
+
}
|
|
6103
6129
|
const {
|
|
6104
6130
|
pane,
|
|
6105
6131
|
nearPane
|
|
@@ -6243,6 +6269,24 @@ class SplitterStore {
|
|
|
6243
6269
|
}
|
|
6244
6270
|
}
|
|
6245
6271
|
}
|
|
6272
|
+
const splitterProps = {
|
|
6273
|
+
orientation: {
|
|
6274
|
+
type: String,
|
|
6275
|
+
default: "horizontal"
|
|
6276
|
+
},
|
|
6277
|
+
splitBarSize: {
|
|
6278
|
+
type: String,
|
|
6279
|
+
default: "2px"
|
|
6280
|
+
},
|
|
6281
|
+
disabledBarSize: {
|
|
6282
|
+
type: String,
|
|
6283
|
+
default: "1px"
|
|
6284
|
+
},
|
|
6285
|
+
showCollapseButton: {
|
|
6286
|
+
type: Boolean,
|
|
6287
|
+
default: true
|
|
6288
|
+
}
|
|
6289
|
+
};
|
|
6246
6290
|
var splitter = "";
|
|
6247
6291
|
var Splitter = defineComponent({
|
|
6248
6292
|
name: "DSplitter",
|
|
@@ -6265,8 +6309,9 @@ var Splitter = defineComponent({
|
|
|
6265
6309
|
provide("splitterStore", store);
|
|
6266
6310
|
const domRef = ref();
|
|
6267
6311
|
const refreshSplitterContainerSize = () => {
|
|
6268
|
-
if (!domRef.value)
|
|
6312
|
+
if (!domRef.value) {
|
|
6269
6313
|
return;
|
|
6314
|
+
}
|
|
6270
6315
|
let containerSize = 0;
|
|
6271
6316
|
if (props.orientation === "vertical") {
|
|
6272
6317
|
containerSize = domRef.value.clientHeight;
|
|
@@ -6283,7 +6328,9 @@ var Splitter = defineComponent({
|
|
|
6283
6328
|
return;
|
|
6284
6329
|
}
|
|
6285
6330
|
refreshSplitterContainerSize();
|
|
6286
|
-
|
|
6331
|
+
if (domRef.value) {
|
|
6332
|
+
observer.observe(domRef.value);
|
|
6333
|
+
}
|
|
6287
6334
|
});
|
|
6288
6335
|
onUnmounted(() => {
|
|
6289
6336
|
observer.disconnect();
|
|
@@ -6379,27 +6426,35 @@ var SplitterPane = defineComponent({
|
|
|
6379
6426
|
}
|
|
6380
6427
|
};
|
|
6381
6428
|
watch([() => props.size, domRef], ([size, ele]) => {
|
|
6382
|
-
|
|
6429
|
+
if (size && ele) {
|
|
6430
|
+
setSizeStyle(size, ele);
|
|
6431
|
+
}
|
|
6383
6432
|
}, {
|
|
6384
6433
|
immediate: true
|
|
6385
6434
|
});
|
|
6386
6435
|
const orientation = inject("orientation");
|
|
6387
6436
|
let initialSize = "";
|
|
6388
6437
|
onMounted(() => {
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6438
|
+
if (props.size) {
|
|
6439
|
+
initialSize = props.size;
|
|
6440
|
+
}
|
|
6441
|
+
if (store) {
|
|
6442
|
+
store.setPanes({
|
|
6443
|
+
panes: store.state.panes
|
|
6444
|
+
});
|
|
6445
|
+
}
|
|
6393
6446
|
});
|
|
6394
6447
|
onUpdated(() => {
|
|
6395
|
-
store
|
|
6396
|
-
|
|
6397
|
-
|
|
6448
|
+
if (store) {
|
|
6449
|
+
store.setPanes({
|
|
6450
|
+
panes: store.state.panes
|
|
6451
|
+
});
|
|
6452
|
+
}
|
|
6398
6453
|
});
|
|
6399
6454
|
const getPaneSize = () => {
|
|
6400
6455
|
const ele = domRef.value;
|
|
6401
6456
|
if (!ele) {
|
|
6402
|
-
return;
|
|
6457
|
+
return 0;
|
|
6403
6458
|
}
|
|
6404
6459
|
if (orientation === "vertical") {
|
|
6405
6460
|
return ele.offsetHeight;
|