@jtigernova-npm/tiffany-vue 1.2.2 → 1.2.3
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/out/vue/BaseState.d.ts +4 -1
- package/out/vue/BaseState.js +6 -1
- package/package.json +3 -3
package/out/vue/BaseState.d.ts
CHANGED
|
@@ -20,7 +20,10 @@ export interface TrackableScroll {
|
|
|
20
20
|
trackScrollTop: (scrollElementID: string, event: any) => void;
|
|
21
21
|
setScrollTop: (scrollElementID: string) => void;
|
|
22
22
|
}
|
|
23
|
-
export declare function getTrackableScrollHelper(
|
|
23
|
+
export declare function getTrackableScrollHelper(opts?: {
|
|
24
|
+
spaceBuffer: 30;
|
|
25
|
+
onReachedBottom: () => void;
|
|
26
|
+
}): {
|
|
24
27
|
scrollTop: Ref<number>;
|
|
25
28
|
trackScrollTop: (scrollElementID: string, event: any) => void;
|
|
26
29
|
setScrollTop: (scrollElementID: string) => void;
|
package/out/vue/BaseState.js
CHANGED
|
@@ -26,7 +26,7 @@ export function getBaseStateHelper(loadable) {
|
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
export function getTrackableScrollHelper() {
|
|
29
|
+
export function getTrackableScrollHelper(opts) {
|
|
30
30
|
const scrollTop = ref(0);
|
|
31
31
|
return {
|
|
32
32
|
scrollTop: scrollTop,
|
|
@@ -36,6 +36,11 @@ export function getTrackableScrollHelper() {
|
|
|
36
36
|
if (scrollElementID == event.target.id) {
|
|
37
37
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
38
38
|
scrollTop.value = event.target.scrollTop;
|
|
39
|
+
if (!opts)
|
|
40
|
+
return;
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
42
|
+
if (event.target.scrollTop + event.target.clientHeight + opts.spaceBuffer >= event.target.scrollHeight)
|
|
43
|
+
opts.onReachedBottom();
|
|
39
44
|
}
|
|
40
45
|
},
|
|
41
46
|
setScrollTop: (scrollElementID) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jtigernova-npm/tiffany-vue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"module": "out/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"format": "prettier --write src/**",
|
|
13
13
|
"format-build": "npm run format && npm run build",
|
|
14
14
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
15
|
-
"tiffany-prepare": "tsc && npm run lint && npm run format && npm pack",
|
|
16
|
-
"tiffany-publish": "tsc && npm run lint && npm run format && npm pack && npm publish --access public && rm *.tgz"
|
|
15
|
+
"tiffany-prepare": "npm i && tsc && npm run lint && npm run format && npm pack",
|
|
16
|
+
"tiffany-publish": "npm i && tsc && npm run lint && npm run format && npm pack && npm publish --access public && rm *.tgz"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [],
|
|
19
19
|
"author": "JTiger Nova",
|