@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.1
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/components/avatar/index.esm.js +138 -1526
- package/components/avatar/index.umd.cjs +1 -6
- package/components/button/index.css +1 -1
- package/components/button/index.esm.js +15951 -15410
- package/components/button/index.umd.cjs +27 -27
- package/components/calendar/index.esm.js +269 -255
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +243 -229
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +32 -32
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +473 -456
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2503 -2239
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +1064 -954
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +1 -1
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +3894 -3058
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +91 -77
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +220 -215
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +145 -131
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +336 -329
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1611 -1536
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +219 -219
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/external-container/index.esm.js +179 -178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +285 -221
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -0
- package/components/filter-bar/index.esm.js +1512 -1290
- package/components/filter-bar/index.umd.cjs +7 -7
- package/components/filter-condition-editor/index.esm.js +851 -831
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +520 -501
- package/components/flow-canvas/index.umd.cjs +8 -8
- package/components/image/index.esm.js +101 -79
- package/components/image/index.umd.cjs +3 -3
- package/components/language-textbox/index.esm.js +330 -251
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-nav/index.esm.js +399 -313
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +3 -0
- package/components/locale/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +997 -976
- package/components/lookup/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +725 -705
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +542 -522
- package/components/message-box/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +95 -308
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +115 -107
- package/components/number-range/index.umd.cjs +2 -2
- package/components/order/index.esm.js +56 -54
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +135 -123
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +266 -222
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +402 -375
- package/components/property-panel/index.umd.cjs +4 -4
- package/components/query-solution/index.esm.js +3171 -3061
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1620 -1608
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/scroll-navbar/index.esm.js +150 -136
- package/components/scroll-navbar/index.umd.cjs +2 -2
- package/components/section/index.esm.js +323 -311
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +850 -830
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/step/index.esm.js +991 -224
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +356 -334
- package/components/tabs/index.umd.cjs +1 -1
- package/components/wizard/index.esm.js +159 -162
- package/components/wizard/index.umd.cjs +1 -1
- package/designer/avatar/index.esm.js +1721 -0
- package/designer/avatar/index.umd.cjs +6 -0
- package/designer/button-edit/index.esm.js +2 -1
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +693 -659
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +90 -78
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +203 -203
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.esm.js +181 -167
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +228 -206
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +10014 -9692
- package/designer/farris-designer.all.umd.cjs +18 -18
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +15 -15
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +1719 -0
- package/designer/nav/index.umd.cjs +6 -0
- package/designer/number-spinner/index.esm.js +8 -7
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +133 -125
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/response-toolbar/index.esm.js +864 -863
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +245 -183
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +3667 -2810
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +26 -17
- package/designer/time-picker/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +69 -37
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/wizard/index.esm.js +110 -110
- package/designer/wizard/index.umd.cjs +3 -3
- package/farris.all.esm.js +39993 -39089
- package/farris.all.umd.cjs +36 -36
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +1 -0
- package/locales/filter-bar/ui/zh-CHS.json +1 -0
- package/locales/filter-bar/ui/zh-CHT.json +1 -0
- package/locales/ui/en.json +1 -0
- package/locales/ui/zh-CHS.json +1 -0
- package/locales/ui/zh-CHT.json +1 -0
- package/package.json +1 -1
- package/types/avatar/designer.d.ts +28 -0
- package/types/avatar/index.d.ts +0 -15
- package/types/avatar/src/composition/types.d.ts +3 -0
- package/types/avatar/src/composition/use-file.d.ts +19 -0
- package/types/avatar/src/composition/use-image.d.ts +1 -1
- package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
- package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
- package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
- package/types/components.d.ts +3 -0
- package/types/condition/index.d.ts +18 -6
- package/types/condition/src/condition-fields.component.d.ts +9 -3
- package/types/condition/src/condition-fields.design.component.d.ts +9 -3
- package/types/condition/src/condition-list.component.d.ts +9 -3
- package/types/condition/src/condition.props.d.ts +11 -0
- package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
- package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
- package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
- package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
- package/types/dynamic-view/src/components/maps.d.ts +130 -4
- package/types/filter-bar/src/composition/types.d.ts +2 -0
- package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
- package/types/filter-bar/src/locale/locale.d.ts +2 -1
- package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
- package/types/language-textbox/index.d.ts +65 -2
- package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
- package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
- package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/lookup/src/composition/use-compat.d.ts +28 -0
- package/types/lookup/src/composition/use-state.d.ts +1 -0
- package/types/message-box/src/message-box.service.d.ts +2 -1
- package/types/nav/designer.d.ts +28 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/designer/nav.design.props.d.ts +29 -0
- package/types/nav/src/designer/use-design-rules.d.ts +3 -0
- package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
- package/types/nav/src/schema/schema-mapper.d.ts +4 -0
- package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
- package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
- package/types/section/src/designer/section.design.props.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +39 -0
- package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
- package/types/step/src/designer/use-designer-rules.d.ts +3 -0
- package/types/step/src/designer/use-step-creator.d.ts +6 -0
- package/types/step/src/property-config/step.property-config.d.ts +15 -0
- package/types/step/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +4 -0
- package/types/tabs/src/tabs.props.d.ts +6 -0
- package/types/tooltip/index.d.ts +3 -3
- package/types/tooltip/src/tooltip.component.d.ts +2 -2
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { ref as S, computed as y, watch as R, nextTick as V, reactive as be, createVNode as
|
|
2
|
-
import {
|
|
3
|
-
import xe from "../
|
|
1
|
+
import { ref as S, computed as y, watch as R, nextTick as V, reactive as be, createVNode as c, withDirectives as Z, resolveDirective as pe, onMounted as N, vModelText as he, Fragment as me, defineComponent as ee, shallowRef as E, provide as ge, inject as ye, onUnmounted as Te, isVNode as we } from "vue";
|
|
2
|
+
import { FNotifyService as Ce } from "../notify/index.esm.js";
|
|
3
|
+
import { getCustomClass as Se, isMobilePhone as xe } from "../common/index.esm.js";
|
|
4
|
+
import Be from "../capsule/index.esm.js";
|
|
4
5
|
import { LocaleService as $ } from "../locale/index.esm.js";
|
|
5
|
-
import
|
|
6
|
+
import Ie from "../response-toolbar/index.esm.js";
|
|
6
7
|
import "bignumber.js";
|
|
7
8
|
import "lodash-es";
|
|
8
9
|
import Q from "../section/index.esm.js";
|
|
9
|
-
import { BaseControlProperty as
|
|
10
|
-
const
|
|
10
|
+
import { BaseControlProperty as Pe } from "../property-panel/index.esm.js";
|
|
11
|
+
const Oe = {
|
|
11
12
|
/** 标签页头部区域的展示类型 */
|
|
12
13
|
tabType: { type: String, default: "default" },
|
|
13
14
|
/** 标题自适应宽度 */
|
|
@@ -28,198 +29,217 @@ const Pe = {
|
|
|
28
29
|
fill: { type: Boolean, default: !1 },
|
|
29
30
|
justifyContent: { type: String, default: "left" },
|
|
30
31
|
/** 控制是否可见 */
|
|
31
|
-
visible: { type: Boolean, default: !0 }
|
|
32
|
+
visible: { type: Boolean, default: !0 },
|
|
33
|
+
showHeader: { type: Boolean, default: !0 },
|
|
34
|
+
/** 标签页选中前事件 */
|
|
35
|
+
beforeTabSelect: { type: Function, default: null }
|
|
32
36
|
};
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
function Ze() {
|
|
38
|
+
function e(t, l, r) {
|
|
39
|
+
const s = {};
|
|
40
|
+
return s.beforeTabSelect = (a) => l.call("beforeTabSelect", t, [a, t], r), s;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
resolve: e
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function je(e, t, l) {
|
|
47
|
+
const r = new Ce(), s = S([]), a = S(e.activeId || "");
|
|
48
|
+
let u = "";
|
|
49
|
+
const b = S(!0), f = S([]), v = S(!0), h = S(0), C = y(() => {
|
|
50
|
+
const n = s.value.find((d) => d.props.id === a.value);
|
|
51
|
+
return (n == null ? void 0 : n.props.toolbarPosition) === "inHead";
|
|
39
52
|
});
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
if (d
|
|
43
|
-
if (
|
|
53
|
+
function T(n, o = !0) {
|
|
54
|
+
const d = n.findIndex((g) => g.props.show !== !1 && !g.props.disabled);
|
|
55
|
+
if (d !== -1) {
|
|
56
|
+
if (a.value = n[d].props.id, !o)
|
|
44
57
|
return;
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
f.value = [];
|
|
59
|
+
const g = n[d];
|
|
60
|
+
g && g.props.toolbar && g.props.toolbar.buttons && g.props.toolbar.buttons.length && (f.value = [...g.props.toolbar.buttons], v.value = g.props.toolbarVisible);
|
|
47
61
|
}
|
|
48
62
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
prevId:
|
|
54
|
-
nextId:
|
|
63
|
+
function B(n) {
|
|
64
|
+
a.value = n;
|
|
65
|
+
const o = s.value.find((d) => d.props.id === n);
|
|
66
|
+
f.value = [], o && o.props.toolbar && o.props.toolbar.buttons && o.props.toolbar.buttons.length && (f.value = [...o.props.toolbar.buttons], v.value = o.props.toolbarVisible), t.emit("update:activeId", n), t.emit("tabChange", {
|
|
67
|
+
prevId: u,
|
|
68
|
+
nextId: a.value
|
|
55
69
|
});
|
|
56
70
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
async function O(n) {
|
|
72
|
+
var H;
|
|
73
|
+
let o = -1;
|
|
74
|
+
if (!a.value) {
|
|
75
|
+
if (o = n.findIndex((L) => a.value === L.props.id && L.props.show !== !1 && !L.props.disabled), o > -1)
|
|
61
76
|
return;
|
|
62
|
-
|
|
77
|
+
u = a.value;
|
|
63
78
|
}
|
|
64
|
-
|
|
79
|
+
T(n, !1);
|
|
80
|
+
const d = await ((H = e.beforeTabSelect) == null ? void 0 : H.call(e, {
|
|
81
|
+
prevId: u,
|
|
82
|
+
nextId: a.value
|
|
83
|
+
}));
|
|
84
|
+
(typeof d == "boolean" ? d : (d == null ? void 0 : d.canSelect) ?? !0) ? B(a.value) : (a.value = u, typeof d != "boolean" && d.message && (r == null || r.warning({ message: d.message, position: "top-center" })));
|
|
65
85
|
}
|
|
66
|
-
function
|
|
67
|
-
let
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
|
|
86
|
+
function i(n) {
|
|
87
|
+
let o = !1;
|
|
88
|
+
if (n) {
|
|
89
|
+
const d = s.value.find((g) => g.props.id === n);
|
|
90
|
+
o = !d || d.props.show === !1 || d.props.disabled === !0;
|
|
71
91
|
}
|
|
72
|
-
|
|
92
|
+
o ? O(s.value) : (a.value !== n && (u = a.value, a.value = n), B(a.value));
|
|
73
93
|
}
|
|
74
|
-
R(() => e.activeId, (
|
|
75
|
-
|
|
94
|
+
R(() => e.activeId, (n, o) => {
|
|
95
|
+
n !== o && e.activeId !== a.value && i(n);
|
|
76
96
|
});
|
|
77
|
-
function
|
|
78
|
-
var
|
|
97
|
+
function m(n) {
|
|
98
|
+
var d;
|
|
79
99
|
if (e.autoTitleWidth)
|
|
80
100
|
return;
|
|
81
|
-
const
|
|
82
|
-
if (!(!
|
|
83
|
-
for (let g = 0; g <
|
|
84
|
-
const
|
|
85
|
-
|
|
101
|
+
const o = (d = n.value) == null ? void 0 : d.querySelectorAll(".st-tab-text");
|
|
102
|
+
if (!(!o || e.tabType === "pill"))
|
|
103
|
+
for (let g = 0; g < o.length; g++) {
|
|
104
|
+
const H = o[g].parentNode;
|
|
105
|
+
o[g].scrollWidth > H.offsetWidth ? o[g].classList.contains("farris-title-text-custom") || o[g].classList.add("farris-title-text-custom") : o[g].classList.remove("farris-title-text-custom");
|
|
86
106
|
}
|
|
87
107
|
}
|
|
88
|
-
const
|
|
89
|
-
|
|
108
|
+
const x = (n) => {
|
|
109
|
+
n.preventDefault(), n.stopPropagation();
|
|
90
110
|
};
|
|
91
|
-
function
|
|
92
|
-
const g =
|
|
93
|
-
|
|
94
|
-
|
|
111
|
+
function p(n, o, d = !1) {
|
|
112
|
+
const g = s.value.findIndex((H) => H.props.id === o);
|
|
113
|
+
s.value = s.value.filter((H) => H.props.id !== o), a.value === o && (u = o, a.value = "", T(s.value)), x(n), V(() => {
|
|
114
|
+
h.value++, m(l), d && (b.value = !0), t.emit("tabRemove", {
|
|
95
115
|
removeIndex: g,
|
|
96
|
-
removeId:
|
|
97
|
-
activeId:
|
|
116
|
+
removeId: o,
|
|
117
|
+
activeId: a.value
|
|
98
118
|
});
|
|
99
119
|
});
|
|
100
120
|
}
|
|
101
|
-
function
|
|
102
|
-
|
|
103
|
-
|
|
121
|
+
function P(n, o = !0) {
|
|
122
|
+
a.value === n && (a.value = "", u = n, i("")), V(() => {
|
|
123
|
+
h.value++, o && (b.value = !0);
|
|
104
124
|
});
|
|
105
125
|
}
|
|
106
|
-
let
|
|
107
|
-
function
|
|
108
|
-
|
|
126
|
+
let I;
|
|
127
|
+
function j(n) {
|
|
128
|
+
I = n;
|
|
109
129
|
}
|
|
110
|
-
function
|
|
111
|
-
|
|
130
|
+
function A(n) {
|
|
131
|
+
a.value !== n && (u = a.value, B(n), I && I());
|
|
112
132
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
133
|
+
function M(n) {
|
|
134
|
+
s.value.findIndex((d) => d.props.id === n.props.id) === -1 && s.value.push(n), h.value++;
|
|
115
135
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}),
|
|
120
|
-
|
|
136
|
+
function F(n) {
|
|
137
|
+
s.value.findIndex((d) => d.props.id === n.props.id) !== -1 && (s.value.forEach((d) => {
|
|
138
|
+
d.props.id === n.props.id && (d = n);
|
|
139
|
+
}), n.props.id === a.value && C.value, V(() => {
|
|
140
|
+
h.value++, m(l);
|
|
121
141
|
}));
|
|
122
142
|
}
|
|
123
143
|
return {
|
|
124
|
-
activeId:
|
|
125
|
-
addTab:
|
|
126
|
-
changeTitleStyle:
|
|
127
|
-
removeTab:
|
|
128
|
-
selectTab:
|
|
129
|
-
tabPages:
|
|
130
|
-
updateTab:
|
|
131
|
-
toolbarItems:
|
|
132
|
-
needUpdateNavigationLayout:
|
|
133
|
-
checkActiveIdAndSelect:
|
|
134
|
-
toggleShowTab:
|
|
135
|
-
hasInHeadClass:
|
|
136
|
-
setScrollToSelectedTabFunction:
|
|
144
|
+
activeId: a,
|
|
145
|
+
addTab: M,
|
|
146
|
+
changeTitleStyle: m,
|
|
147
|
+
removeTab: p,
|
|
148
|
+
selectTab: A,
|
|
149
|
+
tabPages: s,
|
|
150
|
+
updateTab: F,
|
|
151
|
+
toolbarItems: f,
|
|
152
|
+
needUpdateNavigationLayout: h,
|
|
153
|
+
checkActiveIdAndSelect: i,
|
|
154
|
+
toggleShowTab: P,
|
|
155
|
+
hasInHeadClass: C,
|
|
156
|
+
setScrollToSelectedTabFunction: j,
|
|
137
157
|
toolbarVisible: v
|
|
138
158
|
};
|
|
139
159
|
}
|
|
140
|
-
function
|
|
160
|
+
function He(e, t, l, r, s) {
|
|
141
161
|
const {
|
|
142
|
-
activeId:
|
|
143
|
-
removeTab:
|
|
144
|
-
selectTab:
|
|
145
|
-
} =
|
|
162
|
+
activeId: a,
|
|
163
|
+
removeTab: u,
|
|
164
|
+
selectTab: b
|
|
165
|
+
} = s, f = y(() => {
|
|
146
166
|
const p = {
|
|
147
167
|
"st-tab-text": !0,
|
|
148
168
|
"text-truncate": e.tabType === "pill" && !e.autoTitleWidth,
|
|
149
169
|
"farris-title-auto": e.autoTitleWidth
|
|
150
170
|
};
|
|
151
|
-
return
|
|
152
|
-
}),
|
|
171
|
+
return Se(p, t.customTitleClass);
|
|
172
|
+
}), v = y(() => ({
|
|
153
173
|
"nav-item": !0,
|
|
154
174
|
"d-none": t.show !== void 0 ? !t.show : !1,
|
|
155
|
-
"f-state-active": t.id ===
|
|
175
|
+
"f-state-active": t.id === a.value,
|
|
156
176
|
"f-state-disabled": t.disabled
|
|
157
177
|
})), h = y(() => ({
|
|
158
178
|
width: `${t.tabWidth}px`
|
|
159
179
|
})), C = y(() => ({
|
|
160
180
|
"nav-link": !0,
|
|
161
181
|
"tabs-text-truncate": !0,
|
|
162
|
-
active: t.id ===
|
|
182
|
+
active: t.id === a.value,
|
|
163
183
|
disabled: t.disabled
|
|
164
184
|
})), T = be({
|
|
165
185
|
content: t.title,
|
|
166
186
|
overflowShown: !0
|
|
167
187
|
});
|
|
168
|
-
function
|
|
169
|
-
return e.tabType !== "pill" && !e.autoTitleWidth ? Z(
|
|
170
|
-
class:
|
|
188
|
+
function B() {
|
|
189
|
+
return e.tabType !== "pill" && !e.autoTitleWidth ? Z(c("span", {
|
|
190
|
+
class: f.value,
|
|
171
191
|
"data-tabid": t.id
|
|
172
|
-
}, [t.title]), [[pe("tooltip"), T]]) :
|
|
173
|
-
class:
|
|
192
|
+
}, [t.title]), [[pe("tooltip"), T]]) : c("span", {
|
|
193
|
+
class: f.value,
|
|
174
194
|
"data-tabid": t.id,
|
|
175
195
|
title: t.title
|
|
176
196
|
}, [t.title]);
|
|
177
197
|
}
|
|
178
|
-
const
|
|
198
|
+
const O = S(t.removeable);
|
|
179
199
|
function i() {
|
|
180
|
-
return
|
|
200
|
+
return O.value ? c("span", {
|
|
181
201
|
class: "st-drop-close",
|
|
182
|
-
onClick: (p) =>
|
|
183
|
-
}, [
|
|
202
|
+
onClick: (p) => u(p, t.id)
|
|
203
|
+
}, [c("i", {
|
|
184
204
|
class: "f-icon f-icon-close"
|
|
185
205
|
}, null)]) : "";
|
|
186
206
|
}
|
|
187
207
|
function m(p) {
|
|
188
|
-
|
|
208
|
+
b(t.id), e.tabType === "one-page" && r.scrollToByPaggId(t.id);
|
|
189
209
|
}
|
|
190
210
|
function x() {
|
|
191
|
-
return l.slots.title ?
|
|
211
|
+
return l.slots.title ? c("a", {
|
|
192
212
|
class: C.value,
|
|
193
213
|
onClick: m,
|
|
194
214
|
id: `${t.id}-design-item`
|
|
195
|
-
}, [l.slots.title(l), i()]) : t.titleRenderFunction ?
|
|
215
|
+
}, [l.slots.title(l), i()]) : t.titleRenderFunction ? c("a", {
|
|
196
216
|
class: C.value,
|
|
197
217
|
onClick: m,
|
|
198
218
|
id: `${t.id}-design-item`
|
|
199
|
-
}, [t.titleRenderFunction(), i()]) :
|
|
219
|
+
}, [t.titleRenderFunction(), i()]) : c("a", {
|
|
200
220
|
class: C.value,
|
|
201
221
|
onClick: m,
|
|
202
222
|
id: `${t.id}-design-item`
|
|
203
|
-
}, [
|
|
223
|
+
}, [B(), i()]);
|
|
204
224
|
}
|
|
205
|
-
return
|
|
206
|
-
class:
|
|
225
|
+
return c("li", {
|
|
226
|
+
class: v.value,
|
|
207
227
|
style: h.value
|
|
208
228
|
}, [x()]);
|
|
209
229
|
}
|
|
210
|
-
function
|
|
230
|
+
function ke(e, t, l, r, s) {
|
|
211
231
|
const {
|
|
212
|
-
shouldShowNavigationButtons:
|
|
232
|
+
shouldShowNavigationButtons: a
|
|
213
233
|
} = l, {
|
|
214
|
-
tabPages:
|
|
215
|
-
} =
|
|
234
|
+
tabPages: u
|
|
235
|
+
} = s, b = y(() => ({
|
|
216
236
|
spacer: !0,
|
|
217
237
|
"f-utils-fill": !0,
|
|
218
|
-
"spacer-sides-dropdown":
|
|
219
|
-
})),
|
|
238
|
+
"spacer-sides-dropdown": a.value
|
|
239
|
+
})), f = y(() => ({
|
|
220
240
|
width: "100%",
|
|
221
241
|
"justify-content": e.justifyContent
|
|
222
|
-
})),
|
|
242
|
+
})), v = y(() => ({
|
|
223
243
|
nav: !0,
|
|
224
244
|
"farris-nav-tabs": !0,
|
|
225
245
|
"flex-nowrap": !0,
|
|
@@ -228,22 +248,22 @@ function He(e, t, l, r, o) {
|
|
|
228
248
|
"flex-row": e.position === "top" || e.position === "bottom",
|
|
229
249
|
"flex-column": e.position === "left" || e.position === "right"
|
|
230
250
|
}));
|
|
231
|
-
return () =>
|
|
232
|
-
class:
|
|
233
|
-
style:
|
|
234
|
-
}, [
|
|
235
|
-
class:
|
|
251
|
+
return () => c("div", {
|
|
252
|
+
class: b.value,
|
|
253
|
+
style: f.value
|
|
254
|
+
}, [c("ul", {
|
|
255
|
+
class: v.value,
|
|
236
256
|
ref: t
|
|
237
|
-
}, [
|
|
257
|
+
}, [u.value.map((h) => He(e, h.props, h, r, s))])]);
|
|
238
258
|
}
|
|
239
|
-
function Me(e, t, l, r,
|
|
240
|
-
const
|
|
241
|
-
shouldShowNavigationButtons:
|
|
259
|
+
function Me(e, t, l, r, s) {
|
|
260
|
+
const a = S(), {
|
|
261
|
+
shouldShowNavigationButtons: u
|
|
242
262
|
} = l, {
|
|
243
|
-
activeId:
|
|
244
|
-
tabPages:
|
|
245
|
-
selectTab:
|
|
246
|
-
} =
|
|
263
|
+
activeId: b,
|
|
264
|
+
tabPages: f,
|
|
265
|
+
selectTab: v
|
|
266
|
+
} = s, h = S(b.value), C = y(() => f.value.map((i) => ({
|
|
247
267
|
name: i.props.title,
|
|
248
268
|
value: i.props.id,
|
|
249
269
|
show: i.props.show,
|
|
@@ -251,70 +271,70 @@ function Me(e, t, l, r, o) {
|
|
|
251
271
|
}))), T = y(() => ({
|
|
252
272
|
spacer: !0,
|
|
253
273
|
"f-utils-fill": !0,
|
|
254
|
-
"spacer-sides-dropdown":
|
|
255
|
-
})),
|
|
274
|
+
"spacer-sides-dropdown": u.value
|
|
275
|
+
})), B = y(() => ({
|
|
256
276
|
width: "100%",
|
|
257
277
|
display: "flex",
|
|
258
278
|
"justify-content": e.justifyContent
|
|
259
279
|
}));
|
|
260
280
|
N(() => {
|
|
261
|
-
|
|
281
|
+
a.value && (t.value = a.value.$el);
|
|
262
282
|
});
|
|
263
|
-
function
|
|
264
|
-
|
|
283
|
+
function O(i) {
|
|
284
|
+
v(i);
|
|
265
285
|
}
|
|
266
|
-
return R(() =>
|
|
286
|
+
return R(() => b.value, (i) => {
|
|
267
287
|
i !== h.value && (h.value = i);
|
|
268
288
|
}, {
|
|
269
289
|
immediate: !0
|
|
270
|
-
}), () =>
|
|
290
|
+
}), () => c("div", {
|
|
271
291
|
class: T.value,
|
|
272
|
-
style:
|
|
273
|
-
}, [
|
|
292
|
+
style: B.value
|
|
293
|
+
}, [c(Be, {
|
|
274
294
|
items: C.value,
|
|
275
295
|
modelValue: h.value,
|
|
276
296
|
"onUpdate:modelValue": (i) => h.value = i,
|
|
277
|
-
onChange:
|
|
278
|
-
ref:
|
|
297
|
+
onChange: O,
|
|
298
|
+
ref: a
|
|
279
299
|
}, null)]);
|
|
280
300
|
}
|
|
281
|
-
function
|
|
282
|
-
const
|
|
283
|
-
activeId:
|
|
284
|
-
removeTab:
|
|
285
|
-
tabPages:
|
|
286
|
-
selectTab:
|
|
301
|
+
function Re(e, t, l, r) {
|
|
302
|
+
const s = S(), {
|
|
303
|
+
activeId: a,
|
|
304
|
+
removeTab: u,
|
|
305
|
+
tabPages: b,
|
|
306
|
+
selectTab: f
|
|
287
307
|
} = r, {
|
|
288
|
-
hideDropDown:
|
|
308
|
+
hideDropDown: v,
|
|
289
309
|
searchTabText: h
|
|
290
310
|
} = t, C = 600;
|
|
291
311
|
let T = null;
|
|
292
|
-
const
|
|
293
|
-
var
|
|
312
|
+
const B = y(() => {
|
|
313
|
+
var o, d;
|
|
294
314
|
let n = [];
|
|
295
|
-
return e.searchBoxVisible ? n = (
|
|
296
|
-
}),
|
|
315
|
+
return e.searchBoxVisible ? n = (o = b.value) == null ? void 0 : o.filter((g) => g.props.title.includes(h.value)) : n = (d = b.value) == null ? void 0 : d.slice(), n;
|
|
316
|
+
}), O = y(() => ({
|
|
297
317
|
"dropdown-menu": !0,
|
|
298
318
|
"tabs-pt28": e.searchBoxVisible,
|
|
299
319
|
// 未看到样式定义
|
|
300
|
-
show: !
|
|
301
|
-
"d-none":
|
|
320
|
+
show: !v.value,
|
|
321
|
+
"d-none": v.value
|
|
302
322
|
}));
|
|
303
323
|
let i;
|
|
304
324
|
function m(n) {
|
|
305
325
|
i = n;
|
|
306
326
|
}
|
|
307
|
-
R(
|
|
327
|
+
R(v, (n) => {
|
|
308
328
|
if (i.value)
|
|
309
329
|
if (n)
|
|
310
|
-
|
|
330
|
+
s.value.style.width = null;
|
|
311
331
|
else {
|
|
312
|
-
const
|
|
313
|
-
|
|
332
|
+
const o = i.value.querySelector(".farris-tabs-header"), d = i.value.clientHeight - o.clientHeight - 20, H = o.querySelector(".farris-tabs-title").clientWidth - 20;
|
|
333
|
+
s.value.style.maxWidth = H + "px", s.value.style.maxHeight = d + "px", V(() => {
|
|
314
334
|
const {
|
|
315
335
|
width: L
|
|
316
|
-
} =
|
|
317
|
-
|
|
336
|
+
} = s.value.getClientRects()[0];
|
|
337
|
+
s.value.style.width = L ? L + "px" : null;
|
|
318
338
|
});
|
|
319
339
|
}
|
|
320
340
|
});
|
|
@@ -324,213 +344,213 @@ function ke(e, t, l, r) {
|
|
|
324
344
|
"text-truncate": !0,
|
|
325
345
|
"px-2": !0,
|
|
326
346
|
disabled: n.props.disabled,
|
|
327
|
-
active: n.props.id ===
|
|
347
|
+
active: n.props.id === a.value,
|
|
328
348
|
"d-none": n.props.show !== !0
|
|
329
349
|
};
|
|
330
350
|
}
|
|
331
351
|
function p(n) {
|
|
332
352
|
n.preventDefault(), n.stopPropagation();
|
|
333
353
|
}
|
|
334
|
-
function
|
|
354
|
+
function P() {
|
|
335
355
|
T && clearTimeout(T);
|
|
336
356
|
}
|
|
337
|
-
function
|
|
338
|
-
|
|
339
|
-
|
|
357
|
+
function I() {
|
|
358
|
+
v.value || (T = setTimeout(() => {
|
|
359
|
+
v.value = !0;
|
|
340
360
|
}, C));
|
|
341
361
|
}
|
|
342
|
-
function j(n,
|
|
343
|
-
n.stopPropagation(),
|
|
362
|
+
function j(n, o) {
|
|
363
|
+
n.stopPropagation(), o.disabled || f(o.id), v.value = !0;
|
|
344
364
|
}
|
|
345
|
-
function A(n,
|
|
346
|
-
n.stopPropagation(),
|
|
365
|
+
function A(n, o) {
|
|
366
|
+
n.stopPropagation(), u(n, o, !0);
|
|
347
367
|
}
|
|
348
368
|
function M(n) {
|
|
349
|
-
return n.slots.title ?
|
|
369
|
+
return n.slots.title ? c("a", {
|
|
350
370
|
class: "dropdown-title",
|
|
351
371
|
id: `${n.props.id}-dropdown-item`
|
|
352
|
-
}, [n.slots.title(n)]) : n.props.titleRenderFunction ?
|
|
372
|
+
}, [n.slots.title(n)]) : n.props.titleRenderFunction ? c("a", {
|
|
353
373
|
class: "dropdown-title",
|
|
354
374
|
id: `${n.props.id}-dropdown-item`
|
|
355
|
-
}, [n.props.titleRenderFunction()]) :
|
|
375
|
+
}, [n.props.titleRenderFunction()]) : c("a", {
|
|
356
376
|
class: "dropdown-title",
|
|
357
377
|
id: `${n.props.id}-dropdown-item`
|
|
358
378
|
}, [n.props.title]);
|
|
359
379
|
}
|
|
360
|
-
function
|
|
361
|
-
return
|
|
362
|
-
ref:
|
|
363
|
-
class:
|
|
364
|
-
onMouseenter: () =>
|
|
365
|
-
onMouseleave: () =>
|
|
366
|
-
}, [e.searchBoxVisible &&
|
|
380
|
+
function F() {
|
|
381
|
+
return c("div", {
|
|
382
|
+
ref: s,
|
|
383
|
+
class: O.value,
|
|
384
|
+
onMouseenter: () => P(),
|
|
385
|
+
onMouseleave: () => I()
|
|
386
|
+
}, [e.searchBoxVisible && c("div", {
|
|
367
387
|
onClick: (n) => p(n),
|
|
368
388
|
class: "pb-1 tabs-li-absolute"
|
|
369
|
-
}, [Z(
|
|
389
|
+
}, [Z(c("input", {
|
|
370
390
|
type: "text",
|
|
371
391
|
class: "form-control",
|
|
372
392
|
"onUpdate:modelValue": (n) => h.value = n
|
|
373
|
-
}, null), [[he, h.value]]),
|
|
393
|
+
}, null), [[he, h.value]]), c("span", {
|
|
374
394
|
class: "f-icon f-icon-page-title-query tabs-icon-search"
|
|
375
|
-
}, null)]),
|
|
395
|
+
}, null)]), B.value.length ? c("ul", {
|
|
376
396
|
class: "tab-dropdown-menu--items flex-fill"
|
|
377
|
-
}, [
|
|
397
|
+
}, [B.value.map((n) => c("li", {
|
|
378
398
|
class: x(n),
|
|
379
|
-
onClick: (
|
|
380
|
-
}, [n.props.removeable && n.props.disabled !== !0 &&
|
|
399
|
+
onClick: (o) => j(o, n.props)
|
|
400
|
+
}, [n.props.removeable && n.props.disabled !== !0 && c("span", {
|
|
381
401
|
class: "float-right st-drop-close",
|
|
382
|
-
onClick: (
|
|
383
|
-
}, [
|
|
402
|
+
onClick: (o) => A(o, n.props.id)
|
|
403
|
+
}, [c("i", {
|
|
384
404
|
class: "f-icon f-icon-close"
|
|
385
|
-
}, null)]), M(n)]))]) :
|
|
405
|
+
}, null)]), M(n)]))]) : c("div", {
|
|
386
406
|
class: "dropdown-no-data"
|
|
387
407
|
}, [$.getLocaleValue("tabs.noData")])]);
|
|
388
408
|
}
|
|
389
409
|
return {
|
|
390
|
-
renderDropdownMenu:
|
|
410
|
+
renderDropdownMenu: F,
|
|
391
411
|
setTabsRef: m
|
|
392
412
|
};
|
|
393
413
|
}
|
|
394
|
-
function
|
|
414
|
+
function Ae(e, t, l, r) {
|
|
395
415
|
const {
|
|
396
|
-
hideDropDown:
|
|
416
|
+
hideDropDown: s
|
|
397
417
|
} = t, {
|
|
398
|
-
renderDropdownMenu:
|
|
399
|
-
setTabsRef:
|
|
400
|
-
} =
|
|
401
|
-
function
|
|
402
|
-
return
|
|
418
|
+
renderDropdownMenu: a,
|
|
419
|
+
setTabsRef: u
|
|
420
|
+
} = Re(e, t, l, r), b = S(e.showDropdown);
|
|
421
|
+
function f() {
|
|
422
|
+
return b.value && c(me, null, [c("button", {
|
|
403
423
|
class: "btn dropdown-toggle-split dropdown-toggle",
|
|
404
424
|
onClick: () => {
|
|
405
|
-
|
|
425
|
+
s.value = !1;
|
|
406
426
|
}
|
|
407
|
-
}, null),
|
|
427
|
+
}, null), a()]);
|
|
408
428
|
}
|
|
409
429
|
return {
|
|
410
|
-
renderMorePagesButtton:
|
|
411
|
-
setTabsRef:
|
|
430
|
+
renderMorePagesButtton: f,
|
|
431
|
+
setTabsRef: u
|
|
412
432
|
};
|
|
413
433
|
}
|
|
414
|
-
function
|
|
415
|
-
const
|
|
434
|
+
function Ve(e, t, l, r) {
|
|
435
|
+
const s = S(!1), { selectTab: a, tabPages: u, needUpdateNavigationLayout: b, activeId: f } = r, v = 4, h = y(() => ({
|
|
416
436
|
btn: !0,
|
|
417
437
|
"sc-nav-btn": !0,
|
|
418
438
|
"px-1": !0,
|
|
419
439
|
"sc-nav-lr": !0,
|
|
420
|
-
"d-none": !
|
|
440
|
+
"d-none": !s.value
|
|
421
441
|
})), C = y(() => ({
|
|
422
442
|
"btn-group": !0,
|
|
423
443
|
"sc-nav-btn": !0,
|
|
424
444
|
dropdown: !0,
|
|
425
|
-
"d-none": !
|
|
445
|
+
"d-none": !s.value
|
|
426
446
|
})), T = y(() => ({
|
|
427
447
|
btn: !0,
|
|
428
448
|
"sc-nav-rg": !0,
|
|
429
|
-
"d-none": !
|
|
449
|
+
"d-none": !s.value
|
|
430
450
|
}));
|
|
431
|
-
function
|
|
451
|
+
function B(p, P) {
|
|
432
452
|
if (!t.value)
|
|
433
453
|
return;
|
|
434
|
-
const
|
|
435
|
-
if (
|
|
454
|
+
const I = t.value.scrollLeft, j = t.value.scrollWidth - t.value.offsetWidth;
|
|
455
|
+
if (P > 0) {
|
|
436
456
|
if (t.value.scrollLeft >= j)
|
|
437
457
|
return;
|
|
438
|
-
t.value.scrollLeft =
|
|
439
|
-
} else if (
|
|
458
|
+
t.value.scrollLeft = I + e.scrollStep + p;
|
|
459
|
+
} else if (P < 0) {
|
|
440
460
|
if (t.value.scrollLeft <= 0)
|
|
441
461
|
return;
|
|
442
|
-
t.value.scrollLeft =
|
|
462
|
+
t.value.scrollLeft = I - e.scrollStep - p;
|
|
443
463
|
}
|
|
444
464
|
}
|
|
445
|
-
function
|
|
446
|
-
if (!
|
|
465
|
+
function O(p = -1) {
|
|
466
|
+
if (!s.value || !t.value)
|
|
447
467
|
return;
|
|
448
|
-
p < 0 && (p =
|
|
449
|
-
const
|
|
468
|
+
p < 0 && (p = u.value.findIndex((M) => M.props.id === f.value));
|
|
469
|
+
const P = e.tabType === "pills" ? ".f-capsule-item" : ".nav-item", I = t.value.querySelectorAll(P), { parentElement: j } = t.value, A = I[p];
|
|
450
470
|
if (A && j) {
|
|
451
|
-
const M = j.getBoundingClientRect().left,
|
|
452
|
-
n < M ?
|
|
471
|
+
const M = j.getBoundingClientRect().left, F = j.getBoundingClientRect().right, n = A.getBoundingClientRect().left, o = A.getBoundingClientRect().right;
|
|
472
|
+
n < M ? B(M - n, -1) : F < o && B(o - F, 1), e.tabType === "one-page" && l.scrollTo(p);
|
|
453
473
|
}
|
|
454
474
|
}
|
|
455
475
|
function i() {
|
|
456
|
-
var
|
|
476
|
+
var I;
|
|
457
477
|
if (!t.value)
|
|
458
478
|
return;
|
|
459
|
-
const p = t.value,
|
|
460
|
-
|
|
461
|
-
|
|
479
|
+
const p = t.value, P = (I = t.value) == null ? void 0 : I.parentElement;
|
|
480
|
+
s.value = P && p && P.offsetWidth < p.scrollWidth - v, s.value && V(() => {
|
|
481
|
+
O();
|
|
462
482
|
});
|
|
463
483
|
}
|
|
464
484
|
function m(p) {
|
|
465
|
-
p.disabled ||
|
|
485
|
+
p.disabled || a(p.id);
|
|
466
486
|
}
|
|
467
487
|
function x() {
|
|
468
488
|
["default", "one-page"].indexOf(e.tabType) > -1 && V(() => {
|
|
469
|
-
|
|
489
|
+
O();
|
|
470
490
|
});
|
|
471
491
|
}
|
|
472
|
-
return R(
|
|
492
|
+
return R(b, () => {
|
|
473
493
|
i();
|
|
474
494
|
}), {
|
|
475
495
|
previousButtonClass: h,
|
|
476
496
|
nextButtonGroupClass: C,
|
|
477
497
|
nextButtonClass: T,
|
|
478
|
-
scrollTab:
|
|
498
|
+
scrollTab: B,
|
|
479
499
|
selectAndScrollToTab: m,
|
|
480
|
-
shouldShowNavigationButtons:
|
|
500
|
+
shouldShowNavigationButtons: s,
|
|
481
501
|
updateNavigationLayout: i,
|
|
482
502
|
scrollToSelectedTab: x
|
|
483
503
|
};
|
|
484
504
|
}
|
|
485
|
-
function
|
|
486
|
-
const { tabPages: l } = t, r = S(""),
|
|
487
|
-
return R(
|
|
488
|
-
|
|
505
|
+
function Fe(e, t) {
|
|
506
|
+
const { tabPages: l } = t, r = S(""), s = S(!0), a = y(() => e.searchBoxVisible), u = y(() => a.value ? l.value.filter((f) => f.props.title.includes(r.value)) : l.value.slice());
|
|
507
|
+
return R(s, (b) => {
|
|
508
|
+
b || (r.value = "");
|
|
489
509
|
}), {
|
|
490
510
|
searchTabText: r,
|
|
491
|
-
hideDropDown:
|
|
492
|
-
shouldShowSearchBox:
|
|
493
|
-
tabsInDropdownMenu:
|
|
511
|
+
hideDropDown: s,
|
|
512
|
+
shouldShowSearchBox: a,
|
|
513
|
+
tabsInDropdownMenu: u
|
|
494
514
|
};
|
|
495
515
|
}
|
|
496
|
-
function
|
|
497
|
-
const r = ".farris-tab-page", { tabPages:
|
|
498
|
-
function
|
|
499
|
-
const
|
|
500
|
-
if (
|
|
501
|
-
const
|
|
502
|
-
if (
|
|
503
|
-
const h =
|
|
504
|
-
|
|
516
|
+
function Le(e, t, l) {
|
|
517
|
+
const r = ".farris-tab-page", { tabPages: s } = l;
|
|
518
|
+
function a(b) {
|
|
519
|
+
const f = t.value;
|
|
520
|
+
if (f) {
|
|
521
|
+
const v = t.value.querySelectorAll(r);
|
|
522
|
+
if (v.length > 0) {
|
|
523
|
+
const h = v[b], { offsetTop: C } = h, T = C - 32 > 0 ? C - 32 : 0;
|
|
524
|
+
f.scrollTop = T;
|
|
505
525
|
}
|
|
506
526
|
}
|
|
507
527
|
}
|
|
508
|
-
function b
|
|
509
|
-
const
|
|
510
|
-
|
|
528
|
+
function u(b) {
|
|
529
|
+
const f = s.value.findIndex((v) => v.props.id === b);
|
|
530
|
+
f > -1 && a(f);
|
|
511
531
|
}
|
|
512
|
-
return { scrollTo:
|
|
532
|
+
return { scrollTo: a, scrollToByPaggId: u };
|
|
513
533
|
}
|
|
514
|
-
const
|
|
515
|
-
function
|
|
534
|
+
const De = ["moz", "ms", "webkit"];
|
|
535
|
+
function We() {
|
|
516
536
|
let e = 0;
|
|
517
537
|
return (t) => {
|
|
518
|
-
const l = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (l - e)),
|
|
538
|
+
const l = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (l - e)), s = setTimeout(() => {
|
|
519
539
|
t(l + r);
|
|
520
540
|
}, r);
|
|
521
|
-
return e = l + r,
|
|
541
|
+
return e = l + r, s;
|
|
522
542
|
};
|
|
523
543
|
}
|
|
524
|
-
function
|
|
544
|
+
function Ee() {
|
|
525
545
|
if (typeof window > "u")
|
|
526
546
|
return () => 0;
|
|
527
547
|
if (window.requestAnimationFrame)
|
|
528
548
|
return window.requestAnimationFrame.bind(window);
|
|
529
|
-
const e =
|
|
530
|
-
return e ? window[`${e}RequestAnimationFrame`] :
|
|
549
|
+
const e = De.filter((t) => `${t}RequestAnimationFrame` in window)[0];
|
|
550
|
+
return e ? window[`${e}RequestAnimationFrame`] : We();
|
|
531
551
|
}
|
|
532
|
-
|
|
533
|
-
function
|
|
552
|
+
Ee();
|
|
553
|
+
function qe() {
|
|
534
554
|
const e = navigator.userAgent || navigator.vendor || window.opera, t = [
|
|
535
555
|
/iPhone/i,
|
|
536
556
|
/iPod/i,
|
|
@@ -550,57 +570,57 @@ function Ee() {
|
|
|
550
570
|
/Kindle/i,
|
|
551
571
|
/Silk/i
|
|
552
572
|
];
|
|
553
|
-
for (const
|
|
554
|
-
if (
|
|
573
|
+
for (const b of l)
|
|
574
|
+
if (b.test(e))
|
|
555
575
|
return !1;
|
|
556
|
-
for (const
|
|
557
|
-
if (
|
|
576
|
+
for (const b of t)
|
|
577
|
+
if (b.test(e))
|
|
558
578
|
return !0;
|
|
559
|
-
const r = "ontouchstart" in window || navigator.maxTouchPoints > 0,
|
|
560
|
-
return !!(r &&
|
|
579
|
+
const r = "ontouchstart" in window || navigator.maxTouchPoints > 0, s = screen.width, a = screen.height, u = Math.min(s, a);
|
|
580
|
+
return !!(r && u <= 768);
|
|
561
581
|
}
|
|
562
582
|
const q = /* @__PURE__ */ ee({
|
|
563
583
|
name: "FTabs",
|
|
564
|
-
props:
|
|
584
|
+
props: Oe,
|
|
565
585
|
emits: ["tabChange", "tabRemove", "update:activeId", "Click"],
|
|
566
586
|
setup(e, t) {
|
|
567
|
-
const l = S(e.tabType), r = E(),
|
|
587
|
+
const l = S(e.tabType), r = E(), s = qe(), a = S(e.customClass), u = E(), b = E(), f = S(), v = je(e, t, u), {
|
|
568
588
|
activeId: h,
|
|
569
589
|
changeTitleStyle: C,
|
|
570
590
|
tabPages: T,
|
|
571
|
-
addTab:
|
|
572
|
-
updateTab:
|
|
591
|
+
addTab: B,
|
|
592
|
+
updateTab: O,
|
|
573
593
|
toolbarItems: i,
|
|
574
594
|
checkActiveIdAndSelect: m,
|
|
575
595
|
toggleShowTab: x,
|
|
576
596
|
hasInHeadClass: p,
|
|
577
|
-
toolbarVisible:
|
|
578
|
-
} =
|
|
597
|
+
toolbarVisible: P
|
|
598
|
+
} = v, I = Le(e, b, v), j = Ve(e, u, I, v), {
|
|
579
599
|
previousButtonClass: A,
|
|
580
600
|
nextButtonClass: M,
|
|
581
|
-
nextButtonGroupClass:
|
|
601
|
+
nextButtonGroupClass: F,
|
|
582
602
|
scrollTab: n,
|
|
583
|
-
updateNavigationLayout:
|
|
584
|
-
scrollToSelectedTab:
|
|
603
|
+
updateNavigationLayout: o,
|
|
604
|
+
scrollToSelectedTab: d
|
|
585
605
|
} = j;
|
|
586
|
-
|
|
587
|
-
const
|
|
606
|
+
v.setScrollToSelectedTabFunction(d);
|
|
607
|
+
const g = Fe(e, v), H = ke(e, u, j, I, v), L = H, te = Me(e, u, j, I, v), U = /* @__PURE__ */ new Map([["default", H], ["one-page", L], ["pills", te]]);
|
|
588
608
|
y(() => {
|
|
589
|
-
const w = T.value.find((
|
|
609
|
+
const w = T.value.find((k) => k.props.id === h.value);
|
|
590
610
|
return w == null ? void 0 : w.slots;
|
|
591
611
|
});
|
|
592
|
-
const W = y(() => e.fill), z = (w,
|
|
593
|
-
t.emit("Click", w,
|
|
612
|
+
const W = y(() => e.fill), z = (w, k) => {
|
|
613
|
+
t.emit("Click", w, k, h.value);
|
|
594
614
|
};
|
|
595
615
|
ge("tabs", {
|
|
596
616
|
activeId: h,
|
|
597
|
-
addTab:
|
|
598
|
-
updateTab:
|
|
617
|
+
addTab: B,
|
|
618
|
+
updateTab: O,
|
|
599
619
|
tabPages: T,
|
|
600
620
|
tabType: l,
|
|
601
621
|
shouldFillParentContaner: W,
|
|
602
622
|
toggleShowTab: x,
|
|
603
|
-
toolbarVisible:
|
|
623
|
+
toolbarVisible: P,
|
|
604
624
|
clickToolbarItemHandler: z
|
|
605
625
|
});
|
|
606
626
|
let G = !1;
|
|
@@ -609,7 +629,8 @@ const q = /* @__PURE__ */ ee({
|
|
|
609
629
|
"farris-tabs-inHead": p.value,
|
|
610
630
|
"farris-tabs-inContent": !p.value,
|
|
611
631
|
"farris-tabs-nav-fill": e.tabType === "fill",
|
|
612
|
-
"farris-tabs-nav-pills": e.tabType === "pills"
|
|
632
|
+
"farris-tabs-nav-pills": e.tabType === "pills",
|
|
633
|
+
"d-none": e.showHeader === !1
|
|
613
634
|
})), le = y(() => {
|
|
614
635
|
const w = {
|
|
615
636
|
width: p.value && e.titleWidth ? `${e.titleWidth}%` : ""
|
|
@@ -625,28 +646,28 @@ const q = /* @__PURE__ */ ee({
|
|
|
625
646
|
"flex-row-reverse": e.position === "right",
|
|
626
647
|
"one-page": e.tabType === "one-page"
|
|
627
648
|
};
|
|
628
|
-
return
|
|
629
|
-
}),
|
|
630
|
-
w.length &&
|
|
649
|
+
return a.value && a.value.split(" ").reduce((k, D) => (k[D] = !0, k), w), w;
|
|
650
|
+
}), se = new ResizeObserver((w) => {
|
|
651
|
+
w.length && o();
|
|
631
652
|
});
|
|
632
653
|
function _() {
|
|
633
|
-
|
|
654
|
+
f.value && !G && (se.observe(f.value), G = !0);
|
|
634
655
|
}
|
|
635
656
|
R(() => e.visible, (w) => {
|
|
636
657
|
V(() => {
|
|
637
|
-
T.value.length && m(e.activeId || T.value[0].props.id),
|
|
658
|
+
T.value.length && m(e.activeId || T.value[0].props.id), o(), C(u), _();
|
|
638
659
|
});
|
|
639
660
|
}), R(() => e.autoTitleWidth, (w) => {
|
|
640
661
|
V(() => {
|
|
641
|
-
|
|
662
|
+
o(), C(u);
|
|
642
663
|
});
|
|
643
664
|
}), N(() => {
|
|
644
665
|
e.visible && (T.value.length && m(e.activeId || T.value[0].props.id), V(() => {
|
|
645
|
-
|
|
666
|
+
o(), C(u);
|
|
646
667
|
}), _());
|
|
647
668
|
});
|
|
648
|
-
function
|
|
649
|
-
return
|
|
669
|
+
function ae() {
|
|
670
|
+
return c("button", {
|
|
650
671
|
title: $.getLocaleValue("tabs.leftButton"),
|
|
651
672
|
type: "button",
|
|
652
673
|
class: A.value,
|
|
@@ -655,8 +676,8 @@ const q = /* @__PURE__ */ ee({
|
|
|
655
676
|
}
|
|
656
677
|
}, null);
|
|
657
678
|
}
|
|
658
|
-
function
|
|
659
|
-
return
|
|
679
|
+
function ie() {
|
|
680
|
+
return c("button", {
|
|
660
681
|
title: $.getLocaleValue("tabs.rightButton"),
|
|
661
682
|
type: "button",
|
|
662
683
|
class: M.value,
|
|
@@ -668,37 +689,37 @@ const q = /* @__PURE__ */ ee({
|
|
|
668
689
|
const {
|
|
669
690
|
renderMorePagesButtton: re,
|
|
670
691
|
setTabsRef: ue
|
|
671
|
-
} =
|
|
692
|
+
} = Ae(e, g, j, v);
|
|
672
693
|
ue(r);
|
|
673
694
|
function ce() {
|
|
674
|
-
return i.value.length ?
|
|
695
|
+
return i.value.length ? c("div", {
|
|
675
696
|
class: {
|
|
676
697
|
"farris-tabs-toolbar": !0,
|
|
677
|
-
"d-none": !
|
|
698
|
+
"d-none": !P.value
|
|
678
699
|
}
|
|
679
|
-
}, [
|
|
700
|
+
}, [c(Ie, {
|
|
680
701
|
class: "f-utils-fill",
|
|
681
702
|
alignment: p.value ? "right" : "left",
|
|
682
703
|
items: i.value,
|
|
683
|
-
visible:
|
|
704
|
+
visible: P.value,
|
|
684
705
|
onClick: z
|
|
685
706
|
}, null)]) : null;
|
|
686
707
|
}
|
|
687
708
|
const K = U.get(e.tabType) || U.get("default");
|
|
688
709
|
function de() {
|
|
689
|
-
var w,
|
|
690
|
-
return
|
|
710
|
+
var w, k, D, J;
|
|
711
|
+
return c("div", {
|
|
691
712
|
class: ne.value
|
|
692
|
-
}, [
|
|
713
|
+
}, [c("div", {
|
|
693
714
|
class: "farris-tabs-header-pre"
|
|
694
|
-
}, [(
|
|
715
|
+
}, [(k = (w = t.slots).headerPrefix) == null ? void 0 : k.call(w)]), c("div", {
|
|
695
716
|
class: "farris-tabs-title scroll-tabs",
|
|
696
717
|
style: le.value,
|
|
697
|
-
ref:
|
|
698
|
-
}, [!
|
|
699
|
-
hidden:
|
|
700
|
-
class:
|
|
701
|
-
}, [
|
|
718
|
+
ref: f
|
|
719
|
+
}, [!s && ae(), K && K(), c("div", {
|
|
720
|
+
hidden: s,
|
|
721
|
+
class: F.value
|
|
722
|
+
}, [ie(), re()])]), ce(), c("div", {
|
|
702
723
|
class: "farris-tabs-header-post"
|
|
703
724
|
}, [(J = (D = t.slots).headerSuffix) == null ? void 0 : J.call(D)])]);
|
|
704
725
|
}
|
|
@@ -707,18 +728,18 @@ const q = /* @__PURE__ */ ee({
|
|
|
707
728
|
"f-utils-fill-flex-column": W.value
|
|
708
729
|
}));
|
|
709
730
|
function ve() {
|
|
710
|
-
var w,
|
|
711
|
-
return
|
|
731
|
+
var w, k;
|
|
732
|
+
return c("div", {
|
|
712
733
|
class: fe.value,
|
|
713
|
-
ref:
|
|
714
|
-
}, [(
|
|
734
|
+
ref: b
|
|
735
|
+
}, [(k = (w = t.slots).default) == null ? void 0 : k.call(w)]);
|
|
715
736
|
}
|
|
716
|
-
return () => e.visible ?
|
|
737
|
+
return () => e.visible ? c("div", {
|
|
717
738
|
class: oe.value,
|
|
718
739
|
ref: r
|
|
719
740
|
}, [de(), ve()]) : null;
|
|
720
741
|
}
|
|
721
|
-
}),
|
|
742
|
+
}), $e = {
|
|
722
743
|
tabWidth: { type: Number },
|
|
723
744
|
id: { type: String, default: "" },
|
|
724
745
|
customTitleClass: { type: String, default: "" },
|
|
@@ -746,22 +767,22 @@ function X(e) {
|
|
|
746
767
|
}
|
|
747
768
|
const Y = /* @__PURE__ */ ee({
|
|
748
769
|
name: "FTabPage",
|
|
749
|
-
props:
|
|
770
|
+
props: $e,
|
|
750
771
|
emits: [],
|
|
751
772
|
setup(e, t) {
|
|
752
773
|
const l = ye("tabs");
|
|
753
|
-
|
|
754
|
-
const r = S(e.show),
|
|
774
|
+
xe();
|
|
775
|
+
const r = S(e.show), s = {
|
|
755
776
|
slots: t.slots,
|
|
756
777
|
props: e
|
|
757
|
-
},
|
|
778
|
+
}, a = S((l == null ? void 0 : l.tabType.value) || "default");
|
|
758
779
|
N(() => {
|
|
759
780
|
const i = l == null ? void 0 : l.tabPages.value.findIndex((m) => m.props.id === e.id);
|
|
760
|
-
(!i || i === -1) && (l == null || l.addTab(
|
|
781
|
+
(!i || i === -1) && (l == null || l.addTab(s));
|
|
761
782
|
}), Te(() => {
|
|
762
783
|
});
|
|
763
|
-
const
|
|
764
|
-
display:
|
|
784
|
+
const u = y(() => (e == null ? void 0 : e.id) === (l == null ? void 0 : l.activeId.value)), b = y(() => ({
|
|
785
|
+
display: u.value ? "" : "none"
|
|
765
786
|
}));
|
|
766
787
|
R(() => e, (i) => {
|
|
767
788
|
l == null || l.updateTab({
|
|
@@ -774,27 +795,27 @@ const Y = /* @__PURE__ */ ee({
|
|
|
774
795
|
}), R(() => e.show, (i) => {
|
|
775
796
|
l == null || l.toggleShowTab(e.id);
|
|
776
797
|
}), R(() => e.toolbarVisible, (i) => {
|
|
777
|
-
|
|
798
|
+
u.value && l && (l.toolbarVisible.value = i);
|
|
778
799
|
});
|
|
779
|
-
function
|
|
800
|
+
function f() {
|
|
780
801
|
var m, x;
|
|
781
802
|
const i = (x = (m = t.slots).default) == null ? void 0 : x.call(m);
|
|
782
|
-
return
|
|
803
|
+
return c(Q, {
|
|
783
804
|
"main-title": e.title,
|
|
784
805
|
class: ["farris-tab-page", r.value ? "" : "f-tab-d-none"]
|
|
785
806
|
}, X(i) ? i : {
|
|
786
807
|
default: () => [i]
|
|
787
808
|
});
|
|
788
809
|
}
|
|
789
|
-
function
|
|
810
|
+
function v(i, m) {
|
|
790
811
|
l && (l.activeId.value = e.id, l.clickToolbarItemHandler && l.clickToolbarItemHandler(i, m));
|
|
791
812
|
}
|
|
792
813
|
function h() {
|
|
793
814
|
var m, x;
|
|
794
815
|
const i = (x = (m = t.slots).default) == null ? void 0 : x.call(m);
|
|
795
|
-
return
|
|
816
|
+
return c(Q, {
|
|
796
817
|
customClass: "section-in-tab is-mobile",
|
|
797
|
-
onClick:
|
|
818
|
+
onClick: v,
|
|
798
819
|
visible: e.show,
|
|
799
820
|
"main-title": e.title,
|
|
800
821
|
buttons: e.toolbar.buttons,
|
|
@@ -809,22 +830,22 @@ const Y = /* @__PURE__ */ ee({
|
|
|
809
830
|
return {
|
|
810
831
|
"farris-tab-page": !0,
|
|
811
832
|
"f-tab-d-none": !r.value,
|
|
812
|
-
"f-tab-active":
|
|
833
|
+
"f-tab-active": u.value && l && ((m = l.shouldFillParentContaner) == null ? void 0 : m.value)
|
|
813
834
|
};
|
|
814
835
|
});
|
|
815
836
|
function T() {
|
|
816
837
|
var m, x;
|
|
817
838
|
const i = (x = (m = t.slots).default) == null ? void 0 : x.call(m);
|
|
818
|
-
return
|
|
839
|
+
return c("div", {
|
|
819
840
|
class: C.value,
|
|
820
|
-
style:
|
|
841
|
+
style: b.value
|
|
821
842
|
}, [i]);
|
|
822
843
|
}
|
|
823
|
-
const
|
|
824
|
-
return () =>
|
|
844
|
+
const O = (/* @__PURE__ */ new Map([["default", T], ["one-page", f], ["mobile", h]])).get(a.value) || T;
|
|
845
|
+
return () => O();
|
|
825
846
|
}
|
|
826
847
|
});
|
|
827
|
-
class
|
|
848
|
+
class et extends Pe {
|
|
828
849
|
constructor(t, l) {
|
|
829
850
|
super(t, l);
|
|
830
851
|
}
|
|
@@ -877,18 +898,18 @@ class Xe extends Ie {
|
|
|
877
898
|
label: "onClick",
|
|
878
899
|
name: "点击事件"
|
|
879
900
|
}
|
|
880
|
-
], r = this,
|
|
901
|
+
], r = this, s = r.eventsEditorUtils.formProperties(t, r.viewModelId, l), a = r.createBaseEventProperty(s);
|
|
881
902
|
this.propertyConfig.categories.eventsEditor = {
|
|
882
903
|
title: "事件",
|
|
883
904
|
hideTitle: !0,
|
|
884
|
-
properties:
|
|
905
|
+
properties: a,
|
|
885
906
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
886
907
|
refreshPanelAfterChanged: !0,
|
|
887
908
|
tabId: "commands",
|
|
888
909
|
tabName: "交互",
|
|
889
|
-
setPropertyRelates(
|
|
890
|
-
const
|
|
891
|
-
delete t[r.viewModelId],
|
|
910
|
+
setPropertyRelates(u, b) {
|
|
911
|
+
const f = u.propertyValue;
|
|
912
|
+
delete t[r.viewModelId], f && (f.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(t, r.viewModelId, f.events, f));
|
|
892
913
|
}
|
|
893
914
|
};
|
|
894
915
|
}
|
|
@@ -899,8 +920,9 @@ q.install = (e) => {
|
|
|
899
920
|
export {
|
|
900
921
|
Y as FTabPage,
|
|
901
922
|
q as FTabs,
|
|
902
|
-
|
|
923
|
+
et as TabToolbarItemProperty,
|
|
924
|
+
Ze as createTabsCallbackResolver,
|
|
903
925
|
q as default,
|
|
904
|
-
|
|
905
|
-
|
|
926
|
+
$e as tabPageProps,
|
|
927
|
+
Oe as tabsProps
|
|
906
928
|
};
|