vue-devui 1.0.0-rc.1 → 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 -200
- package/auto-complete/index.es.js +55 -77
- package/auto-complete/index.umd.js +3 -1
- package/auto-complete/style.css +1 -1
- package/editable-select/index.es.js +118 -162
- package/editable-select/index.umd.js +1 -1
- package/nuxt/components/tagProps.js +3 -0
- package/package.json +1 -1
- package/popover/index.es.js +2 -2
- package/popover/index.umd.js +4 -4
- 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 +8 -2
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/ripple/index.es.js +43 -42
- package/ripple/index.umd.js +1 -1
- package/slider/index.es.js +58 -58
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +168 -125
- package/splitter/index.umd.js +11 -11
- package/style.css +1 -1
- package/tag/index.es.js +13 -17
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/vue-devui.es.js +765 -605
- package/vue-devui.umd.js +18 -16
- package/accordion/index.d.ts +0 -7
- package/accordion/index.es.js +0 -723
- 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/package.json +0 -7
- package/anchor/style.css +0 -1
- package/back-top/index.d.ts +0 -7
- package/back-top/index.es.js +0 -130
- 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 -128
- 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 -314
- 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 -5971
- 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 -8196
- 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 -1154
- 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 -693
- 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 -7876
- 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 -332
- 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 -229
- 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/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 -242
- 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 -2024
- 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-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1238
- 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 -5835
- 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 -7615
- 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 -6495
- 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 -627
- 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
|
@@ -23,24 +23,6 @@ var __publicField = (obj, key, value) => {
|
|
|
23
23
|
};
|
|
24
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
25
|
import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
26
|
-
const splitterProps = {
|
|
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
26
|
var baseOverlay = "";
|
|
45
27
|
function _isSlot(s) {
|
|
46
28
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -5883,58 +5865,58 @@ function removeClass(el, className) {
|
|
|
5883
5865
|
}
|
|
5884
5866
|
}
|
|
5885
5867
|
}
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
}
|
|
5898
|
-
};
|
|
5899
|
-
function bindEvent(el) {
|
|
5900
|
-
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
|
+
};
|
|
5901
5879
|
}
|
|
5902
|
-
function bind(el,
|
|
5903
|
-
el.addEventListener && el.addEventListener(
|
|
5880
|
+
function bind(el, eventName, callback) {
|
|
5881
|
+
el.addEventListener && el.addEventListener(eventName, callback);
|
|
5904
5882
|
}
|
|
5905
|
-
function unbind(el,
|
|
5906
|
-
el.removeEventListener && el.removeEventListener(
|
|
5883
|
+
function unbind(el, eventName, callback) {
|
|
5884
|
+
el.removeEventListener && el.removeEventListener(eventName, callback);
|
|
5907
5885
|
}
|
|
5908
5886
|
function onMousedown(e) {
|
|
5909
5887
|
var _a;
|
|
5910
|
-
const
|
|
5911
|
-
if (
|
|
5888
|
+
const resizeProps = (_a = e == null ? void 0 : e.target) == null ? void 0 : _a.resizeProps;
|
|
5889
|
+
if (!resizeProps) {
|
|
5912
5890
|
return;
|
|
5913
5891
|
}
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
$value.onPressEvent(normalizeEvent(e));
|
|
5917
|
-
function onMousemove(e2) {
|
|
5918
|
-
$value.onDragEvent(normalizeEvent(e2));
|
|
5892
|
+
function onMousemove(evt) {
|
|
5893
|
+
resizeProps.onDragEvent(normalizeEvent(evt));
|
|
5919
5894
|
}
|
|
5920
|
-
function onMouseup(
|
|
5895
|
+
function onMouseup(evt) {
|
|
5921
5896
|
unbind(document, "mousemove", onMousemove);
|
|
5922
5897
|
unbind(document, "mouseup", onMouseup);
|
|
5923
|
-
|
|
5898
|
+
resizeProps.onReleaseEvent(normalizeEvent(evt));
|
|
5924
5899
|
}
|
|
5900
|
+
bind(document, "mousemove", onMousemove);
|
|
5901
|
+
bind(document, "mouseup", onMouseup);
|
|
5902
|
+
resizeProps.onPressEvent(normalizeEvent(e));
|
|
5925
5903
|
}
|
|
5926
|
-
function
|
|
5927
|
-
|
|
5928
|
-
pageX: e.pageX,
|
|
5929
|
-
pageY: e.pageY,
|
|
5930
|
-
clientX: e.clientX,
|
|
5931
|
-
clientY: e.clientY,
|
|
5932
|
-
offsetX: e.offsetX,
|
|
5933
|
-
offsetY: e.offsetY,
|
|
5934
|
-
type: e.type,
|
|
5935
|
-
originalEvent: e
|
|
5936
|
-
};
|
|
5904
|
+
function bindEvent(el) {
|
|
5905
|
+
bind(el, "mousedown", onMousedown);
|
|
5937
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
|
+
};
|
|
5938
5920
|
const splitterBarProps = {
|
|
5939
5921
|
index: {
|
|
5940
5922
|
type: Number
|
|
@@ -5978,10 +5960,13 @@ var DSplitterBar = defineComponent({
|
|
|
5978
5960
|
}, {
|
|
5979
5961
|
immediate: true
|
|
5980
5962
|
});
|
|
5981
|
-
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
|
+
}
|
|
5982
5967
|
if (!store.isStaticBar(props.index)) {
|
|
5983
5968
|
state.wrapperClass += " resizable";
|
|
5984
|
-
} else {
|
|
5969
|
+
} else if (ele) {
|
|
5985
5970
|
setStyle(ele, {
|
|
5986
5971
|
flexBasis: props.disabledBarSize
|
|
5987
5972
|
});
|
|
@@ -5989,62 +5974,10 @@ var DSplitterBar = defineComponent({
|
|
|
5989
5974
|
}, {
|
|
5990
5975
|
deep: true
|
|
5991
5976
|
});
|
|
5992
|
-
const coordinate = {
|
|
5993
|
-
pageX: 0,
|
|
5994
|
-
pageY: 0,
|
|
5995
|
-
originalX: 0,
|
|
5996
|
-
originalY: 0
|
|
5997
|
-
};
|
|
5998
|
-
let initState;
|
|
5999
|
-
const resizeProp = {
|
|
6000
|
-
enableResize: true,
|
|
6001
|
-
onPressEvent: function({
|
|
6002
|
-
originalEvent
|
|
6003
|
-
}) {
|
|
6004
|
-
originalEvent.stopPropagation();
|
|
6005
|
-
if (!store.isResizable(props.index)) {
|
|
6006
|
-
return;
|
|
6007
|
-
}
|
|
6008
|
-
initState = store.dragState(props.index);
|
|
6009
|
-
coordinate.originalX = originalEvent.pageX;
|
|
6010
|
-
coordinate.originalY = originalEvent.pageY;
|
|
6011
|
-
},
|
|
6012
|
-
onDragEvent: function({
|
|
6013
|
-
originalEvent
|
|
6014
|
-
}) {
|
|
6015
|
-
originalEvent.stopPropagation();
|
|
6016
|
-
if (!store.isResizable(props.index)) {
|
|
6017
|
-
return;
|
|
6018
|
-
}
|
|
6019
|
-
coordinate.pageX = originalEvent.pageX;
|
|
6020
|
-
coordinate.pageY = originalEvent.pageY;
|
|
6021
|
-
let distance;
|
|
6022
|
-
if (props.orientation === "vertical") {
|
|
6023
|
-
distance = coordinate.pageY - coordinate.originalY;
|
|
6024
|
-
} else {
|
|
6025
|
-
distance = coordinate.pageX - coordinate.originalX;
|
|
6026
|
-
}
|
|
6027
|
-
store.setSize(initState, distance);
|
|
6028
|
-
},
|
|
6029
|
-
onReleaseEvent: function({
|
|
6030
|
-
originalEvent
|
|
6031
|
-
}) {
|
|
6032
|
-
originalEvent.stopPropagation();
|
|
6033
|
-
if (!store.isResizable(props.index)) {
|
|
6034
|
-
return;
|
|
6035
|
-
}
|
|
6036
|
-
coordinate.pageX = originalEvent.pageX;
|
|
6037
|
-
coordinate.pageY = originalEvent.pageY;
|
|
6038
|
-
let distance;
|
|
6039
|
-
if (props.orientation === "vertical") {
|
|
6040
|
-
distance = coordinate.pageY - coordinate.originalY;
|
|
6041
|
-
} else {
|
|
6042
|
-
distance = coordinate.pageX - coordinate.originalX;
|
|
6043
|
-
}
|
|
6044
|
-
store.setSize(initState, distance);
|
|
6045
|
-
}
|
|
6046
|
-
};
|
|
6047
5977
|
const queryPanes = (index2, nearIndex) => {
|
|
5978
|
+
if (!store) {
|
|
5979
|
+
return {};
|
|
5980
|
+
}
|
|
6048
5981
|
const pane = store.getPane(index2);
|
|
6049
5982
|
const nearPane = store.getPane(nearIndex);
|
|
6050
5983
|
return {
|
|
@@ -6056,7 +5989,7 @@ var DSplitterBar = defineComponent({
|
|
|
6056
5989
|
var _a, _b, _c, _d;
|
|
6057
5990
|
const isCollapsible = ((_b = (_a = pane == null ? void 0 : pane.component) == null ? void 0 : _a.props) == null ? void 0 : _b.collapsible) && showIcon;
|
|
6058
5991
|
const isCollapsed = (_d = (_c = pane == null ? void 0 : pane.component) == null ? void 0 : _c.props) == null ? void 0 : _d.collapsed;
|
|
6059
|
-
const isNearPaneCollapsed = nearPane.collapsed;
|
|
5992
|
+
const isNearPaneCollapsed = nearPane == null ? void 0 : nearPane.collapsed;
|
|
6060
5993
|
return {
|
|
6061
5994
|
"devui-collapse": isCollapsible,
|
|
6062
5995
|
collapsed: isCollapsed,
|
|
@@ -6065,6 +5998,9 @@ var DSplitterBar = defineComponent({
|
|
|
6065
5998
|
};
|
|
6066
5999
|
const prevClass = computed(() => {
|
|
6067
6000
|
var _a, _b;
|
|
6001
|
+
if (!props || props.index === void 0) {
|
|
6002
|
+
return {};
|
|
6003
|
+
}
|
|
6068
6004
|
const {
|
|
6069
6005
|
pane,
|
|
6070
6006
|
nearPane
|
|
@@ -6074,6 +6010,9 @@ var DSplitterBar = defineComponent({
|
|
|
6074
6010
|
});
|
|
6075
6011
|
const nextClass = computed(() => {
|
|
6076
6012
|
var _a, _b;
|
|
6013
|
+
if (!store || !props || props.index === void 0) {
|
|
6014
|
+
return {};
|
|
6015
|
+
}
|
|
6077
6016
|
const {
|
|
6078
6017
|
pane,
|
|
6079
6018
|
nearPane
|
|
@@ -6083,6 +6022,9 @@ var DSplitterBar = defineComponent({
|
|
|
6083
6022
|
});
|
|
6084
6023
|
const toggleResize = () => {
|
|
6085
6024
|
var _a, _b, _c, _d;
|
|
6025
|
+
if (!domRef.value || !props || props.index === void 0) {
|
|
6026
|
+
return;
|
|
6027
|
+
}
|
|
6086
6028
|
const {
|
|
6087
6029
|
pane,
|
|
6088
6030
|
nearPane
|
|
@@ -6095,10 +6037,16 @@ var DSplitterBar = defineComponent({
|
|
|
6095
6037
|
}
|
|
6096
6038
|
};
|
|
6097
6039
|
const handleCollapsePrePane = (lockStatus) => {
|
|
6040
|
+
if (!store || !props || props.index === void 0) {
|
|
6041
|
+
return;
|
|
6042
|
+
}
|
|
6098
6043
|
store.tooglePane(props.index, props.index + 1, lockStatus);
|
|
6099
6044
|
toggleResize();
|
|
6100
6045
|
};
|
|
6101
6046
|
const handleCollapseNextPane = (lockStatus) => {
|
|
6047
|
+
if (!store || !props || props.index === void 0) {
|
|
6048
|
+
return;
|
|
6049
|
+
}
|
|
6102
6050
|
store.tooglePane(props.index + 1, props.index, lockStatus);
|
|
6103
6051
|
toggleResize();
|
|
6104
6052
|
};
|
|
@@ -6106,11 +6054,78 @@ var DSplitterBar = defineComponent({
|
|
|
6106
6054
|
handleCollapsePrePane(true);
|
|
6107
6055
|
handleCollapseNextPane(true);
|
|
6108
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
|
+
};
|
|
6109
6121
|
onMounted(() => {
|
|
6110
6122
|
initialCollapseStatus();
|
|
6111
6123
|
});
|
|
6112
6124
|
const renderCollapsedTip = () => {
|
|
6113
6125
|
var _a, _b, _c, _d;
|
|
6126
|
+
if (!props || props.index === void 0) {
|
|
6127
|
+
return "\u6536\u8D77";
|
|
6128
|
+
}
|
|
6114
6129
|
const {
|
|
6115
6130
|
pane,
|
|
6116
6131
|
nearPane
|
|
@@ -6254,6 +6269,24 @@ class SplitterStore {
|
|
|
6254
6269
|
}
|
|
6255
6270
|
}
|
|
6256
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
|
+
};
|
|
6257
6290
|
var splitter = "";
|
|
6258
6291
|
var Splitter = defineComponent({
|
|
6259
6292
|
name: "DSplitter",
|
|
@@ -6295,7 +6328,9 @@ var Splitter = defineComponent({
|
|
|
6295
6328
|
return;
|
|
6296
6329
|
}
|
|
6297
6330
|
refreshSplitterContainerSize();
|
|
6298
|
-
|
|
6331
|
+
if (domRef.value) {
|
|
6332
|
+
observer.observe(domRef.value);
|
|
6333
|
+
}
|
|
6299
6334
|
});
|
|
6300
6335
|
onUnmounted(() => {
|
|
6301
6336
|
observer.disconnect();
|
|
@@ -6391,27 +6426,35 @@ var SplitterPane = defineComponent({
|
|
|
6391
6426
|
}
|
|
6392
6427
|
};
|
|
6393
6428
|
watch([() => props.size, domRef], ([size, ele]) => {
|
|
6394
|
-
|
|
6429
|
+
if (size && ele) {
|
|
6430
|
+
setSizeStyle(size, ele);
|
|
6431
|
+
}
|
|
6395
6432
|
}, {
|
|
6396
6433
|
immediate: true
|
|
6397
6434
|
});
|
|
6398
6435
|
const orientation = inject("orientation");
|
|
6399
6436
|
let initialSize = "";
|
|
6400
6437
|
onMounted(() => {
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6438
|
+
if (props.size) {
|
|
6439
|
+
initialSize = props.size;
|
|
6440
|
+
}
|
|
6441
|
+
if (store) {
|
|
6442
|
+
store.setPanes({
|
|
6443
|
+
panes: store.state.panes
|
|
6444
|
+
});
|
|
6445
|
+
}
|
|
6405
6446
|
});
|
|
6406
6447
|
onUpdated(() => {
|
|
6407
|
-
store
|
|
6408
|
-
|
|
6409
|
-
|
|
6448
|
+
if (store) {
|
|
6449
|
+
store.setPanes({
|
|
6450
|
+
panes: store.state.panes
|
|
6451
|
+
});
|
|
6452
|
+
}
|
|
6410
6453
|
});
|
|
6411
6454
|
const getPaneSize = () => {
|
|
6412
6455
|
const ele = domRef.value;
|
|
6413
6456
|
if (!ele) {
|
|
6414
|
-
return;
|
|
6457
|
+
return 0;
|
|
6415
6458
|
}
|
|
6416
6459
|
if (orientation === "vertical") {
|
|
6417
6460
|
return ele.offsetHeight;
|