vft 0.0.450 → 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 +5 -4
- package/es/components/autocomplete/autocomplete.vue2.js +18 -18
- package/es/components/autocomplete/index.d.ts +6 -6
- 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/button/index.d.ts +9 -9
- package/es/components/carousel/carousel.vue2.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/config-provider/hooks/use-global-config.js +3 -3
- 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.vue.d.ts +1 -1
- package/es/components/input/input.vue2.js +1 -1
- package/es/components/input-number/input-number.vue2.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/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +3 -3
- 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/search/search.vue2.js +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/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/style/index.d.ts +1 -0
- package/es/components/super-form/style/index.js +2 -0
- 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/style/index.js +2 -0
- package/es/components/table/table.vue2.js +40 -34
- 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/package.json.d.ts +1 -1
- package/es/package.json.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 +5 -4
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/autocomplete/index.d.ts +6 -6
- 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/button/index.d.ts +9 -9
- 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.vue.d.ts +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/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +3 -3
- 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/search/search.vue2.cjs +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/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/style/index.cjs +1 -1
- package/lib/components/super-form/style/index.d.ts +1 -0
- 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/style/index.cjs +1 -1
- 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
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as F, ref as u, computed as
|
|
1
|
+
import { defineComponent as F, ref as u, computed as A, createVNode as e, Fragment as E } from "vue";
|
|
2
2
|
import { isArray as Y } from "@vft/utils";
|
|
3
|
-
import { VftDatePicker as
|
|
4
|
-
import { VftDropdown as
|
|
3
|
+
import { VftDatePicker as S } from "../date-picker/index.js";
|
|
4
|
+
import { VftDropdown as q } from "../dropdown/index.js";
|
|
5
5
|
import { VftIcon as k } from "../icon/index.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
8
|
import "lodash-es";
|
|
9
9
|
import "../form/index.js";
|
|
10
|
-
import { useNamespace as
|
|
10
|
+
import { useNamespace as z } 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
14
|
import v from "dayjs";
|
|
15
|
-
const
|
|
15
|
+
const B = F({
|
|
16
16
|
name: "vft-date-time-select"
|
|
17
|
-
}),
|
|
18
|
-
...
|
|
17
|
+
}), oe = /* @__PURE__ */ F({
|
|
18
|
+
...B,
|
|
19
19
|
props: {
|
|
20
20
|
dateList: {
|
|
21
21
|
default: () => []
|
|
@@ -28,67 +28,66 @@ const G = F({
|
|
|
28
28
|
setup(d, {
|
|
29
29
|
emit: x
|
|
30
30
|
}) {
|
|
31
|
-
const
|
|
32
|
-
function M(
|
|
31
|
+
const H = x, o = z("date-time-select"), C = u(!1), g = u(), I = u("请选择时间"), t = u("");
|
|
32
|
+
function M(n) {
|
|
33
33
|
const {
|
|
34
34
|
count: a,
|
|
35
35
|
type: h,
|
|
36
36
|
format: f,
|
|
37
|
-
dateRange:
|
|
37
|
+
dateRange: l = !0,
|
|
38
38
|
startOfType: O,
|
|
39
39
|
endOfType: V
|
|
40
|
-
} =
|
|
40
|
+
} = n;
|
|
41
41
|
let m, r, L;
|
|
42
|
-
const p = f || d.defaultFormat
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
let D, T = A ? "startOf" : "endOf";
|
|
42
|
+
const p = f || d.defaultFormat, s = v().format(p), R = (i, j = !0) => {
|
|
43
|
+
let D;
|
|
44
|
+
const T = j ? "startOf" : "endOf";
|
|
46
45
|
return i === "week" ? D = v().add(a, i)[T](i).add(1, "day").format(p) : D = v().add(a, i)[T](i).format(p), D;
|
|
47
46
|
};
|
|
48
47
|
O && (m = R(O)), V && (r = R(V, !1)), L = v().add(a, h).format(p);
|
|
49
|
-
|
|
50
|
-
return
|
|
48
|
+
const c = m || r || L;
|
|
49
|
+
return l ? m && r ? [c, r] : a > 0 ? [c !== r && r || s, c] : a === 0 ? [m || s, r || s] : [c, c !== r && r || s] : c;
|
|
51
50
|
}
|
|
52
|
-
function N(
|
|
53
|
-
g.value =
|
|
51
|
+
function N(n, a) {
|
|
52
|
+
g.value = n, y.value.handleClose(), t.value = M(a), H("change", t.value);
|
|
54
53
|
}
|
|
55
54
|
function P() {
|
|
56
55
|
t.value = "";
|
|
57
56
|
}
|
|
58
|
-
const w =
|
|
59
|
-
function
|
|
60
|
-
C.value =
|
|
57
|
+
const w = A(() => Y(t.value) && t.value?.length ? `${t.value[0]} - ${t.value[1]}` : t.value), y = u();
|
|
58
|
+
function $(n) {
|
|
59
|
+
C.value = n;
|
|
61
60
|
}
|
|
62
|
-
const
|
|
63
|
-
const
|
|
61
|
+
const b = () => {
|
|
62
|
+
const n = Y(d.dateList[0]) ? d.dateList : [d.dateList];
|
|
64
63
|
return e("div", {
|
|
65
|
-
class:
|
|
66
|
-
}, [e(
|
|
64
|
+
class: o.e("content")
|
|
65
|
+
}, [e(E, null, [n.map((a, h) => e("div", {
|
|
67
66
|
key: h,
|
|
68
|
-
class:
|
|
69
|
-
}, [a.map((f,
|
|
70
|
-
class: [
|
|
71
|
-
onClick: () => N(
|
|
67
|
+
class: o.e("item-container")
|
|
68
|
+
}, [a.map((f, l) => e("div", {
|
|
69
|
+
class: [o.e("item"), o.is("active", g.value === l)],
|
|
70
|
+
onClick: () => N(l, f)
|
|
72
71
|
}, [e("span", {
|
|
73
|
-
key:
|
|
74
|
-
}, [f.text]), g.value ===
|
|
72
|
+
key: l
|
|
73
|
+
}, [f.text]), g.value === l ? e(k, {
|
|
75
74
|
icon: "icon-check"
|
|
76
|
-
}, null) : null])), e(
|
|
75
|
+
}, null) : null])), e(S, {
|
|
77
76
|
type: "daterange",
|
|
78
77
|
"range-separator": "To",
|
|
79
78
|
"start-placeholder": "Start date",
|
|
80
79
|
"end-placeholder": "End date"
|
|
81
80
|
}, null)]))])]);
|
|
82
81
|
};
|
|
83
|
-
return () => e(
|
|
82
|
+
return () => e(q, {
|
|
84
83
|
ref: y,
|
|
85
84
|
trigger: "click",
|
|
86
85
|
teleported: !1,
|
|
87
|
-
class:
|
|
88
|
-
onVisibleChange:
|
|
86
|
+
class: o.b(),
|
|
87
|
+
onVisibleChange: $
|
|
89
88
|
}, {
|
|
90
89
|
default: () => [e("span", {
|
|
91
|
-
class: [
|
|
90
|
+
class: [o.e("trigger"), "cursor-pointer"]
|
|
92
91
|
}, [e("span", {
|
|
93
92
|
class: [w.value ? "text" : "placeholder"]
|
|
94
93
|
}, [w.value || I.value]), t.value ? e(k, {
|
|
@@ -101,10 +100,10 @@ const G = F({
|
|
|
101
100
|
"rotate-180": C.value
|
|
102
101
|
}]
|
|
103
102
|
}, null) : null])],
|
|
104
|
-
dropdown: () =>
|
|
103
|
+
dropdown: () => b()
|
|
105
104
|
});
|
|
106
105
|
}
|
|
107
106
|
});
|
|
108
107
|
export {
|
|
109
|
-
|
|
108
|
+
oe as default
|
|
110
109
|
};
|
|
@@ -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,
|
|
@@ -180,7 +180,7 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
180
180
|
}, De = (t) => {
|
|
181
181
|
N.value = !0, s("mouseenter", t);
|
|
182
182
|
}, de = (t) => {
|
|
183
|
-
|
|
183
|
+
const o = t.key;
|
|
184
184
|
if (t.target.type === "number" && ["e", "+", "-0", "E"].includes(o))
|
|
185
185
|
return t.returnValue = !1, !1;
|
|
186
186
|
s("keydown", t);
|
|
@@ -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,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
|
};
|