@fastkit/vui 0.16.37 → 0.16.39
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/vui.mjs +12 -13
- package/dist/vui.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/VPagination/VPagination.tsx +2 -2
- package/src/components/VTabs/VTabs.tsx +11 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastkit/vui",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.39",
|
|
4
4
|
"description": "A simple, extensible UI kit for Vue applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fastkit",
|
|
@@ -44,31 +44,31 @@
|
|
|
44
44
|
"src"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@fastkit/dom": "0.1.3",
|
|
48
|
-
"@fastkit/helpers": "0.13.3",
|
|
49
|
-
"@fastkit/color-scheme-gen": "0.13.10",
|
|
50
|
-
"@fastkit/icon-font": "1.0.9",
|
|
51
47
|
"@fastkit/color-scheme": "1.0.10",
|
|
48
|
+
"@fastkit/color-scheme-gen": "0.13.10",
|
|
49
|
+
"@fastkit/helpers": "0.13.3",
|
|
50
|
+
"@fastkit/dom": "0.1.3",
|
|
51
|
+
"@fastkit/media-match": "1.0.9",
|
|
52
52
|
"@fastkit/media-match-gen": "0.13.10",
|
|
53
53
|
"@fastkit/rules": "0.13.4",
|
|
54
|
+
"@fastkit/vue-action": "0.2.8",
|
|
55
|
+
"@fastkit/icon-font": "1.0.9",
|
|
56
|
+
"@fastkit/vue-app-layout": "0.14.8",
|
|
54
57
|
"@fastkit/tiny-logger": "0.13.3",
|
|
55
|
-
"@fastkit/vue-action": "0.2.7",
|
|
56
|
-
"@fastkit/media-match": "1.0.9",
|
|
57
|
-
"@fastkit/vue-body-scroll-lock": "0.1.7",
|
|
58
|
-
"@fastkit/vue-click-outside": "0.1.8",
|
|
59
|
-
"@fastkit/vue-color-scheme": "0.14.7",
|
|
60
|
-
"@fastkit/vue-keyboard": "0.1.3",
|
|
61
|
-
"@fastkit/vue-app-layout": "0.14.6",
|
|
62
58
|
"@fastkit/stylebase": "0.13.1",
|
|
63
|
-
"@fastkit/vue-
|
|
64
|
-
"@fastkit/vue-
|
|
65
|
-
"@fastkit/vue-
|
|
66
|
-
"@fastkit/vue-
|
|
59
|
+
"@fastkit/vue-click-outside": "0.1.9",
|
|
60
|
+
"@fastkit/vue-color-scheme": "0.14.8",
|
|
61
|
+
"@fastkit/vue-form-control": "0.15.26",
|
|
62
|
+
"@fastkit/vue-body-scroll-lock": "0.1.8",
|
|
63
|
+
"@fastkit/vue-location": "0.1.8",
|
|
67
64
|
"@fastkit/vue-media-match": "0.13.10",
|
|
68
|
-
"@fastkit/vue-
|
|
69
|
-
"@fastkit/vue-
|
|
70
|
-
"@fastkit/vue-
|
|
71
|
-
"@fastkit/vue-
|
|
65
|
+
"@fastkit/vue-keyboard": "0.1.3",
|
|
66
|
+
"@fastkit/vue-scroller": "0.14.8",
|
|
67
|
+
"@fastkit/vue-stack": "0.15.20",
|
|
68
|
+
"@fastkit/vue-resize": "0.1.8",
|
|
69
|
+
"@fastkit/vue-transitions": "0.1.9",
|
|
70
|
+
"@fastkit/vue-utils": "0.14.6",
|
|
71
|
+
"@fastkit/vue-loading": "0.14.9"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"vue": "^3.3.0",
|
|
@@ -222,8 +222,8 @@ export const VPagination = defineComponent({
|
|
|
222
222
|
} else {
|
|
223
223
|
number = false;
|
|
224
224
|
const isPrev = source === 'prev';
|
|
225
|
-
const
|
|
226
|
-
page = currentPage +
|
|
225
|
+
const amount = isPrev ? -1 : 1;
|
|
226
|
+
page = currentPage + amount;
|
|
227
227
|
active = false;
|
|
228
228
|
disabled = page < 1 || page > length;
|
|
229
229
|
}
|
|
@@ -16,11 +16,7 @@ import { useVui } from '../../injections';
|
|
|
16
16
|
import { defineSlots } from '@fastkit/vue-utils';
|
|
17
17
|
import { RouteLocationRaw, RouteLocation } from 'vue-router';
|
|
18
18
|
import { VTab, VTabRef } from './VTab';
|
|
19
|
-
import {
|
|
20
|
-
VScroller,
|
|
21
|
-
useVScrollerRef,
|
|
22
|
-
ScrollResult,
|
|
23
|
-
} from '@fastkit/vue-scroller';
|
|
19
|
+
import { VScroller, ScrollResult } from '@fastkit/vue-scroller';
|
|
24
20
|
import { useScopeColorClass, ScopeName } from '@fastkit/vue-color-scheme';
|
|
25
21
|
import { isPromise } from '@fastkit/helpers';
|
|
26
22
|
|
|
@@ -93,7 +89,7 @@ export const VTabs = defineComponent({
|
|
|
93
89
|
const vui = useVui();
|
|
94
90
|
|
|
95
91
|
const internalValueRef = ref<string>(null as any);
|
|
96
|
-
const
|
|
92
|
+
const ScrollerRef = VScroller.$ref();
|
|
97
93
|
const elRef = ref<HTMLElement>(null as any);
|
|
98
94
|
let scrollResult: ScrollResult | undefined;
|
|
99
95
|
const tabRefs = ref<VTabRef[]>([]);
|
|
@@ -214,7 +210,7 @@ export const VTabs = defineComponent({
|
|
|
214
210
|
const $tab = tab.$el as HTMLElement;
|
|
215
211
|
if (!$tab) return;
|
|
216
212
|
|
|
217
|
-
const scroller =
|
|
213
|
+
const scroller = ScrollerRef.instance;
|
|
218
214
|
if (!scroller) return;
|
|
219
215
|
const container = scroller.scroller.element();
|
|
220
216
|
if (!container) return;
|
|
@@ -233,17 +229,17 @@ export const VTabs = defineComponent({
|
|
|
233
229
|
if (hiddenLeft > 0) hiddenLeft += autoScrollOffset;
|
|
234
230
|
if (hiddenRight > 0) hiddenRight += autoScrollOffset;
|
|
235
231
|
|
|
236
|
-
let
|
|
232
|
+
let scrollAmount = 0;
|
|
237
233
|
if (hiddenRight > 0) {
|
|
238
|
-
|
|
234
|
+
scrollAmount = hiddenRight;
|
|
239
235
|
}
|
|
240
236
|
if (hiddenLeft > 0) {
|
|
241
|
-
|
|
237
|
+
scrollAmount = -hiddenLeft;
|
|
242
238
|
}
|
|
243
239
|
|
|
244
|
-
if (Math.abs(
|
|
240
|
+
if (Math.abs(scrollAmount) > 0) {
|
|
245
241
|
cancelScroll();
|
|
246
|
-
scrollResult = scroller.scroller.by(
|
|
242
|
+
scrollResult = scroller.scroller.by(scrollAmount, 0, {
|
|
247
243
|
duration: 150,
|
|
248
244
|
});
|
|
249
245
|
}
|
|
@@ -327,13 +323,12 @@ export const VTabs = defineComponent({
|
|
|
327
323
|
|
|
328
324
|
return (
|
|
329
325
|
<div class={['v-tabs', classes.value]} ref={elRef}>
|
|
330
|
-
<
|
|
326
|
+
<ScrollerRef
|
|
331
327
|
class="v-tabs__scroller"
|
|
332
328
|
containerClass="v-tabs__scroller__container"
|
|
333
|
-
guide
|
|
334
|
-
ref={scrollerRef}>
|
|
329
|
+
guide>
|
|
335
330
|
<div class="v-tabs__content">{children}</div>
|
|
336
|
-
</
|
|
331
|
+
</ScrollerRef>
|
|
337
332
|
</div>
|
|
338
333
|
);
|
|
339
334
|
};
|