vft 0.0.46 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/es/component.js +30 -27
- package/es/components/avatar/avatar.vue.d.ts +4 -4
- package/es/components/avatar/index.d.ts +4 -4
- package/es/components/avatar/index.js +4 -3
- package/es/components/back-top/back-top.vue.d.ts +21 -0
- package/es/components/back-top/back-top.vue2.js +23 -21
- package/es/components/back-top/index.d.ts +8 -1
- package/es/components/back-top/index.js +4 -3
- package/es/components/back-top/use-back-top.d.ts +1 -1
- package/es/components/back-top/use-back-top.js +23 -21
- package/es/components/clamp/index.js +4 -3
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +15 -15
- package/es/components/clamp-toggle/index.js +4 -3
- package/es/components/config-provider/hooks/use-global-config.js +1 -1
- package/es/components/config-provider/index.js +11 -10
- package/es/components/context-menu/context-menu.vue2.js +3 -2
- package/es/components/descriptions/description.vue2.js +1 -1
- package/es/components/descriptions/index.js +6 -5
- package/es/components/divider/divider.vue.d.ts +2 -2
- package/es/components/divider/index.d.ts +2 -2
- package/es/components/divider/index.js +4 -3
- package/es/components/empty/index.js +6 -5
- package/es/components/exception/exception.vue2.js +13 -11
- package/es/components/exception/index.js +4 -3
- package/es/components/footer-layout/index.js +4 -3
- package/es/components/form/constants.d.ts +4 -0
- package/es/components/form/constants.js +5 -0
- package/es/components/form/form-item.vue.d.ts +133 -0
- package/es/components/form/form-item.vue.js +4 -0
- package/es/components/form/form-item.vue2.js +244 -0
- package/es/components/form/form-label-wrap.d.ts +11 -0
- package/es/components/form/form-label-wrap.js +70 -0
- package/es/components/form/form.vue.d.ts +168 -0
- package/es/components/form/form.vue.js +4 -0
- package/es/components/form/form.vue2.js +151 -0
- package/es/components/form/hooks/index.d.ts +2 -0
- package/es/components/form/hooks/index.js +10 -0
- package/es/components/form/hooks/use-form-common-props.d.ts +6 -0
- package/es/components/form/hooks/use-form-common-props.js +28 -0
- package/es/components/form/hooks/use-form-item.d.ts +18 -0
- package/es/components/form/hooks/use-form-item.js +48 -0
- package/es/components/form/index.d.ts +338 -0
- package/es/components/form/index.js +28 -0
- package/es/components/form/style/css.d.ts +0 -0
- package/es/components/form/style/css.js +2 -0
- package/es/components/form/style/index.d.ts +0 -0
- package/es/components/form/style/index.js +2 -0
- package/es/components/form/types.d.ts +43 -0
- package/es/components/form/types.js +9 -0
- package/es/components/form/utils.d.ts +9 -0
- package/es/components/form/utils.js +42 -0
- package/es/components/form-item/style/css.d.ts +0 -0
- package/es/components/form-item/style/css.js +2 -0
- package/es/components/form-item/style/index.d.ts +0 -0
- package/es/components/form-item/style/index.js +2 -0
- package/es/components/full-screen/index.js +4 -3
- package/es/components/header-layout/index.js +4 -3
- package/es/components/icon/icon.vue2.js +24 -24
- package/es/components/icon/index.js +5 -4
- package/es/components/icon-text/icon-text.vue2.js +20 -21
- package/es/components/icon-text/index.js +4 -3
- package/es/components/iframe-layout/index.js +4 -3
- package/es/components/image/index.js +4 -3
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +119 -103
- package/es/components/input/index.d.ts +4 -4
- package/es/components/input/index.js +4 -3
- package/es/components/input/input.vue.d.ts +4 -4
- package/es/components/input/input.vue2.js +28 -25
- package/es/components/link/index.js +4 -3
- package/es/components/logo/index.js +4 -3
- package/es/components/md-code-demo/index.js +4 -3
- package/es/components/md-code-tabs/index.js +4 -3
- package/es/components/md-comment/index.js +4 -3
- package/es/components/md-container/index.js +4 -3
- package/es/components/md-container/md-container.vue2.js +69 -66
- package/es/components/md-tabs/index.js +4 -3
- package/es/components/md-vue-playground/index.js +4 -3
- package/es/components/menu/index.js +9 -8
- package/es/components/menu/menu-item.vue2.js +4 -3
- package/es/components/menu/menu.vue2.js +1 -1
- package/es/components/menu/sub-menu.vue2.js +3 -2
- package/es/components/message/index.js +8 -7
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +42 -40
- package/es/components/multiple-tabs/tab-content.vue2.js +3 -2
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +20 -20
- package/es/components/overlay/index.js +4 -3
- package/es/components/page-wrapper/index.js +4 -3
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/index.js +9 -8
- package/es/components/pagination/pagination.d.ts +2 -2
- package/es/components/popover/index.d.ts +4 -4
- package/es/components/popover/index.js +4 -3
- package/es/components/popper/composables/use-content.d.ts +2 -2
- package/es/components/popper/index.d.ts +2 -2
- package/es/components/popper/index.js +10 -9
- package/es/components/popper/popper.vue.d.ts +2 -2
- package/es/components/qrcode/index.js +4 -3
- package/es/components/result/index.js +4 -3
- package/es/components/result/result.vue2.js +3 -2
- package/es/components/router-view-content/index.js +4 -3
- package/es/components/search/index.d.ts +3 -3
- package/es/components/search/index.js +4 -3
- package/es/components/search/search.vue.d.ts +3 -3
- package/es/components/search/search.vue2.js +3 -2
- package/es/components/side-menu/index.js +4 -3
- package/es/components/side-menu/side-menu.vue2.js +52 -54
- package/es/components/tabs/index.d.ts +2 -2
- package/es/components/tabs/index.js +9 -8
- package/es/components/tabs/tab-nav.vue2.js +4 -3
- package/es/components/tabs/tab-pane.vue2.js +1 -1
- package/es/components/tabs/tabs.vue.d.ts +2 -2
- package/es/components/tag/index.js +4 -3
- package/es/components/tag/tag.vue2.js +8 -7
- package/es/components/tooltip/index.d.ts +8 -8
- package/es/components/tooltip/index.js +4 -3
- package/es/components/tooltip/tooltip.vue.d.ts +2 -2
- package/es/components/tooltip/trigger.vue2.js +1 -1
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/index.js +30 -25
- package/es/hooks/use-id/index.js +3 -2
- package/es/hooks/use-ordered-children/index.js +5 -4
- package/es/hooks/use-popper/index.d.ts +2 -2
- package/es/hooks/use-prop/index.d.ts +2 -0
- package/es/hooks/use-prop/index.js +11 -0
- package/es/hooks/use-size/index.d.ts +7 -0
- package/es/hooks/use-size/index.js +9 -0
- package/es/index.js +203 -177
- package/es/package.json.js +1 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +27 -22
- package/es/utils/ns-cover.d.ts +12 -0
- package/es/utils/ns-cover.js +17 -5
- package/es/utils/objects.d.ts +4 -0
- package/es/utils/objects.js +12 -0
- package/lib/component.cjs +1 -1
- package/lib/components/avatar/avatar.vue.d.ts +4 -4
- package/lib/components/avatar/index.cjs +1 -1
- package/lib/components/avatar/index.d.ts +4 -4
- package/lib/components/back-top/back-top.vue.d.ts +21 -0
- package/lib/components/back-top/back-top.vue2.cjs +1 -1
- package/lib/components/back-top/index.cjs +1 -1
- package/lib/components/back-top/index.d.ts +8 -1
- package/lib/components/back-top/use-back-top.cjs +1 -1
- package/lib/components/back-top/use-back-top.d.ts +1 -1
- package/lib/components/clamp/index.cjs +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/clamp-toggle/index.cjs +1 -1
- package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
- package/lib/components/config-provider/index.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/descriptions/description.vue2.cjs +1 -1
- package/lib/components/descriptions/index.cjs +1 -1
- package/lib/components/divider/divider.vue.d.ts +2 -2
- package/lib/components/divider/index.cjs +1 -1
- package/lib/components/divider/index.d.ts +2 -2
- package/lib/components/empty/index.cjs +1 -1
- package/lib/components/exception/exception.vue2.cjs +1 -1
- package/lib/components/exception/index.cjs +1 -1
- package/lib/components/footer-layout/index.cjs +1 -1
- package/lib/components/form/constants.cjs +1 -0
- package/lib/components/form/constants.d.ts +4 -0
- package/lib/components/form/form-item.vue.cjs +1 -0
- package/lib/components/form/form-item.vue.d.ts +133 -0
- package/lib/components/form/form-item.vue2.cjs +1 -0
- package/lib/components/form/form-label-wrap.cjs +1 -0
- package/lib/components/form/form-label-wrap.d.ts +11 -0
- package/lib/components/form/form.vue.cjs +1 -0
- package/lib/components/form/form.vue.d.ts +168 -0
- package/lib/components/form/form.vue2.cjs +1 -0
- package/lib/components/form/hooks/index.cjs +1 -0
- package/lib/components/form/hooks/index.d.ts +2 -0
- package/lib/components/form/hooks/use-form-common-props.cjs +1 -0
- package/lib/components/form/hooks/use-form-common-props.d.ts +6 -0
- package/lib/components/form/hooks/use-form-item.cjs +1 -0
- package/lib/components/form/hooks/use-form-item.d.ts +18 -0
- package/lib/components/form/index.cjs +1 -0
- package/lib/components/form/index.d.ts +338 -0
- package/lib/components/form/style/css.cjs +1 -0
- package/lib/components/form/style/css.d.ts +0 -0
- package/lib/components/form/style/index.cjs +1 -0
- package/lib/components/form/style/index.d.ts +0 -0
- package/lib/components/form/types.cjs +1 -0
- package/lib/components/form/types.d.ts +43 -0
- package/lib/components/form/utils.cjs +1 -0
- package/lib/components/form/utils.d.ts +9 -0
- package/lib/components/form-item/style/css.cjs +1 -0
- package/lib/components/form-item/style/css.d.ts +0 -0
- package/lib/components/form-item/style/index.cjs +1 -0
- package/lib/components/form-item/style/index.d.ts +0 -0
- package/lib/components/full-screen/index.cjs +1 -1
- package/lib/components/header-layout/index.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon/index.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/icon-text/index.cjs +1 -1
- package/lib/components/iframe-layout/index.cjs +1 -1
- package/lib/components/image/index.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/input/index.cjs +1 -1
- package/lib/components/input/index.d.ts +4 -4
- package/lib/components/input/input.vue.d.ts +4 -4
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/link/index.cjs +1 -1
- package/lib/components/logo/index.cjs +1 -1
- package/lib/components/md-code-demo/index.cjs +1 -1
- package/lib/components/md-code-tabs/index.cjs +1 -1
- package/lib/components/md-comment/index.cjs +1 -1
- package/lib/components/md-container/index.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-tabs/index.cjs +1 -1
- package/lib/components/md-vue-playground/index.cjs +1 -1
- package/lib/components/menu/index.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/message/index.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/overlay/index.cjs +1 -1
- package/lib/components/page-wrapper/index.cjs +1 -1
- package/lib/components/pagination/index.cjs +1 -1
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/pagination.d.ts +2 -2
- package/lib/components/popover/index.cjs +1 -1
- package/lib/components/popover/index.d.ts +4 -4
- package/lib/components/popper/composables/use-content.d.ts +2 -2
- package/lib/components/popper/index.cjs +1 -1
- package/lib/components/popper/index.d.ts +2 -2
- package/lib/components/popper/popper.vue.d.ts +2 -2
- package/lib/components/qrcode/index.cjs +1 -1
- package/lib/components/result/index.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/router-view-content/index.cjs +1 -1
- package/lib/components/search/index.cjs +1 -1
- package/lib/components/search/index.d.ts +3 -3
- package/lib/components/search/search.vue.d.ts +3 -3
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/side-menu/index.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/tabs/index.cjs +1 -1
- package/lib/components/tabs/index.d.ts +2 -2
- 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.vue.d.ts +2 -2
- package/lib/components/tag/index.cjs +1 -1
- package/lib/components/tag/tag.vue2.cjs +1 -1
- package/lib/components/tooltip/index.cjs +1 -1
- package/lib/components/tooltip/index.d.ts +8 -8
- package/lib/components/tooltip/tooltip.vue.d.ts +2 -2
- package/lib/components/tooltip/trigger.vue2.cjs +1 -1
- package/lib/hooks/index.cjs +1 -1
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/use-id/index.cjs +1 -1
- package/lib/hooks/use-ordered-children/index.cjs +1 -1
- package/lib/hooks/use-popper/index.d.ts +2 -2
- package/lib/hooks/use-prop/index.cjs +1 -0
- package/lib/hooks/use-prop/index.d.ts +2 -0
- package/lib/hooks/use-size/index.cjs +1 -0
- package/lib/hooks/use-size/index.d.ts +7 -0
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/ns-cover.cjs +1 -1
- package/lib/utils/ns-cover.d.ts +12 -0
- package/lib/utils/objects.cjs +1 -0
- package/lib/utils/objects.d.ts +4 -0
- package/package.json +4 -5
- package/theme-style/dark/css-vars.css +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/var.scss +16 -9
- package/theme-style/src/dark/css-vars.scss +1 -1
- package/theme-style/src/dark/var.scss +13 -12
- package/theme-style/src/form-item.scss +0 -0
- package/theme-style/src/form.scss +241 -0
- package/theme-style/src/header-layout.scss +0 -4
- package/theme-style/src/index.scss +2 -0
- package/theme-style/src/md-container.scss +1 -3
- package/theme-style/src/menu.scss +3 -1
- package/theme-style/src/side-menu.scss +1 -3
- package/theme-style/vft-form-item.css +0 -0
- package/theme-style/vft-form.css +1 -0
- package/theme-style/vft-full-screen.css +1 -1
- package/theme-style/vft-header-layout.css +1 -1
- package/theme-style/vft-loading.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/es/components/back-top/types.d.ts +0 -13
- package/es/components/back-top/types.js +0 -1
- package/lib/components/back-top/types.cjs +0 -1
- package/lib/components/back-top/types.d.ts +0 -13
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { listenerRouteChange as
|
|
3
|
-
import { useSortable as
|
|
4
|
-
import { isUrl as
|
|
5
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as k, useSlots as E, ref as P, computed as m, h as f, onMounted as U, nextTick as W, createVNode as d } from "vue";
|
|
2
|
+
import { listenerRouteChange as $, useRouterHelper as j } from "@vft/router";
|
|
3
|
+
import { useSortable as z } from "@vft/use";
|
|
4
|
+
import { isUrl as Y, addUnit as M, isNullOrUndefined as S } from "@vft/utils";
|
|
5
|
+
import { useNamespace as D } from "../../hooks/use-namespace/index.js";
|
|
6
6
|
import "@popperjs/core";
|
|
7
7
|
import "lodash";
|
|
8
8
|
import "../../hooks/use-z-index/index.js";
|
|
9
9
|
import "@vueuse/core";
|
|
10
|
-
import "../../utils/ns-cover.js";
|
|
10
|
+
import { generateCssVars as F } from "../../utils/ns-cover.js";
|
|
11
11
|
import "../divider/index.js";
|
|
12
12
|
import { VftIcon as G } from "../icon/index.js";
|
|
13
13
|
import "../avatar/index.js";
|
|
@@ -18,7 +18,7 @@ import "../popper/index.js";
|
|
|
18
18
|
import "../collapse-transition/index.js";
|
|
19
19
|
import "../tooltip/index.js";
|
|
20
20
|
import "../popover/index.js";
|
|
21
|
-
import { VftMenu as J, VftSubMenu as K, VftMenuItem as
|
|
21
|
+
import { VftMenu as J, VftSubMenu as K, VftMenuItem as b } from "../menu/index.js";
|
|
22
22
|
import "../multiple-tabs/multiple-tabs.vue2.js";
|
|
23
23
|
import "@vft/store";
|
|
24
24
|
import { useRouter as L } from "vue-router";
|
|
@@ -45,6 +45,7 @@ import "../clamp-toggle/index.js";
|
|
|
45
45
|
import "../page-wrapper/index.js";
|
|
46
46
|
import "../exception/index.js";
|
|
47
47
|
import "../search/index.js";
|
|
48
|
+
import "../form/index.js";
|
|
48
49
|
import "../md-container/index.js";
|
|
49
50
|
import "../md-comment/index.js";
|
|
50
51
|
import "../md-tabs/index.js";
|
|
@@ -54,10 +55,10 @@ import "../md-code-tabs/index.js";
|
|
|
54
55
|
import "../message/index.js";
|
|
55
56
|
const i = (
|
|
56
57
|
/* hoist-static*/
|
|
57
|
-
|
|
58
|
-
), Q =
|
|
58
|
+
D("side-menu")
|
|
59
|
+
), Q = k({
|
|
59
60
|
name: i.b()
|
|
60
|
-
}),
|
|
61
|
+
}), Ze = /* @__PURE__ */ k({
|
|
61
62
|
...Q,
|
|
62
63
|
props: {
|
|
63
64
|
menus: null,
|
|
@@ -95,7 +96,7 @@ const i = (
|
|
|
95
96
|
setup(o, {
|
|
96
97
|
emit: h
|
|
97
98
|
}) {
|
|
98
|
-
const c =
|
|
99
|
+
const c = E(), v = P(), a = m(() => ({
|
|
99
100
|
path: "path",
|
|
100
101
|
children: "children",
|
|
101
102
|
title: "title",
|
|
@@ -103,43 +104,43 @@ const i = (
|
|
|
103
104
|
icon: "icon",
|
|
104
105
|
...o.attrMapping
|
|
105
106
|
}));
|
|
106
|
-
|
|
107
|
+
$((e) => {
|
|
107
108
|
!e || e.meta.hideSide || (v.value = e.path);
|
|
108
109
|
});
|
|
109
110
|
const x = (e, r) => {
|
|
110
|
-
const n = e[a.value.path],
|
|
111
|
+
const n = e[a.value.path], p = e[a.value.title], l = e == null ? void 0 : e[a.value.children], u = e == null ? void 0 : e[a.value.index], s = e == null ? void 0 : e[a.value.icon];
|
|
111
112
|
return l != null && l.length ? f(
|
|
112
113
|
// @ts-ignore
|
|
113
114
|
K,
|
|
114
115
|
{
|
|
115
116
|
popperAppendToBody: !0,
|
|
116
|
-
key:
|
|
117
|
-
index:
|
|
118
|
-
title:
|
|
117
|
+
key: u || n,
|
|
118
|
+
index: u || n,
|
|
119
|
+
title: p,
|
|
119
120
|
icon: s,
|
|
120
121
|
popperClass: i.e("popper")
|
|
121
122
|
},
|
|
122
123
|
{
|
|
123
|
-
default: () => l == null ? void 0 : l.map((t,
|
|
124
|
+
default: () => l == null ? void 0 : l.map((t, H) => {
|
|
124
125
|
var O;
|
|
125
|
-
const g = t[a.value.path], C = t[a.value.index],
|
|
126
|
-
return (O = t == null ? void 0 : t[a.value.children]) != null && O.length ? x(t,
|
|
126
|
+
const g = t[a.value.path], C = t[a.value.index], q = t[a.value.icon], R = t[a.value.title];
|
|
127
|
+
return (O = t == null ? void 0 : t[a.value.children]) != null && O.length ? x(t, H) : (
|
|
127
128
|
// @ts-ignore
|
|
128
|
-
f(
|
|
129
|
+
f(b, {
|
|
129
130
|
key: C || g,
|
|
130
131
|
index: C || g,
|
|
131
132
|
route: g,
|
|
132
|
-
icon:
|
|
133
|
-
title:
|
|
133
|
+
icon: q,
|
|
134
|
+
title: R,
|
|
134
135
|
disabled: t.disabled
|
|
135
136
|
})
|
|
136
137
|
);
|
|
137
138
|
})
|
|
138
139
|
}
|
|
139
|
-
) : f(
|
|
140
|
-
key:
|
|
141
|
-
index:
|
|
142
|
-
title:
|
|
140
|
+
) : f(b, {
|
|
141
|
+
key: u || n,
|
|
142
|
+
index: u || n,
|
|
143
|
+
title: p,
|
|
143
144
|
route: n,
|
|
144
145
|
icon: s,
|
|
145
146
|
disabled: e.disabled
|
|
@@ -150,10 +151,10 @@ const i = (
|
|
|
150
151
|
index: r
|
|
151
152
|
});
|
|
152
153
|
} : "");
|
|
153
|
-
},
|
|
154
|
+
}, w = m(() => {
|
|
154
155
|
var e, r;
|
|
155
156
|
return f(J, {
|
|
156
|
-
onSelect: o.useMenuSelect ?
|
|
157
|
+
onSelect: o.useMenuSelect ? N : () => {
|
|
157
158
|
},
|
|
158
159
|
defaultActive: o.defaultActive || v.value,
|
|
159
160
|
class: [i.e("con"), (e = o.dragOption) != null && e.dragClassName ? i.e((r = o.dragOption) == null ? void 0 : r.dragClassName) : ""],
|
|
@@ -163,48 +164,45 @@ const i = (
|
|
|
163
164
|
uniqueOpened: o.uniqueOpened,
|
|
164
165
|
collapse: o.collapse,
|
|
165
166
|
"collapse-transition": !1
|
|
166
|
-
}, () => o.menus.map((n,
|
|
167
|
+
}, () => o.menus.map((n, p) => x(n, p)));
|
|
167
168
|
}), {
|
|
168
169
|
go: y
|
|
169
|
-
} =
|
|
170
|
-
async function
|
|
171
|
-
var l,
|
|
170
|
+
} = j(), B = L();
|
|
171
|
+
async function N(e) {
|
|
172
|
+
var l, u, s;
|
|
172
173
|
const r = e.route;
|
|
173
174
|
let n = e.route;
|
|
174
|
-
e.indexPath.some((t) =>
|
|
175
|
-
const
|
|
176
|
-
y(
|
|
175
|
+
e.indexPath.some((t) => Y(t)) && (n = e.indexPath.slice(-2).join("/"));
|
|
176
|
+
const p = (s = (u = (l = B.getRoutes().filter((t) => t.path === n)) == null ? void 0 : l[0]) == null ? void 0 : u.meta) == null ? void 0 : s.linkTarget;
|
|
177
|
+
y(p ? {
|
|
177
178
|
url: r,
|
|
178
179
|
winOpenOpt: {
|
|
179
|
-
target:
|
|
180
|
+
target: p
|
|
180
181
|
}
|
|
181
182
|
} : r), h("select", e);
|
|
182
183
|
}
|
|
183
|
-
const
|
|
184
|
-
...
|
|
185
|
-
"border-right": "none"
|
|
186
|
-
}, "menu"),
|
|
187
|
-
...b({
|
|
184
|
+
const T = m(() => ({
|
|
185
|
+
...F({
|
|
188
186
|
width: o.collapse ? M(o.collapseWidth) : M(o.width)
|
|
189
187
|
}, "side-menu"),
|
|
190
188
|
height: `calc(100% - ${o.extraHeight}px)`
|
|
191
|
-
})),
|
|
192
|
-
function
|
|
189
|
+
})), A = m(() => [i.b(), i.m("fixed")]);
|
|
190
|
+
function V() {
|
|
193
191
|
h("update:collapse", !o.collapse);
|
|
194
192
|
}
|
|
195
|
-
return
|
|
196
|
-
|
|
193
|
+
return U(() => {
|
|
194
|
+
W(() => {
|
|
197
195
|
var e, r, n;
|
|
198
196
|
if ((e = o.dragOption) != null && e.dragClassName) {
|
|
199
|
-
const
|
|
197
|
+
const p = (n = document.querySelectorAll("." + i.e((r = o.dragOption) == null ? void 0 : r.dragClassName))) == null ? void 0 : n[0], {
|
|
200
198
|
initSortable: l
|
|
201
|
-
} =
|
|
199
|
+
} = z(p, {
|
|
202
200
|
draggable: ".vft-menu-item",
|
|
203
|
-
onEnd: (
|
|
201
|
+
onEnd: (u) => {
|
|
204
202
|
const {
|
|
205
203
|
oldIndex: s,
|
|
206
204
|
newIndex: t
|
|
207
|
-
} =
|
|
205
|
+
} = u;
|
|
208
206
|
S(s) || S(t) || s === t || h("dragEnd", s, t);
|
|
209
207
|
},
|
|
210
208
|
...o.dragOption
|
|
@@ -213,14 +211,14 @@ const i = (
|
|
|
213
211
|
}
|
|
214
212
|
});
|
|
215
213
|
}), () => d("div", {
|
|
216
|
-
class:
|
|
217
|
-
style:
|
|
214
|
+
class: A.value,
|
|
215
|
+
style: T.value
|
|
218
216
|
}, [c.top ? d("div", {
|
|
219
217
|
class: i.e("top")
|
|
220
|
-
}, [c.top()]) : null,
|
|
218
|
+
}, [c.top()]) : null, w.value, c.bottom ? d("div", {
|
|
221
219
|
class: i.e("bottom")
|
|
222
220
|
}, [c.bottom()]) : o.showCollapse ? d("div", {
|
|
223
|
-
onClick:
|
|
221
|
+
onClick: V,
|
|
224
222
|
class: [i.e("bottom"), i.e("collapse")]
|
|
225
223
|
}, [d(G, {
|
|
226
224
|
style: {
|
|
@@ -232,5 +230,5 @@ const i = (
|
|
|
232
230
|
}
|
|
233
231
|
});
|
|
234
232
|
export {
|
|
235
|
-
|
|
233
|
+
Ze as default
|
|
236
234
|
};
|
|
@@ -20,7 +20,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
20
20
|
required: false;
|
|
21
21
|
};
|
|
22
22
|
tabPosition: {
|
|
23
|
-
type: import("vue").PropType<"
|
|
23
|
+
type: import("vue").PropType<"bottom" | "left" | "right" | "top" | undefined>;
|
|
24
24
|
required: false;
|
|
25
25
|
};
|
|
26
26
|
beforeLeave: {
|
|
@@ -113,7 +113,7 @@ export declare const VftTabs: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
113
113
|
required: false;
|
|
114
114
|
};
|
|
115
115
|
tabPosition: {
|
|
116
|
-
type: import("vue").PropType<"
|
|
116
|
+
type: import("vue").PropType<"bottom" | "left" | "right" | "top" | undefined>;
|
|
117
117
|
required: false;
|
|
118
118
|
};
|
|
119
119
|
beforeLeave: {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { withInstall as o, withNoopInstall as
|
|
1
|
+
import { withInstall as o, withNoopInstall as m } from "../../utils/vue/install.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../../utils/ns-cover.js";
|
|
5
|
-
import
|
|
5
|
+
import "lodash";
|
|
6
|
+
import r from "./tabs.vue2.js";
|
|
6
7
|
import t from "./tab-pane.vue2.js";
|
|
7
|
-
import { TabsRootContextKey as
|
|
8
|
-
const
|
|
8
|
+
import { TabsRootContextKey as _ } from "./types.js";
|
|
9
|
+
const l = o(r, { TabPane: t }), b = m(t);
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
_ as TabsRootContextKey,
|
|
12
|
+
b as VftTabPane,
|
|
13
|
+
l as VftTabs,
|
|
14
|
+
l as default
|
|
14
15
|
};
|
|
@@ -2,6 +2,7 @@ import { defineComponent as E, getCurrentInstance as Z, inject as _, ref as g, c
|
|
|
2
2
|
import { capitalize as y } from "@vft/utils";
|
|
3
3
|
import { throwError as nt } from "../../utils/error.js";
|
|
4
4
|
import "../../utils/ns-cover.js";
|
|
5
|
+
import "lodash";
|
|
5
6
|
import "../divider/index.js";
|
|
6
7
|
import { VftIcon as T } from "../icon/index.js";
|
|
7
8
|
import "../avatar/index.js";
|
|
@@ -41,6 +42,7 @@ import "../clamp-toggle/index.js";
|
|
|
41
42
|
import "../page-wrapper/index.js";
|
|
42
43
|
import "../exception/index.js";
|
|
43
44
|
import "../search/index.js";
|
|
45
|
+
import "../form/index.js";
|
|
44
46
|
import "../md-container/index.js";
|
|
45
47
|
import "../md-comment/index.js";
|
|
46
48
|
import "../md-tabs/index.js";
|
|
@@ -50,7 +52,6 @@ import "../md-code-tabs/index.js";
|
|
|
50
52
|
import "../message/index.js";
|
|
51
53
|
import { useNamespace as K } from "../../hooks/use-namespace/index.js";
|
|
52
54
|
import "@popperjs/core";
|
|
53
|
-
import "lodash";
|
|
54
55
|
import "../../hooks/use-z-index/index.js";
|
|
55
56
|
import { useDocumentVisibility as it, useWindowFocus as lt, useResizeObserver as at } from "@vueuse/core";
|
|
56
57
|
import { EVENT_CODE as k } from "@vft/constants";
|
|
@@ -61,7 +62,7 @@ const V = (
|
|
|
61
62
|
K("tab-nav")
|
|
62
63
|
), ct = E({
|
|
63
64
|
name: V.b()
|
|
64
|
-
}),
|
|
65
|
+
}), be = /* @__PURE__ */ E({
|
|
65
66
|
...ct,
|
|
66
67
|
props: {
|
|
67
68
|
panes: null,
|
|
@@ -212,5 +213,5 @@ const V = (
|
|
|
212
213
|
}
|
|
213
214
|
});
|
|
214
215
|
export {
|
|
215
|
-
|
|
216
|
+
be as default
|
|
216
217
|
};
|
|
@@ -2,10 +2,10 @@ import { defineComponent as b, getCurrentInstance as y, useSlots as C, inject as
|
|
|
2
2
|
import "@vft/utils";
|
|
3
3
|
import { throwError as P } from "../../utils/error.js";
|
|
4
4
|
import "../../utils/ns-cover.js";
|
|
5
|
+
import "lodash";
|
|
5
6
|
import { TabsRootContextKey as j } from "./types.js";
|
|
6
7
|
import { useNamespace as D } from "../../hooks/use-namespace/index.js";
|
|
7
8
|
import "@popperjs/core";
|
|
8
|
-
import "lodash";
|
|
9
9
|
import "../../hooks/use-z-index/index.js";
|
|
10
10
|
import { eagerComputed as p } from "@vueuse/core";
|
|
11
11
|
const I = ["id", "aria-hidden", "aria-labelledby"], i = (
|
|
@@ -23,7 +23,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
23
23
|
required: false;
|
|
24
24
|
};
|
|
25
25
|
tabPosition: {
|
|
26
|
-
type: __PropType<"
|
|
26
|
+
type: __PropType<"bottom" | "left" | "right" | "top" | undefined>;
|
|
27
27
|
required: false;
|
|
28
28
|
};
|
|
29
29
|
beforeLeave: {
|
|
@@ -86,7 +86,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
86
86
|
required: false;
|
|
87
87
|
};
|
|
88
88
|
tabPosition: {
|
|
89
|
-
type: __PropType<"
|
|
89
|
+
type: __PropType<"bottom" | "left" | "right" | "top" | undefined>;
|
|
90
90
|
required: false;
|
|
91
91
|
};
|
|
92
92
|
beforeLeave: {
|
|
@@ -2,9 +2,10 @@ import { withInstall as t } from "../../utils/vue/install.js";
|
|
|
2
2
|
import "vue";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../../utils/ns-cover.js";
|
|
5
|
+
import "lodash";
|
|
5
6
|
import o from "./tag.vue2.js";
|
|
6
|
-
const
|
|
7
|
+
const s = t(o);
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
s as VftTag,
|
|
10
|
+
s as default
|
|
10
11
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { defineComponent as m, useSlots as d, computed as f, createVNode as n, Transition as p, isVNode as b } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useNamespace as h } from "../../hooks/use-namespace/index.js";
|
|
2
|
+
import { VftIcon as y } from "../icon/index.js";
|
|
3
|
+
import { useNamespace as g } from "../../hooks/use-namespace/index.js";
|
|
5
4
|
import "@popperjs/core";
|
|
6
5
|
import "lodash";
|
|
7
6
|
import "../../hooks/use-z-index/index.js";
|
|
8
7
|
import "@vueuse/core";
|
|
9
8
|
import "@vft/utils";
|
|
10
9
|
import "../../utils/ns-cover.js";
|
|
10
|
+
import "../form/index.js";
|
|
11
|
+
import { useFormSize as h } from "../form/hooks/use-form-common-props.js";
|
|
11
12
|
function k(e) {
|
|
12
13
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !b(e);
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
+
const F = /* @__PURE__ */ m({
|
|
15
16
|
__name: "tag",
|
|
16
17
|
props: {
|
|
17
18
|
closable: {
|
|
@@ -38,7 +39,7 @@ const x = /* @__PURE__ */ m({
|
|
|
38
39
|
setup(e, {
|
|
39
40
|
emit: c
|
|
40
41
|
}) {
|
|
41
|
-
const l = d(), i =
|
|
42
|
+
const l = d(), i = h(), t = g("tag"), s = f(() => [t.b(), t.is("closable", e.closable), t.m(e.type), t.m(i.value), t.m(e.effect), t.is("hit", e.hit), t.is("round", e.round)]), r = (o) => {
|
|
42
43
|
c("close", o);
|
|
43
44
|
}, u = (o) => {
|
|
44
45
|
c("click", o);
|
|
@@ -55,7 +56,7 @@ const x = /* @__PURE__ */ m({
|
|
|
55
56
|
}, [(o = l.default) == null ? void 0 : o.call(l)]), e.closable ? n("div", {
|
|
56
57
|
class: t.e("close"),
|
|
57
58
|
onClick: r
|
|
58
|
-
}, [n(
|
|
59
|
+
}, [n(y, {
|
|
59
60
|
icon: "vico-close"
|
|
60
61
|
}, null)]) : ""]);
|
|
61
62
|
};
|
|
@@ -71,5 +72,5 @@ const x = /* @__PURE__ */ m({
|
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
export {
|
|
74
|
-
|
|
75
|
+
F as default
|
|
75
76
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
2
|
role: {
|
|
3
|
-
type: import("vue").PropType<"
|
|
3
|
+
type: import("vue").PropType<"grid" | "listbox" | "menu" | "tooltip" | "dialog" | "group" | "navigation" | "tree" | undefined>;
|
|
4
4
|
required: false;
|
|
5
5
|
};
|
|
6
6
|
showArrow: {
|
|
@@ -60,7 +60,7 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
60
60
|
required: false;
|
|
61
61
|
};
|
|
62
62
|
fallbackPlacements: {
|
|
63
|
-
type: import("vue").PropType<import("
|
|
63
|
+
type: import("vue").PropType<import("@popperjs/core").Placement[] | undefined>;
|
|
64
64
|
required: false;
|
|
65
65
|
};
|
|
66
66
|
gpuAcceleration: {
|
|
@@ -72,11 +72,11 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
72
72
|
required: false;
|
|
73
73
|
};
|
|
74
74
|
placement: {
|
|
75
|
-
type: import("vue").PropType<import("
|
|
75
|
+
type: import("vue").PropType<import("@popperjs/core").Placement | undefined>;
|
|
76
76
|
required: false;
|
|
77
77
|
};
|
|
78
78
|
popperOptions: {
|
|
79
|
-
type: import("vue").PropType<Partial<import("
|
|
79
|
+
type: import("vue").PropType<Partial<import("@popperjs/core").Options> | undefined>;
|
|
80
80
|
required: false;
|
|
81
81
|
};
|
|
82
82
|
strategy: {
|
|
@@ -197,7 +197,7 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
197
197
|
hide: (event?: Event | undefined) => void;
|
|
198
198
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "hide" | "show" | "open" | "before-show" | "before-hide")[], "close" | "hide" | "show" | "open" | "before-show" | "before-hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
199
199
|
role: {
|
|
200
|
-
type: import("vue").PropType<"
|
|
200
|
+
type: import("vue").PropType<"grid" | "listbox" | "menu" | "tooltip" | "dialog" | "group" | "navigation" | "tree" | undefined>;
|
|
201
201
|
required: false;
|
|
202
202
|
};
|
|
203
203
|
showArrow: {
|
|
@@ -257,7 +257,7 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
257
257
|
required: false;
|
|
258
258
|
};
|
|
259
259
|
fallbackPlacements: {
|
|
260
|
-
type: import("vue").PropType<import("
|
|
260
|
+
type: import("vue").PropType<import("@popperjs/core").Placement[] | undefined>;
|
|
261
261
|
required: false;
|
|
262
262
|
};
|
|
263
263
|
gpuAcceleration: {
|
|
@@ -269,11 +269,11 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
269
269
|
required: false;
|
|
270
270
|
};
|
|
271
271
|
placement: {
|
|
272
|
-
type: import("vue").PropType<import("
|
|
272
|
+
type: import("vue").PropType<import("@popperjs/core").Placement | undefined>;
|
|
273
273
|
required: false;
|
|
274
274
|
};
|
|
275
275
|
popperOptions: {
|
|
276
|
-
type: import("vue").PropType<Partial<import("
|
|
276
|
+
type: import("vue").PropType<Partial<import("@popperjs/core").Options> | undefined>;
|
|
277
277
|
required: false;
|
|
278
278
|
};
|
|
279
279
|
strategy: {
|
|
@@ -2,9 +2,10 @@ import { withInstall as t } from "../../utils/vue/install.js";
|
|
|
2
2
|
import "vue";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../../utils/ns-cover.js";
|
|
5
|
+
import "lodash";
|
|
5
6
|
import o from "./tooltip.vue2.js";
|
|
6
|
-
const
|
|
7
|
+
const l = t(o);
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
l as VftTooltip,
|
|
10
|
+
l as default
|
|
10
11
|
};
|
|
@@ -54,7 +54,7 @@ export interface ToolTipProps {
|
|
|
54
54
|
}
|
|
55
55
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
56
56
|
role: {
|
|
57
|
-
type: __PropType<"
|
|
57
|
+
type: __PropType<"grid" | "listbox" | "menu" | "tooltip" | "dialog" | "group" | "navigation" | "tree" | undefined>;
|
|
58
58
|
required: false;
|
|
59
59
|
};
|
|
60
60
|
showArrow: {
|
|
@@ -272,7 +272,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
272
272
|
hide: (event?: Event | undefined) => void;
|
|
273
273
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "hide" | "show" | "open" | "before-show" | "before-hide")[], "close" | "hide" | "show" | "open" | "before-show" | "before-hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
274
274
|
role: {
|
|
275
|
-
type: __PropType<"
|
|
275
|
+
type: __PropType<"grid" | "listbox" | "menu" | "tooltip" | "dialog" | "group" | "navigation" | "tree" | undefined>;
|
|
276
276
|
required: false;
|
|
277
277
|
};
|
|
278
278
|
showArrow: {
|
|
@@ -4,9 +4,9 @@ import "../popper/index.js";
|
|
|
4
4
|
import "@vft/utils";
|
|
5
5
|
import { composeEventHandlers as r } from "../../utils/event.js";
|
|
6
6
|
import "../../utils/ns-cover.js";
|
|
7
|
+
import "lodash";
|
|
7
8
|
import { useNamespace as F } from "../../hooks/use-namespace/index.js";
|
|
8
9
|
import "@popperjs/core";
|
|
9
|
-
import "lodash";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
11
|
import "@vueuse/core";
|
|
12
12
|
import { TOOLTIP_INJECTION_KEY as I } from "./constants.js";
|
package/es/hooks/index.d.ts
CHANGED
package/es/hooks/index.js
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
import { _bem as r, defaultNamespace as t, namespaceContextKey as
|
|
1
|
+
import { _bem as r, defaultNamespace as t, namespaceContextKey as p, useGetDerivedNamespace as s, useNamespace as u } from "./use-namespace/index.js";
|
|
2
2
|
import { useCursor as a } from "./use-cursor/index.js";
|
|
3
3
|
import { usePopper as x } from "./use-popper/index.js";
|
|
4
|
-
import { defaultInitialZIndex as
|
|
5
|
-
import { FORWARD_REF_INJECTION_KEY as C, useForwardRef as
|
|
6
|
-
import { ID_INJECTION_KEY as T, useId as
|
|
7
|
-
import { usePopperContainer as
|
|
8
|
-
import { useDelayedToggle as
|
|
9
|
-
import { useTimeout as
|
|
10
|
-
import { useOrderedChildren as
|
|
11
|
-
import { createModelToggleComposable as
|
|
4
|
+
import { defaultInitialZIndex as I, useZIndex as l, zIndexContextKey as n } from "./use-z-index/index.js";
|
|
5
|
+
import { FORWARD_REF_INJECTION_KEY as C, useForwardRef as E, useForwardRefDirective as N } from "./use-forward-ref/index.js";
|
|
6
|
+
import { ID_INJECTION_KEY as T, useId as _, useIdInjection as c } from "./use-id/index.js";
|
|
7
|
+
import { usePopperContainer as K, usePopperContainerId as O } from "./use-popper-container/index.js";
|
|
8
|
+
import { useDelayedToggle as F } from "./use-delayed-toggle/index.js";
|
|
9
|
+
import { useTimeout as b } from "./use-timeout/index.js";
|
|
10
|
+
import { useOrderedChildren as J } from "./use-ordered-children/index.js";
|
|
11
|
+
import { createModelToggleComposable as Y, useModelToggle as Z, useModelToggleEmits as v } from "./use-model-toggle/index.js";
|
|
12
|
+
import { useProp as z } from "./use-prop/index.js";
|
|
13
|
+
import { SIZE_INJECTION_KEY as S, useGlobalSize as h } from "./use-size/index.js";
|
|
12
14
|
export {
|
|
13
15
|
C as FORWARD_REF_INJECTION_KEY,
|
|
14
16
|
T as ID_INJECTION_KEY,
|
|
17
|
+
S as SIZE_INJECTION_KEY,
|
|
15
18
|
r as _bem,
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
Y as createModelToggleComposable,
|
|
20
|
+
I as defaultInitialZIndex,
|
|
18
21
|
t as defaultNamespace,
|
|
19
|
-
|
|
22
|
+
p as namespaceContextKey,
|
|
20
23
|
a as useCursor,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_ as
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
F as useDelayedToggle,
|
|
25
|
+
E as useForwardRef,
|
|
26
|
+
N as useForwardRefDirective,
|
|
27
|
+
s as useGetDerivedNamespace,
|
|
28
|
+
h as useGlobalSize,
|
|
29
|
+
_ as useId,
|
|
30
|
+
c as useIdInjection,
|
|
31
|
+
Z as useModelToggle,
|
|
32
|
+
v as useModelToggleEmits,
|
|
29
33
|
u as useNamespace,
|
|
30
|
-
|
|
34
|
+
J as useOrderedChildren,
|
|
31
35
|
x as usePopper,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
K as usePopperContainer,
|
|
37
|
+
O as usePopperContainerId,
|
|
38
|
+
z as useProp,
|
|
39
|
+
b as useTimeout,
|
|
35
40
|
l as useZIndex,
|
|
36
|
-
|
|
41
|
+
n as zIndexContextKey
|
|
37
42
|
};
|
package/es/hooks/use-id/index.js
CHANGED
|
@@ -3,11 +3,12 @@ import { isClient as u } from "@vueuse/core";
|
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import { debugWarn as d } from "../../utils/error.js";
|
|
5
5
|
import "../../utils/ns-cover.js";
|
|
6
|
+
import "lodash";
|
|
6
7
|
import { useGetDerivedNamespace as p } from "../use-namespace/index.js";
|
|
7
8
|
const r = {
|
|
8
9
|
prefix: Math.floor(Math.random() * 1e4),
|
|
9
10
|
current: 0
|
|
10
|
-
}, m = Symbol("elIdInjection"), I = () => n() ? i(m, r) : r,
|
|
11
|
+
}, m = Symbol("elIdInjection"), I = () => n() ? i(m, r) : r, h = (o) => {
|
|
11
12
|
const e = I();
|
|
12
13
|
!u && e === r && d(
|
|
13
14
|
"IdInjection",
|
|
@@ -24,6 +25,6 @@ usage: app.provide(ID_INJECTION_KEY, {
|
|
|
24
25
|
};
|
|
25
26
|
export {
|
|
26
27
|
m as ID_INJECTION_KEY,
|
|
27
|
-
|
|
28
|
+
h as useId,
|
|
28
29
|
I as useIdInjection
|
|
29
30
|
};
|
|
@@ -2,17 +2,18 @@ import { shallowRef as s, isVNode as m } from "vue";
|
|
|
2
2
|
import "@vft/utils";
|
|
3
3
|
import { flattedChildren as c } from "../../utils/vue/vnode.js";
|
|
4
4
|
import "../../utils/ns-cover.js";
|
|
5
|
-
|
|
5
|
+
import "lodash";
|
|
6
|
+
const p = (t, i, d) => c(t.subTree).filter(
|
|
6
7
|
(e) => {
|
|
7
8
|
var r;
|
|
8
9
|
return m(e) && ((r = e.type) == null ? void 0 : r.name) === i && !!e.component;
|
|
9
10
|
}
|
|
10
|
-
).map((e) => e.component.uid).map((e) => d[e]).filter((e) => !!e),
|
|
11
|
+
).map((e) => e.component.uid).map((e) => d[e]).filter((e) => !!e), v = (t, i) => {
|
|
11
12
|
const d = {}, o = s([]);
|
|
12
13
|
return {
|
|
13
14
|
children: o,
|
|
14
15
|
addChild: (r) => {
|
|
15
|
-
d[r.uid] = r, o.value =
|
|
16
|
+
d[r.uid] = r, o.value = p(t, i, d);
|
|
16
17
|
},
|
|
17
18
|
removeChild: (r) => {
|
|
18
19
|
delete d[r], o.value = o.value.filter(
|
|
@@ -22,5 +23,5 @@ const u = (t, i, d) => c(t.subTree).filter(
|
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
v as useOrderedChildren
|
|
26
27
|
};
|