gi-component 0.0.46 → 0.0.47
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/components/flex/src/flex.vue.d.ts +1 -1
- package/dist/components/nav-tabs/index.d.ts +3 -1
- package/dist/components/nav-tabs/src/nav-tabs.vue.d.ts +18 -44
- package/dist/components/nav-tabs/src/type.d.ts +14 -5
- package/dist/gi.css +1 -1
- package/dist/hooks/useNavTabs.d.ts +21 -1
- package/dist/index.es.js +248 -44
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/packages/components/nav-tabs/index.ts +4 -1
- package/packages/components/nav-tabs/src/nav-tabs.vue +96 -25
- package/packages/components/nav-tabs/src/type.ts +15 -4
- package/packages/components/page-layout/src/page-layout.vue +1 -1
- package/packages/components/tag/src/tag.vue +2 -2
- package/packages/hooks/useNavTabs.ts +239 -17
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, onMounted, watch, toValue, toRef, nextTick, onUnmounted, useAttrs, computed, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, createVNode, createSlots, Fragment, renderList, mergeModels, useModel,
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, ref, onMounted, watch, toValue, toRef, nextTick, onUnmounted, useAttrs, computed, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, createVNode, createSlots, Fragment, renderList, mergeModels, useModel, resolveDynamicComponent, resolveComponent, h, createApp, onUpdated, inject, toRefs, watchEffect, reactive, provide, normalizeProps, guardReactiveProps, useTemplateRef } from "vue";
|
|
2
2
|
import * as El from "element-plus";
|
|
3
3
|
import El__default, { ElButton, ElSpace, ElDescriptions, ElDescriptionsItem, ElDialog, ElDrawer, ElInput, ElForm, ElTable, ElTableColumn, ElFormItem, ElText, ElMessage, ElIcon, ElSplitter, ElSplitterPanel, ElRow, ElPagination, ElTabs, ElTabPane, ElCheckbox, ElScrollbar, ElTree, ElCheckboxGroup, ElEmpty } from "element-plus";
|
|
4
4
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
@@ -300,6 +300,16 @@ function resolveElement(target, root) {
|
|
|
300
300
|
const scope = root ?? document;
|
|
301
301
|
return scope.querySelector(normalizeSelector(target));
|
|
302
302
|
}
|
|
303
|
+
function getMaxScrollLeft(scrollEl) {
|
|
304
|
+
return Math.max(0, scrollEl.scrollWidth - scrollEl.clientWidth);
|
|
305
|
+
}
|
|
306
|
+
const SCROLL_EDGE_EPSILON = 1;
|
|
307
|
+
function canScrollToLeft(scrollEl) {
|
|
308
|
+
return scrollEl.scrollLeft > SCROLL_EDGE_EPSILON;
|
|
309
|
+
}
|
|
310
|
+
function canScrollToRight(scrollEl) {
|
|
311
|
+
return scrollEl.scrollLeft < getMaxScrollLeft(scrollEl) - SCROLL_EDGE_EPSILON;
|
|
312
|
+
}
|
|
303
313
|
const WHEEL_SCROLL_LERP = 0.4;
|
|
304
314
|
const WHEEL_LINE_HEIGHT = 16;
|
|
305
315
|
function getWheelPixelDelta(event, scrollEl) {
|
|
@@ -312,11 +322,10 @@ function getWheelPixelDelta(event, scrollEl) {
|
|
|
312
322
|
return delta;
|
|
313
323
|
}
|
|
314
324
|
function clampScrollLeft(scrollEl, left) {
|
|
315
|
-
|
|
316
|
-
return Math.max(0, Math.min(left, maxScroll));
|
|
325
|
+
return Math.max(0, Math.min(left, getMaxScrollLeft(scrollEl)));
|
|
317
326
|
}
|
|
318
327
|
function scrollItemToCenter(scrollEl, activeEl, behavior = "smooth") {
|
|
319
|
-
const maxScroll = scrollEl
|
|
328
|
+
const maxScroll = getMaxScrollLeft(scrollEl);
|
|
320
329
|
if (maxScroll <= 0) {
|
|
321
330
|
return;
|
|
322
331
|
}
|
|
@@ -329,27 +338,65 @@ function scrollItemToCenter(scrollEl, activeEl, behavior = "smooth") {
|
|
|
329
338
|
behavior
|
|
330
339
|
});
|
|
331
340
|
}
|
|
341
|
+
function setElementVisible(el, visible) {
|
|
342
|
+
if (!el) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
el.style.display = visible ? "flex" : "none";
|
|
346
|
+
}
|
|
347
|
+
function setBtnDisabled(el, disabled, disabledClassName) {
|
|
348
|
+
if (!el) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
if (disabledClassName) {
|
|
352
|
+
el.classList.toggle(disabledClassName, disabled);
|
|
353
|
+
}
|
|
354
|
+
if (disabled) {
|
|
355
|
+
el.setAttribute("aria-disabled", "true");
|
|
356
|
+
} else {
|
|
357
|
+
el.removeAttribute("aria-disabled");
|
|
358
|
+
}
|
|
359
|
+
}
|
|
332
360
|
function useNavTabs(options) {
|
|
333
361
|
const {
|
|
334
362
|
tabEl,
|
|
335
363
|
tabScrollEl,
|
|
336
364
|
tabItemClassName,
|
|
337
365
|
activeValue,
|
|
338
|
-
wheelSpeed = 1
|
|
366
|
+
wheelSpeed = 1,
|
|
367
|
+
tabLeftScrollBtnEl,
|
|
368
|
+
tabRightScrollBtnEl,
|
|
369
|
+
scrollBtnStepRatio = 0.6,
|
|
370
|
+
scrollBtnMinStep = 120,
|
|
371
|
+
navBtnDisabledClassName
|
|
339
372
|
} = options;
|
|
340
373
|
const activeClassName = `${tabItemClassName}--active`;
|
|
341
374
|
const itemSelector = normalizeSelector(tabItemClassName);
|
|
375
|
+
const showNavBtn = ref(false);
|
|
376
|
+
const canScrollLeft = ref(false);
|
|
377
|
+
const canScrollRight = ref(false);
|
|
342
378
|
let rootEl = null;
|
|
343
379
|
let scrollEl = null;
|
|
380
|
+
let leftBtnEl = null;
|
|
381
|
+
let rightBtnEl = null;
|
|
344
382
|
let resizeObserver = null;
|
|
345
383
|
let wheelRafId = null;
|
|
346
384
|
let wheelTargetScrollLeft = 0;
|
|
385
|
+
let navBtnRafId = null;
|
|
386
|
+
let onPrevClick = null;
|
|
387
|
+
let onNextClick = null;
|
|
347
388
|
const cancelWheelAnimation = () => {
|
|
348
389
|
if (wheelRafId !== null) {
|
|
349
390
|
cancelAnimationFrame(wheelRafId);
|
|
350
391
|
wheelRafId = null;
|
|
351
392
|
}
|
|
352
393
|
};
|
|
394
|
+
const cancelWheelScroll = () => {
|
|
395
|
+
if (scrollEl) {
|
|
396
|
+
wheelTargetScrollLeft = scrollEl.scrollLeft;
|
|
397
|
+
}
|
|
398
|
+
cancelWheelAnimation();
|
|
399
|
+
};
|
|
353
400
|
const runWheelAnimation = () => {
|
|
354
401
|
if (!scrollEl) {
|
|
355
402
|
cancelWheelAnimation();
|
|
@@ -360,17 +407,80 @@ function useNavTabs(options) {
|
|
|
360
407
|
if (Math.abs(diff) < 0.5) {
|
|
361
408
|
scrollEl.scrollLeft = wheelTargetScrollLeft;
|
|
362
409
|
cancelWheelAnimation();
|
|
410
|
+
scheduleUpdateNavBtnState();
|
|
363
411
|
return;
|
|
364
412
|
}
|
|
365
413
|
scrollEl.scrollLeft = current + diff * WHEEL_SCROLL_LERP;
|
|
366
414
|
wheelRafId = requestAnimationFrame(runWheelAnimation);
|
|
367
415
|
};
|
|
416
|
+
const updateNavBtnState = () => {
|
|
417
|
+
if (!scrollEl) {
|
|
418
|
+
showNavBtn.value = false;
|
|
419
|
+
canScrollLeft.value = false;
|
|
420
|
+
canScrollRight.value = false;
|
|
421
|
+
setElementVisible(leftBtnEl, false);
|
|
422
|
+
setElementVisible(rightBtnEl, false);
|
|
423
|
+
setBtnDisabled(leftBtnEl, false, navBtnDisabledClassName);
|
|
424
|
+
setBtnDisabled(rightBtnEl, false, navBtnDisabledClassName);
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
const overflow = getMaxScrollLeft(scrollEl) > 1;
|
|
428
|
+
const scrollLeftEnabled = canScrollToLeft(scrollEl);
|
|
429
|
+
const scrollRightEnabled = canScrollToRight(scrollEl);
|
|
430
|
+
showNavBtn.value = overflow;
|
|
431
|
+
canScrollLeft.value = scrollLeftEnabled;
|
|
432
|
+
canScrollRight.value = scrollRightEnabled;
|
|
433
|
+
setElementVisible(leftBtnEl, overflow);
|
|
434
|
+
setElementVisible(rightBtnEl, overflow);
|
|
435
|
+
setBtnDisabled(leftBtnEl, overflow && !scrollLeftEnabled, navBtnDisabledClassName);
|
|
436
|
+
setBtnDisabled(rightBtnEl, overflow && !scrollRightEnabled, navBtnDisabledClassName);
|
|
437
|
+
};
|
|
438
|
+
const scheduleUpdateNavBtnState = () => {
|
|
439
|
+
if (navBtnRafId !== null) {
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
navBtnRafId = requestAnimationFrame(() => {
|
|
443
|
+
navBtnRafId = null;
|
|
444
|
+
updateNavBtnState();
|
|
445
|
+
});
|
|
446
|
+
};
|
|
447
|
+
const cancelNavBtnRaf = () => {
|
|
448
|
+
if (navBtnRafId !== null) {
|
|
449
|
+
cancelAnimationFrame(navBtnRafId);
|
|
450
|
+
navBtnRafId = null;
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
const scrollByStep = (direction) => {
|
|
454
|
+
if (!scrollEl) {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
if (direction === -1 && !canScrollToLeft(scrollEl)) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
if (direction === 1 && !canScrollToRight(scrollEl)) {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
cancelWheelScroll();
|
|
464
|
+
const maxScroll = getMaxScrollLeft(scrollEl);
|
|
465
|
+
if (maxScroll <= 0) {
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
const step = Math.max(scrollBtnMinStep, scrollEl.clientWidth * scrollBtnStepRatio);
|
|
469
|
+
const target = clampScrollLeft(scrollEl, scrollEl.scrollLeft + direction * step);
|
|
470
|
+
if (Math.abs(target - scrollEl.scrollLeft) < 1) {
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
scrollEl.scrollTo({ left: target, behavior: "smooth" });
|
|
474
|
+
};
|
|
368
475
|
const resolveElements = () => {
|
|
369
476
|
var _a, _b;
|
|
370
477
|
const instanceRoot = (_b = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy) == null ? void 0 : _b.$el;
|
|
371
478
|
const fallbackRoot = instanceRoot instanceof HTMLElement ? instanceRoot : document;
|
|
372
479
|
rootEl = resolveElement(toValue(tabEl), fallbackRoot);
|
|
373
|
-
|
|
480
|
+
const scope = rootEl ?? fallbackRoot;
|
|
481
|
+
scrollEl = resolveElement(toValue(tabScrollEl), scope);
|
|
482
|
+
leftBtnEl = resolveElement(toValue(tabLeftScrollBtnEl), scope);
|
|
483
|
+
rightBtnEl = resolveElement(toValue(tabRightScrollBtnEl), scope);
|
|
374
484
|
return Boolean(rootEl && scrollEl);
|
|
375
485
|
};
|
|
376
486
|
const findActiveItem = () => {
|
|
@@ -393,11 +503,12 @@ function useNavTabs(options) {
|
|
|
393
503
|
if (!scrollEl) {
|
|
394
504
|
return;
|
|
395
505
|
}
|
|
396
|
-
|
|
506
|
+
cancelWheelScroll();
|
|
397
507
|
const activeItem = findActiveItem();
|
|
398
508
|
if (activeItem) {
|
|
399
509
|
scrollItemToCenter(scrollEl, activeItem, behavior);
|
|
400
510
|
}
|
|
511
|
+
scheduleUpdateNavBtnState();
|
|
401
512
|
};
|
|
402
513
|
const handleWheel = (event) => {
|
|
403
514
|
if (!scrollEl) {
|
|
@@ -418,19 +529,59 @@ function useNavTabs(options) {
|
|
|
418
529
|
if (wheelRafId === null) {
|
|
419
530
|
wheelRafId = requestAnimationFrame(runWheelAnimation);
|
|
420
531
|
}
|
|
532
|
+
scheduleUpdateNavBtnState();
|
|
533
|
+
};
|
|
534
|
+
const handleScroll = () => {
|
|
535
|
+
scheduleUpdateNavBtnState();
|
|
421
536
|
};
|
|
422
537
|
const bindWheel = () => {
|
|
423
538
|
scrollEl == null ? void 0 : scrollEl.addEventListener("wheel", handleWheel, { passive: false });
|
|
539
|
+
scrollEl == null ? void 0 : scrollEl.addEventListener("scroll", handleScroll, { passive: true });
|
|
424
540
|
};
|
|
425
541
|
const unbindWheel = () => {
|
|
426
542
|
scrollEl == null ? void 0 : scrollEl.removeEventListener("wheel", handleWheel);
|
|
543
|
+
scrollEl == null ? void 0 : scrollEl.removeEventListener("scroll", handleScroll);
|
|
427
544
|
cancelWheelAnimation();
|
|
428
545
|
};
|
|
546
|
+
const bindNavButtons = () => {
|
|
547
|
+
unbindNavButtons();
|
|
548
|
+
if (leftBtnEl) {
|
|
549
|
+
onPrevClick = (event) => {
|
|
550
|
+
if ((leftBtnEl == null ? void 0 : leftBtnEl.getAttribute("aria-disabled")) === "true") {
|
|
551
|
+
event.preventDefault();
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
scrollByStep(-1);
|
|
555
|
+
};
|
|
556
|
+
leftBtnEl.addEventListener("click", onPrevClick);
|
|
557
|
+
}
|
|
558
|
+
if (rightBtnEl) {
|
|
559
|
+
onNextClick = (event) => {
|
|
560
|
+
if ((rightBtnEl == null ? void 0 : rightBtnEl.getAttribute("aria-disabled")) === "true") {
|
|
561
|
+
event.preventDefault();
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
scrollByStep(1);
|
|
565
|
+
};
|
|
566
|
+
rightBtnEl.addEventListener("click", onNextClick);
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
const unbindNavButtons = () => {
|
|
570
|
+
if (leftBtnEl && onPrevClick) {
|
|
571
|
+
leftBtnEl.removeEventListener("click", onPrevClick);
|
|
572
|
+
}
|
|
573
|
+
if (rightBtnEl && onNextClick) {
|
|
574
|
+
rightBtnEl.removeEventListener("click", onNextClick);
|
|
575
|
+
}
|
|
576
|
+
onPrevClick = null;
|
|
577
|
+
onNextClick = null;
|
|
578
|
+
};
|
|
429
579
|
const bindResizeObserver = () => {
|
|
430
580
|
if (!scrollEl || typeof ResizeObserver === "undefined") {
|
|
431
581
|
return;
|
|
432
582
|
}
|
|
433
583
|
resizeObserver = new ResizeObserver(() => {
|
|
584
|
+
scheduleUpdateNavBtnState();
|
|
434
585
|
scrollToActive("auto");
|
|
435
586
|
});
|
|
436
587
|
resizeObserver.observe(scrollEl);
|
|
@@ -439,23 +590,40 @@ function useNavTabs(options) {
|
|
|
439
590
|
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
440
591
|
resizeObserver = null;
|
|
441
592
|
};
|
|
593
|
+
const teardown = () => {
|
|
594
|
+
unbindWheel();
|
|
595
|
+
unbindNavButtons();
|
|
596
|
+
unbindResizeObserver();
|
|
597
|
+
cancelWheelAnimation();
|
|
598
|
+
cancelNavBtnRaf();
|
|
599
|
+
rootEl = null;
|
|
600
|
+
scrollEl = null;
|
|
601
|
+
leftBtnEl = null;
|
|
602
|
+
rightBtnEl = null;
|
|
603
|
+
};
|
|
442
604
|
const setup = async () => {
|
|
443
605
|
await nextTick();
|
|
444
606
|
if (!resolveElements()) {
|
|
445
607
|
return;
|
|
446
608
|
}
|
|
447
609
|
bindWheel();
|
|
610
|
+
bindNavButtons();
|
|
448
611
|
bindResizeObserver();
|
|
612
|
+
updateNavBtnState();
|
|
449
613
|
scrollToActive("auto");
|
|
450
614
|
};
|
|
451
615
|
onMounted(() => {
|
|
452
616
|
setup();
|
|
453
617
|
});
|
|
454
618
|
watch(
|
|
455
|
-
() => [
|
|
619
|
+
() => [
|
|
620
|
+
toValue(tabEl),
|
|
621
|
+
toValue(tabScrollEl),
|
|
622
|
+
toValue(tabLeftScrollBtnEl),
|
|
623
|
+
toValue(tabRightScrollBtnEl)
|
|
624
|
+
],
|
|
456
625
|
() => {
|
|
457
|
-
|
|
458
|
-
unbindResizeObserver();
|
|
626
|
+
teardown();
|
|
459
627
|
setup();
|
|
460
628
|
}
|
|
461
629
|
);
|
|
@@ -465,15 +633,16 @@ function useNavTabs(options) {
|
|
|
465
633
|
});
|
|
466
634
|
}
|
|
467
635
|
onUnmounted(() => {
|
|
468
|
-
|
|
469
|
-
unbindResizeObserver();
|
|
470
|
-
cancelWheelAnimation();
|
|
471
|
-
rootEl = null;
|
|
472
|
-
scrollEl = null;
|
|
636
|
+
teardown();
|
|
473
637
|
});
|
|
474
638
|
return {
|
|
475
639
|
scrollToActive,
|
|
476
|
-
getScrollEl: () => scrollEl
|
|
640
|
+
getScrollEl: () => scrollEl,
|
|
641
|
+
cancelWheelScroll,
|
|
642
|
+
scrollByStep,
|
|
643
|
+
showNavBtn,
|
|
644
|
+
canScrollLeft,
|
|
645
|
+
canScrollRight
|
|
477
646
|
};
|
|
478
647
|
}
|
|
479
648
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
@@ -2512,13 +2681,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2512
2681
|
const { b } = useBemClass();
|
|
2513
2682
|
const rootRef = ref(null);
|
|
2514
2683
|
const scrollRef = ref(null);
|
|
2684
|
+
const leftBtnRef = ref(null);
|
|
2685
|
+
const rightBtnRef = ref(null);
|
|
2515
2686
|
const tabItemClassName = b("nav-tabs-item");
|
|
2516
2687
|
useNavTabs({
|
|
2517
2688
|
tabEl: rootRef,
|
|
2518
2689
|
tabScrollEl: scrollRef,
|
|
2519
2690
|
tabItemClassName,
|
|
2520
2691
|
activeValue: model,
|
|
2521
|
-
wheelSpeed: props.wheelSpeed
|
|
2692
|
+
wheelSpeed: props.wheelSpeed,
|
|
2693
|
+
tabLeftScrollBtnEl: leftBtnRef,
|
|
2694
|
+
tabRightScrollBtnEl: rightBtnRef,
|
|
2695
|
+
navBtnDisabledClassName: b("nav-tabs__nav-btn--disabled")
|
|
2522
2696
|
});
|
|
2523
2697
|
function handleItemClick(item) {
|
|
2524
2698
|
if (item.disabled) {
|
|
@@ -2540,32 +2714,62 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2540
2714
|
renderSlot(_ctx.$slots, "left-extra", {}, void 0, true)
|
|
2541
2715
|
], 2)) : createCommentVNode("", true),
|
|
2542
2716
|
createElementVNode("div", {
|
|
2543
|
-
|
|
2544
|
-
ref: scrollRef,
|
|
2545
|
-
class: normalizeClass(unref(b)("nav-tabs__scroll"))
|
|
2717
|
+
class: normalizeClass(unref(b)("nav-tabs__scroll-wrap"))
|
|
2546
2718
|
}, [
|
|
2547
|
-
(
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2719
|
+
createElementVNode("button", {
|
|
2720
|
+
ref_key: "leftBtnRef",
|
|
2721
|
+
ref: leftBtnRef,
|
|
2722
|
+
type: "button",
|
|
2723
|
+
class: normalizeClass([unref(b)("nav-tabs__nav-btn"), unref(b)("nav-tabs__nav-btn--prev")])
|
|
2724
|
+
}, [
|
|
2725
|
+
createVNode(unref(ElIcon), null, {
|
|
2726
|
+
default: withCtx(() => [
|
|
2727
|
+
createVNode(unref(arrow_left_default))
|
|
2556
2728
|
]),
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2729
|
+
_: 1
|
|
2730
|
+
})
|
|
2731
|
+
], 2),
|
|
2732
|
+
createElementVNode("div", {
|
|
2733
|
+
ref_key: "scrollRef",
|
|
2734
|
+
ref: scrollRef,
|
|
2735
|
+
class: normalizeClass(unref(b)("nav-tabs__scroll"))
|
|
2736
|
+
}, [
|
|
2737
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.data, (item) => {
|
|
2738
|
+
return openBlock(), createElementBlock("div", {
|
|
2739
|
+
key: item.value,
|
|
2740
|
+
class: normalizeClass([
|
|
2741
|
+
unref(b)("nav-tabs-item"),
|
|
2742
|
+
props.custom ? unref(b)("nav-tabs-item--custom") : {
|
|
2743
|
+
[unref(b)("nav-tabs-item--active")]: model.value === item.value,
|
|
2744
|
+
[unref(b)("nav-tabs-item--disabled")]: item.disabled
|
|
2745
|
+
}
|
|
2746
|
+
]),
|
|
2747
|
+
"data-value": item.value,
|
|
2748
|
+
onClick: ($event) => handleItemClick(item)
|
|
2749
|
+
}, [
|
|
2750
|
+
renderSlot(_ctx.$slots, "default", {
|
|
2751
|
+
item,
|
|
2752
|
+
active: model.value === item.value,
|
|
2753
|
+
disabled: !!item.disabled
|
|
2754
|
+
}, () => [
|
|
2755
|
+
createTextVNode(toDisplayString(item.label), 1)
|
|
2756
|
+
], true)
|
|
2757
|
+
], 10, _hoisted_1$1);
|
|
2758
|
+
}), 128))
|
|
2759
|
+
], 2),
|
|
2760
|
+
createElementVNode("button", {
|
|
2761
|
+
ref_key: "rightBtnRef",
|
|
2762
|
+
ref: rightBtnRef,
|
|
2763
|
+
type: "button",
|
|
2764
|
+
class: normalizeClass([unref(b)("nav-tabs__nav-btn"), unref(b)("nav-tabs__nav-btn--next")])
|
|
2765
|
+
}, [
|
|
2766
|
+
createVNode(unref(ElIcon), null, {
|
|
2767
|
+
default: withCtx(() => [
|
|
2768
|
+
createVNode(unref(arrow_right_default))
|
|
2769
|
+
]),
|
|
2770
|
+
_: 1
|
|
2771
|
+
})
|
|
2772
|
+
], 2)
|
|
2569
2773
|
], 2),
|
|
2570
2774
|
unref(slots)["right-extra"] ? (openBlock(), createElementBlock("div", {
|
|
2571
2775
|
key: 1,
|
|
@@ -2577,7 +2781,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2577
2781
|
};
|
|
2578
2782
|
}
|
|
2579
2783
|
});
|
|
2580
|
-
const NavTabs = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
2784
|
+
const NavTabs = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-5c4435f1"]]);
|
|
2581
2785
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
2582
2786
|
__name: "split-button",
|
|
2583
2787
|
props: {
|
|
@@ -2736,7 +2940,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
2736
2940
|
};
|
|
2737
2941
|
}
|
|
2738
2942
|
});
|
|
2739
|
-
const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
2943
|
+
const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-29bffa31"]]);
|
|
2740
2944
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2741
2945
|
__name: "TableColumn",
|
|
2742
2946
|
props: {
|
|
@@ -3133,7 +3337,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3133
3337
|
};
|
|
3134
3338
|
}
|
|
3135
3339
|
});
|
|
3136
|
-
const Tag = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
3340
|
+
const Tag = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-cd3b3c6d"]]);
|
|
3137
3341
|
function getDefaultExportFromCjs(x) {
|
|
3138
3342
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
3139
3343
|
}
|