vft 0.0.451 → 0.0.454
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/affix/affix.vue2.js +1 -1
- package/es/components/alert/alert.vue.d.ts +2 -1
- package/es/components/alert/alert.vue2.js +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +3 -2
- package/es/components/autocomplete/autocomplete.vue2.js +18 -18
- package/es/components/avatar/avatar.vue.d.ts +1 -1
- package/es/components/button/button-group.vue.d.ts +1 -1
- package/es/components/button/button-group.vue2.js +1 -1
- package/es/components/carousel/carousel.vue2.js +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue2.js +4 -7
- package/es/components/cascader-panel/node.vue2.js +1 -1
- package/es/components/check-tag/check-tag.vue2.js +2 -2
- package/es/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +1 -1
- package/es/components/col/col.vue2.js +6 -6
- package/es/components/color-picker/color-picker.vue.d.ts +1 -1
- package/es/components/color-picker/components/hue-slider.vue.js +4 -4
- package/es/components/color-picker/components/sv-panel.vue.js +4 -4
- package/es/components/context-menu/context-menu.vue.d.ts +1 -1
- package/es/components/context-menu/context-menu.vue2.js +15 -18
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +2 -2
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +1 -1
- package/es/components/date-time-select/date-time-select.vue2.js +38 -39
- package/es/components/dialog/dialog.vue.d.ts +1 -1
- package/es/components/drawer/drawer.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +1 -1
- package/es/components/full-screen/full-screen.vue.d.ts +1 -1
- package/es/components/header-layout/header-layout.vue.d.ts +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +2 -2
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +15 -15
- package/es/components/icon/icon.vue.d.ts +1 -1
- package/es/components/icon-text/icon-text.vue2.js +12 -12
- package/es/components/iframe-layout/iframe-layout.vue.d.ts +1 -1
- package/es/components/image/image.vue2.js +1 -1
- package/es/components/image-viewer/image-viewer.vue2.js +1 -1
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-number/input-number.vue2.js +1 -1
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/link/link.vue2.js +10 -11
- package/es/components/list-cell/list-cell.vue.d.ts +1 -1
- package/es/components/list-cell/list-cell.vue2.js +1 -1
- package/es/components/modal/modal.vue.d.ts +1 -8
- package/es/components/modal/types.d.ts +42 -11
- package/es/components/multiple-tabs/multiple-tabs.vue.d.ts +1 -1
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +11 -13
- package/es/components/multiple-tabs/tab-content.vue.d.ts +1 -1
- package/es/components/multiple-tabs/tab-content.vue2.js +7 -8
- package/es/components/overlay/overlay.vue2.js +5 -5
- package/es/components/pagination/components/jumper.vue.d.ts +1 -1
- package/es/components/pagination/components/pager.vue2.js +2 -12
- package/es/components/pagination/pagination.vue2.js +1 -1
- package/es/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/es/components/popper/trigger.vue2.js +13 -13
- package/es/components/progress/index.d.ts +3 -3
- package/es/components/qrcode/qrcode.vue.d.ts +1 -1
- package/es/components/radio/radio-button.vue2.js +4 -4
- package/es/components/radio/radio-group.vue.d.ts +1 -1
- package/es/components/radio/radio.vue2.js +1 -1
- package/es/components/rate/rate.vue2.js +4 -4
- package/es/components/result/result.vue.d.ts +1 -1
- package/es/components/router-view-content/index.d.ts +0 -18
- package/es/components/router-view-content/router-view-content.vue.d.ts +0 -4
- package/es/components/router-view-content/router-view-content.vue2.js +24 -28
- package/es/components/scrollbar/scrollbar.vue2.js +16 -16
- package/es/components/skeleton/skeleton-item.vue.d.ts +1 -1
- package/es/components/slider/button.vue.d.ts +1 -1
- package/es/components/slider/button.vue2.js +1 -1
- package/es/components/slider/slider.vue.d.ts +1 -1
- package/es/components/slider/slider.vue2.js +1 -1
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/super-form/super-form.vue2.js +1 -1
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/table/index.d.ts +9 -0
- package/es/components/table/table.vue2.js +36 -32
- package/es/components/table/types.d.ts +1 -0
- package/es/components/tabs/tab-bar.vue.d.ts +1 -1
- package/es/components/tabs/tab-nav.vue.d.ts +1 -1
- package/es/components/tabs/tabs.vue.d.ts +3 -3
- package/es/components/tag/tag.vue.d.ts +1 -1
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +25 -25
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +2 -3
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +2 -3
- package/es/components/time-select/time-select.vue2.js +2 -1
- package/es/components/timeline/timeline-item.vue.d.ts +1 -1
- package/es/components/tooltip/trigger.vue.d.ts +1 -1
- package/es/components/tree/tree-node.vue.js +1 -1
- package/es/components/upload/upload-content.vue2.js +3 -1
- package/es/components/upload/upload.vue2.js +1 -1
- package/es/components/watermark/watermark.vue2.js +2 -2
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/affix/affix.vue2.cjs +1 -1
- package/lib/components/alert/alert.vue.d.ts +2 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +3 -2
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue.d.ts +1 -1
- package/lib/components/button/button-group.vue.d.ts +1 -1
- package/lib/components/button/button-group.vue2.cjs +1 -1
- package/lib/components/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/node.vue2.cjs +1 -1
- package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue.d.ts +1 -1
- package/lib/components/color-picker/components/hue-slider.vue.cjs +1 -1
- package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue.d.ts +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +1 -1
- package/lib/components/drawer/drawer.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue.d.ts +1 -1
- package/lib/components/header-layout/header-layout.vue.d.ts +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue.d.ts +2 -2
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue.d.ts +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue.d.ts +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/input-number.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue.d.ts +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +1 -8
- package/lib/components/modal/types.d.ts +42 -11
- package/lib/components/multiple-tabs/multiple-tabs.vue.d.ts +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue.d.ts +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/overlay/overlay.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue.d.ts +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/pagination.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/lib/components/progress/index.d.ts +3 -3
- package/lib/components/qrcode/qrcode.vue.d.ts +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue.d.ts +1 -1
- package/lib/components/radio/radio.vue2.cjs +1 -1
- package/lib/components/rate/rate.vue2.cjs +1 -1
- package/lib/components/result/result.vue.d.ts +1 -1
- package/lib/components/router-view-content/index.d.ts +0 -18
- package/lib/components/router-view-content/router-view-content.vue.d.ts +0 -4
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton-item.vue.d.ts +1 -1
- package/lib/components/slider/button.vue.d.ts +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue.d.ts +1 -1
- package/lib/components/slider/slider.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/index.d.ts +9 -0
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/types.d.ts +1 -0
- package/lib/components/tabs/tab-bar.vue.d.ts +1 -1
- package/lib/components/tabs/tab-nav.vue.d.ts +1 -1
- package/lib/components/tabs/tabs.vue.d.ts +3 -3
- package/lib/components/tag/tag.vue.d.ts +1 -1
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/time-select/time-select.vue2.cjs +1 -1
- package/lib/components/timeline/timeline-item.vue.d.ts +1 -1
- package/lib/components/tooltip/trigger.vue.d.ts +1 -1
- package/lib/components/tree/tree-node.vue.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/watermark/watermark.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/var.scss +2 -2
- package/theme-style/src/dialog.scss +3 -3
- package/theme-style/vft-dialog.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as N, useAttrs as ae, ref as s, getCurrentInstance as te, computed as P, unref as e, watch as oe, nextTick as le, toRaw as re, createBlock as f, openBlock as m, withCtx as c, createElementVNode as
|
|
1
|
+
import { defineComponent as N, useAttrs as ae, ref as s, getCurrentInstance as te, computed as P, unref as e, watch as oe, nextTick as le, toRaw as re, createBlock as f, openBlock as m, withCtx as c, createElementVNode as H, normalizeClass as ne, createVNode as p, createCommentVNode as D, mergeProps as _, withDirectives as ce, renderSlot as h, normalizeProps as ie, guardReactiveProps as se } from "vue";
|
|
2
2
|
import { VftEmpty as ge } from "../empty/index.js";
|
|
3
3
|
import { vLoading as de } from "../loading/directive.js";
|
|
4
4
|
import { deepMerge as F, isClient as ue, omit as fe, isFunction as me } from "@vft/utils";
|
|
@@ -16,20 +16,20 @@ import { VftClientOnly as Ce } from "../client-only/index.js";
|
|
|
16
16
|
import { VftPagination as ye } from "../pagination/index.js";
|
|
17
17
|
import { VftSkeleton as we } from "../skeleton/index.js";
|
|
18
18
|
import { VftSuperForm as ve } from "../super-form/index.js";
|
|
19
|
-
import { VxeGrid as
|
|
20
|
-
import
|
|
19
|
+
import { VxeGrid as xe } from "vxe-table";
|
|
20
|
+
import ke from "xe-utils";
|
|
21
21
|
import { PageSize as T } from "./constants.js";
|
|
22
22
|
import { useColumns as Se } from "./use/use-columns.js";
|
|
23
23
|
import { useDataSource as Be } from "./use/use-data-source.js";
|
|
24
24
|
import { useLoading as ze } from "./use/use-loading.js";
|
|
25
25
|
import { usePagination as Re } from "./use/use-pagination.js";
|
|
26
26
|
import { EmptyEnum as Pe } from "../empty/constants.js";
|
|
27
|
-
const
|
|
27
|
+
const He = {
|
|
28
28
|
"vft-loading-text": "加载中..."
|
|
29
|
-
},
|
|
29
|
+
}, De = N({
|
|
30
30
|
name: "vft-table"
|
|
31
31
|
}), la = /* @__PURE__ */ N({
|
|
32
|
-
...
|
|
32
|
+
...De,
|
|
33
33
|
props: {
|
|
34
34
|
sticky: {
|
|
35
35
|
type: [Boolean, Object]
|
|
@@ -72,6 +72,10 @@ const De = {
|
|
|
72
72
|
type: Boolean,
|
|
73
73
|
default: !0
|
|
74
74
|
},
|
|
75
|
+
addMaxHeight: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !0
|
|
78
|
+
},
|
|
75
79
|
pagination: {},
|
|
76
80
|
formOptions: {},
|
|
77
81
|
onChange: {},
|
|
@@ -393,18 +397,18 @@ const De = {
|
|
|
393
397
|
expose: O,
|
|
394
398
|
emit: V
|
|
395
399
|
}) {
|
|
396
|
-
const r = V, g = be("table"), A = ae(), b = s(), C = s(), E = s([]), d = s(),
|
|
397
|
-
getLoading:
|
|
398
|
-
setLoading:
|
|
400
|
+
const r = V, g = be("table"), A = ae(), b = s(), C = s(), E = s([]), d = s(), M = te(), t = P(() => F(M.props, e(d))), {
|
|
401
|
+
getLoading: $,
|
|
402
|
+
setLoading: q
|
|
399
403
|
} = ze(t), {
|
|
400
404
|
getPaginationInfo: i,
|
|
401
405
|
setPagination: u,
|
|
402
|
-
getCurrentPage:
|
|
406
|
+
getCurrentPage: G
|
|
403
407
|
} = Re(t), {
|
|
404
|
-
getViewColumns:
|
|
405
|
-
setColumns:
|
|
408
|
+
getViewColumns: I,
|
|
409
|
+
setColumns: K
|
|
406
410
|
} = Se(t);
|
|
407
|
-
oe(() =>
|
|
411
|
+
oe(() => G(), (a) => {
|
|
408
412
|
le(() => {
|
|
409
413
|
y({
|
|
410
414
|
seqConfig: {
|
|
@@ -423,7 +427,7 @@ const De = {
|
|
|
423
427
|
}
|
|
424
428
|
const {
|
|
425
429
|
getDataSourceRef: w,
|
|
426
|
-
handleTableChange:
|
|
430
|
+
handleTableChange: L,
|
|
427
431
|
reload: X,
|
|
428
432
|
deleteTableDataRecord: Y,
|
|
429
433
|
insertTableDataRecord: j,
|
|
@@ -431,18 +435,18 @@ const De = {
|
|
|
431
435
|
updateTableDataRecord: U,
|
|
432
436
|
setTableData: v,
|
|
433
437
|
getDataSource: J,
|
|
434
|
-
getRawDataSource:
|
|
435
|
-
tableSearch:
|
|
438
|
+
getRawDataSource: x,
|
|
439
|
+
tableSearch: k
|
|
436
440
|
} = Be(t, {
|
|
437
441
|
tableData: E,
|
|
438
|
-
setLoading:
|
|
442
|
+
setLoading: q,
|
|
439
443
|
getPaginationInfo: i,
|
|
440
444
|
setPagination: u
|
|
441
445
|
}, r);
|
|
442
446
|
function S(a) {
|
|
443
447
|
a?.pageSize && u({
|
|
444
448
|
currentPage: 1
|
|
445
|
-
}),
|
|
449
|
+
}), L(a), r("change", a);
|
|
446
450
|
const {
|
|
447
451
|
onChange: o
|
|
448
452
|
} = e(t);
|
|
@@ -570,20 +574,20 @@ const De = {
|
|
|
570
574
|
"toolbar-tool-click",
|
|
571
575
|
"zoom"
|
|
572
576
|
].forEach((a) => {
|
|
573
|
-
const o =
|
|
577
|
+
const o = ke.camelCase(`on-${a}`);
|
|
574
578
|
B[o] = (...l) => r(a, ...l);
|
|
575
579
|
});
|
|
576
580
|
const n = P(() => {
|
|
577
581
|
const a = e(w), o = {
|
|
578
582
|
...A,
|
|
579
583
|
...e(t),
|
|
580
|
-
columns: re(e(
|
|
581
|
-
loading: e(
|
|
584
|
+
columns: re(e(I)),
|
|
585
|
+
loading: e($),
|
|
582
586
|
data: a,
|
|
583
587
|
...B
|
|
584
588
|
};
|
|
585
589
|
if (ue) {
|
|
586
|
-
o.maxHeight = e(t)?.maxHeight ? e(t)?.maxHeight : `${window.innerHeight - e(t)?.extraSysHeight - (t.value?.showPager ? t.value?.pageHeight || 40 : 0)}px
|
|
590
|
+
(e(t)?.addMaxHeight || e(t)?.maxHeight) && (o.maxHeight = e(t)?.maxHeight ? e(t)?.maxHeight : `${window.innerHeight - e(t)?.extraSysHeight - (t.value?.showPager ? t.value?.pageHeight || 40 : 0)}px`);
|
|
587
591
|
const l = e(t)?.minHeight;
|
|
588
592
|
o.minHeight = l || (l !== 0 && e(t)?.toolbarConfig?.custom ? 300 : void 0);
|
|
589
593
|
}
|
|
@@ -600,9 +604,9 @@ const De = {
|
|
|
600
604
|
setTableData: v,
|
|
601
605
|
getDataSource: J,
|
|
602
606
|
getDataSourceRef: w,
|
|
603
|
-
setColumns:
|
|
604
|
-
getRawDataSource:
|
|
605
|
-
tableSearch:
|
|
607
|
+
setColumns: K,
|
|
608
|
+
getRawDataSource: x,
|
|
609
|
+
tableSearch: k
|
|
606
610
|
};
|
|
607
611
|
r("register", z);
|
|
608
612
|
const Q = {
|
|
@@ -639,9 +643,9 @@ const De = {
|
|
|
639
643
|
["showActionForm", "addSearchAllSchema"]
|
|
640
644
|
// 'union' | 'intersection' | 'concat' | 'replace' = 'union'
|
|
641
645
|
), "replace")), R = (a) => {
|
|
642
|
-
Reflect.has(a, "_filterTableData") &&
|
|
646
|
+
Reflect.has(a, "_filterTableData") && k(a._filterTableData), r("form-submit", a);
|
|
643
647
|
}, ee = () => {
|
|
644
|
-
v(
|
|
648
|
+
v(x()), r("form-reset");
|
|
645
649
|
};
|
|
646
650
|
return O({
|
|
647
651
|
table: b,
|
|
@@ -649,9 +653,9 @@ const De = {
|
|
|
649
653
|
...z
|
|
650
654
|
}), (a, o) => (m(), f(e(Ce), null, {
|
|
651
655
|
fallback: c(() => [p(e(we))]),
|
|
652
|
-
default: c(() => [
|
|
656
|
+
default: c(() => [H("div", {
|
|
653
657
|
class: ne([e(g).b()])
|
|
654
|
-
}, [p(e(
|
|
658
|
+
}, [p(e(xe), _({
|
|
655
659
|
ref_key: "xGrid",
|
|
656
660
|
ref: b
|
|
657
661
|
}, n.value), {
|
|
@@ -660,9 +664,9 @@ const De = {
|
|
|
660
664
|
onRegister: e(Z),
|
|
661
665
|
onSubmit: R,
|
|
662
666
|
onReset: ee
|
|
663
|
-
}, null, 8, ["onRegister"])) :
|
|
667
|
+
}, null, 8, ["onRegister"])) : D("", !0), h(a.$slots, "toolbar-right")]),
|
|
664
668
|
empty: c(() => [h(a.$slots, "empty", {}, () => [p(e(ge), ie(se(n.value.emptyCfg)), null, 16)])]),
|
|
665
|
-
loading: c(() => [ce(
|
|
669
|
+
loading: c(() => [ce(H("div", He, null, 512), [[e(de), !!n.value.loading]])]),
|
|
666
670
|
_: 3
|
|
667
671
|
}, 16), n.value.showPager ? (m(), f(e(ye), _({
|
|
668
672
|
key: 0,
|
|
@@ -676,7 +680,7 @@ const De = {
|
|
|
676
680
|
onSizeChange: o[1] || (o[1] = (l) => S({
|
|
677
681
|
pageSize: l
|
|
678
682
|
}))
|
|
679
|
-
}), null, 16, ["class"])) :
|
|
683
|
+
}), null, 16, ["class"])) : D("", !0)], 2)]),
|
|
680
684
|
_: 3
|
|
681
685
|
}));
|
|
682
686
|
}
|
|
@@ -57,6 +57,7 @@ export interface TableProps extends VxeGridProps {
|
|
|
57
57
|
pageHeight?: number;
|
|
58
58
|
/** 是否显示分页器,默认为 true */
|
|
59
59
|
showPager?: boolean;
|
|
60
|
+
addMaxHeight?: boolean;
|
|
60
61
|
/** 分页器配置选项 */
|
|
61
62
|
pagination?: Partial<PaginationProps> & {
|
|
62
63
|
/** 分页器位置,可选值:'bottom-left'、'bottom-right'、'top-left'、'top-right' */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { IconProps } from 'vft/es/components/icon';
|
|
2
|
+
import type { TabPaneName } from 'vft/es/components/tabs';
|
|
3
|
+
import type { VNode } from 'vue';
|
|
4
4
|
export interface TabsProps {
|
|
5
5
|
/** 标签是否可关闭 */
|
|
6
6
|
closable?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as de, inject as pe, ref as C, computed as k, unref as r, onMounted as he, nextTick as x, watch as fe, createElementBlock as a, openBlock as l, normalizeClass as m, createCommentVNode as I, Fragment as u, renderList as
|
|
1
|
+
import { defineComponent as de, inject as pe, ref as C, computed as k, unref as r, onMounted as he, nextTick as x, watch as fe, createElementBlock as a, openBlock as l, normalizeClass as m, createCommentVNode as I, Fragment as u, renderList as $, createBlock as be, withCtx as we, createTextVNode as _, toDisplayString as f, withDirectives as j, createElementVNode as ve, createVNode as U } from "vue";
|
|
2
2
|
import { debounce as Se } from "lodash-es";
|
|
3
3
|
import { vRepeatClick as q } from "@vft/directives";
|
|
4
4
|
import { VftScrollbar as ge } from "../../scrollbar/index.js";
|
|
@@ -12,21 +12,21 @@ import { useNamespace as ke } from "../../../hooks/use-namespace/index.js";
|
|
|
12
12
|
import "../../../hooks/use-model-toggle/index.js";
|
|
13
13
|
import "@popperjs/core";
|
|
14
14
|
import "../../../hooks/use-z-index/index.js";
|
|
15
|
-
import { PICKER_BASE_INJECTION_KEY as
|
|
15
|
+
import { PICKER_BASE_INJECTION_KEY as $e, timeUnits as O, DEFAULT_FORMATS_TIME as _e } from "../constants.js";
|
|
16
16
|
import { buildTimeList as L } from "../utils.js";
|
|
17
|
-
import { basicTimeSpinnerProps as
|
|
18
|
-
import { getTimeLists as
|
|
17
|
+
import { basicTimeSpinnerProps as De } from "../props/basic-time-spinner.js";
|
|
18
|
+
import { getTimeLists as Te } from "../composables/use-time-picker.js";
|
|
19
19
|
const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
20
20
|
__name: "basic-time-spinner",
|
|
21
|
-
props:
|
|
21
|
+
props: De,
|
|
22
22
|
emits: [K, "select-range", "set-option"],
|
|
23
23
|
setup(G, { emit: J }) {
|
|
24
|
-
const c = G, Y = pe(
|
|
24
|
+
const c = G, v = J, Y = pe($e), { isRange: Q, format: A } = Y.props, i = ke("time"), { getHoursList: W, getMinutesList: X, getSecondsList: Z } = Te(
|
|
25
25
|
c.disabledHours,
|
|
26
26
|
c.disabledMinutes,
|
|
27
27
|
c.disabledSeconds
|
|
28
28
|
);
|
|
29
|
-
let
|
|
29
|
+
let D = !1;
|
|
30
30
|
const S = C(), y = C(), ee = C(), se = C(), h = {
|
|
31
31
|
hours: y,
|
|
32
32
|
minutes: ee,
|
|
@@ -49,7 +49,7 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
49
49
|
seconds: L(s, 59)
|
|
50
50
|
};
|
|
51
51
|
}), ne = Se((e) => {
|
|
52
|
-
|
|
52
|
+
D = !1, b(e);
|
|
53
53
|
}, 200), H = (e) => {
|
|
54
54
|
if (!!!c.amPmMode) return "";
|
|
55
55
|
const s = c.amPmMode === "A";
|
|
@@ -57,7 +57,7 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
57
57
|
return s && (n = n.toUpperCase()), n;
|
|
58
58
|
}, p = (e) => {
|
|
59
59
|
let o = [0, 0];
|
|
60
|
-
if (!A || A ===
|
|
60
|
+
if (!A || A === _e)
|
|
61
61
|
switch (e) {
|
|
62
62
|
case "hours":
|
|
63
63
|
o = [0, 2];
|
|
@@ -75,10 +75,10 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
75
75
|
E(e, r(d)[e]);
|
|
76
76
|
}, V = () => {
|
|
77
77
|
b("hours"), b("minutes"), b("seconds");
|
|
78
|
-
},
|
|
78
|
+
}, T = (e) => e.querySelector(`.${i.namespace.value}-scrollbar__wrap`), E = (e, o) => {
|
|
79
79
|
if (c.arrowControl) return;
|
|
80
80
|
const s = r(h[e]);
|
|
81
|
-
s && s.$el && (
|
|
81
|
+
s && s.$el && (T(s.$el).scrollTop = Math.max(
|
|
82
82
|
0,
|
|
83
83
|
o * N(e)
|
|
84
84
|
));
|
|
@@ -120,10 +120,10 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
120
120
|
}, le = (e) => {
|
|
121
121
|
const o = r(h[e]);
|
|
122
122
|
if (!o) return;
|
|
123
|
-
|
|
123
|
+
D = !0, ne(e);
|
|
124
124
|
const s = Math.min(
|
|
125
125
|
Math.round(
|
|
126
|
-
(
|
|
126
|
+
(T(o.$el).scrollTop - (ae(e) * 0.5 - 10) / N(e) + 3) / N(e)
|
|
127
127
|
),
|
|
128
128
|
e === "hours" ? 23 : 59
|
|
129
129
|
);
|
|
@@ -131,7 +131,7 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
131
131
|
}, ae = (e) => r(h[e]).$el.offsetHeight, ue = () => {
|
|
132
132
|
const e = (o) => {
|
|
133
133
|
const s = r(h[o]);
|
|
134
|
-
s && s.$el && (
|
|
134
|
+
s && s.$el && (T(s.$el).onscroll = () => {
|
|
135
135
|
le(o);
|
|
136
136
|
});
|
|
137
137
|
};
|
|
@@ -148,12 +148,12 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
148
148
|
return v("set-option", [`${c.role}_scrollDown`, R]), v("set-option", [`${c.role}_emitSelectRange`, p]), fe(
|
|
149
149
|
() => c.spinnerDate,
|
|
150
150
|
() => {
|
|
151
|
-
|
|
151
|
+
D || V();
|
|
152
152
|
}
|
|
153
153
|
), (e, o) => (l(), a("div", {
|
|
154
154
|
class: m([r(i).b("spinner"), { "has-seconds": e.showSeconds }])
|
|
155
155
|
}, [
|
|
156
|
-
e.arrowControl ? I("", !0) : (l(!0), a(u, { key: 0 },
|
|
156
|
+
e.arrowControl ? I("", !0) : (l(!0), a(u, { key: 0 }, $(F.value, (s) => (l(), be(r(ge), {
|
|
157
157
|
key: s,
|
|
158
158
|
ref_for: !0,
|
|
159
159
|
ref: (n) => me(n, s),
|
|
@@ -166,7 +166,7 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
166
166
|
onMousemove: (n) => b(s)
|
|
167
167
|
}, {
|
|
168
168
|
default: we(() => [
|
|
169
|
-
(l(!0), a(u, null,
|
|
169
|
+
(l(!0), a(u, null, $(g.value[s], (n, t) => (l(), a("li", {
|
|
170
170
|
key: t,
|
|
171
171
|
class: m([
|
|
172
172
|
r(i).be("spinner", "item"),
|
|
@@ -176,35 +176,35 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
176
176
|
onClick: (w) => ie(s, { value: t, disabled: n })
|
|
177
177
|
}, [
|
|
178
178
|
s === "hours" ? (l(), a(u, { key: 0 }, [
|
|
179
|
-
|
|
179
|
+
_(f(`0${e.amPmMode ? t % 12 || 12 : t}`.slice(-2)) + f(H(t)), 1)
|
|
180
180
|
], 64)) : (l(), a(u, { key: 1 }, [
|
|
181
|
-
|
|
181
|
+
_(f(`0${t}`.slice(-2)), 1)
|
|
182
182
|
], 64))
|
|
183
183
|
], 10, Ee))), 128))
|
|
184
184
|
]),
|
|
185
185
|
_: 2
|
|
186
186
|
}, 1032, ["class", "view-class", "onMouseenter", "onMousemove"]))), 128)),
|
|
187
|
-
e.arrowControl ? (l(!0), a(u, { key: 1 },
|
|
187
|
+
e.arrowControl ? (l(!0), a(u, { key: 1 }, $(F.value, (s) => (l(), a("div", {
|
|
188
188
|
key: s,
|
|
189
189
|
class: m([r(i).be("spinner", "wrapper"), r(i).is("arrow")]),
|
|
190
190
|
onMouseenter: (n) => p(s)
|
|
191
191
|
}, [
|
|
192
192
|
j(U(r(z), {
|
|
193
193
|
icon: "icon-arrow-up",
|
|
194
|
-
class: m(["arrow-up", r(i).be("spinner", "arrow")])
|
|
194
|
+
class: m(["arrow-up", [r(i).be("spinner", "arrow")]])
|
|
195
195
|
}, null, 8, ["class"]), [
|
|
196
196
|
[r(q), te]
|
|
197
197
|
]),
|
|
198
198
|
j(U(r(z), {
|
|
199
199
|
icon: "icon-arrow-down",
|
|
200
|
-
class: m(["arrow-down", r(i).be("spinner", "arrow")])
|
|
200
|
+
class: m(["arrow-down", [r(i).be("spinner", "arrow")]])
|
|
201
201
|
}, null, 8, ["class"]), [
|
|
202
202
|
[r(q), re]
|
|
203
203
|
]),
|
|
204
204
|
ve("ul", {
|
|
205
205
|
class: m(r(i).be("spinner", "list"))
|
|
206
206
|
}, [
|
|
207
|
-
(l(!0), a(u, null,
|
|
207
|
+
(l(!0), a(u, null, $(oe.value[s], (n, t) => (l(), a("li", {
|
|
208
208
|
key: t,
|
|
209
209
|
class: m([
|
|
210
210
|
r(i).be("spinner", "item"),
|
|
@@ -214,9 +214,9 @@ const Ee = ["onClick"], Ne = ["onMouseenter"], Ye = /* @__PURE__ */ de({
|
|
|
214
214
|
}, [
|
|
215
215
|
r(Ce)(n) ? (l(), a(u, { key: 0 }, [
|
|
216
216
|
s === "hours" ? (l(), a(u, { key: 0 }, [
|
|
217
|
-
|
|
217
|
+
_(f(`0${e.amPmMode ? n % 12 || 12 : n}`.slice(-2)) + f(H(n)), 1)
|
|
218
218
|
], 64)) : (l(), a(u, { key: 1 }, [
|
|
219
|
-
|
|
219
|
+
_(f(`0${n}`.slice(-2)), 1)
|
|
220
220
|
], 64))
|
|
221
221
|
], 64)) : I("", !0)
|
|
222
222
|
], 2))), 128))
|
|
@@ -54,7 +54,6 @@ const _e = /* @__PURE__ */ F({
|
|
|
54
54
|
if ([c, q].includes(t)) {
|
|
55
55
|
const S = t === c ? -1 : 1;
|
|
56
56
|
h.start_scrollDown(S), e.preventDefault();
|
|
57
|
-
return;
|
|
58
57
|
}
|
|
59
58
|
}, { timePickerOptions: h, onSetOption: j, getAvailableTime: H } = re({
|
|
60
59
|
getAvailableHours: N,
|
|
@@ -90,12 +89,12 @@ const _e = /* @__PURE__ */ F({
|
|
|
90
89
|
}, [
|
|
91
90
|
p("button", {
|
|
92
91
|
type: "button",
|
|
93
|
-
class: r([s(i).be("panel", "btn")
|
|
92
|
+
class: r(["cancel", [s(i).be("panel", "btn")]]),
|
|
94
93
|
onClick: K
|
|
95
94
|
}, " 取消 ", 2),
|
|
96
95
|
p("button", {
|
|
97
96
|
type: "button",
|
|
98
|
-
class: r([s(i).be("panel", "btn")
|
|
97
|
+
class: r(["confirm", [s(i).be("panel", "btn")]]),
|
|
99
98
|
onClick: t[0] || (t[0] = (a) => x())
|
|
100
99
|
}, " 确认 ", 2)
|
|
101
100
|
], 2)
|
|
@@ -74,7 +74,6 @@ const Re = ["disabled"], Ge = /* @__PURE__ */ ve({
|
|
|
74
74
|
if ([r, l].includes(t)) {
|
|
75
75
|
const p = t === r ? -1 : 1, h = D.value[0] < K.value ? "start" : "end";
|
|
76
76
|
T[`${h}_scrollDown`](p), e.preventDefault();
|
|
77
|
-
return;
|
|
78
77
|
}
|
|
79
78
|
}, V = (e, t) => {
|
|
80
79
|
const n = O ? O(e) : [], o = e === "start", l = (t || (o ? v.value : f.value)).hour(), p = o ? g(l + 1, 23) : g(0, l - 1);
|
|
@@ -175,12 +174,12 @@ const Re = ["disabled"], Ge = /* @__PURE__ */ ve({
|
|
|
175
174
|
}, [
|
|
176
175
|
m("button", {
|
|
177
176
|
type: "button",
|
|
178
|
-
class: u([s(a).be("panel", "btn")
|
|
177
|
+
class: u(["cancel", [s(a).be("panel", "btn")]]),
|
|
179
178
|
onClick: t[0] || (t[0] = (n) => X())
|
|
180
179
|
}, " 取消 ", 2),
|
|
181
180
|
m("button", {
|
|
182
181
|
type: "button",
|
|
183
|
-
class: u([s(a).be("panel", "btn")
|
|
182
|
+
class: u(["confirm", [s(a).be("panel", "btn")]]),
|
|
184
183
|
disabled: oe.value,
|
|
185
184
|
onClick: t[1] || (t[1] = (n) => Z())
|
|
186
185
|
}, " 确认 ", 10, Re)
|
|
@@ -22,8 +22,9 @@ const q = v({
|
|
|
22
22
|
props: D,
|
|
23
23
|
emits: ["change", "blur", "focus", "update:modelValue"],
|
|
24
24
|
setup(T, { expose: V }) {
|
|
25
|
+
const o = T;
|
|
25
26
|
d.extend(O);
|
|
26
|
-
const { Option: k } = b,
|
|
27
|
+
const { Option: k } = b, C = j("input"), i = S(), I = U(), g = r(() => o.modelValue), y = r(() => {
|
|
27
28
|
const e = a(o.start);
|
|
28
29
|
return e ? m(e) : null;
|
|
29
30
|
}), c = r(() => {
|
|
@@ -31,7 +31,7 @@ function S(e, n, c, B, M, V) {
|
|
|
31
31
|
}, [
|
|
32
32
|
v("div", {
|
|
33
33
|
class: s(e.ns.be("node", "content")),
|
|
34
|
-
style: D({ paddingLeft: (e.node.level - 1) * e.tree.props.indent
|
|
34
|
+
style: D({ paddingLeft: `${(e.node.level - 1) * e.tree.props.indent}px` })
|
|
35
35
|
}, [
|
|
36
36
|
l(h, {
|
|
37
37
|
icon: e.tree.props.icon || "icon-caret-right",
|
|
@@ -76,7 +76,9 @@ const se = ["onKeydown"], re = ["name", "multiple", "accept"], de = D({
|
|
|
76
76
|
onTypeInvalid: c
|
|
77
77
|
} = l;
|
|
78
78
|
if (s) {
|
|
79
|
-
const n = e.filter(
|
|
79
|
+
const n = e.filter(
|
|
80
|
+
(t) => !P(t, s)
|
|
81
|
+
);
|
|
80
82
|
if (n.length > 0 && (n.forEach((t) => {
|
|
81
83
|
c && c(t, s);
|
|
82
84
|
}), e = e.filter((t) => P(t, s)), e.length === 0))
|
|
@@ -115,7 +115,7 @@ const Q = I({
|
|
|
115
115
|
handleRemove: m,
|
|
116
116
|
fileList: d
|
|
117
117
|
}), (e, l) => (v(), D("div", {
|
|
118
|
-
class: H(["vft-upload-wrapper", { disabled: o(y) }])
|
|
118
|
+
class: H(["vft-upload-wrapper", [{ disabled: o(y) }]])
|
|
119
119
|
}, [
|
|
120
120
|
c.value && s.showFileList ? (v(), g(L, {
|
|
121
121
|
key: 0,
|
|
@@ -10,9 +10,9 @@ const ft = _({
|
|
|
10
10
|
...ft,
|
|
11
11
|
props: rt,
|
|
12
12
|
setup(A) {
|
|
13
|
-
const R = {
|
|
13
|
+
const t = A, R = {
|
|
14
14
|
position: "relative"
|
|
15
|
-
},
|
|
15
|
+
}, E = n(() => t.font?.color ?? "rgba(0,0,0,.15)"), k = n(() => t.font?.fontSize ?? 16), I = n(() => t.font?.fontWeight ?? "normal"), P = n(() => t.font?.fontStyle ?? "normal"), y = n(() => t.font?.fontFamily ?? "sans-serif"), T = n(() => t.font?.textAlign ?? "center"), F = n(() => t.font?.textBaseline ?? "hanging"), b = n(() => t.gap[0]), B = n(() => t.gap[1]), S = n(() => b.value / 2), M = n(() => B.value / 2), H = n(() => t.offset?.[0] ?? S.value), L = n(() => t.offset?.[1] ?? M.value), O = () => {
|
|
16
16
|
const e = {
|
|
17
17
|
zIndex: t.zIndex,
|
|
18
18
|
position: "absolute",
|
|
@@ -2,14 +2,14 @@ import "@vueuse/core";
|
|
|
2
2
|
import { isNumber as m, isClient as p } from "@vft/utils";
|
|
3
3
|
import { debugWarn as l } from "../../utils/error.js";
|
|
4
4
|
import "../../components/config-provider/hooks/use-global-config.js";
|
|
5
|
-
import {
|
|
5
|
+
import { getCurrentInstance as i, inject as e, computed as c, unref as v, ref as Z } from "vue";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../components/form/index.js";
|
|
8
8
|
const s = {
|
|
9
9
|
current: 0
|
|
10
|
-
}, u =
|
|
10
|
+
}, u = Z(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
|
|
11
11
|
const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
|
|
12
|
-
const r =
|
|
12
|
+
const r = v(x);
|
|
13
13
|
return m(r) ? r : f;
|
|
14
14
|
}), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
|
|
15
15
|
return !p && !e(d) && l(
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
package/es/utils/vue/vnode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hasOwn as m, camelize as N, isArray as E } from "@vft/utils";
|
|
2
2
|
import { isVNode as o, Fragment as S, Comment as A, Text as s, createCommentVNode as L, createBlock as _, openBlock as C } from "vue";
|
|
3
3
|
import { debugWarn as O } from "../error.js";
|
|
4
4
|
const R = "utils/vue/vnode";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@vueuse/core"),T=require("../../utils/dom/scroll.cjs"),$=require("../../utils/error.cjs"),C=require("../../utils/helper.cjs");require("@vft/utils");require("lodash-es");require("../form/index.cjs");const B=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("./affix.cjs"),R=e.defineComponent({name:"vft-affix"}),k=e.defineComponent({...R,props:q.affixProps,emits:q.affixEmits,setup(S,{expose:E,emit:_}){const c=B.useNamespace("affix"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("@vueuse/core"),T=require("../../utils/dom/scroll.cjs"),$=require("../../utils/error.cjs"),C=require("../../utils/helper.cjs");require("@vft/utils");require("lodash-es");require("../form/index.cjs");const B=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("./affix.cjs"),R=e.defineComponent({name:"vft-affix"}),k=e.defineComponent({...R,props:q.affixProps,emits:q.affixEmits,setup(S,{expose:E,emit:_}){const t=S,p=_,c=B.useNamespace("affix"),a=e.shallowRef(),v=e.shallowRef(),r=e.shallowRef(),{height:n}=f.useWindowSize(),{height:s,width:m,top:h,bottom:g,update:d}=f.useElementBounding(v,{windowScroll:!1}),u=f.useElementBounding(a),l=e.ref(!1),x=e.ref(0),i=e.ref(0),b=e.computed(()=>({height:l.value?`${s.value}px`:"",width:l.value?`${m.value}px`:""})),y=e.computed(()=>{if(!l.value)return{};const o=t.offset?C.addUnit(t.offset):0;return{height:`${s.value}px`,width:`${m.value}px`,top:t.position==="top"?o:"",bottom:t.position==="bottom"?o:"",transform:i.value?`translateY(${i.value}px)`:"",zIndex:t.zIndex}}),w=()=>{if(r.value)if(x.value=r.value instanceof Window?document.documentElement.scrollTop:r.value.scrollTop||0,t.position==="top")if(t.target){const o=u.bottom.value-t.offset-s.value;l.value=t.offset>h.value&&u.bottom.value>0,i.value=o<0?o:0}else l.value=t.offset>h.value;else if(t.target){const o=n.value-u.top.value-t.offset-s.value;l.value=n.value-t.offset<g.value&&n.value>u.top.value,i.value=o<0?-o:0}else l.value=n.value-t.offset<g.value},z=()=>{d(),p("scroll",{scrollTop:x.value,fixed:l.value})};return e.watch(l,o=>p("change",o)),e.onMounted(()=>{t.target?(a.value=document.querySelector(t.target)??void 0,a.value||$.throwError(c.b(),`Target is not existed: ${t.target}`)):a.value=document.documentElement,r.value=T.getScrollContainer(v.value,!0),d()}),f.useEventListener(r,"scroll",z),e.watchEffect(w),E({update:w,updateRoot:d}),(o,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:v,class:e.normalizeClass(e.unref(c).b()),style:e.normalizeStyle(b.value)},[e.createElementVNode("div",{class:e.normalizeClass({[e.unref(c).m("fixed")]:l.value}),style:e.normalizeStyle(y.value)},[e.renderSlot(o.$slots,"default")],6)],6))}});exports.default=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../icon/index.cjs");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const m=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const k=e.defineComponent({name:"vft-alert"}),B=e.defineComponent({...k,props:{title:{default:""},description:{default:""},type:{default:"info"},closable:{type:Boolean,default:!0},closeText:{default:""},showIcon:{type:Boolean},center:{type:Boolean},effect:{default:"light"}},emits:{close:t=>t instanceof MouseEvent},setup(t,{emit:i}){const l=m.useNamespace("alert"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../icon/index.cjs");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const m=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const k=e.defineComponent({name:"vft-alert"}),B=e.defineComponent({...k,props:{title:{default:""},description:{default:""},type:{default:"info"},closable:{type:Boolean,default:!0},closeText:{default:""},showIcon:{type:Boolean},center:{type:Boolean},effect:{default:"light"}},emits:{close:t=>t instanceof MouseEvent},setup(t,{emit:i}){const u=i,l=m.useNamespace("alert"),o=e.useSlots(),c=e.ref(!0),s=e.computed(()=>t.type),d=e.computed(()=>[l.e("icon"),{[l.is("big")]:!!t.description||!!o.default}]),f=e.computed(()=>({[l.is("bold")]:t.description||o.default})),r=n=>{c.value=!1,u("close",n)};return(n,C)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(l).b("fade")},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).m(t.type),e.unref(l).is("center",t.center),e.unref(l).is(t.effect)]),role:"alert"},[t.showIcon&&s.value?(e.openBlock(),e.createBlock(e.unref(a.VftIcon),{key:0,class:e.normalizeClass(d.value),icon:s.value},null,8,["class","icon"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[t.title||n.$slots.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(l).e("title"),f.value])},[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])],2)):e.createCommentVNode("",!0),n.$slots.default||t.description?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(l).e("description"))},[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],2)):e.createCommentVNode("",!0),t.closable?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.closeText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(l).e("close-btn"),e.unref(l).is("customed")]),onClick:r},e.toDisplayString(t.closeText),3)):(e.openBlock(),e.createBlock(e.unref(a.VftIcon),{key:1,class:e.normalizeClass(e.unref(l).e("close-btn")),onClick:r,icon:"icon-close"},null,8,["class"]))],64)):e.createCommentVNode("",!0)],2)],2),[[e.vShow,c.value]])]),_:3},8,["name"]))}});exports.default=B;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { nextTick
|
|
2
|
-
import
|
|
1
|
+
import { nextTick } from 'vue';
|
|
2
|
+
import type { StyleValue } from 'vue';
|
|
3
|
+
import type { AutocompleteData, AutocompleteFetchSuggestions, Placement } from './types';
|
|
3
4
|
export interface AutocompleteProps {
|
|
4
5
|
valueKey?: string;
|
|
5
6
|
modelValue?: string | number;
|