vft 0.0.521 → 0.0.522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +6 -6
- package/es/components/button/index.d.ts +9 -9
- package/es/components/full-screen/full-screen.vue2.js +19 -17
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +39 -39
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/select/index.d.ts +4 -4
- package/es/components/select/select.vue.d.ts +4 -4
- package/es/components/select/useSelect.d.ts +4 -4
- package/es/components/side-menu/side-menu.vue2.js +94 -94
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/select.vue.d.ts +4 -4
- package/lib/components/select/useSelect.d.ts +4 -4
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/vft-autocomplete.css +1 -1
- package/theme-style/vft-button-group.css +1 -1
- package/theme-style/vft-button.css +1 -1
- package/theme-style/vft-cascader.css +1 -1
- package/theme-style/vft-checkbox.css +1 -1
- package/theme-style/vft-color-picker.css +1 -1
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-dropdown.css +1 -1
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-link.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-md-vue-playground.css +1 -1
- package/theme-style/vft-multiple-tabs.css +1 -1
- package/theme-style/vft-popper.css +1 -1
- package/theme-style/vft-radio.css +1 -1
- package/theme-style/vft-result.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-tag.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as H, toRefs as
|
|
2
|
-
import { VftIcon as
|
|
3
|
-
import { VftMenu as
|
|
1
|
+
import { defineComponent as H, toRefs as ce, useSlots as pe, getCurrentInstance as fe, unref as me, ref as v, computed as b, watch as he, onMounted as ve, nextTick as ge, createVNode as m, h as y, isVNode as be } from "vue";
|
|
2
|
+
import { VftIcon as ye } from "../icon/index.js";
|
|
3
|
+
import { VftMenu as Me, VftSubMenu as Se, VftMenuItem as j, VftMenuItemGroup as Ce } from "../menu/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
|
-
import { isNullOrUndefined as q, isNumber as E, isUrl as
|
|
6
|
-
import { addUnit as
|
|
5
|
+
import { isNullOrUndefined as q, isNumber as E, isUrl as Oe } from "@vft/utils";
|
|
6
|
+
import { addUnit as T } from "../../utils/helper.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
9
|
-
import { listenerRouteChange as
|
|
10
|
-
import { useSortable as
|
|
11
|
-
import { useNamespace as
|
|
9
|
+
import { listenerRouteChange as xe, useRouterHelper as Te } from "@vft/router";
|
|
10
|
+
import { useSortable as Be } from "@vft/use/sortable";
|
|
11
|
+
import { useNamespace as _e } from "../../hooks/use-namespace/index.js";
|
|
12
12
|
import "../../hooks/use-model-toggle/index.js";
|
|
13
13
|
import "@popperjs/core";
|
|
14
14
|
import "../../hooks/use-z-index/index.js";
|
|
15
|
-
import { useDragLine as
|
|
16
|
-
function
|
|
17
|
-
return typeof g == "function" || Object.prototype.toString.call(g) === "[object Object]" && !
|
|
15
|
+
import { useDragLine as we } from "./use-drag-line.js";
|
|
16
|
+
function ke(g) {
|
|
17
|
+
return typeof g == "function" || Object.prototype.toString.call(g) === "[object Object]" && !be(g);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const De = H({
|
|
20
20
|
name: "vft-side-menu"
|
|
21
|
-
}),
|
|
22
|
-
...
|
|
21
|
+
}), Fe = /* @__PURE__ */ H({
|
|
22
|
+
...De,
|
|
23
23
|
props: {
|
|
24
24
|
isFixedLeft: {
|
|
25
25
|
type: Boolean,
|
|
@@ -106,17 +106,17 @@ const we = H({
|
|
|
106
106
|
},
|
|
107
107
|
emits: ["update:collapse", "update:width", "dragEnd", "dragWidthEnd", "select", "subMenuClick", "subMenuOpenClick", "menuItemMouseenter", "menuItemMouseleave"],
|
|
108
108
|
setup(g, {
|
|
109
|
-
expose:
|
|
110
|
-
emit:
|
|
109
|
+
expose: L,
|
|
110
|
+
emit: P
|
|
111
111
|
}) {
|
|
112
|
-
const t = g, r =
|
|
113
|
-
defaultActive:
|
|
112
|
+
const t = g, r = P, {
|
|
113
|
+
defaultActive: U,
|
|
114
114
|
collapse: f,
|
|
115
|
-
uniqueOpened:
|
|
116
|
-
defaultOpeneds:
|
|
117
|
-
openMenuCollapse:
|
|
115
|
+
uniqueOpened: $,
|
|
116
|
+
defaultOpeneds: F,
|
|
117
|
+
openMenuCollapse: Y,
|
|
118
118
|
defaultOpenedsLevel: M
|
|
119
|
-
} =
|
|
119
|
+
} = ce(t), s = _e("side-menu"), d = pe(), B = fe(), S = B.appContext.config.globalProperties.$router, C = me(S?.currentRoute), _ = v(C?.path && !(C.meta?.hideSide && !t.useRouterJump) ? C.path : void 0), a = b(() => ({
|
|
120
120
|
path: "path",
|
|
121
121
|
children: "children",
|
|
122
122
|
title: "title",
|
|
@@ -124,7 +124,7 @@ const we = H({
|
|
|
124
124
|
icon: "icon",
|
|
125
125
|
disabled: "disabled",
|
|
126
126
|
...t.attrMapping
|
|
127
|
-
})),
|
|
127
|
+
})), Z = (e, n = 1 / 0) => {
|
|
128
128
|
const l = [], o = (u, c = 0) => {
|
|
129
129
|
c >= n || u.forEach((i) => {
|
|
130
130
|
i[a.value.children]?.length && (l.push(i[a.value.index]), o(i[a.value.children], c + 1));
|
|
@@ -132,51 +132,51 @@ const we = H({
|
|
|
132
132
|
};
|
|
133
133
|
return o(e), l;
|
|
134
134
|
};
|
|
135
|
-
|
|
135
|
+
xe(({
|
|
136
136
|
route: e
|
|
137
137
|
}) => {
|
|
138
|
-
!e || e.meta?.hideSide && !t.useRouterJump || (
|
|
138
|
+
!e || e.meta?.hideSide && !t.useRouterJump || e.path && (_.value = e.path);
|
|
139
139
|
});
|
|
140
|
-
const
|
|
140
|
+
const z = (e) => {
|
|
141
141
|
const n = e.e;
|
|
142
142
|
if (t.autoScrollActiveDom && n) {
|
|
143
143
|
const l = E(t.autoScrollActiveDom) ? t.autoScrollActiveDom : 0, o = n.target;
|
|
144
|
-
|
|
144
|
+
w({
|
|
145
145
|
activeDom: o,
|
|
146
146
|
offset: l
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
r("subMenuOpenClick", e);
|
|
150
|
-
},
|
|
150
|
+
}, G = (e) => {
|
|
151
151
|
r("subMenuClick", e);
|
|
152
|
-
},
|
|
152
|
+
}, w = ({
|
|
153
153
|
activeDom: e = null,
|
|
154
154
|
offset: n = 0,
|
|
155
155
|
delay: l = 300
|
|
156
156
|
} = {}) => {
|
|
157
|
-
|
|
157
|
+
h.value?.menu && setTimeout(() => {
|
|
158
158
|
const o = e || document.querySelector(".vft-menu-item.is-active") || document.querySelector(".vft-sub-menu.is-active");
|
|
159
|
-
o && (
|
|
159
|
+
o && (h.value.menu.scrollTop = h.value.menu.scrollTop + (o.getBoundingClientRect().top - h.value.menu.getBoundingClientRect().top) + n);
|
|
160
160
|
}, l);
|
|
161
|
-
}, G = (e) => {
|
|
162
|
-
r("menuItemMouseenter", e);
|
|
163
161
|
}, K = (e) => {
|
|
162
|
+
r("menuItemMouseenter", e);
|
|
163
|
+
}, Q = (e) => {
|
|
164
164
|
r("menuItemMouseleave", e);
|
|
165
|
-
},
|
|
165
|
+
}, X = (e, n) => !t.enableScroll || !e ? e : f.value && n > t.scrollThreshold ? y(Ce, {
|
|
166
166
|
style: {
|
|
167
|
-
maxHeight:
|
|
167
|
+
maxHeight: T(t.scrollMaxHeight),
|
|
168
168
|
overflowY: "auto"
|
|
169
169
|
}
|
|
170
|
-
}, () => e) : e,
|
|
171
|
-
const l = e[a.value.path], o = e[a.value.title], u = e?.[a.value.children], c = e?.[a.value.index], i = e?.[a.value.icon],
|
|
172
|
-
return u?.length ? y(
|
|
170
|
+
}, () => e) : e, k = (e, n) => {
|
|
171
|
+
const l = e[a.value.path], o = e[a.value.title], u = e?.[a.value.children], c = e?.[a.value.index], i = e?.[a.value.icon], I = !!e?.[a.value.disabled], N = t.disabledJudgeTurnOver ? !I : I, V = c || l || n + o;
|
|
172
|
+
return u?.length ? y(Se, {
|
|
173
173
|
...e,
|
|
174
174
|
popperAppendToBody: !0,
|
|
175
|
-
key:
|
|
176
|
-
index:
|
|
175
|
+
key: V,
|
|
176
|
+
index: V,
|
|
177
177
|
title: o,
|
|
178
178
|
icon: i,
|
|
179
|
-
disabled: t.openDisabled &&
|
|
179
|
+
disabled: t.openDisabled && N,
|
|
180
180
|
popperClass: s.e("popper"),
|
|
181
181
|
toolTipCfg: {
|
|
182
182
|
placement: "right",
|
|
@@ -185,24 +185,24 @@ const we = H({
|
|
|
185
185
|
}
|
|
186
186
|
}, {
|
|
187
187
|
default: () => {
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
return p?.[a.value.children]?.length ?
|
|
188
|
+
const ue = u?.map((p, se) => {
|
|
189
|
+
const x = p[a.value.path], W = p[a.value.index], ie = p[a.value.icon], re = p[a.value.title], J = !!p[a.value.disabled], de = t.disabledJudgeTurnOver ? !J : J;
|
|
190
|
+
return p?.[a.value.children]?.length ? k(p, se) : (
|
|
191
191
|
// @ts-ignore
|
|
192
192
|
y(j, {
|
|
193
193
|
...p,
|
|
194
|
-
key:
|
|
195
|
-
index:
|
|
196
|
-
route:
|
|
197
|
-
icon:
|
|
198
|
-
title:
|
|
199
|
-
disabled: t.openDisabled &&
|
|
194
|
+
key: W || x,
|
|
195
|
+
index: W || x,
|
|
196
|
+
route: x,
|
|
197
|
+
icon: ie,
|
|
198
|
+
title: re,
|
|
199
|
+
disabled: t.openDisabled && de
|
|
200
200
|
}, d.menuItem ? () => d.menuItem?.({
|
|
201
201
|
item: p
|
|
202
202
|
}) : "")
|
|
203
203
|
);
|
|
204
204
|
});
|
|
205
|
-
return
|
|
205
|
+
return X(ue, u?.length || 0);
|
|
206
206
|
}
|
|
207
207
|
}) : y(j, {
|
|
208
208
|
...e,
|
|
@@ -211,27 +211,27 @@ const we = H({
|
|
|
211
211
|
title: o,
|
|
212
212
|
route: l,
|
|
213
213
|
icon: i,
|
|
214
|
-
disabled: t.openDisabled &&
|
|
215
|
-
onMouseenter: () =>
|
|
216
|
-
onMouseleave: () =>
|
|
214
|
+
disabled: t.openDisabled && N,
|
|
215
|
+
onMouseenter: () => K(e),
|
|
216
|
+
onMouseleave: () => Q(e)
|
|
217
217
|
}, d.menuItem ? () => d.menuItem?.({
|
|
218
218
|
item: e,
|
|
219
219
|
index: n
|
|
220
220
|
}) : "");
|
|
221
|
-
},
|
|
221
|
+
}, h = v(), ee = b(() => ({
|
|
222
222
|
...t.collapseWidth === 0 && f.value ? {
|
|
223
223
|
width: 0
|
|
224
224
|
} : {},
|
|
225
225
|
height: `calc(100% - ${t.menuTopBottomHeight}px)`
|
|
226
|
-
}))
|
|
227
|
-
function
|
|
226
|
+
}));
|
|
227
|
+
function te(e, n) {
|
|
228
228
|
if (t.useRouterJump) {
|
|
229
229
|
const {
|
|
230
230
|
go: l
|
|
231
|
-
} =
|
|
231
|
+
} = Te(S), o = e.route;
|
|
232
232
|
let u = e.route;
|
|
233
|
-
e.indexPath.some((i) =>
|
|
234
|
-
const c =
|
|
233
|
+
e.indexPath.some((i) => Oe(i)) && (u = e.indexPath.slice(-2).join("/"));
|
|
234
|
+
const c = S.getRoutes().filter((i) => i.path === u)?.[0]?.meta?.linkTarget;
|
|
235
235
|
l(c ? {
|
|
236
236
|
url: o,
|
|
237
237
|
winOpenOpt: {
|
|
@@ -241,27 +241,27 @@ const we = H({
|
|
|
241
241
|
}
|
|
242
242
|
r("select", e, n);
|
|
243
243
|
}
|
|
244
|
-
const
|
|
244
|
+
const O = v(), D = v(), R = v(), le = b(() => ({
|
|
245
245
|
...t.collapseWidth === 0 && f.value ? {
|
|
246
246
|
borderRight: "none"
|
|
247
247
|
} : {},
|
|
248
|
-
width:
|
|
248
|
+
width: T(t.width),
|
|
249
249
|
height: t.height
|
|
250
250
|
}));
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
he(() => f.value, (e) => {
|
|
252
|
+
oe.value || (e ? r("update:width", t.collapseWidth) : r("update:width", R.value || t.width), R.value = t.width);
|
|
253
253
|
});
|
|
254
254
|
const {
|
|
255
|
-
isDraging:
|
|
256
|
-
} =
|
|
257
|
-
left:
|
|
258
|
-
})),
|
|
259
|
-
return
|
|
260
|
-
|
|
255
|
+
isDraging: oe
|
|
256
|
+
} = we(O, D, B), ne = b(() => ({
|
|
257
|
+
left: T(t.width)
|
|
258
|
+
})), ae = b(() => [s.b(), t.isFixedLeft ? s.m("fixed") : ""]), A = v([]);
|
|
259
|
+
return ve(() => {
|
|
260
|
+
ge(() => {
|
|
261
261
|
if (t.dragOption?.dragClassName) {
|
|
262
262
|
const e = document.querySelectorAll(`.${s.e(t.dragOption?.dragClassName)}`)?.[0], {
|
|
263
263
|
initSortable: n
|
|
264
|
-
} =
|
|
264
|
+
} = Be(e, {
|
|
265
265
|
draggable: ".vft-menu-item",
|
|
266
266
|
onEnd: (l) => {
|
|
267
267
|
const {
|
|
@@ -275,53 +275,53 @@ const we = H({
|
|
|
275
275
|
n();
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
|
-
}),
|
|
279
|
-
sideRef:
|
|
280
|
-
jumpActiveDom:
|
|
281
|
-
menuRef:
|
|
278
|
+
}), L({
|
|
279
|
+
sideRef: O,
|
|
280
|
+
jumpActiveDom: w,
|
|
281
|
+
menuRef: h
|
|
282
282
|
}), () => {
|
|
283
283
|
let e;
|
|
284
|
-
return M.value && (A.value =
|
|
285
|
-
ref:
|
|
286
|
-
class:
|
|
287
|
-
style:
|
|
284
|
+
return M.value && (A.value = Z(t.menus, E(M.value) ? M.value : 1 / 0)), m("div", {
|
|
285
|
+
ref: O,
|
|
286
|
+
class: ae.value,
|
|
287
|
+
style: le.value
|
|
288
288
|
}, [d.top ? m("div", {
|
|
289
289
|
class: s.e("top")
|
|
290
|
-
}, [d.top()]) : null, y(m(
|
|
291
|
-
ref:
|
|
292
|
-
onSelect:
|
|
293
|
-
onOpen:
|
|
294
|
-
onSubMenuClick:
|
|
295
|
-
defaultActive:
|
|
296
|
-
defaultOpeneds:
|
|
290
|
+
}, [d.top()]) : null, y(m(Me, {
|
|
291
|
+
ref: h,
|
|
292
|
+
onSelect: te,
|
|
293
|
+
onOpen: z,
|
|
294
|
+
onSubMenuClick: G,
|
|
295
|
+
defaultActive: U?.value || _.value,
|
|
296
|
+
defaultOpeneds: F?.value || A.value,
|
|
297
297
|
disableSubMenuAction: t.disableSubMenuAction,
|
|
298
298
|
class: [s.e("con"), t.dragOption?.dragClassName ? s.e(t.dragOption?.dragClassName) : ""],
|
|
299
|
-
style:
|
|
300
|
-
collapse:
|
|
301
|
-
uniqueOpened:
|
|
299
|
+
style: ee.value,
|
|
300
|
+
collapse: Y.value ? f.value : !1,
|
|
301
|
+
uniqueOpened: $.value,
|
|
302
302
|
collapseTransition: t.collapseTransition,
|
|
303
303
|
collapseType: t.collapseType
|
|
304
|
-
},
|
|
304
|
+
}, ke(e = t.menus.map((n, l) => k(n, l))) ? e : {
|
|
305
305
|
default: () => [e]
|
|
306
306
|
})), d.bottom ? m("div", {
|
|
307
307
|
class: s.e("bottom")
|
|
308
308
|
}, [d.bottom()]) : t.showCollapse ? m("div", {
|
|
309
309
|
onClick: () => r("update:collapse", !f.value),
|
|
310
310
|
class: [s.e("bottom"), s.e("collapse")]
|
|
311
|
-
}, [m(
|
|
311
|
+
}, [m(ye, {
|
|
312
312
|
style: {
|
|
313
313
|
transform: f.value ? "rotateY(180deg)" : ""
|
|
314
314
|
},
|
|
315
315
|
size: 20,
|
|
316
316
|
icon: "icon-sidebar-collapse"
|
|
317
317
|
}, null)]) : null, d.default?.(), t.dragWidthCfg ? m("div", {
|
|
318
|
-
ref:
|
|
319
|
-
style:
|
|
318
|
+
ref: D,
|
|
319
|
+
style: ne.value,
|
|
320
320
|
class: s.e("drag-bar")
|
|
321
321
|
}, null) : null]);
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
325
|
export {
|
|
326
|
-
|
|
326
|
+
Fe as default
|
|
327
327
|
};
|
|
@@ -2,14 +2,14 @@ import "@vueuse/core";
|
|
|
2
2
|
import { isNumber as m, isClient as p } from "@vft/utils";
|
|
3
3
|
import { debugWarn as l } from "../../utils/error.js";
|
|
4
4
|
import "../../components/config-provider/hooks/use-global-config.js";
|
|
5
|
-
import { getCurrentInstance as i, inject as e, computed as c, unref as
|
|
5
|
+
import { ref as v, getCurrentInstance as i, inject as e, computed as c, unref as Z } from "vue";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../components/form/index.js";
|
|
8
8
|
const s = {
|
|
9
9
|
current: 0
|
|
10
|
-
}, u =
|
|
10
|
+
}, u = v(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
|
|
11
11
|
const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
|
|
12
|
-
const r =
|
|
12
|
+
const r = Z(x);
|
|
13
13
|
return m(r) ? r : f;
|
|
14
14
|
}), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
|
|
15
15
|
return !p && !e(d) && l(
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -62,9 +62,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
62
62
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
63
63
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
64
64
|
readonly effect?: "light" | "dark" | undefined;
|
|
65
|
-
readonly visible?: boolean | null | undefined;
|
|
66
65
|
readonly teleported?: boolean | undefined;
|
|
67
66
|
readonly open?: boolean | undefined;
|
|
67
|
+
readonly visible?: boolean | null | undefined;
|
|
68
68
|
readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
|
|
69
69
|
readonly arrowOffset?: number | undefined;
|
|
70
70
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -480,9 +480,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
480
480
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
481
481
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
482
482
|
readonly effect?: "light" | "dark" | undefined;
|
|
483
|
-
readonly visible?: boolean | null | undefined;
|
|
484
483
|
readonly teleported?: boolean | undefined;
|
|
485
484
|
readonly open?: boolean | undefined;
|
|
485
|
+
readonly visible?: boolean | null | undefined;
|
|
486
486
|
readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
|
|
487
487
|
readonly arrowOffset?: number | undefined;
|
|
488
488
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -85,9 +85,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
85
85
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
86
86
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
87
87
|
readonly effect?: "light" | "dark" | undefined;
|
|
88
|
-
readonly visible?: boolean | null | undefined;
|
|
89
88
|
readonly teleported?: boolean | undefined;
|
|
90
89
|
readonly open?: boolean | undefined;
|
|
90
|
+
readonly visible?: boolean | null | undefined;
|
|
91
91
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
92
92
|
readonly arrowOffset?: number | undefined;
|
|
93
93
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -503,9 +503,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
503
503
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
504
504
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
505
505
|
readonly effect?: "light" | "dark" | undefined;
|
|
506
|
-
readonly visible?: boolean | null | undefined;
|
|
507
506
|
readonly teleported?: boolean | undefined;
|
|
508
507
|
readonly open?: boolean | undefined;
|
|
508
|
+
readonly visible?: boolean | null | undefined;
|
|
509
509
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
510
510
|
readonly arrowOffset?: number | undefined;
|
|
511
511
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -1006,9 +1006,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1006
1006
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1007
1007
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1008
1008
|
readonly effect?: "light" | "dark" | undefined;
|
|
1009
|
-
readonly visible?: boolean | null | undefined;
|
|
1010
1009
|
readonly teleported?: boolean | undefined;
|
|
1011
1010
|
readonly open?: boolean | undefined;
|
|
1011
|
+
readonly visible?: boolean | null | undefined;
|
|
1012
1012
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1013
1013
|
readonly arrowOffset?: number | undefined;
|
|
1014
1014
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -1424,9 +1424,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1424
1424
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1425
1425
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1426
1426
|
readonly effect?: "light" | "dark" | undefined;
|
|
1427
|
-
readonly visible?: boolean | null | undefined;
|
|
1428
1427
|
readonly teleported?: boolean | undefined;
|
|
1429
1428
|
readonly open?: boolean | undefined;
|
|
1429
|
+
readonly visible?: boolean | null | undefined;
|
|
1430
1430
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1431
1431
|
readonly arrowOffset?: number | undefined;
|
|
1432
1432
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -1916,9 +1916,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
1916
1916
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
1917
1917
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
1918
1918
|
readonly effect?: "light" | "dark" | undefined;
|
|
1919
|
-
readonly visible?: boolean | null | undefined;
|
|
1920
1919
|
readonly teleported?: boolean | undefined;
|
|
1921
1920
|
readonly open?: boolean | undefined;
|
|
1921
|
+
readonly visible?: boolean | null | undefined;
|
|
1922
1922
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
1923
1923
|
readonly arrowOffset?: number | undefined;
|
|
1924
1924
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -2334,9 +2334,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
|
|
|
2334
2334
|
readonly placement?: import("@popperjs/core").Placement | undefined;
|
|
2335
2335
|
readonly strategy?: "fixed" | "absolute" | undefined;
|
|
2336
2336
|
readonly effect?: "light" | "dark" | undefined;
|
|
2337
|
-
readonly visible?: boolean | null | undefined;
|
|
2338
2337
|
readonly teleported?: boolean | undefined;
|
|
2339
2338
|
readonly open?: boolean | undefined;
|
|
2339
|
+
readonly visible?: boolean | null | undefined;
|
|
2340
2340
|
readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
|
|
2341
2341
|
readonly arrowOffset?: number | undefined;
|
|
2342
2342
|
readonly gpuAcceleration?: boolean | undefined;
|
|
@@ -24,12 +24,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
24
24
|
autofocus: {
|
|
25
25
|
type: import("vue").PropType<boolean>;
|
|
26
26
|
};
|
|
27
|
-
icon: {
|
|
28
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
29
|
-
};
|
|
30
27
|
dark: {
|
|
31
28
|
type: import("vue").PropType<boolean>;
|
|
32
29
|
};
|
|
30
|
+
icon: {
|
|
31
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
32
|
+
};
|
|
33
33
|
loading: {
|
|
34
34
|
type: import("vue").PropType<boolean>;
|
|
35
35
|
};
|
|
@@ -114,12 +114,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
114
114
|
autofocus: {
|
|
115
115
|
type: import("vue").PropType<boolean>;
|
|
116
116
|
};
|
|
117
|
-
icon: {
|
|
118
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
119
|
-
};
|
|
120
117
|
dark: {
|
|
121
118
|
type: import("vue").PropType<boolean>;
|
|
122
119
|
};
|
|
120
|
+
icon: {
|
|
121
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
122
|
+
};
|
|
123
123
|
loading: {
|
|
124
124
|
type: import("vue").PropType<boolean>;
|
|
125
125
|
};
|
|
@@ -199,12 +199,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
|
|
|
199
199
|
autofocus: {
|
|
200
200
|
type: import("vue").PropType<boolean>;
|
|
201
201
|
};
|
|
202
|
-
icon: {
|
|
203
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
204
|
-
};
|
|
205
202
|
dark: {
|
|
206
203
|
type: import("vue").PropType<boolean>;
|
|
207
204
|
};
|
|
205
|
+
icon: {
|
|
206
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
207
|
+
};
|
|
208
208
|
loading: {
|
|
209
209
|
type: import("vue").PropType<boolean>;
|
|
210
210
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@vft/use"),i=require("@vft/utils"),c=require("../icon-text/index.cjs");require("@vueuse/core");require("../config-provider/hooks/use-global-config.cjs");const a=require("../../utils/ns-cover.cjs");require("lodash-es");require("../form/index.cjs");const p=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const f=e.defineComponent({name:"full-screen"}),d=e.defineComponent({...f,props:{text:{},icon:{},color:{},hoverColor:{},disableIconHover:{type:Boolean},distance:{},reverse:{type:Boolean},size:{},direction:{},pointer:{type:Boolean},adjustOrigin:{type:Boolean},maxLines:{},showTooltip:{type:Boolean},clampTooltipCfg:{},useClamp:{type:Boolean}},setup(n){const t=n,l=p.useNamespace("full-screen"),{toggle:u,isFullscreen:o}=s.useFullscreen(),r=e.ref("");return e.onMounted(()=>{r.value=a.primaryColor().value}),(q,m)=>(e.openBlock(),e.createBlock(e.unref(c.VftIconText),e.mergeProps({class:e.unref(l).b(),distance:2,"hover-color":r.value,onClick:e.unref(u),icon:e.unref(o)?"icon-exit-full-screen":"icon-full-screen",text:e.unref(o)?"退出全屏":"全屏"},e.unref(i.delObjAttrNotExist)(t,!0,!0),{pointer:""}),null,16,["class","hover-color","onClick","icon","text"]))}});exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),R=require("../tabs/index.cjs"),y=require("../icon/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),R=require("../tabs/index.cjs"),y=require("../icon/index.cjs"),F=require("@vueuse/core");require("@vft/utils");const r=require("../../utils/helper.cjs"),q=require("../../utils/ns-cover.cjs");require("lodash-es");require("../form/index.cjs");const z=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const s=require("@vft/router"),h=require("@vft/store"),A=require("@vft/use"),D=require("hotkeys-js"),H=require("vue-router"),W=require("./tab-content.vue2.cjs"),S=require("./use/use-multiple-tabs.cjs");require("../context-menu/context-menu.vue2.cjs");const j=e.defineComponent({name:"vft-multiple-tabs"}),O=e.defineComponent({...j,props:{tabsStyle:{},contextMenuStyle:{},canDrag:{type:Boolean},showNavRight:{type:Boolean,default:!0},fixTabCount:{default:0},fixExtraScrollWidth:{}},setup(c){const x=z.useNamespace("multiple-tabs"),u=e.getCurrentInstance().appContext.config.globalProperties.$router,P=S.initAffixTabs(u),o=h.useMultipleTabStore(),f=e.computed(()=>o.getTabList.filter(t=>!t.meta?.hideTab&&h.isTabPinned(t)).length),k=e.computed(()=>Math.max(c.fixTabCount,f.value)),l=e.ref(s.getRouterKeyPath(e.unref(u.currentRoute))||""),i=e.ref(0),b=e.ref(),{go:p}=s.useRouterHelper(u),v=e.computed(()=>o.getTabList.filter(t=>!t.meta?.hideTab));e.watchEffect(()=>{if(l.value){const t=v.value.findIndex(a=>s.getRouterKeyPath(a)===l.value);t===-1?i.value=v.value?.length-1:i.value=t,i.value=i.value<f.value?f.value-1:i.value}}),F.isClient&&H.onBeforeRouteLeave(()=>{b.value=e.unref(u.currentRoute)}),s.listenerRouteChange(({route:t})=>{if(!t||t.meta?.hasTokenToRoot)return;const{meta:a={}}=t,{currentActivePath:n,hideTab:d}=a,E=d?n:null,g=s.getRouterKeyPath(t);if(g&&l.value!==g&&(l.value=g),E){const C=u.getRoutes().find(K=>K.path===n);C&&o.addTab(C,e.unref(b),i.value,t)}else d||o.addTab(e.unref(t),e.unref(b),i.value)});function V(t){if(l.value===t.paneName)return;const a=v.value[t.attrs.index];l.value=t.paneName;const n=a?.meta?.hideActiveRoute?.fullPath;p(n||a.fullPath||a.path)}function _(t){o.closeTabByKey(t,u)}const{refs:U,setRefs:w}=A.useRefs();function M(t){const a=t.pane.attrs.index,n=t.event;U.value[a].handleContext(n)}const B=e.computed(()=>{const t={padding:"4px 0 0","border-bottom":"none","header-height":r.addUnit(26),"font-size":r.addUnit(13),"item-padding":`0 ${r.addUnit(10)}`,"close-icon-left":r.addUnit(8),"item-distance":"1px","item-max-width":r.addUnit(180),"scroll-padding":`0 ${r.addUnit(20)}`,"header-margin":`0 0 0 ${r.addUnit(10)}`,"item-border-radius":`${r.addUnit(5)} ${r.addUnit(5)} 0 0`,"item-border":"none"};return{...q.generateCssVars(t,"tabs"),...c.tabsStyle}}),{closeCurrent:N}=h.useTabs(),$={...q.generateCssVars({"sub-item-height":r.addUnit(40),"item-min-width":r.addUnit(150)},"menu"),...c.contextMenuStyle},I=()=>{o.toggleFullScreen(o.getTabList[i.value],u)},m=e.ref(!1);let T;const L=()=>{clearInterval(T),m.value=!0,o.refreshPage(0,u,o.getTabList[i.value]),T=setTimeout(()=>{m.value=!1},500)};return e.onMounted(()=>{c.canDrag&&S.useTabsDrag(P),D("command+e, ctrl+e",()=>(N(),!1))}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(x).b()),style:e.normalizeStyle(B.value)},[e.createVNode(e.unref(R.VftTabs),{"show-bar":!1,"fix-tab-count":k.value,"fix-extra-scroll-width":c.fixExtraScrollWidth,modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=n=>l.value=n),onTabClick:V,onTabRemove:_,onTabContextMenu:M},e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(n,d)=>(e.openBlock(),e.createBlock(e.unref(R.VftTabPane),{key:e.unref(s.getRouterKeyPath)(n)+d,closable:!e.unref(h.isTabPinned)(n),index:d,name:e.unref(s.getRouterKeyPath)(n)},{label:e.withCtx(()=>[e.createVNode(W.default,{"context-menu-style":$,"affix-num":f.value,ref_for:!0,ref:e.unref(w)(d),"tab-item":n},null,8,["affix-num","tab-item"])]),_:2},1032,["closable","index","name"]))),128))]),_:2},[c.showNavRight?{name:"navRight",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"nav-right",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(e.unref(x).e("nav-right"))},[e.createVNode(e.unref(y.VftIcon),{rotate:m.value,"rotate-speed":1,onClick:L,icon:"icon-refresh-right",pointer:""},null,8,["rotate"]),e.createVNode(e.unref(y.VftIcon),{onClick:I,icon:e.unref(o).isFullScreen?"icon-collapse":"icon-expand",pointer:""},null,8,["icon"])],2)])]),key:"0"}:void 0]),1032,["fix-tab-count","fix-extra-scroll-width","modelValue"])],6))}});exports.default=O;
|
|
@@ -7,14 +7,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
7
7
|
type: import("vue").PropType<string | number>;
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
|
-
icon: {
|
|
11
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
10
|
teleported: {
|
|
15
11
|
type: import("vue").PropType<boolean>;
|
|
16
12
|
default: boolean;
|
|
17
13
|
};
|
|
14
|
+
icon: {
|
|
15
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
18
|
hideAfter: {
|
|
19
19
|
type: import("vue").PropType<number>;
|
|
20
20
|
default: number;
|
|
@@ -52,8 +52,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
52
52
|
cancel: (val: MouseEvent) => void;
|
|
53
53
|
}, import("vue").PublicProps, {
|
|
54
54
|
width: string | number;
|
|
55
|
-
icon: string | import("vft/es/vft").IconProps;
|
|
56
55
|
teleported: boolean;
|
|
56
|
+
icon: string | import("vft/es/vft").IconProps;
|
|
57
57
|
hideAfter: number;
|
|
58
58
|
persistent: boolean;
|
|
59
59
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -74,14 +74,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
74
74
|
type: import("vue").PropType<string | number>;
|
|
75
75
|
default: number;
|
|
76
76
|
};
|
|
77
|
-
icon: {
|
|
78
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
79
|
-
default: string;
|
|
80
|
-
};
|
|
81
77
|
teleported: {
|
|
82
78
|
type: import("vue").PropType<boolean>;
|
|
83
79
|
default: boolean;
|
|
84
80
|
};
|
|
81
|
+
icon: {
|
|
82
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
85
|
hideAfter: {
|
|
86
86
|
type: import("vue").PropType<number>;
|
|
87
87
|
default: number;
|
|
@@ -116,8 +116,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
116
116
|
onConfirm?: ((val: MouseEvent) => any) | undefined;
|
|
117
117
|
}>, {}, {}, {}, {}, {
|
|
118
118
|
width: string | number;
|
|
119
|
-
icon: string | import("vft/es/vft").IconProps;
|
|
120
119
|
teleported: boolean;
|
|
120
|
+
icon: string | import("vft/es/vft").IconProps;
|
|
121
121
|
hideAfter: number;
|
|
122
122
|
persistent: boolean;
|
|
123
123
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -135,14 +135,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
135
135
|
type: import("vue").PropType<string | number>;
|
|
136
136
|
default: number;
|
|
137
137
|
};
|
|
138
|
-
icon: {
|
|
139
|
-
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
140
|
-
default: string;
|
|
141
|
-
};
|
|
142
138
|
teleported: {
|
|
143
139
|
type: import("vue").PropType<boolean>;
|
|
144
140
|
default: boolean;
|
|
145
141
|
};
|
|
142
|
+
icon: {
|
|
143
|
+
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
144
|
+
default: string;
|
|
145
|
+
};
|
|
146
146
|
hideAfter: {
|
|
147
147
|
type: import("vue").PropType<number>;
|
|
148
148
|
default: number;
|
|
@@ -180,8 +180,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
180
180
|
cancel: (val: MouseEvent) => void;
|
|
181
181
|
}, string, {
|
|
182
182
|
width: string | number;
|
|
183
|
-
icon: string | import("vft/es/vft").IconProps;
|
|
184
183
|
teleported: boolean;
|
|
184
|
+
icon: string | import("vft/es/vft").IconProps;
|
|
185
185
|
hideAfter: number;
|
|
186
186
|
persistent: boolean;
|
|
187
187
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -43,8 +43,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
43
43
|
onConfirm?: ((val: MouseEvent) => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
width: string | number;
|
|
46
|
-
icon: string | IconProps;
|
|
47
46
|
teleported: boolean;
|
|
47
|
+
icon: string | IconProps;
|
|
48
48
|
hideAfter: number;
|
|
49
49
|
persistent: boolean;
|
|
50
50
|
confirmButtonType: ButtonType;
|