vft 0.0.451 → 0.0.452
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/affix/affix.vue2.js +1 -1
- package/es/components/alert/alert.vue.d.ts +2 -1
- package/es/components/alert/alert.vue2.js +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +3 -2
- package/es/components/autocomplete/autocomplete.vue2.js +18 -18
- package/es/components/avatar/avatar.vue.d.ts +1 -1
- package/es/components/button/button-group.vue.d.ts +1 -1
- package/es/components/button/button-group.vue2.js +1 -1
- package/es/components/carousel/carousel.vue2.js +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader/cascader.vue2.js +4 -7
- package/es/components/cascader-panel/node.vue2.js +1 -1
- package/es/components/check-tag/check-tag.vue2.js +2 -2
- package/es/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +1 -1
- package/es/components/col/col.vue2.js +6 -6
- package/es/components/color-picker/color-picker.vue.d.ts +1 -1
- package/es/components/color-picker/components/hue-slider.vue.js +4 -4
- package/es/components/color-picker/components/sv-panel.vue.js +4 -4
- package/es/components/context-menu/context-menu.vue.d.ts +1 -1
- package/es/components/context-menu/context-menu.vue2.js +15 -18
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +2 -2
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +1 -1
- package/es/components/date-time-select/date-time-select.vue2.js +38 -39
- package/es/components/dialog/dialog.vue.d.ts +1 -1
- package/es/components/drawer/drawer.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +1 -1
- package/es/components/full-screen/full-screen.vue.d.ts +1 -1
- package/es/components/header-layout/header-layout.vue.d.ts +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +2 -2
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +15 -15
- package/es/components/icon/icon.vue.d.ts +1 -1
- package/es/components/icon-text/icon-text.vue2.js +12 -12
- package/es/components/iframe-layout/iframe-layout.vue.d.ts +1 -1
- package/es/components/image/image.vue2.js +1 -1
- package/es/components/image-viewer/image-viewer.vue2.js +1 -1
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-number/input-number.vue2.js +1 -1
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/link/link.vue2.js +10 -11
- package/es/components/list-cell/list-cell.vue.d.ts +1 -1
- package/es/components/list-cell/list-cell.vue2.js +1 -1
- package/es/components/modal/modal.vue.d.ts +1 -1
- package/es/components/multiple-tabs/multiple-tabs.vue.d.ts +1 -1
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +11 -13
- package/es/components/multiple-tabs/tab-content.vue.d.ts +1 -1
- package/es/components/multiple-tabs/tab-content.vue2.js +7 -8
- package/es/components/overlay/overlay.vue2.js +5 -5
- package/es/components/pagination/components/jumper.vue.d.ts +1 -1
- package/es/components/pagination/components/pager.vue2.js +2 -12
- package/es/components/pagination/pagination.vue2.js +1 -1
- package/es/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/es/components/popper/trigger.vue2.js +13 -13
- package/es/components/progress/index.d.ts +3 -3
- package/es/components/qrcode/qrcode.vue.d.ts +1 -1
- package/es/components/radio/radio-button.vue2.js +4 -4
- package/es/components/radio/radio-group.vue.d.ts +1 -1
- package/es/components/radio/radio.vue2.js +1 -1
- package/es/components/rate/rate.vue2.js +4 -4
- package/es/components/result/result.vue.d.ts +1 -1
- package/es/components/router-view-content/router-view-content.vue.d.ts +1 -1
- package/es/components/router-view-content/router-view-content.vue2.js +2 -3
- package/es/components/scrollbar/scrollbar.vue2.js +16 -16
- package/es/components/skeleton/skeleton-item.vue.d.ts +1 -1
- package/es/components/slider/button.vue.d.ts +1 -1
- package/es/components/slider/button.vue2.js +1 -1
- package/es/components/slider/slider.vue.d.ts +1 -1
- package/es/components/slider/slider.vue2.js +1 -1
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/super-form/super-form.vue2.js +1 -1
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/table/index.d.ts +9 -0
- package/es/components/table/table.vue2.js +36 -32
- package/es/components/table/types.d.ts +1 -0
- package/es/components/tabs/tab-bar.vue.d.ts +1 -1
- package/es/components/tabs/tab-nav.vue.d.ts +1 -1
- package/es/components/tabs/tabs.vue.d.ts +3 -3
- package/es/components/tag/tag.vue.d.ts +1 -1
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +25 -25
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +2 -3
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +2 -3
- package/es/components/time-select/time-select.vue2.js +2 -1
- package/es/components/timeline/timeline-item.vue.d.ts +1 -1
- package/es/components/tooltip/trigger.vue.d.ts +1 -1
- package/es/components/tree/tree-node.vue.js +1 -1
- package/es/components/upload/upload-content.vue2.js +3 -1
- package/es/components/upload/upload.vue2.js +1 -1
- package/es/components/watermark/watermark.vue2.js +2 -2
- 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/es/utils/vue/vnode.js +1 -1
- package/lib/components/affix/affix.vue2.cjs +1 -1
- package/lib/components/alert/alert.vue.d.ts +2 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +3 -2
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue.d.ts +1 -1
- package/lib/components/button/button-group.vue.d.ts +1 -1
- package/lib/components/button/button-group.vue2.cjs +1 -1
- package/lib/components/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/node.vue2.cjs +1 -1
- package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue.d.ts +1 -1
- package/lib/components/color-picker/components/hue-slider.vue.cjs +1 -1
- package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue.d.ts +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue.d.ts +1 -1
- package/lib/components/drawer/drawer.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue.d.ts +1 -1
- package/lib/components/header-layout/header-layout.vue.d.ts +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue.d.ts +2 -2
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue.d.ts +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue.d.ts +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/input-number.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue.d.ts +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue.d.ts +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue.d.ts +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/overlay/overlay.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue.d.ts +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/pagination.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/lib/components/progress/index.d.ts +3 -3
- package/lib/components/qrcode/qrcode.vue.d.ts +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue.d.ts +1 -1
- package/lib/components/radio/radio.vue2.cjs +1 -1
- package/lib/components/rate/rate.vue2.cjs +1 -1
- package/lib/components/result/result.vue.d.ts +1 -1
- package/lib/components/router-view-content/router-view-content.vue.d.ts +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton-item.vue.d.ts +1 -1
- package/lib/components/slider/button.vue.d.ts +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue.d.ts +1 -1
- package/lib/components/slider/slider.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/index.d.ts +9 -0
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/types.d.ts +1 -0
- package/lib/components/tabs/tab-bar.vue.d.ts +1 -1
- package/lib/components/tabs/tab-nav.vue.d.ts +1 -1
- package/lib/components/tabs/tabs.vue.d.ts +3 -3
- package/lib/components/tag/tag.vue.d.ts +1 -1
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/time-select/time-select.vue2.cjs +1 -1
- package/lib/components/timeline/timeline-item.vue.d.ts +1 -1
- package/lib/components/tooltip/trigger.vue.d.ts +1 -1
- package/lib/components/tree/tree-node.vue.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/watermark/watermark.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/web-types.json +1 -1
|
@@ -49,7 +49,7 @@ const be = S({
|
|
|
49
49
|
},
|
|
50
50
|
emits: ["visible-change", "command", "click"],
|
|
51
51
|
setup(e, { expose: z, emit: R }) {
|
|
52
|
-
const
|
|
52
|
+
const d = e, u = R, l = me("dropdown"), L = X(), i = a(), C = a(), m = a(null), f = a(null), V = a(null), p = a(null), k = a(!1), N = [w.enter, w.space, w.down], D = b(() => ({
|
|
53
53
|
maxHeight: se(d.maxHeight)
|
|
54
54
|
})), H = ce().value, v = b(() => d.id || H);
|
|
55
55
|
Z(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IconTextProps } from 'vft/es/components/icon-text';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Partial<IconTextProps>>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Partial<IconTextProps>>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
3
|
export default _default;
|
|
4
4
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { SubMenuProps, MenuProps } from 'vft/es/components/menu';
|
|
2
|
+
import type { MenuAttrMapping, MenuType } from 'vft/es/components/side-menu';
|
|
3
3
|
import { MenuTypeEnum } from './constants';
|
|
4
4
|
export interface HorizontalMenuProps {
|
|
5
5
|
menus: Array<MenuType & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as I, computed as w, getCurrentInstance as F, useSlots as G, ref as K, createVNode as
|
|
1
|
+
import { defineComponent as I, computed as w, getCurrentInstance as F, useSlots as G, ref as K, createVNode as i, mergeProps as O } from "vue";
|
|
2
2
|
import { useRouterHelper as Q } from "@vft/router";
|
|
3
3
|
import { isUrl as W } from "@vft/utils";
|
|
4
4
|
import { VftMenu as X, VftSubMenu as Y, VftMenuItem as Z } from "../menu/index.js";
|
|
@@ -46,7 +46,7 @@ const ne = I({
|
|
|
46
46
|
expose: L,
|
|
47
47
|
emit: N
|
|
48
48
|
}) {
|
|
49
|
-
const b = _("horizontal-menu"),
|
|
49
|
+
const f = N, b = _("horizontal-menu"), V = w(() => (e, o, a) => ({
|
|
50
50
|
"grid-template-rows": `repeat(${Math.min(e?.[o]?.[t.value.children]?.length || 0, Number(a || n.maxRowLength ? a || n.maxRowLength : e?.[o]?.[t.value.children]?.length))}, auto)`
|
|
51
51
|
})), t = w(() => ({
|
|
52
52
|
path: "path",
|
|
@@ -57,12 +57,12 @@ const ne = I({
|
|
|
57
57
|
disabled: "disabled",
|
|
58
58
|
...n.attrMapping
|
|
59
59
|
})), J = F(), m = G(), T = K(), k = J.appContext.config.globalProperties.$router, v = (e, o, a) => {
|
|
60
|
-
const
|
|
61
|
-
return
|
|
60
|
+
const c = e[t.value.path], r = e[t.value.title], l = e?.[t.value.index], M = e?.[t.value.icon], h = !!e?.[t.value.disabled], d = n.disabledJudgeTurnOver ? !h : h, g = l || c || o + r;
|
|
61
|
+
return i(Z, O(e, {
|
|
62
62
|
key: g,
|
|
63
63
|
index: String(g),
|
|
64
64
|
icon: M,
|
|
65
|
-
route:
|
|
65
|
+
route: c,
|
|
66
66
|
title: r,
|
|
67
67
|
disabled: n.openDisabled && d,
|
|
68
68
|
className: a ? "vft-menu-popup-item" : "vft-menu-no-popup-item"
|
|
@@ -80,7 +80,7 @@ const ne = I({
|
|
|
80
80
|
}, D = (e) => {
|
|
81
81
|
f("sub-menu-click", e);
|
|
82
82
|
}, S = (e, o, a) => {
|
|
83
|
-
const
|
|
83
|
+
const c = e[t.value.path], r = e[t.value.title], l = e?.[t.value.children], M = e?.[t.value.index], h = e?.[t.value.icon], d = e?.menuOrder, g = e?.maxRowLength, R = !!e?.[t.value.disabled], $ = n.disabledJudgeTurnOver ? !R : R, A = M || c || o + r, x = e.type === ee.TILE;
|
|
84
84
|
let y = [];
|
|
85
85
|
if (x)
|
|
86
86
|
if (d) {
|
|
@@ -94,7 +94,7 @@ const ne = I({
|
|
|
94
94
|
} else
|
|
95
95
|
for (let u = 0; u < l.length; u++)
|
|
96
96
|
y.push([u]);
|
|
97
|
-
return l?.length || e?.render ?
|
|
97
|
+
return l?.length || e?.render ? i(Y, O(n.subMenuCfg, e, {
|
|
98
98
|
index: String(A),
|
|
99
99
|
key: A,
|
|
100
100
|
icon: h,
|
|
@@ -107,17 +107,17 @@ const ne = I({
|
|
|
107
107
|
teleported: !1,
|
|
108
108
|
"popper-class": [x ? b.e("tile") : "", b.e("normal")]
|
|
109
109
|
}), {
|
|
110
|
-
default: () => [e?.render ? e?.render : x ? y.map((u, p) =>
|
|
110
|
+
default: () => [e?.render ? e?.render : x ? y.map((u, p) => i("div", {
|
|
111
111
|
class: "content-main",
|
|
112
112
|
key: p
|
|
113
113
|
}, [u.map((s, j) => {
|
|
114
114
|
const C = l?.[s]?.[t.value.children], H = l?.[s]?.maxRowLength;
|
|
115
|
-
return l?.length ?
|
|
115
|
+
return l?.length ? i("div", {
|
|
116
116
|
class: "content-col",
|
|
117
117
|
key: j
|
|
118
|
-
}, [
|
|
118
|
+
}, [i("span", {
|
|
119
119
|
class: C?.length ? "title" : ""
|
|
120
|
-
}, [l?.[s]?.[t.value.title]]), C?.length ?
|
|
120
|
+
}, [l?.[s]?.[t.value.title]]), C?.length ? i("div", {
|
|
121
121
|
class: "content",
|
|
122
122
|
style: V.value(l, s, H || g)
|
|
123
123
|
}, [C.map((U, q) => v(U, q, !0))]) : null]) : null;
|
|
@@ -130,9 +130,9 @@ const ne = I({
|
|
|
130
130
|
const {
|
|
131
131
|
go: o
|
|
132
132
|
} = Q(k), a = e.route;
|
|
133
|
-
let
|
|
134
|
-
e.indexPath.some((l) => W(l)) && (
|
|
135
|
-
const r = k.getRoutes().filter((l) => l.path ===
|
|
133
|
+
let c = e.route;
|
|
134
|
+
e.indexPath.some((l) => W(l)) && (c = e.indexPath.slice(-2).join("/"));
|
|
135
|
+
const r = k.getRoutes().filter((l) => l.path === c)?.[0]?.meta?.linkTarget;
|
|
136
136
|
o(r ? {
|
|
137
137
|
url: a,
|
|
138
138
|
winOpenOpt: {
|
|
@@ -145,7 +145,7 @@ const ne = I({
|
|
|
145
145
|
const E = w(() => T.value?.inSubMenu);
|
|
146
146
|
return L({
|
|
147
147
|
isInSubMenu: E
|
|
148
|
-
}), () =>
|
|
148
|
+
}), () => i(X, O(n.menuOptions, {
|
|
149
149
|
ref: T,
|
|
150
150
|
onSelect: P,
|
|
151
151
|
onOpen: z,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IconProps } from './types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
3
|
export default _default;
|
|
4
4
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, computed as o, createElementBlock as f, openBlock as l, normalizeStyle as k, normalizeClass as S, unref as r, createBlock as s, createCommentVNode as y, mergeProps as u, normalizeProps as b, toDisplayString as I } from "vue";
|
|
2
2
|
import { VftClampTooltip as w } from "../clamp-tooltip/index.js";
|
|
3
|
-
import { VftIcon as
|
|
3
|
+
import { VftIcon as h } from "../icon/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { singleAttrToObj as H, removeUnit as L } from "@vft/utils";
|
|
6
|
-
import { addUnit as
|
|
6
|
+
import { addUnit as g } from "../../utils/helper.js";
|
|
7
7
|
import { generateCssVars as O } from "../../utils/ns-cover.js";
|
|
8
8
|
import "lodash-es";
|
|
9
9
|
import "../form/index.js";
|
|
@@ -11,9 +11,9 @@ import { useNamespace as V } from "../../hooks/use-namespace/index.js";
|
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
const j = { key: 2 }, N =
|
|
14
|
+
const j = { key: 2 }, N = C({
|
|
15
15
|
name: "vft-icon-text"
|
|
16
|
-
}), Q = /* @__PURE__ */
|
|
16
|
+
}), Q = /* @__PURE__ */ C({
|
|
17
17
|
...N,
|
|
18
18
|
props: {
|
|
19
19
|
text: {},
|
|
@@ -33,8 +33,8 @@ const j = { key: 2 }, N = g({
|
|
|
33
33
|
useClamp: { type: Boolean }
|
|
34
34
|
},
|
|
35
35
|
setup(e) {
|
|
36
|
-
const m = V("icon-text"), i = o(() => e.hoverColor
|
|
37
|
-
const t =
|
|
36
|
+
const m = V("icon-text"), i = o(() => e.hoverColor || e.color), n = o(() => H(e.icon, "icon", { size: e.size, color: e.color })), v = o(() => e.direction === "col"), d = o(() => {
|
|
37
|
+
const t = g(e.distance);
|
|
38
38
|
return v.value ? e.reverse ? { marginTop: t } : { marginBottom: t } : e.reverse ? { marginLeft: t } : { marginRight: t };
|
|
39
39
|
}), a = o(() => L(e.size)), c = o(() => a.value < 12), x = o(() => a.value && c.value ? { transform: `scale(${a.value / 12})` } : {}), z = o(() => {
|
|
40
40
|
const t = O(
|
|
@@ -42,7 +42,7 @@ const j = { key: 2 }, N = g({
|
|
|
42
42
|
cursor: e.pointer ? "pointer" : void 0,
|
|
43
43
|
color: e.color,
|
|
44
44
|
"hover-color": e.hoverColor ? i.value : void 0,
|
|
45
|
-
fontSize: c.value ? "12px" :
|
|
45
|
+
fontSize: c.value ? "12px" : g(e.size)
|
|
46
46
|
},
|
|
47
47
|
"icon-text"
|
|
48
48
|
);
|
|
@@ -65,15 +65,15 @@ const j = { key: 2 }, N = g({
|
|
|
65
65
|
]),
|
|
66
66
|
style: k(z.value)
|
|
67
67
|
}, [
|
|
68
|
-
!e.reverse && n.value?.icon ? (l(), s(r(
|
|
68
|
+
!e.reverse && n.value?.icon ? (l(), s(r(h), u({ key: 0 }, n.value, {
|
|
69
69
|
"hover-color": e.hoverColor && !e.disableIconHover ? i.value : void 0,
|
|
70
70
|
style: d.value
|
|
71
|
-
}), null, 16, ["hover-color", "style"])) :
|
|
71
|
+
}), null, 16, ["hover-color", "style"])) : y("", !0),
|
|
72
72
|
e.useClamp ? (l(), s(r(w), b(u({ key: 1 }, B.value)), null, 16)) : (l(), f("span", j, I(e.text), 1)),
|
|
73
|
-
e.reverse && n.value?.icon ? (l(), s(r(
|
|
73
|
+
e.reverse && n.value?.icon ? (l(), s(r(h), u({ key: 3 }, n.value, {
|
|
74
74
|
style: d.value,
|
|
75
75
|
"hover-color": e.hoverColor && !e.disableIconHover ? i.value : void 0
|
|
76
|
-
}), null, 16, ["style", "hover-color"])) :
|
|
76
|
+
}), null, 16, ["style", "hover-color"])) : y("", !0)
|
|
77
77
|
], 6));
|
|
78
78
|
}
|
|
79
79
|
});
|
|
@@ -31,7 +31,7 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["load", "error", "switch", "close", "show"],
|
|
33
33
|
setup(e, { expose: $, emit: b }) {
|
|
34
|
-
const i = se("image")
|
|
34
|
+
const c = b, i = se("image");
|
|
35
35
|
let C = "";
|
|
36
36
|
const M = W(), O = te(), w = o(), r = o(!1), n = o(!0), h = o(!1), m = o(), a = o(), H = v && "loading" in HTMLImageElement.prototype;
|
|
37
37
|
let z, p;
|
|
@@ -30,7 +30,7 @@ const ke = ["src"], be = A({
|
|
|
30
30
|
switch: (o) => Z(o)
|
|
31
31
|
},
|
|
32
32
|
setup(o, { expose: P, emit: W }) {
|
|
33
|
-
const s = me("image-viewer"),
|
|
33
|
+
const $ = W, s = me("image-viewer"), { nextZIndex: j } = ve(), C = h(), X = h([]), Y = ne(), k = h(!0), m = h(o.initialIndex), i = h({
|
|
34
34
|
scale: 1,
|
|
35
35
|
deg: 0,
|
|
36
36
|
offsetX: 0,
|
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as he } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
|
|
17
|
+
import { useFormSize as at, useFormDisabled as nt } from "../form/hooks/use-form-common-props.js";
|
|
18
18
|
const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
n.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = et(), { inputId: Y } = tt(we.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = at(), x = nt(), n = ye("input"), Z = ye("textarea"), M = H(), p = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || p.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -46,7 +46,7 @@ const me = L({
|
|
|
46
46
|
[f]: (e) => s(e) || b(e)
|
|
47
47
|
},
|
|
48
48
|
setup(e, { expose: x, emit: j }) {
|
|
49
|
-
const o = re("input-number"),
|
|
49
|
+
const r = j, o = re("input-number"), c = ee(), l = te({
|
|
50
50
|
currentValue: e.modelValue,
|
|
51
51
|
userInput: null
|
|
52
52
|
}), { formItem: T } = oe(), D = d(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as s, getCurrentInstance as k, computed as b, createElementBlock as
|
|
1
|
+
import { defineComponent as s, getCurrentInstance as k, computed as b, createElementBlock as r, openBlock as i, normalizeClass as a, unref as t, createBlock as y, createCommentVNode as c, normalizeProps as C, mergeProps as g, renderSlot as B } from "vue";
|
|
2
2
|
import { VftIcon as v } from "../icon/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import { singleAttrToObj as P } from "@vft/utils";
|
|
@@ -10,10 +10,9 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
12
|
import { useRouterHelper as $ } from "@vft/router";
|
|
13
|
-
import "vue-router";
|
|
14
13
|
const h = s({
|
|
15
14
|
name: "vft-link"
|
|
16
|
-
}),
|
|
15
|
+
}), D = /* @__PURE__ */ s({
|
|
17
16
|
...h,
|
|
18
17
|
props: {
|
|
19
18
|
type: { default: "default" },
|
|
@@ -24,13 +23,13 @@ const h = s({
|
|
|
24
23
|
icon: {}
|
|
25
24
|
},
|
|
26
25
|
emits: ["click"],
|
|
27
|
-
setup(e, { emit:
|
|
28
|
-
const o = R("link"),
|
|
26
|
+
setup(e, { emit: u }) {
|
|
27
|
+
const m = u, o = R("link"), d = k().appContext.config.globalProperties.$router, { go: f } = $(d);
|
|
29
28
|
function p(n) {
|
|
30
|
-
e.route && f(e.route, e.isReplace), e.disabled ||
|
|
29
|
+
e.route && f(e.route, e.isReplace), e.disabled || m("click", n);
|
|
31
30
|
}
|
|
32
|
-
const
|
|
33
|
-
return (n, I) => (i(),
|
|
31
|
+
const l = b(() => P(e.icon, "icon"));
|
|
32
|
+
return (n, I) => (i(), r("span", {
|
|
34
33
|
class: a([
|
|
35
34
|
t(o).b(),
|
|
36
35
|
t(o).m(e.type),
|
|
@@ -39,8 +38,8 @@ const h = s({
|
|
|
39
38
|
]),
|
|
40
39
|
onClick: p
|
|
41
40
|
}, [
|
|
42
|
-
|
|
43
|
-
n.$slots.default ? (i(),
|
|
41
|
+
l.value?.icon ? (i(), y(t(v), C(g({ key: 0 }, l.value)), null, 16)) : c("", !0),
|
|
42
|
+
n.$slots.default ? (i(), r("span", {
|
|
44
43
|
key: 1,
|
|
45
44
|
class: a(t(o).e("inner"))
|
|
46
45
|
}, [
|
|
@@ -50,5 +49,5 @@ const h = s({
|
|
|
50
49
|
}
|
|
51
50
|
});
|
|
52
51
|
export {
|
|
53
|
-
|
|
52
|
+
D as default
|
|
54
53
|
};
|
|
@@ -22,7 +22,7 @@ const j = ["onClick"], A = h({
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["item-click"],
|
|
24
24
|
setup(c, { emit: k }) {
|
|
25
|
-
const n = S("list-cell"),
|
|
25
|
+
const C = k, n = S("list-cell"), u = y(c.activeIndex), I = _(() => H(
|
|
26
26
|
{
|
|
27
27
|
height: v(c.cellHeight),
|
|
28
28
|
"left-text-distance": v(c.leftTextDistance)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MultipleTabsProps } from './types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MultipleTabsProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MultipleTabsProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
3
|
export default _default;
|
|
4
4
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -31,11 +31,11 @@ const ie = P({
|
|
|
31
31
|
fixExtraScrollWidth: {}
|
|
32
32
|
},
|
|
33
33
|
setup(l) {
|
|
34
|
-
const k = J("multiple-tabs"), s = N().appContext.config.globalProperties.$router, c = ne(s),
|
|
34
|
+
const k = J("multiple-tabs"), s = N().appContext.config.globalProperties.$router, c = ne(s), m = X(), i = h(""), r = h(0), b = h(), { go: v } = O(s), f = T(() => m.getTabList.filter((e) => !e.meta?.hideTab));
|
|
35
35
|
z(() => {
|
|
36
36
|
if (i.value) {
|
|
37
|
-
const e =
|
|
38
|
-
e === -1 ? r.value =
|
|
37
|
+
const e = f.value.findIndex((a) => d(a) === i.value);
|
|
38
|
+
e === -1 ? r.value = f.value?.length - 1 : r.value = e, r.value = r.value < c?.length ? c?.length - 1 : r.value;
|
|
39
39
|
}
|
|
40
40
|
}), G && te(() => {
|
|
41
41
|
b.value = n(s.currentRoute);
|
|
@@ -44,26 +44,26 @@ const ie = P({
|
|
|
44
44
|
return;
|
|
45
45
|
const { meta: a = {} } = e, { currentActivePath: t, hideTab: u } = a, I = u ? t : null, x = d(e);
|
|
46
46
|
if (i.value !== x && (i.value = x), I) {
|
|
47
|
-
|
|
48
|
-
g &&
|
|
47
|
+
const g = s.getRoutes().find((L) => L.path === t);
|
|
48
|
+
g && m.addTab(
|
|
49
49
|
g,
|
|
50
50
|
n(b),
|
|
51
51
|
r.value,
|
|
52
52
|
e
|
|
53
53
|
);
|
|
54
54
|
} else
|
|
55
|
-
|
|
55
|
+
m.addTab(n(e), n(b), r.value);
|
|
56
56
|
});
|
|
57
57
|
function _(e) {
|
|
58
58
|
if (i.value === e.paneName)
|
|
59
59
|
return;
|
|
60
|
-
const a =
|
|
60
|
+
const a = f.value[e.attrs.index];
|
|
61
61
|
i.value = e.paneName;
|
|
62
62
|
const t = a?.meta?.hideActiveRoute?.fullPath;
|
|
63
63
|
v(t || a.fullPath || a.path);
|
|
64
64
|
}
|
|
65
65
|
function w(e) {
|
|
66
|
-
|
|
66
|
+
m.closeTabByKey(e, s);
|
|
67
67
|
}
|
|
68
68
|
const { refs: M, setRefs: V } = Z();
|
|
69
69
|
function $(e) {
|
|
@@ -71,7 +71,7 @@ const ie = P({
|
|
|
71
71
|
M.value[a].handleContext(t);
|
|
72
72
|
}
|
|
73
73
|
const B = T(() => {
|
|
74
|
-
|
|
74
|
+
const e = {
|
|
75
75
|
padding: "4px 0 0",
|
|
76
76
|
"border-bottom": "none",
|
|
77
77
|
"header-height": o(26),
|
|
@@ -97,9 +97,7 @@ const ie = P({
|
|
|
97
97
|
...l.contextMenuStyle
|
|
98
98
|
};
|
|
99
99
|
return D(() => {
|
|
100
|
-
l.canDrag && oe(c), ee("command+e, ctrl+e",
|
|
101
|
-
return A(), !1;
|
|
102
|
-
});
|
|
100
|
+
l.canDrag && oe(c), ee("command+e, ctrl+e", () => (A(), !1));
|
|
103
101
|
}), (e, a) => (p(), y("div", {
|
|
104
102
|
class: K(n(k).b()),
|
|
105
103
|
style: H(B.value)
|
|
@@ -115,7 +113,7 @@ const ie = P({
|
|
|
115
113
|
onTabContextMenu: $
|
|
116
114
|
}, {
|
|
117
115
|
default: R(() => [
|
|
118
|
-
(p(!0), y(U, null, W(
|
|
116
|
+
(p(!0), y(U, null, W(f.value, (t, u) => (p(), F(n(q), {
|
|
119
117
|
key: n(d)(t) + u,
|
|
120
118
|
closable: !t.meta?.affix,
|
|
121
119
|
index: u,
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, computed as i, createBlock as f, openBlock as s, unref as x, withModifiers as b } from "vue";
|
|
2
2
|
import { singleAttrToObj as p } from "@vft/utils";
|
|
3
3
|
import "../context-menu/context-menu.vue2.js";
|
|
4
4
|
import "../icon/index.js";
|
|
5
5
|
import { useContextMenu as I } from "../context-menu/useContextMenu.js";
|
|
6
6
|
import { VftIconText as d } from "../icon-text/index.js";
|
|
7
|
-
import "vue-router";
|
|
8
7
|
import "@vft/store";
|
|
9
8
|
import "@vft/use/sortable";
|
|
10
9
|
import { useTabDropdown as v } from "./use/use-tab-dropdown.js";
|
|
11
|
-
const
|
|
10
|
+
const N = /* @__PURE__ */ r({
|
|
12
11
|
__name: "tab-content",
|
|
13
12
|
props: {
|
|
14
13
|
tabItem: {},
|
|
@@ -17,15 +16,15 @@ const S = /* @__PURE__ */ l({
|
|
|
17
16
|
visible: { type: Boolean }
|
|
18
17
|
},
|
|
19
18
|
setup(t, { expose: m }) {
|
|
20
|
-
const [a] = I(), n = i(() => t.tabItem.meta && t.tabItem.meta.title),
|
|
19
|
+
const [a] = I(), n = i(() => t.tabItem.meta && t.tabItem.meta.title), u = i(() => p(t.tabItem.meta?.icon, "icon")), { getDropMenuList: c, handleContextMenu: l } = v(
|
|
21
20
|
t.tabItem,
|
|
22
21
|
t.affixNum
|
|
23
22
|
);
|
|
24
23
|
function o(e) {
|
|
25
|
-
|
|
24
|
+
l(t.tabItem)(e), a({
|
|
26
25
|
event: e,
|
|
27
26
|
styles: t.contextMenuStyle,
|
|
28
|
-
items:
|
|
27
|
+
items: c.value
|
|
29
28
|
});
|
|
30
29
|
}
|
|
31
30
|
return m({
|
|
@@ -33,12 +32,12 @@ const S = /* @__PURE__ */ l({
|
|
|
33
32
|
}), (e, M) => (s(), f(x(d), {
|
|
34
33
|
class: "vft-multiple-tabs__title",
|
|
35
34
|
title: n.value,
|
|
36
|
-
icon:
|
|
35
|
+
icon: u.value,
|
|
37
36
|
text: n.value || "",
|
|
38
37
|
onContextmenu: b(o, ["stop"])
|
|
39
38
|
}, null, 8, ["title", "icon", "text"]));
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
41
|
export {
|
|
43
|
-
|
|
42
|
+
N as default
|
|
44
43
|
};
|
|
@@ -21,7 +21,7 @@ const g = i({
|
|
|
21
21
|
},
|
|
22
22
|
emits: ["click"],
|
|
23
23
|
setup(o, { emit: c }) {
|
|
24
|
-
const m = (t) => {
|
|
24
|
+
const m = c, d = (t) => {
|
|
25
25
|
if (!t)
|
|
26
26
|
return { onClick: u, onMousedown: u, onMouseup: u };
|
|
27
27
|
let s = !1, a = !1;
|
|
@@ -32,15 +32,15 @@ const g = i({
|
|
|
32
32
|
}, onMouseup: (e) => {
|
|
33
33
|
a = e.target === e.currentTarget;
|
|
34
34
|
} };
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
}, { onClick: M, onMousedown: k, onMouseup: v } =
|
|
35
|
+
}, p = C("overlay"), n = y(), f = (t) => {
|
|
36
|
+
m("click", t);
|
|
37
|
+
}, { onClick: M, onMousedown: k, onMouseup: v } = d(
|
|
38
38
|
o.customMaskEvent ? void 0 : f
|
|
39
39
|
);
|
|
40
40
|
return () => o.mask ? x(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
|
-
class: [
|
|
43
|
+
class: [p.b(), o.overlayClass],
|
|
44
44
|
style: {
|
|
45
45
|
zIndex: o.zIndex
|
|
46
46
|
},
|
|
@@ -81,12 +81,7 @@ const O = ["aria-current", "tabindex"], S = ["tabindex"], j = ["aria-current", "
|
|
|
81
81
|
}, " 1 ", 10, O)) : m("", !0),
|
|
82
82
|
C.value ? (r(), c("li", {
|
|
83
83
|
key: 1,
|
|
84
|
-
class: d([
|
|
85
|
-
"more",
|
|
86
|
-
"btn-quickprev",
|
|
87
|
-
u(M).b(),
|
|
88
|
-
u(l).is("disabled", e.disabled)
|
|
89
|
-
]),
|
|
84
|
+
class: d(["more btn-quickprev", [u(M).b(), u(l).is("disabled", e.disabled)]]),
|
|
90
85
|
tabindex: g.value,
|
|
91
86
|
onMouseenter: t[0] || (t[0] = (n) => q(!0)),
|
|
92
87
|
onMouseleave: t[1] || (t[1] = (n) => k.value = !1),
|
|
@@ -112,12 +107,7 @@ const O = ["aria-current", "tabindex"], S = ["tabindex"], j = ["aria-current", "
|
|
|
112
107
|
}, F(n), 11, j))), 128)),
|
|
113
108
|
P.value ? (r(), c("li", {
|
|
114
109
|
key: 2,
|
|
115
|
-
class: d([
|
|
116
|
-
"more",
|
|
117
|
-
"btn-quicknext",
|
|
118
|
-
u(M).b(),
|
|
119
|
-
u(l).is("disabled", e.disabled)
|
|
120
|
-
]),
|
|
110
|
+
class: d(["more btn-quicknext", [u(M).b(), u(l).is("disabled", e.disabled)]]),
|
|
121
111
|
tabindex: g.value,
|
|
122
112
|
onMouseenter: t[4] || (t[4] = (n) => q()),
|
|
123
113
|
onMouseleave: t[5] || (t[5] = (n) => x.value = !1),
|
|
@@ -65,7 +65,7 @@ const D = b({
|
|
|
65
65
|
expose: x,
|
|
66
66
|
emit: k
|
|
67
67
|
}) {
|
|
68
|
-
const u = j("pagination"),
|
|
68
|
+
const o = k, u = j("pagination"), y = E(), g = M().vnode.props || {}, C = "onUpdate:currentPage" in g || "onUpdate:current-page" in g || "onCurrentChange" in g, d = "onUpdate:pageSize" in g || "onUpdate:page-size" in g || "onSizeChange" in g, T = c(() => {
|
|
69
69
|
if (!t(e.total) && !t(e.pageCount) || t(e.currentPage) && !C) return !1;
|
|
70
70
|
if (e.layout.includes("sizes")) {
|
|
71
71
|
if (t(e.pageCount)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ButtonType } from 'vft/es/components/button';
|
|
2
|
+
import type { IconProps } from 'vft/es/components/icon';
|
|
3
3
|
interface Props {
|
|
4
4
|
title?: string;
|
|
5
5
|
confirmButtonText?: string;
|