vft 0.0.97 → 0.0.98
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/es/components/affix/affix.vue2.js +25 -26
- package/es/components/alert/alert.vue2.js +17 -18
- package/es/components/backtop/backtop.vue2.js +14 -15
- package/es/components/button/button-group.vue2.js +14 -15
- package/es/components/button/button.vue2.js +24 -25
- package/es/components/card/card.vue2.js +10 -11
- package/es/components/check-tag/check-tag.vue2.js +10 -11
- package/es/components/checkbox/checkbox-button.vue2.js +13 -14
- package/es/components/checkbox/checkbox-group.vue2.js +15 -16
- package/es/components/checkbox/checkbox.vue2.js +24 -25
- package/es/components/clamp/clamp.vue2.js +16 -17
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +13 -14
- package/es/components/col/col.vue2.js +20 -21
- package/es/components/collapse-transition/src/collapse-transition.vue2.js +12 -13
- package/es/components/collection/collection-item.vue2.js +6 -7
- package/es/components/collection/collection.vue2.js +5 -7
- package/es/components/color-picker/color-picker.vue2.js +45 -46
- package/es/components/color-picker/components/alpha-slider.vue2.js +20 -21
- package/es/components/config-provider/config-provider.vue2.js +22 -23
- package/es/components/container/aside.vue2.js +12 -13
- package/es/components/container/container.vue2.js +10 -11
- package/es/components/container/footer.vue2.js +11 -12
- package/es/components/container/header.vue2.js +10 -11
- package/es/components/container/main.vue2.js +12 -13
- package/es/components/context-menu/context-menu.vue2.js +18 -19
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +87 -87
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +1 -1
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +1 -1
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +2 -2
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +39 -40
- package/es/components/date-time-select/date-time-select.vue2.js +20 -21
- package/es/components/descriptions/description-item.vue2.js +9 -10
- package/es/components/descriptions/description.vue2.js +20 -21
- package/es/components/descriptions/descriptions-row.vue2.js +15 -16
- package/es/components/dialog/dialog-content.vue2.js +12 -13
- package/es/components/dialog/dialog.vue2.js +40 -41
- package/es/components/divider/divider.vue2.js +10 -11
- package/es/components/dropdown/dropdown.vue2.js +38 -39
- package/es/components/empty/empty.vue2.js +11 -12
- package/es/components/footer-layout/footer-layout.vue2.js +7 -8
- package/es/components/form/form-item.vue2.js +43 -44
- package/es/components/form/form.vue2.js +28 -29
- package/es/components/full-screen/full-screen.vue2.js +15 -16
- package/es/components/header-layout/header-layout.vue2.js +21 -22
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +50 -51
- package/es/components/icon/icon.vue2.js +12 -13
- package/es/components/icon-text/icon-text.vue2.js +13 -14
- package/es/components/iframe-layout/iframe-layout.vue2.js +15 -16
- package/es/components/iframe-layout/iframe-page.vue2.js +12 -13
- package/es/components/image/image.vue2.js +25 -26
- package/es/components/image-viewer/image-viewer.vue2.js +54 -55
- package/es/components/index.js +90 -90
- package/es/components/link/link.vue2.js +11 -12
- package/es/components/list-cell/list-cell.vue2.js +21 -22
- package/es/components/logo/logo.vue2.js +12 -13
- package/es/components/md-comment/md-comment.vue2.js +12 -13
- package/es/components/md-container/md-container.vue2.js +33 -34
- package/es/components/md-vue-playground/md-vue-playground.vue2.js +18 -19
- package/es/components/menu/menu-item-group.vue2.js +13 -14
- package/es/components/menu/menu-item.vue2.js +12 -13
- package/es/components/menu/menu.vue2.js +44 -45
- package/es/components/menu/sub-menu.vue2.js +30 -31
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +35 -38
- package/es/components/overlay/overlay.vue2.js +23 -24
- package/es/components/page-wrapper/page-wrapper.vue2.js +17 -18
- package/es/components/pagination/pagination.vue2.js +17 -18
- package/es/components/popconfirm/popconfirm.vue2.js +17 -18
- package/es/components/popover/popover.vue2.js +31 -32
- package/es/components/popper/arrow.vue2.js +15 -16
- package/es/components/popper/content.vue2.js +38 -39
- package/es/components/popper/popper.vue2.js +13 -14
- package/es/components/popper/trigger.vue2.js +11 -12
- package/es/components/qrcode/qrcode.vue2.js +21 -22
- package/es/components/radio/radio-button.vue2.js +16 -17
- package/es/components/radio/radio-group.vue2.js +16 -17
- package/es/components/radio/radio.vue2.js +15 -16
- package/es/components/result/result.vue2.js +12 -13
- package/es/components/router-view-content/router-view-content.vue2.js +10 -11
- package/es/components/row/row.vue2.js +17 -18
- package/es/components/scrollbar/scrollbar.vue2.js +30 -31
- package/es/components/search/search.vue2.js +39 -40
- package/es/components/side-menu/side-menu.vue2.js +43 -45
- package/es/components/skeleton/skeleton-item.vue2.js +9 -10
- package/es/components/skeleton/skeleton.vue2.js +11 -12
- package/es/components/switch/switch.vue2.js +27 -28
- package/es/components/table/table.vue2.js +36 -37
- package/es/components/tabs/tab-nav.vue2.js +28 -29
- package/es/components/tabs/tab-pane.vue2.js +23 -24
- package/es/components/tabs/tabs.vue2.js +30 -31
- package/es/components/time-picker/common/picker.vue2.js +48 -49
- package/es/components/time-select/time-select.vue2.js +28 -29
- package/es/components/tooltip/content.vue2.js +36 -37
- package/es/components/tooltip/tooltip.vue2.js +15 -16
- package/es/components/tooltip/trigger.vue2.js +37 -38
- package/es/components/verify-code/verify-code.vue2.js +19 -20
- package/es/constants/date.js +7 -7
- package/es/index.js +90 -90
- package/es/package.json.js +1 -1
- package/lib/components/affix/affix.vue2.cjs +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/button/button-group.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/check-tag/check-tag.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/col/col.vue2.cjs +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue2.cjs +1 -1
- package/lib/components/collection/collection-item.vue2.cjs +1 -1
- package/lib/components/collection/collection.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/container/aside.vue2.cjs +1 -1
- package/lib/components/container/container.vue2.cjs +1 -1
- package/lib/components/container/footer.vue2.cjs +1 -1
- package/lib/components/container/header.vue2.cjs +1 -1
- package/lib/components/container/main.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.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-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/descriptions/description-item.vue2.cjs +1 -1
- 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/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/form/form.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.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/index.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/md-comment/md-comment.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-vue-playground/md-vue-playground.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/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/overlay/overlay.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/pagination.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/arrow.vue2.cjs +1 -1
- package/lib/components/popper/content.vue2.cjs +1 -1
- package/lib/components/popper/popper.vue2.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- 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/radio/radio.vue2.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
- package/lib/components/time-select/time-select.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/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/constants/date.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +8 -8
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as a, openBlock as n, createElementBlock as i, normalizeClass as r, unref as e, createElementVNode as o, toDisplayString as l, renderSlot as m } from "vue";
|
|
2
2
|
import { useNamespace as c } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
@@ -10,33 +10,32 @@ import { useRouterHelper as d } from "@vft/router";
|
|
|
10
10
|
const t = (
|
|
11
11
|
/* hoist-static*/
|
|
12
12
|
c("page-wrapper")
|
|
13
|
-
),
|
|
14
|
-
name: t.b()
|
|
15
|
-
|
|
16
|
-
...u,
|
|
13
|
+
), E = /* @__PURE__ */ a({
|
|
14
|
+
name: t.b(),
|
|
15
|
+
__name: "page-wrapper",
|
|
17
16
|
props: {
|
|
18
17
|
title: {}
|
|
19
18
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const { getTitle:
|
|
22
|
-
return (
|
|
23
|
-
class:
|
|
19
|
+
setup(u) {
|
|
20
|
+
const { getTitle: s } = d();
|
|
21
|
+
return (p, f) => (n(), i("div", {
|
|
22
|
+
class: r(e(t).b())
|
|
24
23
|
}, [
|
|
25
|
-
|
|
26
|
-
class:
|
|
24
|
+
o("div", {
|
|
25
|
+
class: r(e(t).e("header"))
|
|
27
26
|
}, [
|
|
28
|
-
|
|
29
|
-
class:
|
|
30
|
-
}, l(
|
|
27
|
+
o("span", {
|
|
28
|
+
class: r(e(t).e("title"))
|
|
29
|
+
}, l(p.title || e(s)), 3)
|
|
31
30
|
], 2),
|
|
32
|
-
|
|
33
|
-
class:
|
|
31
|
+
o("div", {
|
|
32
|
+
class: r(e(t).e("content"))
|
|
34
33
|
}, [
|
|
35
|
-
m(
|
|
34
|
+
m(p.$slots, "default")
|
|
36
35
|
], 2)
|
|
37
36
|
], 2));
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
export {
|
|
41
|
-
|
|
40
|
+
E as default
|
|
42
41
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as U, useSlots as w, getCurrentInstance as E, computed as s, ref as x, watch as M, provide as j, h as r } from "vue";
|
|
2
2
|
import { useNamespace as L } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
@@ -16,10 +16,9 @@ import { vftPaginationKey as V } from "./usePagination.js";
|
|
|
16
16
|
const l = (
|
|
17
17
|
/* hoist-static*/
|
|
18
18
|
L("pagination")
|
|
19
|
-
),
|
|
20
|
-
name: l.b()
|
|
21
|
-
|
|
22
|
-
...q,
|
|
19
|
+
), ie = /* @__PURE__ */ U({
|
|
20
|
+
name: l.b(),
|
|
21
|
+
__name: "pagination",
|
|
23
22
|
props: {
|
|
24
23
|
total: {},
|
|
25
24
|
pageSize: {},
|
|
@@ -67,7 +66,7 @@ const l = (
|
|
|
67
66
|
setup(e, {
|
|
68
67
|
emit: g
|
|
69
68
|
}) {
|
|
70
|
-
const c = w(), o = E().vnode.props || {}, h = "onUpdate:currentPage" in o || "onUpdate:current-page" in o || "onCurrentChange" in o, m = "onUpdate:pageSize" in o || "onUpdate:page-size" in o || "onSizeChange" in o,
|
|
69
|
+
const c = w(), o = E().vnode.props || {}, h = "onUpdate:currentPage" in o || "onUpdate:current-page" in o || "onCurrentChange" in o, m = "onUpdate:pageSize" in o || "onUpdate:page-size" in o || "onSizeChange" in o, k = s(() => {
|
|
71
70
|
if (!t(e.total) && !t(e.pageCount) || t(e.currentPage) && !h)
|
|
72
71
|
return !1;
|
|
73
72
|
if (e.layout.includes("sizes")) {
|
|
@@ -103,15 +102,15 @@ const l = (
|
|
|
103
102
|
function z(a) {
|
|
104
103
|
i.value = a;
|
|
105
104
|
}
|
|
106
|
-
function
|
|
105
|
+
function y(a) {
|
|
107
106
|
v.value = a;
|
|
108
107
|
const n = u.value;
|
|
109
108
|
i.value > n && (i.value = n);
|
|
110
109
|
}
|
|
111
|
-
function
|
|
110
|
+
function T() {
|
|
112
111
|
e.disabled || (i.value -= 1, g("prev-click", i.value));
|
|
113
112
|
}
|
|
114
|
-
function
|
|
113
|
+
function B() {
|
|
115
114
|
e.disabled || (i.value += 1, g("next-click", i.value));
|
|
116
115
|
}
|
|
117
116
|
function d(a, n) {
|
|
@@ -122,12 +121,12 @@ const l = (
|
|
|
122
121
|
disabled: s(() => e.disabled),
|
|
123
122
|
currentPage: i,
|
|
124
123
|
changeEvent: z,
|
|
125
|
-
handleSizeChange:
|
|
124
|
+
handleSizeChange: y
|
|
126
125
|
}), () => {
|
|
127
126
|
var b;
|
|
128
|
-
if (!
|
|
127
|
+
if (!k.value || !e.layout || e.hideOnSinglePage && u.value <= 1)
|
|
129
128
|
return null;
|
|
130
|
-
const a = [], n = [],
|
|
129
|
+
const a = [], n = [], I = r("div", {
|
|
131
130
|
class: l.e("rightwrapper")
|
|
132
131
|
}, n), S = {
|
|
133
132
|
prev: r(O, {
|
|
@@ -135,7 +134,7 @@ const l = (
|
|
|
135
134
|
currentPage: i.value,
|
|
136
135
|
prevText: e.prevText,
|
|
137
136
|
prevIcon: e.prevIcon,
|
|
138
|
-
onClick:
|
|
137
|
+
onClick: T
|
|
139
138
|
}),
|
|
140
139
|
jumper: r(W, {
|
|
141
140
|
size: e.small ? "small" : "default"
|
|
@@ -153,7 +152,7 @@ const l = (
|
|
|
153
152
|
pageCount: u.value,
|
|
154
153
|
nextText: e.nextText,
|
|
155
154
|
nextIcon: e.nextIcon,
|
|
156
|
-
onClick:
|
|
155
|
+
onClick: B
|
|
157
156
|
}),
|
|
158
157
|
sizes: r(R, {
|
|
159
158
|
pageSize: v.value,
|
|
@@ -166,15 +165,15 @@ const l = (
|
|
|
166
165
|
total: r(K, {
|
|
167
166
|
total: t(e.total) ? e.total : 0
|
|
168
167
|
})
|
|
169
|
-
},
|
|
168
|
+
}, $ = e.layout.split(",").map((f) => f.trim());
|
|
170
169
|
let C = !1;
|
|
171
|
-
return
|
|
170
|
+
return $.forEach((f) => {
|
|
172
171
|
if (f === "->") {
|
|
173
172
|
C = !0;
|
|
174
173
|
return;
|
|
175
174
|
}
|
|
176
175
|
C ? n.push(S[f]) : a.push(S[f]);
|
|
177
|
-
}), d(a[0], l.is("first")), d(a[a.length - 1], l.is("last")), C && n.length > 0 && (d(n[0], l.is("first")), d(n[n.length - 1], l.is("last")), a.push(
|
|
176
|
+
}), d(a[0], l.is("first")), d(a[a.length - 1], l.is("last")), C && n.length > 0 && (d(n[0], l.is("first")), d(n[n.length - 1], l.is("last")), a.push(I)), r("div", {
|
|
178
177
|
role: "pagination",
|
|
179
178
|
"aria-label": "pagination",
|
|
180
179
|
class: [l.b(), l.is("background", e.background), {
|
|
@@ -185,5 +184,5 @@ const l = (
|
|
|
185
184
|
}
|
|
186
185
|
});
|
|
187
186
|
export {
|
|
188
|
-
|
|
187
|
+
ie as default
|
|
189
188
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as N, ref as w, computed as p, openBlock as d, createBlock as y, unref as t, mergeProps as $, withCtx as n, createElementVNode as a, normalizeClass as r, normalizeStyle as b, createCommentVNode as B, createTextVNode as c, toDisplayString as s, createVNode as T, renderSlot as I } from "vue";
|
|
2
2
|
import { VftButton as h } from "../button/index.js";
|
|
3
3
|
import { VftIcon as P } from "../icon/index.js";
|
|
4
4
|
import { VftTooltip as S } from "../tooltip/index.js";
|
|
@@ -9,10 +9,9 @@ import "../../hooks/use-z-index/index.js";
|
|
|
9
9
|
import "@vueuse/core";
|
|
10
10
|
import { addUnit as E } from "@vft/utils";
|
|
11
11
|
import "../../utils/ns-cover.js";
|
|
12
|
-
const
|
|
13
|
-
name: "ElPopconfirm"
|
|
14
|
-
|
|
15
|
-
...R,
|
|
12
|
+
const L = /* @__PURE__ */ N({
|
|
13
|
+
name: "ElPopconfirm",
|
|
14
|
+
__name: "popconfirm",
|
|
16
15
|
props: {
|
|
17
16
|
title: {},
|
|
18
17
|
confirmButtonText: {},
|
|
@@ -28,19 +27,19 @@ const R = C({
|
|
|
28
27
|
width: { default: 150 }
|
|
29
28
|
},
|
|
30
29
|
emits: ["confirm", "cancel"],
|
|
31
|
-
setup(
|
|
32
|
-
const l =
|
|
30
|
+
setup(C, { emit: f }) {
|
|
31
|
+
const l = C, o = A("popconfirm"), m = w(), u = () => {
|
|
33
32
|
var e, i;
|
|
34
33
|
(i = (e = m.value) == null ? void 0 : e.onClose) == null || i.call(e);
|
|
35
|
-
},
|
|
34
|
+
}, k = p(() => ({
|
|
36
35
|
width: E(l.width)
|
|
37
|
-
})),
|
|
36
|
+
})), v = (e) => {
|
|
38
37
|
f("confirm", e), u();
|
|
39
|
-
},
|
|
38
|
+
}, V = (e) => {
|
|
40
39
|
f("cancel", e), u();
|
|
41
|
-
},
|
|
40
|
+
}, g = p(
|
|
42
41
|
() => l.confirmButtonText || "确认"
|
|
43
|
-
),
|
|
42
|
+
), z = p(
|
|
44
43
|
() => l.cancelButtonText || "取消"
|
|
45
44
|
);
|
|
46
45
|
return (e, i) => (d(), y(t(S), $({
|
|
@@ -50,7 +49,7 @@ const R = C({
|
|
|
50
49
|
effect: "light"
|
|
51
50
|
}, e.$attrs, {
|
|
52
51
|
"popper-class": `${t(o).namespace.value}-popover`,
|
|
53
|
-
"popper-style":
|
|
52
|
+
"popper-style": k.value,
|
|
54
53
|
teleported: e.teleported,
|
|
55
54
|
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
56
55
|
"hide-after": e.hideAfter,
|
|
@@ -79,10 +78,10 @@ const R = C({
|
|
|
79
78
|
size: "small",
|
|
80
79
|
type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
|
|
81
80
|
text: e.cancelButtonType === "text",
|
|
82
|
-
onClick:
|
|
81
|
+
onClick: V
|
|
83
82
|
}, {
|
|
84
83
|
default: n(() => [
|
|
85
|
-
c(s(
|
|
84
|
+
c(s(z.value), 1)
|
|
86
85
|
]),
|
|
87
86
|
_: 1
|
|
88
87
|
}, 8, ["type", "text"]),
|
|
@@ -90,10 +89,10 @@ const R = C({
|
|
|
90
89
|
size: "small",
|
|
91
90
|
type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
|
|
92
91
|
text: e.confirmButtonType === "text",
|
|
93
|
-
onClick:
|
|
92
|
+
onClick: v
|
|
94
93
|
}, {
|
|
95
94
|
default: n(() => [
|
|
96
|
-
c(s(
|
|
95
|
+
c(s(g.value), 1)
|
|
97
96
|
]),
|
|
98
97
|
_: 1
|
|
99
98
|
}, 8, ["type", "text"])
|
|
@@ -108,5 +107,5 @@ const R = C({
|
|
|
108
107
|
}
|
|
109
108
|
});
|
|
110
109
|
export {
|
|
111
|
-
|
|
110
|
+
L as default
|
|
112
111
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, ref as k, computed as a, unref as l, openBlock as p, createBlock as A, mergeProps as S, withCtx as i, createElementBlock as $, normalizeClass as R, toDisplayString as s, createCommentVNode as f, renderSlot as d, createTextVNode as E } from "vue";
|
|
2
2
|
import { addUnit as N } from "@vft/utils";
|
|
3
3
|
import { useNamespace as V } from "../../hooks/use-namespace/index.js";
|
|
4
4
|
import "@popperjs/core";
|
|
@@ -10,10 +10,9 @@ import { VftTooltip as H } from "../tooltip/index.js";
|
|
|
10
10
|
const r = (
|
|
11
11
|
/* hoist-static*/
|
|
12
12
|
V("popover")
|
|
13
|
-
),
|
|
14
|
-
name: r.b()
|
|
15
|
-
|
|
16
|
-
...L,
|
|
13
|
+
), G = /* @__PURE__ */ C({
|
|
14
|
+
name: r.b(),
|
|
15
|
+
__name: "popover",
|
|
17
16
|
props: {
|
|
18
17
|
trigger: { default: "hover" },
|
|
19
18
|
placement: { default: "bottom" },
|
|
@@ -38,35 +37,35 @@ const r = (
|
|
|
38
37
|
persistent: { type: Boolean, default: !0 }
|
|
39
38
|
},
|
|
40
39
|
emits: ["update:visible", "before-enter", "before-leave", "after-enter", "after-leave"],
|
|
41
|
-
setup(t, { expose:
|
|
42
|
-
const
|
|
40
|
+
setup(t, { expose: u, emit: o }) {
|
|
41
|
+
const n = k(), b = a(() => {
|
|
43
42
|
var e;
|
|
44
|
-
return (e = n
|
|
45
|
-
}),
|
|
43
|
+
return (e = l(n)) == null ? void 0 : e.popperRef;
|
|
44
|
+
}), c = a(() => [
|
|
46
45
|
{
|
|
47
46
|
width: N(t.width)
|
|
48
47
|
},
|
|
49
48
|
t.popperStyle
|
|
50
|
-
]),
|
|
49
|
+
]), m = a(() => [r.b(), t.popperClass, { [r.m("plain")]: !!t.content }]), h = a(() => t.transition === `${r.namespace.value}-fade-in-linear`), v = () => {
|
|
51
50
|
var e;
|
|
52
|
-
(e =
|
|
53
|
-
},
|
|
51
|
+
(e = n.value) == null || e.hide();
|
|
52
|
+
}, w = () => {
|
|
54
53
|
o("before-enter");
|
|
55
|
-
},
|
|
54
|
+
}, y = () => {
|
|
56
55
|
o("before-leave");
|
|
57
|
-
},
|
|
56
|
+
}, g = () => {
|
|
58
57
|
o("after-enter");
|
|
59
|
-
},
|
|
58
|
+
}, B = () => {
|
|
60
59
|
o("update:visible", !1), o("after-leave");
|
|
61
60
|
};
|
|
62
|
-
return
|
|
61
|
+
return u({
|
|
63
62
|
/** @description popper ref */
|
|
64
63
|
popperRef: b,
|
|
65
64
|
/** @description hide popover */
|
|
66
|
-
hide:
|
|
67
|
-
}), (e,
|
|
65
|
+
hide: v
|
|
66
|
+
}), (e, L) => (p(), A(l(H), S({
|
|
68
67
|
ref_key: "tooltipRef",
|
|
69
|
-
ref:
|
|
68
|
+
ref: n
|
|
70
69
|
}, e.$attrs, {
|
|
71
70
|
trigger: e.trigger,
|
|
72
71
|
placement: e.placement,
|
|
@@ -84,27 +83,27 @@ const r = (
|
|
|
84
83
|
"aria-label": e.title,
|
|
85
84
|
effect: e.effect,
|
|
86
85
|
enterable: e.enterable,
|
|
87
|
-
"popper-class":
|
|
88
|
-
"popper-style":
|
|
86
|
+
"popper-class": m.value,
|
|
87
|
+
"popper-style": c.value,
|
|
89
88
|
teleported: e.teleported,
|
|
90
89
|
persistent: e.persistent,
|
|
91
|
-
"gpu-acceleration":
|
|
92
|
-
onBeforeShow:
|
|
93
|
-
onBeforeHide:
|
|
94
|
-
onShow:
|
|
95
|
-
onHide:
|
|
90
|
+
"gpu-acceleration": h.value,
|
|
91
|
+
onBeforeShow: w,
|
|
92
|
+
onBeforeHide: y,
|
|
93
|
+
onShow: g,
|
|
94
|
+
onHide: B
|
|
96
95
|
}), {
|
|
97
|
-
content:
|
|
96
|
+
content: i(() => [
|
|
98
97
|
e.title ? (p(), $("div", {
|
|
99
98
|
key: 0,
|
|
100
|
-
class: R(
|
|
99
|
+
class: R(l(r).e("title")),
|
|
101
100
|
role: "title"
|
|
102
|
-
},
|
|
101
|
+
}, s(e.title), 3)) : f("", !0),
|
|
103
102
|
d(e.$slots, "default", {}, () => [
|
|
104
|
-
E(
|
|
103
|
+
E(s(e.content), 1)
|
|
105
104
|
])
|
|
106
105
|
]),
|
|
107
|
-
default:
|
|
106
|
+
default: i(() => [
|
|
108
107
|
e.$slots.reference ? d(e.$slots, "reference", { key: 0 }) : f("", !0)
|
|
109
108
|
]),
|
|
110
109
|
_: 3
|
|
@@ -112,5 +111,5 @@ const r = (
|
|
|
112
111
|
}
|
|
113
112
|
});
|
|
114
113
|
export {
|
|
115
|
-
|
|
114
|
+
G as default
|
|
116
115
|
};
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as s, inject as m, watch as i, onBeforeUnmount as l, openBlock as c, createElementBlock as w, normalizeClass as u, unref as o, normalizeStyle as _ } from "vue";
|
|
2
|
+
import { useNamespace as O } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
5
5
|
import "../../hooks/use-z-index/index.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../utils/ns-cover.js";
|
|
9
|
-
import { POPPER_CONTENT_INJECTION_KEY as
|
|
10
|
-
const
|
|
9
|
+
import { POPPER_CONTENT_INJECTION_KEY as d } from "./constants.js";
|
|
10
|
+
const R = /* @__PURE__ */ s({
|
|
11
11
|
name: "vft-popper-arrow",
|
|
12
|
-
inheritAttrs: !1
|
|
13
|
-
|
|
14
|
-
...v,
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "arrow",
|
|
15
14
|
props: {
|
|
16
15
|
arrowOffset: { default: 5 }
|
|
17
16
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
17
|
+
setup(t, { expose: a }) {
|
|
18
|
+
const p = O("popper"), { arrowOffset: n, arrowRef: r, arrowStyle: f } = m(
|
|
19
|
+
d,
|
|
21
20
|
void 0
|
|
22
21
|
);
|
|
23
22
|
return i(
|
|
24
|
-
() =>
|
|
23
|
+
() => t.arrowOffset,
|
|
25
24
|
(e) => {
|
|
26
25
|
n.value = e;
|
|
27
26
|
}
|
|
28
27
|
), l(() => {
|
|
29
28
|
r.value = void 0;
|
|
30
|
-
}),
|
|
29
|
+
}), a({
|
|
31
30
|
/**
|
|
32
31
|
* @description Arrow element
|
|
33
32
|
*/
|
|
34
33
|
arrowRef: r
|
|
35
|
-
}), (e,
|
|
34
|
+
}), (e, v) => (c(), w("span", {
|
|
36
35
|
ref_key: "arrowRef",
|
|
37
36
|
ref: r,
|
|
38
|
-
class: u(o(
|
|
37
|
+
class: u(o(p).e("arrow")),
|
|
39
38
|
"data-popper-arrow": "",
|
|
40
|
-
style:
|
|
39
|
+
style: _(o(f))
|
|
41
40
|
}, null, 6));
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
R as default
|
|
46
45
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, getCurrentInstance as z, ref as D, provide as J, onMounted as K, watch as i, unref as e, onBeforeUnmount as U, openBlock as Y, createElementBlock as Z, mergeProps as j, createVNode as G, withCtx as H, renderSlot as Q } from "vue";
|
|
2
2
|
import X from "../focus-trap/focus-trap.vue.js";
|
|
3
3
|
import "../focus-trap/utils.js";
|
|
4
4
|
import { isElement as R } from "@vft/utils";
|
|
@@ -7,10 +7,9 @@ import { usePopperContent as W } from "./composables/use-content.js";
|
|
|
7
7
|
import { usePopperContentDOM as _ } from "./composables/use-content-dom.js";
|
|
8
8
|
import { usePopperContentFocusTrap as ee } from "./composables/use-focus-trap.js";
|
|
9
9
|
import { POPPER_CONTENT_INJECTION_KEY as te } from "./constants.js";
|
|
10
|
-
const
|
|
11
|
-
name: "vft-popper-content"
|
|
12
|
-
|
|
13
|
-
...oe,
|
|
10
|
+
const ie = /* @__PURE__ */ V({
|
|
11
|
+
name: "vft-popper-content",
|
|
12
|
+
__name: "content",
|
|
14
13
|
props: {
|
|
15
14
|
boundariesPadding: { default: 0 },
|
|
16
15
|
fallbackPlacements: {},
|
|
@@ -38,36 +37,36 @@ const oe = y({
|
|
|
38
37
|
zIndex: {}
|
|
39
38
|
},
|
|
40
39
|
emits: ["mouseenter", "mouseleave", "focus", "blur", "close"],
|
|
41
|
-
setup(r, { expose:
|
|
40
|
+
setup(r, { expose: y, emit: P }) {
|
|
42
41
|
const u = z(), {
|
|
43
|
-
focusStartRef:
|
|
42
|
+
focusStartRef: F,
|
|
44
43
|
trapped: p,
|
|
45
|
-
onFocusAfterReleased:
|
|
46
|
-
onFocusAfterTrapped:
|
|
47
|
-
onFocusInTrap:
|
|
48
|
-
onFocusoutPrevented:
|
|
49
|
-
onReleaseRequested:
|
|
50
|
-
} = ee(u.props,
|
|
51
|
-
ariaModal:
|
|
52
|
-
arrowStyle:
|
|
53
|
-
contentAttrs:
|
|
54
|
-
contentClass:
|
|
44
|
+
onFocusAfterReleased: E,
|
|
45
|
+
onFocusAfterTrapped: B,
|
|
46
|
+
onFocusInTrap: C,
|
|
47
|
+
onFocusoutPrevented: A,
|
|
48
|
+
onReleaseRequested: T
|
|
49
|
+
} = ee(u.props, P), { attributes: g, arrowRef: O, contentRef: s, styles: I, instanceRef: N, role: d, update: w } = W(u.props), {
|
|
50
|
+
ariaModal: M,
|
|
51
|
+
arrowStyle: k,
|
|
52
|
+
contentAttrs: S,
|
|
53
|
+
contentClass: q,
|
|
55
54
|
contentStyle: c,
|
|
56
|
-
updateZIndex:
|
|
55
|
+
updateZIndex: x
|
|
57
56
|
} = _(u.props, {
|
|
58
|
-
styles:
|
|
59
|
-
attributes:
|
|
57
|
+
styles: I,
|
|
58
|
+
attributes: g,
|
|
60
59
|
role: d
|
|
61
|
-
}),
|
|
60
|
+
}), $ = D();
|
|
62
61
|
J(te, {
|
|
63
|
-
arrowStyle:
|
|
64
|
-
arrowRef:
|
|
65
|
-
arrowOffset:
|
|
62
|
+
arrowStyle: k,
|
|
63
|
+
arrowRef: O,
|
|
64
|
+
arrowOffset: $
|
|
66
65
|
});
|
|
67
66
|
let t;
|
|
68
67
|
const m = (n = !0) => {
|
|
69
|
-
|
|
70
|
-
},
|
|
68
|
+
w(), n && x();
|
|
69
|
+
}, L = () => {
|
|
71
70
|
m(!1), r.visible && r.focusOnShow ? p.value = !0 : r.visible === !1 && (p.value = !1);
|
|
72
71
|
};
|
|
73
72
|
return K(() => {
|
|
@@ -77,7 +76,7 @@ const oe = y({
|
|
|
77
76
|
t == null || t(), t = void 0;
|
|
78
77
|
const o = e(n || s.value), f = e(a || s.value);
|
|
79
78
|
R(o) && (t = i(
|
|
80
|
-
[d, () => r.ariaLabel,
|
|
79
|
+
[d, () => r.ariaLabel, M, () => r.id],
|
|
81
80
|
(l) => {
|
|
82
81
|
["role", "aria-label", "aria-modal", "id"].forEach((v, b) => {
|
|
83
82
|
h(l[b]) ? o.removeAttribute(v) : o.setAttribute(v, l[b]);
|
|
@@ -89,10 +88,10 @@ const oe = y({
|
|
|
89
88
|
});
|
|
90
89
|
},
|
|
91
90
|
{ immediate: !0 }
|
|
92
|
-
), i(() => r.visible,
|
|
91
|
+
), i(() => r.visible, L, { immediate: !0 });
|
|
93
92
|
}), U(() => {
|
|
94
93
|
t == null || t(), t = void 0;
|
|
95
|
-
}),
|
|
94
|
+
}), y({
|
|
96
95
|
/**
|
|
97
96
|
* @description popper content element
|
|
98
97
|
*/
|
|
@@ -100,7 +99,7 @@ const oe = y({
|
|
|
100
99
|
/**
|
|
101
100
|
* @description popperjs instance
|
|
102
101
|
*/
|
|
103
|
-
popperInstanceRef:
|
|
102
|
+
popperInstanceRef: N,
|
|
104
103
|
/**
|
|
105
104
|
* @description method for updating popper
|
|
106
105
|
*/
|
|
@@ -112,9 +111,9 @@ const oe = y({
|
|
|
112
111
|
}), (n, a) => (Y(), Z("div", j({
|
|
113
112
|
ref_key: "contentRef",
|
|
114
113
|
ref: s
|
|
115
|
-
}, e(
|
|
114
|
+
}, e(S), {
|
|
116
115
|
style: e(c),
|
|
117
|
-
class: e(
|
|
116
|
+
class: e(q),
|
|
118
117
|
tabindex: "-1",
|
|
119
118
|
onMouseenter: a[0] || (a[0] = (o) => n.$emit("mouseenter", o)),
|
|
120
119
|
onMouseleave: a[1] || (a[1] = (o) => n.$emit("mouseleave", o))
|
|
@@ -123,12 +122,12 @@ const oe = y({
|
|
|
123
122
|
trapped: e(p),
|
|
124
123
|
"trap-on-focus-in": !0,
|
|
125
124
|
"focus-trap-el": e(s),
|
|
126
|
-
"focus-start-el": e(
|
|
127
|
-
onFocusAfterTrapped: e(
|
|
128
|
-
onFocusAfterReleased: e(
|
|
129
|
-
onFocusin: e(
|
|
130
|
-
onFocusoutPrevented: e(
|
|
131
|
-
onReleaseRequested: e(
|
|
125
|
+
"focus-start-el": e(F),
|
|
126
|
+
onFocusAfterTrapped: e(B),
|
|
127
|
+
onFocusAfterReleased: e(E),
|
|
128
|
+
onFocusin: e(C),
|
|
129
|
+
onFocusoutPrevented: e(A),
|
|
130
|
+
onReleaseRequested: e(T)
|
|
132
131
|
}, {
|
|
133
132
|
default: H(() => [
|
|
134
133
|
Q(n.$slots, "default")
|
|
@@ -139,5 +138,5 @@ const oe = y({
|
|
|
139
138
|
}
|
|
140
139
|
});
|
|
141
140
|
export {
|
|
142
|
-
|
|
141
|
+
ie as default
|
|
143
142
|
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { POPPER_INJECTION_KEY as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as a, ref as e, computed as i, provide as m, renderSlot as d } from "vue";
|
|
2
|
+
import { POPPER_INJECTION_KEY as _ } from "./constants.js";
|
|
3
|
+
const v = /* @__PURE__ */ a({
|
|
4
4
|
name: "vft-popper",
|
|
5
|
-
inheritAttrs: !1
|
|
6
|
-
|
|
7
|
-
...u,
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "popper",
|
|
8
7
|
props: {
|
|
9
8
|
role: { default: "tooltip" }
|
|
10
9
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const p = e(),
|
|
10
|
+
setup(t, { expose: r }) {
|
|
11
|
+
const p = e(), n = e(), s = e(), f = e(), c = i(() => t.role), o = {
|
|
13
12
|
/**
|
|
14
13
|
* @description trigger element
|
|
15
14
|
*/
|
|
@@ -17,23 +16,23 @@ const u = t({
|
|
|
17
16
|
/**
|
|
18
17
|
* @description popperjs instance
|
|
19
18
|
*/
|
|
20
|
-
popperInstanceRef:
|
|
19
|
+
popperInstanceRef: n,
|
|
21
20
|
/**
|
|
22
21
|
* @description popper content element
|
|
23
22
|
*/
|
|
24
|
-
contentRef:
|
|
23
|
+
contentRef: s,
|
|
25
24
|
/**
|
|
26
25
|
* @description popper reference element
|
|
27
26
|
*/
|
|
28
|
-
referenceRef:
|
|
27
|
+
referenceRef: f,
|
|
29
28
|
/**
|
|
30
29
|
* @description role determines how aria attributes are distributed
|
|
31
30
|
*/
|
|
32
|
-
role:
|
|
31
|
+
role: c
|
|
33
32
|
};
|
|
34
|
-
return
|
|
33
|
+
return r(o), m(_, o), (l, u) => d(l.$slots, "default");
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
export {
|
|
38
|
-
|
|
37
|
+
v as default
|
|
39
38
|
};
|