vxe-pc-ui 4.20.9 → 4.20.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/dist/all.esm.js +1863 -2038
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/date-panel/src/date-panel.js +58 -36
- package/es/date-panel/style.css +22 -20
- package/es/date-panel/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +74 -38
- package/es/icon-picker/style.css +9 -3
- package/es/icon-picker/style.min.css +1 -1
- package/es/list/src/list.js +8 -164
- package/es/scrollbar/src/scrollbar.js +20 -173
- package/es/select/src/select.js +243 -8
- package/es/select/style.css +44 -0
- package/es/select/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tooltip/src/tooltip.js +2 -4
- package/es/tooltip/style.css +2 -0
- package/es/tooltip/style.min.css +1 -1
- package/es/tree/src/tree.js +17 -172
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-date-panel/style.css +22 -20
- package/es/vxe-date-panel/style.min.css +1 -1
- package/es/vxe-icon-picker/style.css +9 -3
- package/es/vxe-icon-picker/style.min.css +1 -1
- package/es/vxe-select/style.css +44 -0
- package/es/vxe-select/style.min.css +1 -1
- package/es/vxe-tooltip/style.css +2 -0
- package/es/vxe-tooltip/style.min.css +1 -1
- package/lib/date-panel/src/date-panel.js +56 -34
- package/lib/date-panel/src/date-panel.min.js +1 -1
- package/lib/date-panel/style/style.css +22 -20
- package/lib/date-panel/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +101 -45
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/icon-picker/style/style.css +9 -3
- package/lib/icon-picker/style/style.min.css +1 -1
- package/lib/index.umd.js +813 -756
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +25 -194
- package/lib/list/src/list.min.js +1 -1
- package/lib/scrollbar/src/scrollbar.js +34 -199
- package/lib/scrollbar/src/scrollbar.min.js +1 -1
- package/lib/select/src/select.js +315 -68
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +44 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tooltip/src/tooltip.js +2 -4
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +2 -0
- package/lib/tooltip/style/style.min.css +1 -1
- package/lib/tree/src/tree.js +36 -201
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-date-panel/style/style.css +22 -20
- package/lib/vxe-date-panel/style/style.min.css +1 -1
- package/lib/vxe-icon-picker/style/style.css +9 -3
- package/lib/vxe-icon-picker/style/style.min.css +1 -1
- package/lib/vxe-select/style/style.css +44 -0
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-tooltip/style/style.css +2 -0
- package/lib/vxe-tooltip/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/date-panel/src/date-panel.ts +58 -36
- package/packages/icon-picker/src/icon-picker.ts +80 -38
- package/packages/list/src/list.ts +24 -181
- package/packages/scrollbar/src/scrollbar.ts +36 -188
- package/packages/select/src/select.ts +278 -8
- package/packages/tooltip/src/tooltip.ts +2 -4
- package/packages/tree/src/tree.ts +33 -189
- package/styles/components/date-panel.scss +31 -29
- package/styles/components/icon-picker.scss +9 -3
- package/styles/components/select.scss +77 -0
- package/styles/components/tooltip.scss +1 -0
- package/types/components/gantt-module/gantt-view.d.ts +7 -16
- package/types/components/icon-picker.d.ts +21 -1
- package/types/components/list.d.ts +4 -0
- package/types/components/scrollbar.d.ts +7 -14
- package/types/components/select.d.ts +28 -3
- package/types/components/table.d.ts +20 -18
- package/types/components/tree.d.ts +7 -16
- /package/es/icon/{iconfont.1792139440389.ttf → iconfont.1792219842406.ttf} +0 -0
- /package/es/icon/{iconfont.1792139440389.woff → iconfont.1792219842406.woff} +0 -0
- /package/es/icon/{iconfont.1792139440389.woff2 → iconfont.1792219842406.woff2} +0 -0
- /package/es/{iconfont.1792139440389.ttf → iconfont.1792219842406.ttf} +0 -0
- /package/es/{iconfont.1792139440389.woff → iconfont.1792219842406.woff} +0 -0
- /package/es/{iconfont.1792139440389.woff2 → iconfont.1792219842406.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1792139440389.ttf → iconfont.1792219842406.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1792139440389.woff → iconfont.1792219842406.woff} +0 -0
- /package/lib/icon/style/{iconfont.1792139440389.woff2 → iconfont.1792219842406.woff2} +0 -0
- /package/lib/{iconfont.1792139440389.ttf → iconfont.1792219842406.ttf} +0 -0
- /package/lib/{iconfont.1792139440389.woff → iconfont.1792219842406.woff} +0 -0
- /package/lib/{iconfont.1792139440389.woff2 → iconfont.1792219842406.woff2} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-ico-picker,.vxe-ico-picker--panel{--vxe-ui-ico-picker-current-font-size:var(--vxe-ui-font-size-default);--vxe-ui-ico-picker-current-height:var(--vxe-ui-input-height-default)}.vxe-ico-picker--panel.size--medium,.vxe-ico-picker.size--medium{--vxe-ui-ico-picker-current-font-size:var(--vxe-ui-font-size-medium);--vxe-ui-ico-picker-current-height:var(--vxe-ui-input-height-medium)}.vxe-ico-picker--panel.size--small,.vxe-ico-picker.size--small{--vxe-ui-ico-picker-current-font-size:var(--vxe-ui-font-size-small);--vxe-ui-ico-picker-current-height:var(--vxe-ui-input-height-small)}.vxe-ico-picker--panel.size--mini,.vxe-ico-picker.size--mini{--vxe-ui-ico-picker-current-font-size:var(--vxe-ui-font-size-mini);--vxe-ui-ico-picker-current-height:var(--vxe-ui-input-height-mini)}.vxe-ico-picker{position:relative;display:inline-block;font-size:var(--vxe-ui-ico-picker-current-font-size);color:var(--vxe-ui-font-color);width:100px;border:1px solid var(--vxe-ui-input-border-color);border-radius:var(--vxe-ui-base-border-radius);background-color:var(--vxe-ui-layout-background-color);height:var(--vxe-ui-ico-picker-current-height);line-height:var(--vxe-ui-ico-picker-current-height)}.vxe-ico-picker.is--disabled{background-color:var(--vxe-ui-input-disabled-background-color);color:var(--vxe-ui-font-disabled-color);cursor:no-drop}.vxe-ico-picker.show--clear:hover .vxe-ico-picker--clear-icon{display:block}.vxe-ico-picker.is--active{border-color:var(--vxe-ui-font-primary-color)}.vxe-ico-picker--inner{display:flex;flex-direction:row;width:100%;padding:0 .5em}.vxe-ico-picker--input{position:absolute;z-index:-1;width:1px;height:1px;outline:0;border:0}.vxe-ico-picker--icon{flex-grow:1;display:inline-flex;flex-direction:row;align-items:center;justify-content:left;padding:0 .5em}.vxe-ico-picker--icon>svg{max-width:1em;max-height:1em;vertical-align:middle}.vxe-ico-picker--placeholder{flex-grow:1;color:var(--vxe-ui-input-placeholder-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-ico-picker--suffix{display:flex;flex-direction:row;flex-shrink:0;color:var(--vxe-ui-input-placeholder-color);cursor:pointer}.vxe-ico-picker--suffix .vxe-ico-picker--suffix-icon>i{display:inline-block;transition:transform .2s ease-in-out}.vxe-ico-picker--panel-search{display:block;flex-shrink:0;padding:var(--vxe-ui-layout-padding-default)}.vxe-ico-picker--panel-search .vxe-ico-picker-search--input{width:100%}.vxe-ico-picker--readonly{color:var(--vxe-ui-font-color);display:inline-flex}.vxe-ico-picker--clear-icon{display:none;padding-right:.5em;height:100%;color:var(--vxe-ui-input-placeholder-color);cursor:pointer}.vxe-ico-picker--clear-icon:hover{color:var(--vxe-ui-font-color)}.vxe-ico-picker--clear-icon:active{color:var(--vxe-ui-font-primary-color)}.vxe-ico-picker--list-wrapper{overflow-x:hidden;overflow-y:auto;height:var(--vxe-ui-icon-picker-panel-height);max-height:var(--vxe-ui-icon-picker-panel-max-height,var(--vxe-ui-icon-picker-panel-height,22.
|
|
1
|
+
.vxe-ico-picker,.vxe-ico-picker--panel{--vxe-ui-ico-picker-current-font-size:var(--vxe-ui-font-size-default);--vxe-ui-ico-picker-current-height:var(--vxe-ui-input-height-default)}.vxe-ico-picker--panel.size--medium,.vxe-ico-picker.size--medium{--vxe-ui-ico-picker-current-font-size:var(--vxe-ui-font-size-medium);--vxe-ui-ico-picker-current-height:var(--vxe-ui-input-height-medium)}.vxe-ico-picker--panel.size--small,.vxe-ico-picker.size--small{--vxe-ui-ico-picker-current-font-size:var(--vxe-ui-font-size-small);--vxe-ui-ico-picker-current-height:var(--vxe-ui-input-height-small)}.vxe-ico-picker--panel.size--mini,.vxe-ico-picker.size--mini{--vxe-ui-ico-picker-current-font-size:var(--vxe-ui-font-size-mini);--vxe-ui-ico-picker-current-height:var(--vxe-ui-input-height-mini)}.vxe-ico-picker{position:relative;display:inline-block;font-size:var(--vxe-ui-ico-picker-current-font-size);color:var(--vxe-ui-font-color);width:100px;border:1px solid var(--vxe-ui-input-border-color);border-radius:var(--vxe-ui-base-border-radius);background-color:var(--vxe-ui-layout-background-color);height:var(--vxe-ui-ico-picker-current-height);line-height:var(--vxe-ui-ico-picker-current-height)}.vxe-ico-picker.is--disabled{background-color:var(--vxe-ui-input-disabled-background-color);color:var(--vxe-ui-font-disabled-color);cursor:no-drop}.vxe-ico-picker.show--clear:hover .vxe-ico-picker--clear-icon{display:block}.vxe-ico-picker.is--active{border-color:var(--vxe-ui-font-primary-color)}.vxe-ico-picker--inner{display:flex;flex-direction:row;width:100%;padding:0 .5em}.vxe-ico-picker--input{position:absolute;z-index:-1;width:1px;height:1px;outline:0;border:0}.vxe-ico-picker--icon{flex-grow:1;display:inline-flex;flex-direction:row;align-items:center;justify-content:left;padding:0 .5em}.vxe-ico-picker--icon>svg{max-width:1em;max-height:1em;vertical-align:middle}.vxe-ico-picker--placeholder{flex-grow:1;color:var(--vxe-ui-input-placeholder-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-ico-picker--suffix{display:flex;flex-direction:row;flex-shrink:0;color:var(--vxe-ui-input-placeholder-color);cursor:pointer}.vxe-ico-picker--suffix .vxe-ico-picker--suffix-icon>i{display:inline-block;transition:transform .2s ease-in-out}.vxe-ico-picker--panel-search{display:block;flex-shrink:0;padding:var(--vxe-ui-layout-padding-default)}.vxe-ico-picker--panel-search .vxe-ico-picker-search--input{width:100%}.vxe-ico-picker--readonly{color:var(--vxe-ui-font-color);display:inline-flex}.vxe-ico-picker--clear-icon{display:none;padding-right:.5em;height:100%;color:var(--vxe-ui-input-placeholder-color);cursor:pointer}.vxe-ico-picker--clear-icon:hover{color:var(--vxe-ui-font-color)}.vxe-ico-picker--clear-icon:active{color:var(--vxe-ui-font-primary-color)}.vxe-ico-picker--list-wrapper,.vxe-ico-picker--scrollbar-list-wrapper{overflow-x:hidden;overflow-y:auto;height:var(--vxe-ui-icon-picker-panel-height);padding:var(--vxe-ui-layout-padding-qtr)}.vxe-ico-picker--list-wrapper,.vxe-ico-picker--scrollbar-list-wrapper-view{max-height:var(--vxe-ui-icon-picker-panel-max-height,var(--vxe-ui-icon-picker-panel-height,22.6em))}.vxe-ico-picker--list,.vxe-ico-picker--scrollbar-list-wrapper-inner{display:flex;flex-direction:row;flex-wrap:wrap}.vxe-ico-picker--item{display:flex;flex-direction:column;width:var(--vxe-ui-icon-picker-item-width,25%);padding:var(--vxe-ui-layout-padding-half)}.vxe-ico-picker--item .vxe-ico-picker--item-inner{padding:.2em;border:1px solid var(--vxe-ui-input-border-color);border-radius:var(--vxe-ui-base-border-radius);cursor:pointer}.vxe-ico-picker--item .vxe-ico-picker--item-inner:hover{background-color:var(--vxe-ui-base-hover-background-color)}.vxe-ico-picker--item.is--selected .vxe-ico-picker--item-inner{color:var(--vxe-ui-font-primary-color);border-color:var(--vxe-ui-font-primary-color)}.vxe-ico-picker--item-icon{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;height:1.5em;font-size:var(--vxe-ui-icon-picker-panel-icon-font-size)}.vxe-ico-picker--item-icon>svg{max-width:1em;max-height:1em;vertical-align:middle}.vxe-ico-picker--item-title{padding:0 .2em;line-height:1.3em;flex-shrink:0;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9em}.vxe-ico-picker--item-icon,.vxe-ico-picker--item-title{width:100%}.vxe-ico-picker--panel-wrapper{position:relative;border-radius:var(--vxe-ui-base-border-radius);border:1px solid var(--vxe-ui-base-popup-border-color);box-shadow:var(--vxe-ui-base-popup-box-shadow);background-color:var(--vxe-ui-layout-background-color)}.vxe-ico-picker--panel{display:none;position:absolute;left:0;padding:4px 0;font-size:var(--vxe-ui-ico-picker-current-font-size);color:var(--vxe-ui-font-color);text-align:left;width:20em}.vxe-ico-picker--panel:not(.is--transfer){min-width:100%}.vxe-ico-picker--panel.is--transfer{position:fixed}.vxe-ico-picker--panel.ani--leave{display:block;opacity:0;transform:scaleY(.5);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transform-origin:center top;backface-visibility:hidden}.vxe-ico-picker--panel.ani--leave[placement=top]{transform-origin:center bottom}.vxe-ico-picker--panel.ani--enter{opacity:1;transform:scaleY(1)}.vxe-ico-picker--empty-placeholder{display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .6em;text-align:center;min-height:4em}
|
package/es/list/src/list.js
CHANGED
|
@@ -9,8 +9,7 @@ import { createComponentLog } from '../../ui/src/log';
|
|
|
9
9
|
import { moveRowAnimateToTb, clearRowAnimate } from '../../ui/src/anime';
|
|
10
10
|
import { getItemCacheObj } from './util';
|
|
11
11
|
import VxeLoadingComponent from '../../loading';
|
|
12
|
-
const { getConfig, getIcon, getI18n, domUtils,
|
|
13
|
-
const { getThumbOffsetSize, getThumbSize, getScrollFromClick, getScrollFromDrag } = scrollbarUtils;
|
|
12
|
+
const { getConfig, getIcon, getI18n, domUtils, useFns, menus, globalEvents, globalResize } = VxeUI;
|
|
14
13
|
const { warnLog, errLog } = createComponentLog('tree');
|
|
15
14
|
function getRowKeyByField(row, keyField) {
|
|
16
15
|
return row ? ('' + (row[keyField] || '')) : '';
|
|
@@ -145,8 +144,6 @@ export default defineVxeComponent({
|
|
|
145
144
|
const { slots, emit } = context;
|
|
146
145
|
const xID = XEUtils.uniqueId();
|
|
147
146
|
const browseObj = XEUtils.browse();
|
|
148
|
-
const { computeSize } = useFns.useSize(props);
|
|
149
|
-
const { computeIsVScrollbar } = useFns.useVScrollbar(props);
|
|
150
147
|
const reactData = reactive(createReactData());
|
|
151
148
|
const internalData = createInternalData();
|
|
152
149
|
const crossListDragRowInfo = getCrossListDragRowInfo();
|
|
@@ -156,12 +153,10 @@ export default defineVxeComponent({
|
|
|
156
153
|
const refVirtualWrapper = ref();
|
|
157
154
|
const refVirtualSpaceElem = ref();
|
|
158
155
|
const refVirtualBody = ref();
|
|
159
|
-
const refTrackXElem = ref();
|
|
160
|
-
const refTrackYElem = ref();
|
|
161
|
-
const refThumbXElem = ref();
|
|
162
|
-
const refThumbYElem = ref();
|
|
163
156
|
const refDragRowLineElem = ref();
|
|
164
157
|
const refDragTipElem = ref();
|
|
158
|
+
const { computeSize } = useFns.useSize(props);
|
|
159
|
+
const { computeIsVScrollbar } = useFns.useVScrollbar(props);
|
|
165
160
|
const refMaps = {
|
|
166
161
|
refElem
|
|
167
162
|
};
|
|
@@ -173,6 +168,7 @@ export default defineVxeComponent({
|
|
|
173
168
|
internalData,
|
|
174
169
|
getRefMaps: () => refMaps
|
|
175
170
|
};
|
|
171
|
+
const { refTrackXElem, refTrackYElem, refThumbXElem, refThumbYElem, updateThumbSize, updateThumbOffset, clickTrackXEvent, clickTrackYEvent, pointerdownThumbXEvent, pointermoveThumbXEvent, cleatPointerThumbEvent, pointerdownThumbYEvent, pointermoveThumbYEvent } = useFns.useInitVScrollbar($xeList);
|
|
176
172
|
const computeRowOpts = computed(() => {
|
|
177
173
|
return Object.assign({}, getConfig().list.rowConfig, props.rowConfig);
|
|
178
174
|
});
|
|
@@ -1495,6 +1491,10 @@ export default defineVxeComponent({
|
|
|
1495
1491
|
};
|
|
1496
1492
|
const listMethods = {
|
|
1497
1493
|
dispatchEvent,
|
|
1494
|
+
getScrollViewElem() {
|
|
1495
|
+
const viewEl = refVirtualWrapper.value;
|
|
1496
|
+
return viewEl || null;
|
|
1497
|
+
},
|
|
1498
1498
|
loadData,
|
|
1499
1499
|
/**
|
|
1500
1500
|
* 重新加载数据
|
|
@@ -1842,162 +1842,6 @@ export default defineVxeComponent({
|
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
1844
|
};
|
|
1845
|
-
const updateThumbSize = () => {
|
|
1846
|
-
const viewEl = refVirtualWrapper.value;
|
|
1847
|
-
if (!viewEl) {
|
|
1848
|
-
return;
|
|
1849
|
-
}
|
|
1850
|
-
if (!viewEl.clientHeight || !viewEl.clientHeight) {
|
|
1851
|
-
return;
|
|
1852
|
-
}
|
|
1853
|
-
const trackXEl = refTrackXElem.value;
|
|
1854
|
-
const xThumbWidth = trackXEl ? getThumbSize(viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth) : 0;
|
|
1855
|
-
const thumbXElem = refThumbXElem.value;
|
|
1856
|
-
if (thumbXElem) {
|
|
1857
|
-
thumbXElem.style.width = xThumbWidth + 'px';
|
|
1858
|
-
}
|
|
1859
|
-
reactData.xThumbWidth = xThumbWidth;
|
|
1860
|
-
const trackYEl = refTrackYElem.value;
|
|
1861
|
-
const yThumbHeight = trackYEl ? getThumbSize(viewEl.clientHeight, viewEl.scrollHeight, trackYEl.clientHeight) : 0;
|
|
1862
|
-
const thumbYElem = refThumbYElem.value;
|
|
1863
|
-
if (thumbYElem) {
|
|
1864
|
-
thumbYElem.style.height = yThumbHeight + 'px';
|
|
1865
|
-
}
|
|
1866
|
-
reactData.yThumbHeight = yThumbHeight;
|
|
1867
|
-
};
|
|
1868
|
-
const updateThumbOffset = () => {
|
|
1869
|
-
const viewEl = refVirtualWrapper.value;
|
|
1870
|
-
if (!viewEl) {
|
|
1871
|
-
return;
|
|
1872
|
-
}
|
|
1873
|
-
if (!viewEl.clientHeight || !viewEl.clientHeight) {
|
|
1874
|
-
return;
|
|
1875
|
-
}
|
|
1876
|
-
const { xThumbWidth, yThumbHeight } = reactData;
|
|
1877
|
-
const trackXEl = refTrackXElem.value;
|
|
1878
|
-
const thumbXElem = refThumbXElem.value;
|
|
1879
|
-
const xThumbLeft = trackXEl && xThumbWidth ? getThumbOffsetSize(viewEl.scrollLeft, viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth, xThumbWidth) : 0;
|
|
1880
|
-
internalData.xThumbLeft = xThumbLeft;
|
|
1881
|
-
if (thumbXElem && xThumbWidth) {
|
|
1882
|
-
thumbXElem.style.width = xThumbWidth + 'px';
|
|
1883
|
-
thumbXElem.style.transform = `translateX(${xThumbLeft}px)`;
|
|
1884
|
-
}
|
|
1885
|
-
const trackYEl = refTrackYElem.value;
|
|
1886
|
-
const thumbYElem = refThumbYElem.value;
|
|
1887
|
-
const yThumbTop = trackYEl && yThumbHeight ? getThumbOffsetSize(viewEl.scrollTop, viewEl.clientHeight, viewEl.scrollHeight, trackYEl.clientHeight, yThumbHeight) : 0;
|
|
1888
|
-
internalData.yThumbTop = yThumbTop;
|
|
1889
|
-
if (thumbYElem && yThumbHeight) {
|
|
1890
|
-
thumbYElem.style.height = yThumbHeight + 'px';
|
|
1891
|
-
thumbYElem.style.transform = `translateY(${yThumbTop}px)`;
|
|
1892
|
-
}
|
|
1893
|
-
};
|
|
1894
|
-
const clickTrackXEvent = (evnt) => {
|
|
1895
|
-
const trackEl = evnt.currentTarget;
|
|
1896
|
-
if (trackEl !== evnt.target) {
|
|
1897
|
-
return;
|
|
1898
|
-
}
|
|
1899
|
-
const viewEl = refVirtualWrapper.value;
|
|
1900
|
-
if (!viewEl) {
|
|
1901
|
-
return;
|
|
1902
|
-
}
|
|
1903
|
-
const { xThumbWidth } = reactData;
|
|
1904
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
1905
|
-
viewEl.scrollTo({
|
|
1906
|
-
left: getScrollFromClick(evnt.clientX - trackRect.left, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth),
|
|
1907
|
-
behavior: 'auto'
|
|
1908
|
-
});
|
|
1909
|
-
};
|
|
1910
|
-
const clickTrackYEvent = (evnt) => {
|
|
1911
|
-
const trackEl = evnt.currentTarget;
|
|
1912
|
-
if (trackEl !== evnt.target) {
|
|
1913
|
-
return;
|
|
1914
|
-
}
|
|
1915
|
-
const viewEl = refVirtualWrapper.value;
|
|
1916
|
-
if (!viewEl) {
|
|
1917
|
-
return;
|
|
1918
|
-
}
|
|
1919
|
-
const { yThumbHeight } = reactData;
|
|
1920
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
1921
|
-
viewEl.scrollTo({
|
|
1922
|
-
top: getScrollFromClick(evnt.clientY - trackRect.top, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight),
|
|
1923
|
-
behavior: 'auto'
|
|
1924
|
-
});
|
|
1925
|
-
};
|
|
1926
|
-
const pointerdownThumbXEvent = (evnt) => {
|
|
1927
|
-
const thumbEl = evnt.currentTarget;
|
|
1928
|
-
internalData.isThumbDrag = true;
|
|
1929
|
-
thumbEl.setPointerCapture(evnt.pointerId);
|
|
1930
|
-
const viewEl = refVirtualWrapper.value;
|
|
1931
|
-
if (!viewEl) {
|
|
1932
|
-
return;
|
|
1933
|
-
}
|
|
1934
|
-
const { xThumbWidth } = reactData;
|
|
1935
|
-
const trackEl = thumbEl.parentElement;
|
|
1936
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
1937
|
-
const pointerPosition = evnt.clientX - trackRect.left;
|
|
1938
|
-
// 记录 thumb 的偏移
|
|
1939
|
-
const thumbOffset = getThumbOffsetSize(viewEl.scrollLeft, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth);
|
|
1940
|
-
internalData.thumbDragOffset = pointerPosition - thumbOffset;
|
|
1941
|
-
};
|
|
1942
|
-
const pointermoveThumbXEvent = (evnt) => {
|
|
1943
|
-
const thumbEl = evnt.currentTarget;
|
|
1944
|
-
if (!thumbEl.hasPointerCapture(evnt.pointerId)) {
|
|
1945
|
-
return;
|
|
1946
|
-
}
|
|
1947
|
-
const { isThumbDrag, thumbDragOffset } = internalData;
|
|
1948
|
-
if (isThumbDrag) {
|
|
1949
|
-
const viewEl = refVirtualWrapper.value;
|
|
1950
|
-
if (!viewEl) {
|
|
1951
|
-
return;
|
|
1952
|
-
}
|
|
1953
|
-
const { xThumbWidth } = reactData;
|
|
1954
|
-
const thumbEl = evnt.currentTarget;
|
|
1955
|
-
const trackEl = thumbEl.parentElement;
|
|
1956
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
1957
|
-
// 更新偏移
|
|
1958
|
-
viewEl.scrollLeft = getScrollFromDrag(evnt.clientX - trackRect.left, thumbDragOffset, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth);
|
|
1959
|
-
}
|
|
1960
|
-
};
|
|
1961
|
-
const cleatPointerThumbEvent = (evnt) => {
|
|
1962
|
-
const thumbEl = evnt.currentTarget;
|
|
1963
|
-
thumbEl.releasePointerCapture(evnt.pointerId);
|
|
1964
|
-
internalData.isThumbDrag = false;
|
|
1965
|
-
};
|
|
1966
|
-
const pointerdownThumbYEvent = (evnt) => {
|
|
1967
|
-
const thumbEl = evnt.currentTarget;
|
|
1968
|
-
internalData.isThumbDrag = true;
|
|
1969
|
-
thumbEl.setPointerCapture(evnt.pointerId);
|
|
1970
|
-
const viewEl = refVirtualWrapper.value;
|
|
1971
|
-
if (!viewEl) {
|
|
1972
|
-
return;
|
|
1973
|
-
}
|
|
1974
|
-
const { yThumbHeight } = reactData;
|
|
1975
|
-
const trackEl = thumbEl.parentElement;
|
|
1976
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
1977
|
-
const pointerPosition = evnt.clientY - trackRect.top;
|
|
1978
|
-
// 记录 thumb 的偏移
|
|
1979
|
-
const thumbOffset = getThumbOffsetSize(viewEl.scrollTop, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight);
|
|
1980
|
-
internalData.thumbDragOffset = pointerPosition - thumbOffset;
|
|
1981
|
-
};
|
|
1982
|
-
const pointermoveThumbYEvent = (evnt) => {
|
|
1983
|
-
const thumbEl = evnt.currentTarget;
|
|
1984
|
-
if (!thumbEl.hasPointerCapture(evnt.pointerId)) {
|
|
1985
|
-
return;
|
|
1986
|
-
}
|
|
1987
|
-
const { isThumbDrag, thumbDragOffset } = internalData;
|
|
1988
|
-
if (isThumbDrag) {
|
|
1989
|
-
const viewEl = refVirtualWrapper.value;
|
|
1990
|
-
if (!viewEl) {
|
|
1991
|
-
return;
|
|
1992
|
-
}
|
|
1993
|
-
const { yThumbHeight } = reactData;
|
|
1994
|
-
const thumbEl = evnt.currentTarget;
|
|
1995
|
-
const trackEl = thumbEl.parentElement;
|
|
1996
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
1997
|
-
// 更新偏移
|
|
1998
|
-
viewEl.scrollTop = getScrollFromDrag(evnt.clientY - trackRect.top, thumbDragOffset, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight);
|
|
1999
|
-
}
|
|
2000
|
-
};
|
|
2001
1845
|
Object.assign($xeList, listMethods, listPrivateMethods);
|
|
2002
1846
|
const renderDragTip = () => {
|
|
2003
1847
|
const { dragRow, dragTipText } = reactData;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ref, h, reactive, computed, onMounted, onBeforeUnmount, nextTick, watch } from 'vue';
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
|
-
import { VxeUI } from '../../ui';
|
|
4
|
+
import { VxeUI, useFns } from '../../ui';
|
|
5
5
|
import { toCssUnit } from '../../ui/src/dom';
|
|
6
6
|
import { getDefaultConfig } from '../../ui/src/utils';
|
|
7
7
|
import VxeLoadingComponent from '../../loading';
|
|
8
|
-
const { getConfig, createEvent, domUtils,
|
|
9
|
-
const { getThumbOffsetSize, getThumbSize, getScrollFromClick, getScrollFromDrag } = scrollbarUtils;
|
|
8
|
+
const { getConfig, createEvent, domUtils, globalResize, globalEvents, renderEmptyElement } = VxeUI;
|
|
10
9
|
function createReactData() {
|
|
11
10
|
return {
|
|
12
11
|
yThumbHeight: 0,
|
|
@@ -15,7 +14,7 @@ function createReactData() {
|
|
|
15
14
|
}
|
|
16
15
|
function createInternalData() {
|
|
17
16
|
return {
|
|
18
|
-
//
|
|
17
|
+
// scrollObserver: undefined,
|
|
19
18
|
// isThumbDrag: false,
|
|
20
19
|
thumbDragOffset: 0,
|
|
21
20
|
yThumbTop: 0,
|
|
@@ -78,6 +77,10 @@ export default defineVxeComponent({
|
|
|
78
77
|
type: String,
|
|
79
78
|
default: () => getConfig().scrollbar.viewInnerClassName
|
|
80
79
|
},
|
|
80
|
+
size: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: () => getConfig().scrollbar.size || getConfig().size
|
|
83
|
+
},
|
|
81
84
|
/**
|
|
82
85
|
* 已废弃
|
|
83
86
|
* @deprecated
|
|
@@ -102,12 +105,9 @@ export default defineVxeComponent({
|
|
|
102
105
|
const refElem = ref();
|
|
103
106
|
const refViewElem = ref();
|
|
104
107
|
const refViewInnerElem = ref();
|
|
105
|
-
const refTrackXElem = ref();
|
|
106
|
-
const refTrackYElem = ref();
|
|
107
|
-
const refThumbXElem = ref();
|
|
108
|
-
const refThumbYElem = ref();
|
|
109
108
|
const reactData = reactive(createReactData());
|
|
110
109
|
const internalData = createInternalData();
|
|
110
|
+
const { computeSize } = useFns.useSize(props);
|
|
111
111
|
const computeWrapperStyle = computed(() => {
|
|
112
112
|
const { width, height, minWidth, minHeight, maxWidth, maxHeight } = props;
|
|
113
113
|
const barWidth = computeYWidth.value;
|
|
@@ -168,6 +168,7 @@ export default defineVxeComponent({
|
|
|
168
168
|
const computeWrapperClss = computed(() => {
|
|
169
169
|
const { native, theme, className, padding } = props;
|
|
170
170
|
const { yThumbHeight, xThumbWidth } = reactData;
|
|
171
|
+
const vSize = computeSize.value;
|
|
171
172
|
const xToTop = computeXToTop.value;
|
|
172
173
|
const yToLeft = computeYToLeft.value;
|
|
173
174
|
const xVisible = computeXVisible.value;
|
|
@@ -176,6 +177,7 @@ export default defineVxeComponent({
|
|
|
176
177
|
const yAutoHide = computeYAutoHide.value;
|
|
177
178
|
return domUtils.buildClass([
|
|
178
179
|
'vxe-scrollbar',
|
|
180
|
+
vSize ? `size--${vSize}` : '',
|
|
179
181
|
theme ? `theme--${theme}` : '',
|
|
180
182
|
`ov-x--${xVisible === false ? 'hidden' : 'visible'}`,
|
|
181
183
|
`ov-y--${yVisible === false ? 'hidden' : 'visible'}`,
|
|
@@ -232,16 +234,17 @@ export default defineVxeComponent({
|
|
|
232
234
|
getRefMaps: () => refMaps,
|
|
233
235
|
getComputeMaps: () => computeMaps
|
|
234
236
|
};
|
|
237
|
+
const { refTrackXElem, refTrackYElem, refThumbXElem, refThumbYElem, updateThumbSize, updateThumbOffset, clickTrackXEvent, clickTrackYEvent, pointerdownThumbXEvent, pointermoveThumbXEvent, cleatPointerThumbEvent, pointerdownThumbYEvent, pointermoveThumbYEvent } = useFns.useInitVScrollbar($xeScrollbar);
|
|
235
238
|
const dispatchEvent = (type, params, evnt) => {
|
|
236
239
|
emit(type, createEvent(evnt, { $scrollbar: $xeScrollbar }, params));
|
|
237
240
|
};
|
|
238
241
|
const scrollbarMethods = {
|
|
239
242
|
dispatchEvent,
|
|
240
|
-
|
|
243
|
+
getScrollViewElem() {
|
|
241
244
|
const viewEl = refViewElem.value;
|
|
242
245
|
return viewEl || null;
|
|
243
246
|
},
|
|
244
|
-
|
|
247
|
+
getScrollViewInnerElem() {
|
|
245
248
|
const viewInnerEl = refViewInnerElem.value;
|
|
246
249
|
return viewInnerEl || null;
|
|
247
250
|
},
|
|
@@ -301,55 +304,6 @@ export default defineVxeComponent({
|
|
|
301
304
|
return nextTick();
|
|
302
305
|
}
|
|
303
306
|
};
|
|
304
|
-
const updateThumbSize = () => {
|
|
305
|
-
const viewEl = refViewElem.value;
|
|
306
|
-
if (!viewEl) {
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
if (!viewEl.clientHeight || !viewEl.clientHeight) {
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
const trackXEl = refTrackXElem.value;
|
|
313
|
-
const xThumbWidth = trackXEl ? getThumbSize(viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth) : 0;
|
|
314
|
-
const thumbXElem = refThumbXElem.value;
|
|
315
|
-
if (thumbXElem) {
|
|
316
|
-
thumbXElem.style.width = xThumbWidth + 'px';
|
|
317
|
-
}
|
|
318
|
-
reactData.xThumbWidth = xThumbWidth;
|
|
319
|
-
const trackYEl = refTrackYElem.value;
|
|
320
|
-
const yThumbHeight = trackYEl ? getThumbSize(viewEl.clientHeight, viewEl.scrollHeight, trackYEl.clientHeight) : 0;
|
|
321
|
-
const thumbYElem = refThumbYElem.value;
|
|
322
|
-
if (thumbYElem) {
|
|
323
|
-
thumbYElem.style.height = yThumbHeight + 'px';
|
|
324
|
-
}
|
|
325
|
-
reactData.yThumbHeight = yThumbHeight;
|
|
326
|
-
};
|
|
327
|
-
const updateThumbOffset = () => {
|
|
328
|
-
const viewEl = refViewElem.value;
|
|
329
|
-
if (!viewEl) {
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
if (!viewEl.clientHeight || !viewEl.clientHeight) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
const { xThumbWidth, yThumbHeight } = reactData;
|
|
336
|
-
const trackXEl = refTrackXElem.value;
|
|
337
|
-
const thumbXElem = refThumbXElem.value;
|
|
338
|
-
const xThumbLeft = trackXEl && xThumbWidth ? getThumbOffsetSize(viewEl.scrollLeft, viewEl.clientWidth, viewEl.scrollWidth, trackXEl.clientWidth, xThumbWidth) : 0;
|
|
339
|
-
internalData.xThumbLeft = xThumbLeft;
|
|
340
|
-
if (thumbXElem && xThumbWidth) {
|
|
341
|
-
thumbXElem.style.width = xThumbWidth + 'px';
|
|
342
|
-
thumbXElem.style.transform = `translateX(${xThumbLeft}px)`;
|
|
343
|
-
}
|
|
344
|
-
const trackYEl = refTrackYElem.value;
|
|
345
|
-
const thumbYElem = refThumbYElem.value;
|
|
346
|
-
const yThumbTop = trackYEl && yThumbHeight ? getThumbOffsetSize(viewEl.scrollTop, viewEl.clientHeight, viewEl.scrollHeight, trackYEl.clientHeight, yThumbHeight) : 0;
|
|
347
|
-
internalData.yThumbTop = yThumbTop;
|
|
348
|
-
if (thumbYElem && yThumbHeight) {
|
|
349
|
-
thumbYElem.style.height = yThumbHeight + 'px';
|
|
350
|
-
thumbYElem.style.transform = `translateY(${yThumbTop}px)`;
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
307
|
const scrollEvent = (evnt) => {
|
|
354
308
|
const { xThumbWidth, yThumbHeight } = reactData;
|
|
355
309
|
const { lastScrollTop, lastScrollLeft } = internalData;
|
|
@@ -424,113 +378,6 @@ export default defineVxeComponent({
|
|
|
424
378
|
scrollWidth: scrollWidth
|
|
425
379
|
}, evnt);
|
|
426
380
|
};
|
|
427
|
-
const clickTrackXEvent = (evnt) => {
|
|
428
|
-
const trackEl = evnt.currentTarget;
|
|
429
|
-
if (trackEl !== evnt.target) {
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
const viewEl = refViewElem.value;
|
|
433
|
-
if (!viewEl) {
|
|
434
|
-
return;
|
|
435
|
-
}
|
|
436
|
-
const { xThumbWidth } = reactData;
|
|
437
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
438
|
-
viewEl.scrollTo({
|
|
439
|
-
left: getScrollFromClick(evnt.clientX - trackRect.left, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth),
|
|
440
|
-
behavior: 'auto'
|
|
441
|
-
});
|
|
442
|
-
};
|
|
443
|
-
const clickTrackYEvent = (evnt) => {
|
|
444
|
-
const trackEl = evnt.currentTarget;
|
|
445
|
-
if (trackEl !== evnt.target) {
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
const viewEl = refViewElem.value;
|
|
449
|
-
if (!viewEl) {
|
|
450
|
-
return;
|
|
451
|
-
}
|
|
452
|
-
const { yThumbHeight } = reactData;
|
|
453
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
454
|
-
viewEl.scrollTo({
|
|
455
|
-
top: getScrollFromClick(evnt.clientY - trackRect.top, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight),
|
|
456
|
-
behavior: 'auto'
|
|
457
|
-
});
|
|
458
|
-
};
|
|
459
|
-
const pointerdownThumbXEvent = (evnt) => {
|
|
460
|
-
const thumbEl = evnt.currentTarget;
|
|
461
|
-
internalData.isThumbDrag = true;
|
|
462
|
-
thumbEl.setPointerCapture(evnt.pointerId);
|
|
463
|
-
const viewEl = refViewElem.value;
|
|
464
|
-
if (!viewEl) {
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
const { xThumbWidth } = reactData;
|
|
468
|
-
const trackEl = thumbEl.parentElement;
|
|
469
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
470
|
-
const pointerPosition = evnt.clientX - trackRect.left;
|
|
471
|
-
// 记录 thumb 的偏移
|
|
472
|
-
const thumbOffset = getThumbOffsetSize(viewEl.scrollLeft, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth);
|
|
473
|
-
internalData.thumbDragOffset = pointerPosition - thumbOffset;
|
|
474
|
-
};
|
|
475
|
-
const pointermoveThumbXEvent = (evnt) => {
|
|
476
|
-
const thumbEl = evnt.currentTarget;
|
|
477
|
-
if (!thumbEl.hasPointerCapture(evnt.pointerId)) {
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
480
|
-
const { isThumbDrag, thumbDragOffset } = internalData;
|
|
481
|
-
if (isThumbDrag) {
|
|
482
|
-
const viewEl = refViewElem.value;
|
|
483
|
-
if (!viewEl) {
|
|
484
|
-
return;
|
|
485
|
-
}
|
|
486
|
-
const { xThumbWidth } = reactData;
|
|
487
|
-
const thumbEl = evnt.currentTarget;
|
|
488
|
-
const trackEl = thumbEl.parentElement;
|
|
489
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
490
|
-
// 更新偏移
|
|
491
|
-
viewEl.scrollLeft = getScrollFromDrag(evnt.clientX - trackRect.left, thumbDragOffset, viewEl.clientWidth, viewEl.scrollWidth, trackEl.clientWidth, xThumbWidth);
|
|
492
|
-
}
|
|
493
|
-
};
|
|
494
|
-
const cleatPointerThumbEvent = (evnt) => {
|
|
495
|
-
const thumbEl = evnt.currentTarget;
|
|
496
|
-
thumbEl.releasePointerCapture(evnt.pointerId);
|
|
497
|
-
internalData.isThumbDrag = false;
|
|
498
|
-
};
|
|
499
|
-
const pointerdownThumbYEvent = (evnt) => {
|
|
500
|
-
const thumbEl = evnt.currentTarget;
|
|
501
|
-
internalData.isThumbDrag = true;
|
|
502
|
-
thumbEl.setPointerCapture(evnt.pointerId);
|
|
503
|
-
const viewEl = refViewElem.value;
|
|
504
|
-
if (!viewEl) {
|
|
505
|
-
return;
|
|
506
|
-
}
|
|
507
|
-
const { yThumbHeight } = reactData;
|
|
508
|
-
const trackEl = thumbEl.parentElement;
|
|
509
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
510
|
-
const pointerPosition = evnt.clientY - trackRect.top;
|
|
511
|
-
// 记录 thumb 的偏移
|
|
512
|
-
const thumbOffset = getThumbOffsetSize(viewEl.scrollTop, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight);
|
|
513
|
-
internalData.thumbDragOffset = pointerPosition - thumbOffset;
|
|
514
|
-
};
|
|
515
|
-
const pointermoveThumbYEvent = (evnt) => {
|
|
516
|
-
const thumbEl = evnt.currentTarget;
|
|
517
|
-
if (!thumbEl.hasPointerCapture(evnt.pointerId)) {
|
|
518
|
-
return;
|
|
519
|
-
}
|
|
520
|
-
const { isThumbDrag, thumbDragOffset } = internalData;
|
|
521
|
-
if (isThumbDrag) {
|
|
522
|
-
const viewEl = refViewElem.value;
|
|
523
|
-
if (!viewEl) {
|
|
524
|
-
return;
|
|
525
|
-
}
|
|
526
|
-
const { yThumbHeight } = reactData;
|
|
527
|
-
const thumbEl = evnt.currentTarget;
|
|
528
|
-
const trackEl = thumbEl.parentElement;
|
|
529
|
-
const trackRect = trackEl.getBoundingClientRect();
|
|
530
|
-
// 更新偏移
|
|
531
|
-
viewEl.scrollTop = getScrollFromDrag(evnt.clientY - trackRect.top, thumbDragOffset, viewEl.clientHeight, viewEl.scrollHeight, trackEl.clientHeight, yThumbHeight);
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
381
|
const scrollbarPrivateMethods = {};
|
|
535
382
|
Object.assign($xeScrollbar, scrollbarMethods, scrollbarPrivateMethods);
|
|
536
383
|
const renderVN = () => {
|
|
@@ -646,18 +493,18 @@ export default defineVxeComponent({
|
|
|
646
493
|
const viewEl = refViewElem.value;
|
|
647
494
|
const viewInnerEl = refViewInnerElem.value;
|
|
648
495
|
if (autoResize) {
|
|
649
|
-
const
|
|
496
|
+
const scrollObserver = globalResize.create(() => {
|
|
650
497
|
if (props.autoResize) {
|
|
651
498
|
reFlag.value++;
|
|
652
499
|
}
|
|
653
500
|
});
|
|
654
501
|
if (viewEl) {
|
|
655
|
-
|
|
502
|
+
scrollObserver.observe(viewEl);
|
|
656
503
|
}
|
|
657
504
|
if (viewInnerEl) {
|
|
658
|
-
|
|
505
|
+
scrollObserver.observe(viewInnerEl);
|
|
659
506
|
}
|
|
660
|
-
internalData.
|
|
507
|
+
internalData.scrollObserver = scrollObserver;
|
|
661
508
|
}
|
|
662
509
|
reFlag.value++;
|
|
663
510
|
globalEvents.on($xeScrollbar, 'resize', () => {
|
|
@@ -665,9 +512,9 @@ export default defineVxeComponent({
|
|
|
665
512
|
});
|
|
666
513
|
});
|
|
667
514
|
onBeforeUnmount(() => {
|
|
668
|
-
const {
|
|
669
|
-
if (
|
|
670
|
-
|
|
515
|
+
const { scrollObserver } = internalData;
|
|
516
|
+
if (scrollObserver) {
|
|
517
|
+
scrollObserver.disconnect();
|
|
671
518
|
}
|
|
672
519
|
globalEvents.off($xeScrollbar, 'resize');
|
|
673
520
|
});
|