vft 0.0.429 → 0.0.430
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/es/components/alert/alert.vue2.js +38 -38
- package/es/components/autocomplete/autocomplete.vue2.js +82 -82
- package/es/components/avatar/avatar.vue2.js +23 -23
- package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
- package/es/components/button/button.vue2.js +37 -37
- package/es/components/card/card.vue2.js +19 -19
- package/es/components/carousel/carousel.vue2.js +75 -75
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader-panel/index.vue2.js +2 -2
- package/es/components/cascader-panel/menu.vue2.js +2 -2
- package/es/components/cascader-panel/node.vue2.js +3 -4
- package/es/components/checkbox/checkbox-button.vue2.js +52 -52
- package/es/components/checkbox/checkbox-group.vue2.js +26 -26
- package/es/components/checkbox/checkbox.vue2.js +57 -57
- package/es/components/clamp/clamp.vue2.js +14 -14
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
- package/es/components/col/col.vue2.js +20 -20
- package/es/components/color-picker/color-picker.vue2.js +126 -128
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/context-menu/context-menu.vue2.js +18 -18
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/descriptions/description.vue2.js +44 -44
- package/es/components/descriptions/descriptions-row.vue2.js +12 -12
- package/es/components/dialog/dialog-content.vue2.js +31 -31
- package/es/components/dialog/dialog.vue2.js +46 -46
- package/es/components/divider/divider.vue2.js +19 -19
- package/es/components/drawer/drawer.vue2.js +41 -41
- package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
- package/es/components/dropdown/dropdown-item.vue2.js +28 -28
- package/es/components/dropdown/dropdown.vue2.js +124 -124
- package/es/components/form/form-item.vue2.js +71 -71
- package/es/components/header-layout/header-layout.vue2.js +25 -25
- package/es/components/icon/icon.vue2.js +15 -15
- package/es/components/icon-text/icon-text.vue2.js +28 -28
- package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
- package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
- package/es/components/image/image.vue2.js +63 -63
- package/es/components/image-viewer/image-viewer.vue2.js +88 -88
- package/es/components/infinite-scroll/index.d.ts +1 -1
- package/es/components/input/input.vue2.js +112 -112
- package/es/components/input-number/input-number.vue2.js +100 -100
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/link/link.vue2.js +20 -20
- package/es/components/list-cell/list-cell.vue2.js +19 -19
- package/es/components/logo/logo.vue2.js +22 -22
- package/es/components/menu/menu-item-group.vue2.js +8 -8
- package/es/components/menu/menu-item.vue2.js +48 -48
- package/es/components/message/message.vue2.js +66 -66
- package/es/components/modal/modal-footer-action.vue2.js +25 -25
- package/es/components/modal/modal.vue2.js +40 -40
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
- package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
- package/es/components/pagination/components/jumper.vue2.js +18 -18
- package/es/components/pagination/components/next.vue2.js +11 -11
- package/es/components/pagination/components/pager.vue2.js +74 -74
- package/es/components/pagination/components/prev.vue2.js +9 -9
- package/es/components/pagination/components/sizes.vue2.js +18 -18
- package/es/components/pagination/components/total.vue2.js +8 -8
- package/es/components/popconfirm/popconfirm.vue2.js +47 -47
- package/es/components/popover/popover.vue2.js +28 -28
- package/es/components/popper/trigger.vue2.js +9 -9
- package/es/components/progress/progress.vue2.js +87 -87
- package/es/components/qrcode/qrcode.vue2.js +31 -31
- package/es/components/radio/radio-button.vue2.js +17 -17
- package/es/components/radio/radio-group.vue2.js +35 -35
- package/es/components/router-view-content/router-view-content.vue2.js +25 -25
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
- package/es/components/row/row.vue2.js +5 -5
- package/es/components/scrollbar/bar.vue2.js +16 -16
- package/es/components/scrollbar/scrollbar.vue2.js +48 -48
- package/es/components/scrollbar/thumb.vue2.js +27 -27
- package/es/components/search/search.vue2.js +29 -29
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/select.vue.d.ts +1 -1
- package/es/components/side-menu/index.d.ts +2 -8
- package/es/components/side-menu/side-menu.vue.d.ts +5 -59
- package/es/components/side-menu/types.d.ts +107 -0
- package/es/components/skeleton/skeleton-item.vue2.js +9 -9
- package/es/components/skeleton/skeleton.vue2.js +14 -14
- package/es/components/slider/button.vue2.js +54 -54
- package/es/components/slider/slider.vue2.js +106 -106
- package/es/components/steps/item.vue2.js +56 -56
- package/es/components/steps/steps.vue2.js +16 -16
- package/es/components/super-form/super-form-action.vue2.js +28 -28
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/switch/switch.vue2.js +108 -108
- package/es/components/table/field.d.ts +4 -4
- package/es/components/teleport/teleport.vue2.js +6 -6
- package/es/components/time-picker/common/picker.vue.d.ts +1 -1
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/time-picker/time-picker.d.ts +1 -1
- package/es/components/timeline/timeline-item.vue2.js +20 -20
- package/es/components/tooltip/content.vue2.js +57 -57
- package/es/components/tooltip/tooltip.vue2.js +66 -66
- package/es/components/tooltip/trigger.vue2.js +42 -42
- package/es/components/tree/tree.vue2.js +72 -72
- package/es/components/upload/upload-content.vue2.js +85 -85
- package/es/components/upload/upload-list.vue2.js +70 -70
- package/es/components/upload/upload.vue2.js +86 -86
- package/es/components/verify-code/verify-code.vue2.js +18 -18
- 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/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue2.cjs +1 -1
- package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
- package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/card/card.vue2.cjs +1 -1
- package/lib/components/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/cascader-panel/index.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
- package/lib/components/cascader-panel/node.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
- package/lib/components/clamp/clamp.vue2.cjs +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +1 -1
- package/lib/components/date-picker/index.d.ts +2 -2
- package/lib/components/descriptions/description.vue2.cjs +1 -1
- package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/divider/divider.vue2.cjs +1 -1
- package/lib/components/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +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/infinite-scroll/index.d.ts +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.vue2.cjs +1 -1
- package/lib/components/logo/logo.vue2.cjs +1 -1
- package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/next.vue2.cjs +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/components/prev.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/progress/progress.vue2.cjs +5 -5
- package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue2.cjs +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/bar.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/select.vue.d.ts +1 -1
- package/lib/components/side-menu/index.d.ts +2 -8
- package/lib/components/side-menu/side-menu.vue.d.ts +5 -59
- package/lib/components/side-menu/types.d.ts +107 -0
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue2.cjs +1 -1
- package/lib/components/steps/item.vue2.cjs +1 -1
- package/lib/components/steps/steps.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/field.d.ts +4 -4
- package/lib/components/teleport/teleport.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/time-picker/time-picker.d.ts +1 -1
- package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/trigger.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/tags.json +1 -1
- package/theme-style/src/mixins/mixins.scss +1 -0
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as i, createElementBlock as r, openBlock as n, unref as t, normalizeClass as s, toDisplayString as p } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../../config-provider/hooks/use-global-config.js";
|
|
@@ -9,17 +9,17 @@ import "../../../hooks/use-model-toggle/index.js";
|
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../../hooks/use-z-index/index.js";
|
|
11
11
|
import { usePagination as l } from "../usePagination.js";
|
|
12
|
-
const c = ["disabled"], D = /* @__PURE__ */
|
|
12
|
+
const c = ["disabled"], D = /* @__PURE__ */ i({
|
|
13
13
|
__name: "total",
|
|
14
14
|
props: {
|
|
15
15
|
total: { default: 0 }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
return (
|
|
20
|
-
class: s(t(
|
|
21
|
-
disabled: t(
|
|
22
|
-
}, "共 " +
|
|
17
|
+
setup(o) {
|
|
18
|
+
const e = m("pagination"), { disabled: a } = l();
|
|
19
|
+
return (d, f) => (n(), r("span", {
|
|
20
|
+
class: s(t(e).e("total")),
|
|
21
|
+
disabled: t(a)
|
|
22
|
+
}, "共 " + p(o.total) + " 条", 11, c));
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as h, ref as
|
|
1
|
+
import { defineComponent as h, ref as N, computed as r, createBlock as d, openBlock as y, unref as t, mergeProps as w, withCtx as l, renderSlot as $, createCommentVNode as B, createElementVNode as a, normalizeClass as c, createTextVNode as f, normalizeStyle as b, toDisplayString as s, createVNode as T } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
|
-
import { addUnit as
|
|
4
|
+
import { addUnit as I } from "../../utils/helper.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../form/index.js";
|
|
7
|
-
import { VftButton as
|
|
8
|
-
import { VftIcon as
|
|
9
|
-
import { VftTooltip as
|
|
10
|
-
import { useNamespace as
|
|
7
|
+
import { VftButton as x } from "../button/index.js";
|
|
8
|
+
import { VftIcon as P } from "../icon/index.js";
|
|
9
|
+
import { VftTooltip as S } from "../tooltip/index.js";
|
|
10
|
+
import { useNamespace as A } from "../../hooks/use-namespace/index.js";
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
const
|
|
14
|
+
const R = h({
|
|
15
15
|
name: "VftPopconfirm"
|
|
16
16
|
}), W = /* @__PURE__ */ h({
|
|
17
|
-
...
|
|
17
|
+
...R,
|
|
18
18
|
props: {
|
|
19
19
|
title: {},
|
|
20
20
|
confirmButtonText: {},
|
|
@@ -30,77 +30,77 @@ const q = h({
|
|
|
30
30
|
width: { default: 150 }
|
|
31
31
|
},
|
|
32
32
|
emits: ["confirm", "cancel"],
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
width:
|
|
38
|
-
})),
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
() =>
|
|
44
|
-
),
|
|
45
|
-
return (
|
|
33
|
+
setup(e, { emit: C }) {
|
|
34
|
+
const i = e, m = C, n = A("popconfirm"), p = N(), u = () => {
|
|
35
|
+
p.value?.onClose?.();
|
|
36
|
+
}, k = r(() => ({
|
|
37
|
+
width: I(i.width)
|
|
38
|
+
})), v = (o) => {
|
|
39
|
+
m("confirm", o), u();
|
|
40
|
+
}, V = (o) => {
|
|
41
|
+
m("cancel", o), u();
|
|
42
|
+
}, g = r(
|
|
43
|
+
() => i.confirmButtonText || "确认"
|
|
44
|
+
), z = r(() => i.cancelButtonText || "取消");
|
|
45
|
+
return (o, q) => (y(), d(t(S), w({
|
|
46
46
|
ref_key: "tooltipRef",
|
|
47
|
-
ref:
|
|
47
|
+
ref: p,
|
|
48
48
|
trigger: "click",
|
|
49
49
|
effect: "light"
|
|
50
|
-
},
|
|
51
|
-
"popper-class": `${t(
|
|
52
|
-
"popper-style":
|
|
50
|
+
}, o.$attrs, {
|
|
51
|
+
"popper-class": `${t(n).namespace.value}-popover`,
|
|
52
|
+
"popper-style": k.value,
|
|
53
53
|
teleported: e.teleported,
|
|
54
54
|
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
55
55
|
"hide-after": e.hideAfter,
|
|
56
56
|
persistent: e.persistent
|
|
57
57
|
}), {
|
|
58
|
-
content:
|
|
59
|
-
|
|
60
|
-
class:
|
|
58
|
+
content: l(() => [
|
|
59
|
+
a("div", {
|
|
60
|
+
class: c(t(n).b())
|
|
61
61
|
}, [
|
|
62
|
-
|
|
63
|
-
class:
|
|
62
|
+
a("div", {
|
|
63
|
+
class: c(t(n).e("main"))
|
|
64
64
|
}, [
|
|
65
|
-
!e.hideIcon && e.icon ? (
|
|
65
|
+
!e.hideIcon && e.icon ? (y(), d(t(P), {
|
|
66
66
|
key: 0,
|
|
67
67
|
icon: e.icon,
|
|
68
68
|
size: 20,
|
|
69
|
-
class:
|
|
70
|
-
style:
|
|
71
|
-
}, null, 8, ["icon", "class", "style"])) :
|
|
72
|
-
|
|
69
|
+
class: c(t(n).e("icon")),
|
|
70
|
+
style: b({ color: e.iconColor })
|
|
71
|
+
}, null, 8, ["icon", "class", "style"])) : B("", !0),
|
|
72
|
+
f(" " + s(e.title), 1)
|
|
73
73
|
], 2),
|
|
74
|
-
|
|
75
|
-
class:
|
|
74
|
+
a("div", {
|
|
75
|
+
class: c(t(n).e("action"))
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
T(t(x), {
|
|
78
78
|
size: "small",
|
|
79
79
|
type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
|
|
80
80
|
text: e.cancelButtonType === "text",
|
|
81
|
-
onClick:
|
|
81
|
+
onClick: V
|
|
82
82
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
|
|
83
|
+
default: l(() => [
|
|
84
|
+
f(s(z.value), 1)
|
|
85
85
|
]),
|
|
86
86
|
_: 1
|
|
87
87
|
}, 8, ["type", "text"]),
|
|
88
|
-
|
|
88
|
+
T(t(x), {
|
|
89
89
|
size: "small",
|
|
90
90
|
type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
|
|
91
91
|
text: e.confirmButtonType === "text",
|
|
92
|
-
onClick:
|
|
92
|
+
onClick: v
|
|
93
93
|
}, {
|
|
94
|
-
default:
|
|
95
|
-
|
|
94
|
+
default: l(() => [
|
|
95
|
+
f(s(g.value), 1)
|
|
96
96
|
]),
|
|
97
97
|
_: 1
|
|
98
98
|
}, 8, ["type", "text"])
|
|
99
99
|
], 2)
|
|
100
100
|
], 2)
|
|
101
101
|
]),
|
|
102
|
-
default:
|
|
103
|
-
|
|
102
|
+
default: l(() => [
|
|
103
|
+
o.$slots.reference ? $(o.$slots, "reference", { key: 0 }) : B("", !0)
|
|
104
104
|
]),
|
|
105
105
|
_: 3
|
|
106
106
|
}, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftTooltip as
|
|
3
|
-
import { EVENT_CODE as
|
|
1
|
+
import { defineComponent as u, computed as o, ref as S, unref as l, createBlock as x, openBlock as f, mergeProps as R, withCtx as s, renderSlot as d, createCommentVNode as p, createElementBlock as T, normalizeClass as U, toDisplayString as c, createTextVNode as V } from "vue";
|
|
2
|
+
import { VftTooltip as $ } from "../tooltip/index.js";
|
|
3
|
+
import { EVENT_CODE as i } from "../../constants/aria.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "@vft/utils";
|
|
6
|
-
import { addUnit as
|
|
6
|
+
import { addUnit as N } from "../../utils/helper.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as O } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
const
|
|
13
|
+
const K = "onUpdate:visible", D = u({
|
|
14
14
|
name: "vft-popover"
|
|
15
|
-
}),
|
|
16
|
-
...
|
|
15
|
+
}), X = /* @__PURE__ */ u({
|
|
16
|
+
...D,
|
|
17
17
|
props: {
|
|
18
18
|
trigger: { default: "hover" },
|
|
19
19
|
placement: { default: "bottom" },
|
|
@@ -37,7 +37,7 @@ const D = "onUpdate:visible", H = m({
|
|
|
37
37
|
showArrow: { type: Boolean, default: !0 },
|
|
38
38
|
persistent: { type: Boolean, default: !0 },
|
|
39
39
|
appendTo: {},
|
|
40
|
-
triggerKeys: { default: () => [
|
|
40
|
+
triggerKeys: { default: () => [i.enter, i.numpadEnter, i.space] }
|
|
41
41
|
},
|
|
42
42
|
emits: [
|
|
43
43
|
"update:visible",
|
|
@@ -46,30 +46,30 @@ const D = "onUpdate:visible", H = m({
|
|
|
46
46
|
"after-enter",
|
|
47
47
|
"after-leave"
|
|
48
48
|
],
|
|
49
|
-
setup(
|
|
50
|
-
const
|
|
49
|
+
setup(e, { expose: m, emit: b }) {
|
|
50
|
+
const t = b, r = O("popover"), v = o(() => [K]), n = S(), g = o(() => l(n)?.popperRef), h = o(() => [
|
|
51
51
|
{
|
|
52
|
-
width:
|
|
52
|
+
width: N(e.width)
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
]), y =
|
|
54
|
+
e.popperStyle
|
|
55
|
+
]), y = o(() => [r.b(), e.popperClass, { [r.m("plain")]: !!e.content }]), w = o(() => e.transition === `${r.namespace.value}-fade-in-linear`), B = () => {
|
|
56
56
|
n.value?.hide();
|
|
57
57
|
}, k = () => {
|
|
58
|
-
|
|
58
|
+
t("before-enter");
|
|
59
59
|
}, C = () => {
|
|
60
|
-
|
|
60
|
+
t("before-leave");
|
|
61
61
|
}, A = () => {
|
|
62
|
-
|
|
62
|
+
t("after-enter");
|
|
63
63
|
}, E = () => {
|
|
64
|
-
|
|
64
|
+
t("update:visible", !1), t("after-leave");
|
|
65
65
|
};
|
|
66
|
-
return
|
|
66
|
+
return m({
|
|
67
67
|
popperRef: g,
|
|
68
68
|
hide: B
|
|
69
|
-
}), (
|
|
69
|
+
}), (a, H) => (f(), x(l($), R({
|
|
70
70
|
ref_key: "tooltipRef",
|
|
71
71
|
ref: n
|
|
72
|
-
},
|
|
72
|
+
}, a.$attrs, {
|
|
73
73
|
trigger: e.trigger,
|
|
74
74
|
"trigger-keys": e.triggerKeys,
|
|
75
75
|
placement: e.placement,
|
|
@@ -100,22 +100,22 @@ const D = "onUpdate:visible", H = m({
|
|
|
100
100
|
onHide: E
|
|
101
101
|
}), {
|
|
102
102
|
content: s(() => [
|
|
103
|
-
e.title ? (
|
|
103
|
+
e.title ? (f(), T("div", {
|
|
104
104
|
key: 0,
|
|
105
|
-
class:
|
|
105
|
+
class: U(l(r).e("title")),
|
|
106
106
|
role: "title"
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
}, c(e.title), 3)) : p("", !0),
|
|
108
|
+
d(a.$slots, "default", {}, () => [
|
|
109
|
+
V(c(e.content), 1)
|
|
110
110
|
])
|
|
111
111
|
]),
|
|
112
112
|
default: s(() => [
|
|
113
|
-
|
|
113
|
+
a.$slots.reference ? d(a.$slots, "reference", { key: 0 }) : p("", !0)
|
|
114
114
|
]),
|
|
115
115
|
_: 3
|
|
116
116
|
}, 16, ["trigger", "trigger-keys", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "append-to", "persistent", "gpu-acceleration", "onUpdate:visible"]));
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
export {
|
|
120
|
-
|
|
120
|
+
X as default
|
|
121
121
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, getCurrentInstance as C, inject as y, computed as s, onMounted as
|
|
1
|
+
import { defineComponent as g, getCurrentInstance as C, inject as y, computed as s, onMounted as x, watch as l, onBeforeUnmount as E, createBlock as B, createCommentVNode as w, openBlock as A, unref as M, mergeProps as P, withCtx as R, renderSlot as T } from "vue";
|
|
2
2
|
import { isElement as v } from "@vft/utils";
|
|
3
3
|
import { OnlyChild as k } from "../slot/only-child.js";
|
|
4
4
|
import { unrefElement as L } from "@vueuse/core";
|
|
@@ -31,15 +31,15 @@ const O = g({
|
|
|
31
31
|
setup(r, { expose: b }) {
|
|
32
32
|
const h = C(), { role: i, triggerRef: n } = y(K, void 0);
|
|
33
33
|
I(n);
|
|
34
|
-
const p = s(() => u.value ? r.id : void 0),
|
|
34
|
+
const p = s(() => u.value ? r.id : void 0), c = s(() => {
|
|
35
35
|
if (i && i.value === "tooltip")
|
|
36
36
|
return r.open && r.id ? r.id : void 0;
|
|
37
37
|
}), u = s(() => {
|
|
38
38
|
if (i && i.value !== "tooltip")
|
|
39
39
|
return i.value;
|
|
40
|
-
}),
|
|
40
|
+
}), m = s(() => u.value ? `${r.open}` : void 0);
|
|
41
41
|
let a;
|
|
42
|
-
return
|
|
42
|
+
return x(() => {
|
|
43
43
|
l(
|
|
44
44
|
() => r.virtualRef,
|
|
45
45
|
(e) => {
|
|
@@ -69,7 +69,7 @@ const O = g({
|
|
|
69
69
|
t
|
|
70
70
|
));
|
|
71
71
|
}), a = l(
|
|
72
|
-
[p,
|
|
72
|
+
[p, c, u, m],
|
|
73
73
|
(o) => {
|
|
74
74
|
[
|
|
75
75
|
"aria-controls",
|
|
@@ -92,17 +92,17 @@ const O = g({
|
|
|
92
92
|
immediate: !0
|
|
93
93
|
}
|
|
94
94
|
);
|
|
95
|
-
}),
|
|
95
|
+
}), E(() => {
|
|
96
96
|
a?.(), a = void 0;
|
|
97
97
|
}), b({
|
|
98
98
|
/**
|
|
99
99
|
* @description trigger element
|
|
100
100
|
*/
|
|
101
101
|
triggerRef: n
|
|
102
|
-
}), (e, d) =>
|
|
102
|
+
}), (e, d) => r.virtualTriggering ? w("", !0) : (A(), B(M(k), P({ key: 0 }, e.$attrs, {
|
|
103
103
|
"aria-controls": p.value,
|
|
104
|
-
"aria-describedby":
|
|
105
|
-
"aria-expanded":
|
|
104
|
+
"aria-describedby": c.value,
|
|
105
|
+
"aria-expanded": m.value,
|
|
106
106
|
"aria-haspopup": u.value
|
|
107
107
|
}), {
|
|
108
108
|
default: R(() => [
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as T, computed as
|
|
2
|
-
import { isFunction as
|
|
3
|
-
import { VftIcon as
|
|
1
|
+
import { defineComponent as T, computed as r, createElementBlock as i, openBlock as o, normalizeClass as l, unref as a, createCommentVNode as y, createElementVNode as f, normalizeStyle as c, renderSlot as C, toDisplayString as D, createBlock as A, normalizeProps as L, mergeProps as M } from "vue";
|
|
2
|
+
import { isFunction as E, isString as I } from "@vft/utils";
|
|
3
|
+
import { VftIcon as O } from "../icon/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../form/index.js";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as R } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
|
-
const
|
|
12
|
+
const U = ["aria-valuenow"], j = { viewBox: "0 0 100 100" }, q = ["d", "stroke", "stroke-width"], G = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"], H = { key: 0 }, J = T({
|
|
13
13
|
name: "vft-progress"
|
|
14
|
-
}),
|
|
15
|
-
...
|
|
14
|
+
}), re = /* @__PURE__ */ T({
|
|
15
|
+
...J,
|
|
16
16
|
props: {
|
|
17
17
|
type: { default: "line" },
|
|
18
18
|
percentage: { default: 0 },
|
|
@@ -27,69 +27,69 @@ const R = ["aria-valuenow"], U = { viewBox: "0 0 100 100" }, j = ["d", "stroke",
|
|
|
27
27
|
color: { type: [String, Array, Function], default: "" },
|
|
28
28
|
striped: { type: Boolean, default: !1 },
|
|
29
29
|
stripedFlow: { type: Boolean, default: !1 },
|
|
30
|
-
format: { type: Function, default: (
|
|
30
|
+
format: { type: Function, default: (e) => `${e}%` }
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
32
|
+
setup(e) {
|
|
33
|
+
const n = R("progress"), g = {
|
|
34
34
|
success: "#13ce66",
|
|
35
35
|
exception: "#ff4949",
|
|
36
36
|
warning: "#e6a23c",
|
|
37
37
|
default: "#20a0ff"
|
|
38
|
-
}, F =
|
|
39
|
-
width: `${
|
|
40
|
-
animationDuration: `${
|
|
41
|
-
backgroundColor: B(
|
|
42
|
-
})), h =
|
|
43
|
-
() => (
|
|
44
|
-
),
|
|
38
|
+
}, F = r(() => ({
|
|
39
|
+
width: `${e.percentage}%`,
|
|
40
|
+
animationDuration: `${e.duration}s`,
|
|
41
|
+
backgroundColor: B(e.percentage)
|
|
42
|
+
})), h = r(
|
|
43
|
+
() => (e.strokeWidth / e.width * 100).toFixed(1)
|
|
44
|
+
), $ = r(() => ["circle", "dashboard"].includes(e.type) ? Number.parseInt(
|
|
45
45
|
`${50 - Number.parseFloat(h.value) / 2}`,
|
|
46
46
|
10
|
|
47
|
-
) : 0),
|
|
48
|
-
const
|
|
47
|
+
) : 0), b = r(() => {
|
|
48
|
+
const t = $.value, s = e.type === "dashboard";
|
|
49
49
|
return `
|
|
50
50
|
M 50 50
|
|
51
|
-
m 0 ${
|
|
52
|
-
a ${
|
|
53
|
-
a ${
|
|
51
|
+
m 0 ${s ? "" : "-"}${t}
|
|
52
|
+
a ${t} ${t} 0 1 1 0 ${s ? "-" : ""}${t * 2}
|
|
53
|
+
a ${t} ${t} 0 1 1 0 ${s ? "" : "-"}${t * 2}
|
|
54
54
|
`;
|
|
55
|
-
}),
|
|
56
|
-
strokeDasharray: `${
|
|
57
|
-
strokeDashoffset:
|
|
58
|
-
})), N =
|
|
59
|
-
strokeDasharray: `${
|
|
60
|
-
strokeDashoffset:
|
|
55
|
+
}), u = r(() => 2 * Math.PI * $.value), m = r(() => e.type === "dashboard" ? 0.75 : 1), w = r(() => `${-1 * u.value * (1 - m.value) / 2}px`), P = r(() => ({
|
|
56
|
+
strokeDasharray: `${u.value * m.value}px, ${u.value}px`,
|
|
57
|
+
strokeDashoffset: w.value
|
|
58
|
+
})), N = r(() => ({
|
|
59
|
+
strokeDasharray: `${u.value * m.value * (e.percentage / 100)}px, ${u.value}px`,
|
|
60
|
+
strokeDashoffset: w.value,
|
|
61
61
|
transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
|
|
62
|
-
})), z =
|
|
63
|
-
let
|
|
64
|
-
return
|
|
65
|
-
}),
|
|
66
|
-
function V(
|
|
67
|
-
const
|
|
68
|
-
return
|
|
62
|
+
})), z = r(() => {
|
|
63
|
+
let t;
|
|
64
|
+
return e.color ? t = B(e.percentage) : t = g[e.status] || g.default, t;
|
|
65
|
+
}), x = r(() => e.status === "warning" ? "icon-warning-filled" : e.type === "line" ? e.status === "success" ? "icon-circle-check" : "icon-circle-close" : e.status === "success" ? "icon-check" : "icon-close"), W = r(() => e.type === "line" ? 12 + e.strokeWidth * 0.4 : e.width * 0.111111 + 2), S = r(() => e.format(e.percentage));
|
|
66
|
+
function V(t) {
|
|
67
|
+
const s = 100 / t.length;
|
|
68
|
+
return t.map((d, k) => I(d) ? {
|
|
69
69
|
color: d,
|
|
70
|
-
percentage: (k + 1) *
|
|
70
|
+
percentage: (k + 1) * s
|
|
71
71
|
} : d).sort((d, k) => d.percentage - k.percentage);
|
|
72
72
|
}
|
|
73
|
-
const B = (
|
|
74
|
-
if (
|
|
75
|
-
return
|
|
76
|
-
if (I(
|
|
77
|
-
return
|
|
73
|
+
const B = (t) => {
|
|
74
|
+
if (E(e.color))
|
|
75
|
+
return e.color(t);
|
|
76
|
+
if (I(e.color))
|
|
77
|
+
return e.color;
|
|
78
78
|
{
|
|
79
|
-
const
|
|
80
|
-
for (const v of
|
|
81
|
-
if (v.percentage >
|
|
82
|
-
return
|
|
79
|
+
const s = V(e.color);
|
|
80
|
+
for (const v of s)
|
|
81
|
+
if (v.percentage > t) return v.color;
|
|
82
|
+
return s[s.length - 1]?.color;
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
return (
|
|
86
|
-
class:
|
|
87
|
-
a(
|
|
88
|
-
a(
|
|
89
|
-
a(
|
|
85
|
+
return (t, s) => (o(), i("div", {
|
|
86
|
+
class: l([
|
|
87
|
+
a(n).b(),
|
|
88
|
+
a(n).m(e.type),
|
|
89
|
+
a(n).is(e.status),
|
|
90
90
|
{
|
|
91
|
-
[a(
|
|
92
|
-
[a(
|
|
91
|
+
[a(n).m("without-text")]: !e.showText,
|
|
92
|
+
[a(n).m("text-inside")]: e.textInside
|
|
93
93
|
}
|
|
94
94
|
]),
|
|
95
95
|
role: "progressbar",
|
|
@@ -97,71 +97,71 @@ const R = ["aria-valuenow"], U = { viewBox: "0 0 100 100" }, j = ["d", "stroke",
|
|
|
97
97
|
"aria-valuemin": "0",
|
|
98
98
|
"aria-valuemax": "100"
|
|
99
99
|
}, [
|
|
100
|
-
e.type === "line" ? (
|
|
100
|
+
e.type === "line" ? (o(), i("div", {
|
|
101
101
|
key: 0,
|
|
102
|
-
class:
|
|
102
|
+
class: l(a(n).b("bar"))
|
|
103
103
|
}, [
|
|
104
104
|
f("div", {
|
|
105
|
-
class:
|
|
106
|
-
style:
|
|
105
|
+
class: l(a(n).be("bar", "outer")),
|
|
106
|
+
style: c({ height: `${e.strokeWidth}px` })
|
|
107
107
|
}, [
|
|
108
108
|
f("div", {
|
|
109
|
-
class:
|
|
110
|
-
a(
|
|
111
|
-
{ [a(
|
|
112
|
-
{ [a(
|
|
113
|
-
{ [a(
|
|
109
|
+
class: l([
|
|
110
|
+
a(n).be("bar", "inner"),
|
|
111
|
+
{ [a(n).bem("bar", "inner", "indeterminate")]: e.indeterminate },
|
|
112
|
+
{ [a(n).bem("bar", "inner", "striped")]: e.striped },
|
|
113
|
+
{ [a(n).bem("bar", "inner", "striped-flow")]: e.stripedFlow }
|
|
114
114
|
]),
|
|
115
|
-
style:
|
|
115
|
+
style: c(F.value)
|
|
116
116
|
}, [
|
|
117
|
-
(e.showText ||
|
|
117
|
+
(e.showText || t.$slots.default) && e.textInside ? (o(), i("div", {
|
|
118
118
|
key: 0,
|
|
119
|
-
class:
|
|
119
|
+
class: l(a(n).be("bar", "innerText"))
|
|
120
120
|
}, [
|
|
121
|
-
C(
|
|
121
|
+
C(t.$slots, "default", { percentage: e.percentage }, () => [
|
|
122
122
|
f("span", null, D(S.value), 1)
|
|
123
123
|
])
|
|
124
|
-
], 2)) :
|
|
124
|
+
], 2)) : y("", !0)
|
|
125
125
|
], 6)
|
|
126
126
|
], 6)
|
|
127
|
-
], 2)) : (
|
|
127
|
+
], 2)) : (o(), i("div", {
|
|
128
128
|
key: 1,
|
|
129
|
-
class:
|
|
130
|
-
style:
|
|
129
|
+
class: l(a(n).b("circle")),
|
|
130
|
+
style: c({ height: `${e.width}px`, width: `${e.width}px` })
|
|
131
131
|
}, [
|
|
132
|
-
(
|
|
132
|
+
(o(), i("svg", j, [
|
|
133
133
|
f("path", {
|
|
134
|
-
class:
|
|
135
|
-
d:
|
|
136
|
-
stroke: `var(${a(
|
|
134
|
+
class: l(a(n).be("circle", "track")),
|
|
135
|
+
d: b.value,
|
|
136
|
+
stroke: `var(${a(n).cssVarName("fill-color-light")}, #e5e9f2)`,
|
|
137
137
|
"stroke-width": h.value,
|
|
138
138
|
fill: "none",
|
|
139
|
-
style:
|
|
140
|
-
}, null, 14,
|
|
139
|
+
style: c(P.value)
|
|
140
|
+
}, null, 14, q),
|
|
141
141
|
f("path", {
|
|
142
|
-
class:
|
|
143
|
-
d:
|
|
142
|
+
class: l(a(n).be("circle", "path")),
|
|
143
|
+
d: b.value,
|
|
144
144
|
stroke: z.value,
|
|
145
145
|
fill: "none",
|
|
146
146
|
opacity: e.percentage ? 1 : 0,
|
|
147
147
|
"stroke-linecap": e.strokeLinecap,
|
|
148
148
|
"stroke-width": h.value,
|
|
149
|
-
style:
|
|
150
|
-
}, null, 14,
|
|
149
|
+
style: c(N.value)
|
|
150
|
+
}, null, 14, G)
|
|
151
151
|
]))
|
|
152
152
|
], 6)),
|
|
153
|
-
(e.showText ||
|
|
153
|
+
(e.showText || t.$slots.default) && !e.textInside ? (o(), i("div", {
|
|
154
154
|
key: 2,
|
|
155
|
-
class:
|
|
156
|
-
style:
|
|
155
|
+
class: l(a(n).e("text")),
|
|
156
|
+
style: c({ fontSize: `${W.value}px` })
|
|
157
157
|
}, [
|
|
158
|
-
C(
|
|
159
|
-
e.status ?
|
|
158
|
+
C(t.$slots, "default", { percentage: e.percentage }, () => [
|
|
159
|
+
e.status ? x.value?.icon ? (o(), A(a(O), L(M({ key: 1 }, x.value)), null, 16)) : y("", !0) : (o(), i("span", H, D(S.value), 1))
|
|
160
160
|
])
|
|
161
|
-
], 6)) :
|
|
162
|
-
], 10,
|
|
161
|
+
], 6)) : y("", !0)
|
|
162
|
+
], 10, U));
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
export {
|
|
166
|
-
|
|
166
|
+
re as default
|
|
167
167
|
};
|