vft 0.0.61 → 0.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/component.js +26 -22
- package/es/components/back-top/back-top.vue2.js +4 -2
- package/es/components/color-picker/color-picker.vue.d.ts +3 -1
- package/es/components/color-picker/color-picker.vue2.js +31 -30
- package/es/components/color-picker/index.d.ts +3 -1
- package/es/components/context-menu/context-menu.vue2.js +4 -2
- package/es/components/dialog/dialog.vue.d.ts +1 -1
- package/es/components/dialog/dialog.vue2.js +52 -53
- package/es/components/dialog/index.d.ts +3 -3
- package/es/components/dialog/index.js +1 -1
- package/es/components/dialog/style/css.js +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +5 -5
- package/es/components/dropdown/index.d.ts +5 -5
- package/es/components/icon-text/icon-text.vue.d.ts +10 -4
- package/es/components/icon-text/icon-text.vue2.js +28 -26
- package/es/components/icon-text/index.d.ts +10 -4
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +117 -109
- package/es/components/list-cell/index.d.ts +38 -0
- package/es/components/list-cell/index.js +12 -0
- package/es/components/list-cell/list-cell.vue.d.ts +53 -0
- package/es/components/list-cell/list-cell.vue.js +4 -0
- package/es/components/list-cell/list-cell.vue2.js +68 -0
- package/es/components/list-cell/style/css.d.ts +0 -0
- package/es/components/list-cell/style/css.js +2 -0
- package/es/components/list-cell/style/index.d.ts +0 -0
- package/es/components/list-cell/style/index.js +2 -0
- package/es/components/md-container/md-container.vue2.js +4 -2
- package/es/components/menu/index.d.ts +2 -2
- package/es/components/menu/menu-item.vue2.js +14 -12
- package/es/components/menu/menu.vue.d.ts +2 -2
- package/es/components/menu/sub-menu.vue2.js +4 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +5 -3
- package/es/components/multiple-tabs/tab-content.vue.d.ts +8 -0
- package/es/components/multiple-tabs/tab-content.vue2.js +13 -12
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +12 -12
- package/es/components/result/result.vue2.js +4 -2
- package/es/components/search/search.vue2.js +4 -2
- package/es/components/select-v2/defaults.d.ts +1 -1
- package/es/components/select-v2/index.d.ts +16 -16
- package/es/components/select-v2/select.vue.d.ts +8 -8
- package/es/components/select-v2/useSelect.d.ts +5 -5
- package/es/components/side-menu/index.d.ts +38 -1
- package/es/components/side-menu/side-menu.vue.d.ts +38 -1
- package/es/components/side-menu/side-menu.vue2.js +144 -113
- package/es/components/side-menu/use-drag-line.d.ts +10 -0
- package/es/components/side-menu/use-drag-line.js +51 -0
- package/es/components/switch/index.d.ts +1 -1
- package/es/components/switch/switch.vue.d.ts +1 -1
- package/es/components/tabs/tab-nav.vue2.js +4 -2
- package/es/components/tooltip/index.d.ts +2 -2
- package/es/components/tooltip/tooltip.vue.d.ts +2 -2
- package/es/components/virtual-list/builders/build-list.d.ts +38 -38
- package/es/components/virtual-list/components/scrollbar.d.ts +1 -1
- package/es/defaults.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +248 -239
- package/es/package.json.js +1 -1
- package/es/utils/index.js +31 -30
- package/es/utils/ns-cover.d.ts +6 -3
- package/es/utils/ns-cover.js +25 -15
- package/global.d.ts +2 -70
- package/lib/component.cjs +1 -1
- package/lib/components/back-top/back-top.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue.d.ts +3 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/index.d.ts +3 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/dialog/index.cjs +1 -1
- package/lib/components/dialog/index.d.ts +3 -3
- package/lib/components/dialog/style/css.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +5 -5
- package/lib/components/dropdown/index.d.ts +5 -5
- package/lib/components/icon-text/icon-text.vue.d.ts +10 -4
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/icon-text/index.d.ts +10 -4
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/list-cell/index.cjs +1 -0
- package/lib/components/list-cell/index.d.ts +38 -0
- package/lib/components/list-cell/list-cell.vue.cjs +1 -0
- package/lib/components/list-cell/list-cell.vue.d.ts +53 -0
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -0
- package/lib/components/list-cell/style/css.cjs +1 -0
- package/lib/components/list-cell/style/css.d.ts +0 -0
- package/lib/components/list-cell/style/index.cjs +1 -0
- package/lib/components/list-cell/style/index.d.ts +0 -0
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/index.d.ts +2 -2
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue.d.ts +2 -2
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue.d.ts +8 -0
- 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/result/result.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select-v2/defaults.d.ts +1 -1
- package/lib/components/select-v2/index.d.ts +16 -16
- package/lib/components/select-v2/select.vue.d.ts +8 -8
- package/lib/components/select-v2/useSelect.d.ts +5 -5
- package/lib/components/side-menu/index.d.ts +38 -1
- package/lib/components/side-menu/side-menu.vue.d.ts +38 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/use-drag-line.cjs +1 -0
- package/lib/components/side-menu/use-drag-line.d.ts +10 -0
- package/lib/components/switch/index.d.ts +1 -1
- package/lib/components/switch/switch.vue.d.ts +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tooltip/index.d.ts +2 -2
- package/lib/components/tooltip/tooltip.vue.d.ts +2 -2
- package/lib/components/virtual-list/builders/build-list.d.ts +38 -38
- package/lib/components/virtual-list/components/scrollbar.d.ts +1 -1
- package/lib/defaults.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/ns-cover.cjs +1 -1
- package/lib/utils/ns-cover.d.ts +6 -3
- package/package.json +1 -1
- package/tags.json +1 -1
- package/theme-style/base.css +1 -1
- package/theme-style/dark/css-vars.css +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/var.scss +13 -2
- package/theme-style/src/dark/var.scss +3 -3
- package/theme-style/src/dialog.scss +6 -4
- package/theme-style/src/footer-layout.scss +1 -0
- package/theme-style/src/index.scss +1 -0
- package/theme-style/src/list-cell.scss +55 -0
- package/theme-style/src/loading.scss +1 -1
- package/theme-style/src/md-container.scss +2 -3
- package/theme-style/src/menu.scss +5 -1
- package/theme-style/src/multiple-tabs.scss +1 -1
- package/theme-style/src/pagination.scss +1 -5
- package/theme-style/src/popover.scss +3 -3
- package/theme-style/src/side-menu.scss +21 -5
- package/theme-style/src/var.scss +0 -2
- package/theme-style/vft-back-top.css +1 -1
- package/theme-style/vft-dialog.css +1 -1
- package/theme-style/vft-footer-layout.css +1 -1
- package/theme-style/vft-list-cell.css +1 -0
- 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-popover.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/theme-style/vft-var.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { listenerRouteChange as
|
|
3
|
-
import { useSortable as
|
|
4
|
-
import { isUrl as
|
|
5
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as N, useSlots as F, ref as h, computed as m, h as v, onMounted as G, nextTick as J, getCurrentInstance as K, createVNode as f } from "vue";
|
|
2
|
+
import { listenerRouteChange as Q, useRouterHelper as X } from "@vft/router";
|
|
3
|
+
import { useSortable as Z } from "@vft/use";
|
|
4
|
+
import { isUrl as I, addUnit as C, isNullOrUndefined as V, removeUnit as _ } from "@vft/utils";
|
|
5
|
+
import { useNamespace as ee } 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 { generateCssVars as
|
|
10
|
+
import { generateCssVars as te, cssVarValue as oe } from "../../utils/ns-cover.js";
|
|
11
11
|
import "@vue/reactivity";
|
|
12
12
|
import "@vue/shared";
|
|
13
13
|
import "../divider/index.js";
|
|
14
|
-
import { VftIcon as
|
|
14
|
+
import { VftIcon as le } from "../icon/index.js";
|
|
15
15
|
import "../avatar/index.js";
|
|
16
16
|
import "../empty/index.js";
|
|
17
17
|
import "../result/index.js";
|
|
@@ -20,11 +20,11 @@ import "../popper/index.js";
|
|
|
20
20
|
import "../collapse-transition/index.js";
|
|
21
21
|
import "../tooltip/index.js";
|
|
22
22
|
import "../popover/index.js";
|
|
23
|
-
import { VftMenu as
|
|
23
|
+
import { VftMenu as ne, VftSubMenu as ie, VftMenuItem as k } from "../menu/index.js";
|
|
24
24
|
import "../context-menu/context-menu.vue2.js";
|
|
25
25
|
import "../multiple-tabs/multiple-tabs.vue2.js";
|
|
26
26
|
import "@vft/store";
|
|
27
|
-
import { useRouter as
|
|
27
|
+
import { useRouter as ae } from "vue-router";
|
|
28
28
|
import "../header-layout/index.js";
|
|
29
29
|
import "../footer-layout/index.js";
|
|
30
30
|
import "../iframe-layout/index.js";
|
|
@@ -65,6 +65,8 @@ import "../select-v2/index.js";
|
|
|
65
65
|
import "../verify-code/index.js";
|
|
66
66
|
import "../table/index.js";
|
|
67
67
|
import "../image-viewer/index.js";
|
|
68
|
+
import "../list-cell/index.js";
|
|
69
|
+
import "../dialog/index.js";
|
|
68
70
|
import "../md-container/index.js";
|
|
69
71
|
import "../md-comment/index.js";
|
|
70
72
|
import "../md-tabs/index.js";
|
|
@@ -72,13 +74,14 @@ import "../md-vue-playground/index.js";
|
|
|
72
74
|
import "../md-code-demo/index.js";
|
|
73
75
|
import "../md-code-tabs/index.js";
|
|
74
76
|
import "../message/index.js";
|
|
75
|
-
|
|
77
|
+
import { useDragLine as re } from "./use-drag-line.js";
|
|
78
|
+
const a = (
|
|
76
79
|
/* hoist-static*/
|
|
77
|
-
|
|
78
|
-
),
|
|
79
|
-
name:
|
|
80
|
-
}),
|
|
81
|
-
...
|
|
80
|
+
ee("side-menu")
|
|
81
|
+
), ue = N({
|
|
82
|
+
name: a.b()
|
|
83
|
+
}), Tt = /* @__PURE__ */ N({
|
|
84
|
+
...ue,
|
|
82
85
|
props: {
|
|
83
86
|
menus: null,
|
|
84
87
|
uniqueOpened: {
|
|
@@ -106,148 +109,176 @@ const l = (
|
|
|
106
109
|
default: !1
|
|
107
110
|
},
|
|
108
111
|
dragOption: null,
|
|
112
|
+
dragWidth: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: !0
|
|
115
|
+
},
|
|
109
116
|
useMenuSelect: {
|
|
110
117
|
type: Boolean,
|
|
111
118
|
default: !0
|
|
112
|
-
}
|
|
119
|
+
},
|
|
120
|
+
openListenRoute: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: !1
|
|
123
|
+
},
|
|
124
|
+
openDisabled: {
|
|
125
|
+
type: Boolean
|
|
126
|
+
},
|
|
127
|
+
defaultOpeneds: null
|
|
113
128
|
},
|
|
114
|
-
emits: ["update:collapse", "dragEnd", "select"],
|
|
115
|
-
setup(
|
|
116
|
-
|
|
129
|
+
emits: ["update:collapse", "dragEnd", "select", "dragWidthEnd"],
|
|
130
|
+
setup(t, {
|
|
131
|
+
expose: T,
|
|
132
|
+
emit: b
|
|
117
133
|
}) {
|
|
118
|
-
const
|
|
134
|
+
const c = F(), O = h(), n = m(() => ({
|
|
119
135
|
path: "path",
|
|
120
136
|
children: "children",
|
|
121
137
|
title: "title",
|
|
122
138
|
index: "path",
|
|
123
139
|
icon: "icon",
|
|
124
|
-
|
|
140
|
+
disabled: "disabled",
|
|
141
|
+
...t.attrMapping
|
|
125
142
|
}));
|
|
126
|
-
|
|
127
|
-
|
|
143
|
+
Q((e) => {
|
|
144
|
+
var o;
|
|
145
|
+
!e || (o = e.meta) != null && o.hideSide && !t.openListenRoute || (O.value = e.path);
|
|
128
146
|
});
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
return
|
|
147
|
+
const B = (e, o) => {
|
|
148
|
+
const l = e[n.value.path], u = e[n.value.title], r = e == null ? void 0 : e[n.value.children], d = e == null ? void 0 : e[n.value.index], p = e == null ? void 0 : e[n.value.icon], s = !(e != null && e[n.value.disabled]);
|
|
149
|
+
return r != null && r.length ? v(
|
|
132
150
|
// @ts-ignore
|
|
133
|
-
|
|
151
|
+
ie,
|
|
134
152
|
{
|
|
135
153
|
popperAppendToBody: !0,
|
|
136
|
-
key:
|
|
137
|
-
index:
|
|
138
|
-
title:
|
|
139
|
-
icon:
|
|
140
|
-
popperClass:
|
|
154
|
+
key: d || l,
|
|
155
|
+
index: d || l,
|
|
156
|
+
title: u,
|
|
157
|
+
icon: p,
|
|
158
|
+
popperClass: a.e("popper")
|
|
141
159
|
},
|
|
142
160
|
{
|
|
143
|
-
default: () =>
|
|
144
|
-
var
|
|
145
|
-
const
|
|
146
|
-
return (
|
|
161
|
+
default: () => r == null ? void 0 : r.map((i, $) => {
|
|
162
|
+
var R;
|
|
163
|
+
const y = i[n.value.path], w = i[n.value.index], j = i[n.value.icon], z = i[n.value.title], Y = i[n.value.disabled];
|
|
164
|
+
return (R = i == null ? void 0 : i[n.value.children]) != null && R.length ? B(i, $) : (
|
|
147
165
|
// @ts-ignore
|
|
148
|
-
|
|
149
|
-
key:
|
|
150
|
-
index:
|
|
151
|
-
route:
|
|
152
|
-
icon:
|
|
153
|
-
title:
|
|
154
|
-
disabled:
|
|
166
|
+
v(k, {
|
|
167
|
+
key: w || y,
|
|
168
|
+
index: w || y,
|
|
169
|
+
route: y,
|
|
170
|
+
icon: j,
|
|
171
|
+
title: z,
|
|
172
|
+
disabled: t.openDisabled && Y
|
|
155
173
|
})
|
|
156
174
|
);
|
|
157
175
|
})
|
|
158
176
|
}
|
|
159
|
-
) :
|
|
160
|
-
key:
|
|
161
|
-
index:
|
|
162
|
-
title:
|
|
163
|
-
route:
|
|
164
|
-
icon:
|
|
165
|
-
disabled: t.
|
|
166
|
-
},
|
|
167
|
-
var
|
|
168
|
-
return (
|
|
169
|
-
item:
|
|
170
|
-
index:
|
|
177
|
+
) : v(k, {
|
|
178
|
+
key: d || l,
|
|
179
|
+
index: d || l,
|
|
180
|
+
title: u,
|
|
181
|
+
route: l,
|
|
182
|
+
icon: p,
|
|
183
|
+
disabled: t.openDisabled && s
|
|
184
|
+
}, c.menuItem ? () => {
|
|
185
|
+
var i;
|
|
186
|
+
return (i = c.menuItem) == null ? void 0 : i.call(c, {
|
|
187
|
+
item: e,
|
|
188
|
+
index: o
|
|
171
189
|
});
|
|
172
190
|
} : "");
|
|
173
|
-
},
|
|
174
|
-
var
|
|
175
|
-
return
|
|
176
|
-
onSelect:
|
|
191
|
+
}, A = m(() => {
|
|
192
|
+
var e, o;
|
|
193
|
+
return v(ne, {
|
|
194
|
+
onSelect: t.useMenuSelect ? H : () => {
|
|
177
195
|
},
|
|
178
|
-
defaultActive:
|
|
179
|
-
|
|
196
|
+
defaultActive: t.defaultActive || O.value,
|
|
197
|
+
defaultOpeneds: t.defaultOpeneds,
|
|
198
|
+
class: [a.e("con"), (e = t.dragOption) != null && e.dragClassName ? a.e((o = t.dragOption) == null ? void 0 : o.dragClassName) : ""],
|
|
180
199
|
style: {
|
|
181
|
-
height: `calc(100% - ${
|
|
200
|
+
height: `calc(100% - ${t.menuTopBottomHeight}px)`
|
|
182
201
|
},
|
|
183
|
-
uniqueOpened:
|
|
184
|
-
collapse:
|
|
202
|
+
uniqueOpened: t.uniqueOpened,
|
|
203
|
+
collapse: t.collapse,
|
|
185
204
|
"collapse-transition": !1
|
|
186
|
-
}, () =>
|
|
205
|
+
}, () => t.menus.map((l, u) => B(l, u)));
|
|
187
206
|
}), {
|
|
188
|
-
go:
|
|
189
|
-
} =
|
|
190
|
-
async function
|
|
191
|
-
var
|
|
192
|
-
const
|
|
193
|
-
let
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
url:
|
|
207
|
+
go: S
|
|
208
|
+
} = X(), D = ae();
|
|
209
|
+
async function H(e) {
|
|
210
|
+
var r, d, p;
|
|
211
|
+
const o = e.route;
|
|
212
|
+
let l = e.route;
|
|
213
|
+
e.indexPath.some((s) => I(s)) && (l = e.indexPath.slice(-2).join("/"));
|
|
214
|
+
const u = (p = (d = (r = D.getRoutes().filter((s) => s.path === l)) == null ? void 0 : r[0]) == null ? void 0 : d.meta) == null ? void 0 : p.linkTarget;
|
|
215
|
+
S(u ? {
|
|
216
|
+
url: o,
|
|
198
217
|
winOpenOpt: {
|
|
199
|
-
target:
|
|
218
|
+
target: u
|
|
200
219
|
}
|
|
201
|
-
} :
|
|
220
|
+
} : o), b("select", e);
|
|
202
221
|
}
|
|
203
|
-
const
|
|
204
|
-
...
|
|
205
|
-
width:
|
|
222
|
+
const x = h(), q = m(() => ({
|
|
223
|
+
...te({
|
|
224
|
+
width: t.collapse ? C(t.collapseWidth) : x.value ? C(x.value) : C(t.width)
|
|
206
225
|
}, "side-menu"),
|
|
207
|
-
height: `calc(100% - ${
|
|
208
|
-
})),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
const p = (i = document.querySelectorAll("." + l.e((a = o.dragOption) == null ? void 0 : a.dragClassName))) == null ? void 0 : i[0], {
|
|
217
|
-
initSortable: n
|
|
218
|
-
} = z(p, {
|
|
226
|
+
height: `calc(100% - ${t.extraHeight}px)`
|
|
227
|
+
})), E = m(() => [a.b(), a.m("fixed")]);
|
|
228
|
+
G(() => {
|
|
229
|
+
J(() => {
|
|
230
|
+
var e, o, l;
|
|
231
|
+
if ((e = t.dragOption) != null && e.dragClassName) {
|
|
232
|
+
const u = (l = document.querySelectorAll("." + a.e((o = t.dragOption) == null ? void 0 : o.dragClassName))) == null ? void 0 : l[0], {
|
|
233
|
+
initSortable: r
|
|
234
|
+
} = Z(u, {
|
|
219
235
|
draggable: ".vft-menu-item",
|
|
220
|
-
onEnd: (
|
|
236
|
+
onEnd: (d) => {
|
|
221
237
|
const {
|
|
222
|
-
oldIndex:
|
|
223
|
-
newIndex:
|
|
224
|
-
} =
|
|
225
|
-
|
|
238
|
+
oldIndex: p,
|
|
239
|
+
newIndex: s
|
|
240
|
+
} = d;
|
|
241
|
+
V(p) || V(s) || p === s || b("dragEnd", p, s);
|
|
226
242
|
},
|
|
227
|
-
...
|
|
243
|
+
...t.dragOption
|
|
228
244
|
});
|
|
229
|
-
|
|
245
|
+
r();
|
|
230
246
|
}
|
|
231
247
|
});
|
|
232
|
-
})
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
},
|
|
248
|
+
});
|
|
249
|
+
const g = h(), M = h(), W = oe("side-menu-width", g), U = m(() => ({
|
|
250
|
+
left: W.value
|
|
251
|
+
}));
|
|
252
|
+
function L() {
|
|
253
|
+
t.collapse || (x.value = W.value), b("update:collapse", !t.collapse);
|
|
254
|
+
}
|
|
255
|
+
const P = K();
|
|
256
|
+
return t.dragWidth && re(g, M, m(() => _(t.collapseWidth)), P, t.collapse), T({
|
|
257
|
+
sideRef: g
|
|
258
|
+
}), () => f("div", {
|
|
259
|
+
ref: g,
|
|
260
|
+
class: E.value,
|
|
261
|
+
style: q.value
|
|
262
|
+
}, [c.top ? f("div", {
|
|
263
|
+
class: a.e("top")
|
|
264
|
+
}, [c.top()]) : null, A.value, c.bottom ? f("div", {
|
|
265
|
+
class: a.e("bottom")
|
|
266
|
+
}, [c.bottom()]) : t.showCollapse ? f("div", {
|
|
267
|
+
onClick: L,
|
|
268
|
+
class: [a.e("bottom"), a.e("collapse")]
|
|
269
|
+
}, [f(le, {
|
|
243
270
|
style: {
|
|
244
|
-
transform:
|
|
271
|
+
transform: t.collapse ? "rotateY(180deg)" : ""
|
|
245
272
|
},
|
|
246
273
|
size: 20,
|
|
247
274
|
icon: "ico-iconoir:sidebar-collapse"
|
|
248
|
-
}, null)]) : null
|
|
275
|
+
}, null)]) : null, t.dragWidth ? f("div", {
|
|
276
|
+
ref: M,
|
|
277
|
+
style: U.value,
|
|
278
|
+
class: a.e("drag-bar")
|
|
279
|
+
}, null) : null]);
|
|
249
280
|
}
|
|
250
281
|
});
|
|
251
282
|
export {
|
|
252
|
-
|
|
283
|
+
Tt as default
|
|
253
284
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Handle menu drag and drop related operations
|
|
4
|
+
* @param siderRef
|
|
5
|
+
* @param dragBarRef
|
|
6
|
+
* @param minWidth
|
|
7
|
+
* @param instance
|
|
8
|
+
* @param collapse
|
|
9
|
+
*/
|
|
10
|
+
export declare function useDragLine(siderRef: Ref<any>, dragBarRef: Ref<any>, minWidth: any, instance: any, collapse: any): {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { addUnit as x } from "@vft/utils";
|
|
2
|
+
import { onMounted as v, nextTick as g, unref as s } from "vue";
|
|
3
|
+
import "lodash";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import { setCssVar as y } from "../../utils/ns-cover.js";
|
|
6
|
+
import { useDebounceFn as M } from "@vft/use";
|
|
7
|
+
function $(i, c, a, m, p) {
|
|
8
|
+
v(() => {
|
|
9
|
+
g(() => {
|
|
10
|
+
M(h, 100)();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
function r(t) {
|
|
14
|
+
var o;
|
|
15
|
+
const e = s(t);
|
|
16
|
+
return e ? Reflect.has(e, "$el") ? (o = s(t)) == null ? void 0 : o.$el : s(t) : null;
|
|
17
|
+
}
|
|
18
|
+
function d(t, e, o) {
|
|
19
|
+
document.onmousemove = function(u) {
|
|
20
|
+
let n = t.left + (u.clientX - o);
|
|
21
|
+
u = u || window.event;
|
|
22
|
+
const f = 800, l = s(a);
|
|
23
|
+
return n < 0 && (n = 0), n > f && (n = f), n < l && (n = l, m.emit("update:collapse", !p)), t.style.left = n + "px", !1;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function w(t) {
|
|
27
|
+
const e = r(c), o = r(i);
|
|
28
|
+
document.onmouseup = function() {
|
|
29
|
+
var n;
|
|
30
|
+
document.onmousemove = null, document.onmouseup = null, o.style.transition = "width 0.2s";
|
|
31
|
+
const u = parseInt(e.style.left);
|
|
32
|
+
y("side-menu-width", x(u), "", i), m.emit("dragWidthEnd"), (n = t.releaseCapture) == null || n.call(t);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function h() {
|
|
36
|
+
const t = r(c);
|
|
37
|
+
if (!t)
|
|
38
|
+
return;
|
|
39
|
+
const e = r(i);
|
|
40
|
+
e && (t.onmousedown = (o) => {
|
|
41
|
+
var n;
|
|
42
|
+
e.style.transition = "unset";
|
|
43
|
+
const u = o == null ? void 0 : o.clientX;
|
|
44
|
+
return t.left = t.offsetLeft, d(t, e, u), w(t), (n = t.setCapture) == null || n.call(t), !1;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return {};
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
$ as useDragLine
|
|
51
|
+
};
|
|
@@ -193,9 +193,9 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
|
|
|
193
193
|
onInput?: ((...args: any[]) => any) | undefined;
|
|
194
194
|
}, {
|
|
195
195
|
loading: boolean | undefined;
|
|
196
|
+
modelValue: string | number | boolean | undefined;
|
|
196
197
|
disabled: boolean | undefined;
|
|
197
198
|
value: string | number | boolean | undefined;
|
|
198
|
-
modelValue: string | number | boolean | undefined;
|
|
199
199
|
validateEvent: boolean | undefined;
|
|
200
200
|
inlinePrompt: boolean | undefined;
|
|
201
201
|
activeValue: string | number | boolean | undefined;
|
|
@@ -225,9 +225,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
225
225
|
onInput?: ((...args: any[]) => any) | undefined;
|
|
226
226
|
}, {
|
|
227
227
|
loading: boolean | undefined;
|
|
228
|
+
modelValue: string | number | boolean | undefined;
|
|
228
229
|
disabled: boolean | undefined;
|
|
229
230
|
value: string | number | boolean | undefined;
|
|
230
|
-
modelValue: string | number | boolean | undefined;
|
|
231
231
|
validateEvent: boolean | undefined;
|
|
232
232
|
inlinePrompt: boolean | undefined;
|
|
233
233
|
activeValue: string | number | boolean | undefined;
|
|
@@ -61,6 +61,8 @@ import "../select-v2/index.js";
|
|
|
61
61
|
import "../verify-code/index.js";
|
|
62
62
|
import "../table/index.js";
|
|
63
63
|
import "../image-viewer/index.js";
|
|
64
|
+
import "../list-cell/index.js";
|
|
65
|
+
import "../dialog/index.js";
|
|
64
66
|
import "../md-container/index.js";
|
|
65
67
|
import "../md-comment/index.js";
|
|
66
68
|
import "../md-tabs/index.js";
|
|
@@ -81,7 +83,7 @@ const V = (
|
|
|
81
83
|
K("tab-nav")
|
|
82
84
|
), ct = E({
|
|
83
85
|
name: V.b()
|
|
84
|
-
}),
|
|
86
|
+
}), Eo = /* @__PURE__ */ E({
|
|
85
87
|
...ct,
|
|
86
88
|
props: {
|
|
87
89
|
panes: null,
|
|
@@ -235,5 +237,5 @@ const V = (
|
|
|
235
237
|
}
|
|
236
238
|
});
|
|
237
239
|
export {
|
|
238
|
-
|
|
240
|
+
Eo as default
|
|
239
241
|
};
|
|
@@ -196,7 +196,7 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
196
196
|
onOpen: (event?: Event | undefined) => void;
|
|
197
197
|
onClose: (event?: Event | undefined) => void;
|
|
198
198
|
hide: (event?: Event | undefined) => void;
|
|
199
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
199
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "before-show" | "before-hide" | "show" | "hide")[], "open" | "close" | "before-show" | "before-hide" | "show" | "hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
200
200
|
role: {
|
|
201
201
|
type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
202
202
|
required: false;
|
|
@@ -386,8 +386,8 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
|
|
|
386
386
|
required: false;
|
|
387
387
|
};
|
|
388
388
|
}>> & {
|
|
389
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
390
389
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
390
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
391
391
|
"onBefore-show"?: ((...args: any[]) => any) | undefined;
|
|
392
392
|
"onBefore-hide"?: ((...args: any[]) => any) | undefined;
|
|
393
393
|
onShow?: ((...args: any[]) => any) | undefined;
|
|
@@ -270,7 +270,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
270
270
|
* @description expose hide function
|
|
271
271
|
*/
|
|
272
272
|
hide: (event?: Event | undefined) => void;
|
|
273
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
273
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "before-show" | "before-hide" | "show" | "hide")[], "open" | "close" | "before-show" | "before-hide" | "show" | "hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
274
274
|
role: {
|
|
275
275
|
type: __PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
|
|
276
276
|
required: false;
|
|
@@ -460,8 +460,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
460
460
|
required: false;
|
|
461
461
|
};
|
|
462
462
|
}>> & {
|
|
463
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
464
463
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
464
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
465
465
|
"onBefore-show"?: ((...args: any[]) => any) | undefined;
|
|
466
466
|
"onBefore-hide"?: ((...args: any[]) => any) | undefined;
|
|
467
467
|
onShow?: ((...args: any[]) => any) | undefined;
|