Skip to content

Commit d4c7bc3

Browse files
committed
fix: misjudgment of scrolling to the bottom of the list
1 parent af4dcea commit d4c7bc3

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

dist/virtual-drag-list.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-virtual-draglist v3.3.3
2+
* vue-virtual-draglist v3.3.4
33
* open source under the MIT license
44
* https://github.com/mfuu/vue3-virtual-drag-list#readme
55
*/
@@ -1322,7 +1322,7 @@
13221322
}
13231323
this.offset = offset;
13241324
var top = this.isFront() && offset <= 0;
1325-
var bottom = this.isBehind() && clientSize + offset >= scrollSize;
1325+
var bottom = this.isBehind() && clientSize + offset + 1 >= scrollSize;
13261326
this.options.onScroll({
13271327
top: top,
13281328
bottom: bottom,

dist/virtual-drag-list.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-virtual-draglist",
3-
"version": "3.3.3",
3+
"version": "3.3.4",
44
"description": "A virtual scrolling list component that can be sorted by dragging, support vue3",
55
"main": "dist/virtual-drag-list.min.js",
66
"types": "types/index.d.ts",
@@ -11,7 +11,7 @@
1111
"scripts": {
1212
"lint": "eslint --fix src --ext .js",
1313
"build": "cross-env mode=production rollup -c rollup.config.js",
14-
"core:update": "git submodule update --init --recursive",
14+
"core:update": "git submodule update --remote",
1515
"docs:dev": "vitepress dev docs",
1616
"docs:build": "vitepress build docs",
1717
"docs:preview": "vitepress preview docs"

src/core

Submodule core updated 1 file

types/index.d.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as vue from 'vue';
22

3-
declare const VirtualList: vue.DefineComponent<vue.ExtractPropTypes<{
3+
declare const VirtualList: vue.DefineComponent<{
44
dataSource: {};
55
modelValue: {};
66
dataKey: {
@@ -133,9 +133,9 @@ declare const VirtualList: vue.DefineComponent<vue.ExtractPropTypes<{
133133
type: StringConstructor;
134134
default: string;
135135
};
136-
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
136+
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
137137
[key: string]: any;
138-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("update:dataSource" | "update:modelValue" | "top" | "bottom" | "drag" | "drop" | "rangeChange")[], "update:dataSource" | "update:modelValue" | "top" | "bottom" | "drag" | "drop" | "rangeChange", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
138+
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("update:dataSource" | "update:modelValue" | "top" | "bottom" | "drag" | "drop" | "rangeChange")[], "update:dataSource" | "update:modelValue" | "top" | "bottom" | "drag" | "drop" | "rangeChange", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
139139
dataSource: {};
140140
modelValue: {};
141141
dataKey: {
@@ -268,15 +268,15 @@ declare const VirtualList: vue.DefineComponent<vue.ExtractPropTypes<{
268268
type: StringConstructor;
269269
default: string;
270270
};
271-
}>> & Readonly<{
271+
}>> & {
272272
"onUpdate:dataSource"?: ((...args: any[]) => any) | undefined;
273273
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
274274
onTop?: ((...args: any[]) => any) | undefined;
275275
onBottom?: ((...args: any[]) => any) | undefined;
276276
onDrag?: ((...args: any[]) => any) | undefined;
277277
onDrop?: ((...args: any[]) => any) | undefined;
278278
onRangeChange?: ((...args: any[]) => any) | undefined;
279-
}>, {
279+
}, {
280280
dataKey: string;
281281
tableMode: boolean;
282282
draggable: string;
@@ -304,6 +304,6 @@ declare const VirtualList: vue.DefineComponent<vue.ExtractPropTypes<{
304304
ghostStyle: Record<string, any>;
305305
chosenClass: string;
306306
placeholderClass: string;
307-
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
307+
}>;
308308

309309
export { VirtualList as default };

0 commit comments

Comments
 (0)