@farris/ui-vue 1.8.5-beta.3 → 1.8.5-beta.4

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.
Files changed (61) hide show
  1. package/components/batch-editor/index.esm.js +6850 -6840
  2. package/components/batch-editor/index.umd.cjs +20 -20
  3. package/components/button/index.esm.js +6852 -6842
  4. package/components/button/index.umd.cjs +20 -20
  5. package/components/button-edit/index.esm.js +140 -140
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/button-group/index.esm.js +46 -45
  8. package/components/button-group/index.umd.cjs +1 -1
  9. package/components/common/index.esm.js +16 -12
  10. package/components/common/index.umd.cjs +1 -1
  11. package/components/component/index.esm.js +411 -411
  12. package/components/component/index.umd.cjs +2 -2
  13. package/components/data-view/index.esm.js +6500 -6487
  14. package/components/data-view/index.umd.cjs +21 -21
  15. package/components/designer-canvas/index.esm.js +269 -269
  16. package/components/designer-canvas/index.umd.cjs +1 -1
  17. package/components/expression-editor/index.esm.js +458 -458
  18. package/components/expression-editor/index.umd.cjs +2 -2
  19. package/components/filter-condition-editor/index.esm.js +386 -386
  20. package/components/filter-condition-editor/index.umd.cjs +1 -1
  21. package/components/flow-canvas/index.esm.js +1100 -1100
  22. package/components/flow-canvas/index.umd.cjs +7 -7
  23. package/components/mapping-editor/index.esm.js +243 -243
  24. package/components/mapping-editor/index.umd.cjs +2 -2
  25. package/components/message-box/index.esm.js +82 -82
  26. package/components/message-box/index.umd.cjs +1 -1
  27. package/components/modal/index.esm.js +76 -76
  28. package/components/modal/index.umd.cjs +1 -1
  29. package/components/order/index.esm.js +139 -138
  30. package/components/order/index.umd.cjs +1 -1
  31. package/components/query-solution/index.esm.js +891 -891
  32. package/components/query-solution/index.umd.cjs +1 -1
  33. package/components/response-toolbar/index.esm.js +151 -149
  34. package/components/response-toolbar/index.umd.cjs +1 -1
  35. package/components/schema-selector/index.esm.js +947 -941
  36. package/components/schema-selector/index.umd.cjs +6 -6
  37. package/components/section/index.esm.js +121 -121
  38. package/components/section/index.umd.cjs +2 -2
  39. package/components/sort-condition-editor/index.esm.js +539 -539
  40. package/components/sort-condition-editor/index.umd.cjs +1 -1
  41. package/components/tabs/index.esm.js +448 -442
  42. package/components/tabs/index.umd.cjs +1 -1
  43. package/designer/button-edit/index.esm.js +97 -97
  44. package/designer/button-edit/index.umd.cjs +1 -1
  45. package/designer/data-grid/index.esm.js +6483 -6470
  46. package/designer/data-grid/index.umd.cjs +21 -21
  47. package/designer/farris-designer.all.esm.js +1891 -1885
  48. package/designer/farris-designer.all.umd.cjs +14 -14
  49. package/designer/radio-group/index.esm.js +183 -183
  50. package/designer/radio-group/index.umd.cjs +2 -2
  51. package/designer/response-toolbar/index.esm.js +558 -556
  52. package/designer/response-toolbar/index.umd.cjs +1 -1
  53. package/designer/tabs/index.esm.js +416 -416
  54. package/designer/tabs/index.umd.cjs +2 -2
  55. package/farris.all.esm.js +9133 -9119
  56. package/farris.all.umd.cjs +35 -35
  57. package/package.json +1 -1
  58. package/types/common/index.d.ts +1 -0
  59. package/types/common/utils/attrs.d.ts +26 -0
  60. package/types/modal/src/composition/type.d.ts +2 -0
  61. package/types/tabs/src/composition/types.d.ts +2 -0
@@ -1,14 +1,14 @@
1
- import { ref as I, computed as T, watch as A, nextTick as L, reactive as ve, createVNode as v, withDirectives as Z, resolveDirective as be, onMounted as _, vModelText as pe, Fragment as he, defineComponent as ee, shallowRef as N, provide as me, inject as ge, onUnmounted as ye, isVNode as Te } from "vue";
2
- import { FNotifyService as we } from "../notify/index.esm.js";
3
- import { getCustomClass as Ce, isMobilePhone as Se, EVENT_PROPERTY_TAB_IDS as Be } from "../common/index.esm.js";
4
- import Ie from "../capsule/index.esm.js";
5
- import { LocaleService as $ } from "../locale/index.esm.js";
6
- import xe from "../response-toolbar/index.esm.js";
1
+ import { ref as x, computed as T, watch as k, nextTick as F, reactive as pe, createVNode as v, mergeProps as W, withDirectives as te, resolveDirective as he, onMounted as U, vModelText as me, Fragment as ge, defineComponent as ne, shallowRef as q, provide as ye, inject as Te, onUnmounted as we, isVNode as Ce } from "vue";
2
+ import { FNotifyService as Se } from "../notify/index.esm.js";
3
+ import { getCustomClass as Be, extractDataAttrs as Ie, isMobilePhone as xe, EVENT_PROPERTY_TAB_IDS as Oe } from "../common/index.esm.js";
4
+ import Pe from "../capsule/index.esm.js";
5
+ import { LocaleService as _ } from "../locale/index.esm.js";
6
+ import He from "../response-toolbar/index.esm.js";
7
7
  import "bignumber.js";
8
8
  import "lodash-es";
9
- import Y from "../section/index.esm.js";
10
- import { BaseControlProperty as Oe } from "../property-panel/index.esm.js";
11
- const Pe = {
9
+ import J from "../section/index.esm.js";
10
+ import { BaseControlProperty as je } from "../property-panel/index.esm.js";
11
+ const Me = {
12
12
  /**
13
13
  * 标签页显示样式
14
14
  * @default 'default'
@@ -86,161 +86,161 @@ const Pe = {
86
86
  */
87
87
  beforeTabSelect: { type: Function, default: null }
88
88
  };
89
- function Ze() {
90
- function e(t, l, c) {
91
- const i = {};
92
- return i.beforeTabSelect = (o) => l.call("beforeTabSelect", t, [o, t], c), i;
89
+ function nt() {
90
+ function e(t, n, c) {
91
+ const a = {};
92
+ return a.beforeTabSelect = (o) => n.call("beforeTabSelect", t, [o, t], c), a;
93
93
  }
94
94
  return {
95
95
  resolve: e
96
96
  };
97
97
  }
98
- function He(e, t, l) {
99
- const c = new we(), i = I([]), o = I(e.activeId || "");
98
+ function Ae(e, t, n) {
99
+ const c = new Se(), a = x([]), o = x(e.activeId || "");
100
100
  let f = "";
101
- const m = I(!0), d = I([]), h = I(!0), b = I(0), w = T(() => {
102
- const n = i.value.find((r) => r.props.id === o.value);
103
- return (n == null ? void 0 : n.props.toolbarPosition) === "inHead";
101
+ const h = x(!0), d = x([]), p = x(!0), b = x(0), w = T(() => {
102
+ const l = a.value.find((r) => r.props.id === o.value);
103
+ return (l == null ? void 0 : l.props.toolbarPosition) === "inHead";
104
104
  });
105
- let C;
106
- function P(n) {
107
- C = n;
105
+ let S;
106
+ function H(l) {
107
+ S = l;
108
108
  }
109
- function x(n, u = !0) {
110
- const r = n.findIndex((g) => g.props.show !== !1 && !g.props.disabled);
109
+ function O(l, u = !0) {
110
+ const r = l.findIndex((m) => m.props.show !== !1 && !m.props.disabled);
111
111
  if (r !== -1) {
112
- if (o.value = n[r].props.id, !u)
112
+ if (o.value = l[r].props.id, !u)
113
113
  return;
114
114
  d.value = [];
115
- const g = n[r];
116
- g && g.props.toolbar && g.props.toolbar.buttons && g.props.toolbar.buttons.length && (d.value = [...g.props.toolbar.buttons], h.value = g.props.toolbarVisible);
115
+ const m = l[r];
116
+ m && m.props.toolbar && m.props.toolbar.buttons && m.props.toolbar.buttons.length && (d.value = [...m.props.toolbar.buttons], p.value = m.props.toolbarVisible);
117
117
  }
118
118
  }
119
- function s(n) {
120
- o.value = n;
121
- const u = i.value.find((r) => r.props.id === n);
122
- d.value = [], u && u.props.toolbar && u.props.toolbar.buttons && u.props.toolbar.buttons.length && (d.value = [...u.props.toolbar.buttons], h.value = u.props.toolbarVisible), t.emit("update:activeId", n), t.emit("tabChange", {
119
+ function i(l) {
120
+ o.value = l;
121
+ const u = a.value.find((r) => r.props.id === l);
122
+ d.value = [], u && u.props.toolbar && u.props.toolbar.buttons && u.props.toolbar.buttons.length && (d.value = [...u.props.toolbar.buttons], p.value = u.props.toolbarVisible), t.emit("update:activeId", l), t.emit("tabChange", {
123
123
  prevId: f,
124
124
  nextId: o.value
125
125
  });
126
126
  }
127
- async function y(n, u, r, g) {
128
- var D;
129
- const O = await ((D = e.beforeTabSelect) == null ? void 0 : D.call(e, {
130
- prevId: n,
127
+ async function g(l, u, r, m) {
128
+ var L;
129
+ const P = await ((L = e.beforeTabSelect) == null ? void 0 : L.call(e, {
130
+ prevId: l,
131
131
  nextId: u
132
132
  }));
133
- (typeof O == "boolean" ? O : (O == null ? void 0 : O.canSelect) ?? !0) ? r && r() : (g && g(), typeof O != "boolean" && O.message && (c == null || c.warning({ message: O.message, position: "top-center" })));
133
+ (typeof P == "boolean" ? P : (P == null ? void 0 : P.canSelect) ?? !0) ? r && r() : (m && m(), typeof P != "boolean" && P.message && (c == null || c.warning({ message: P.message, position: "top-center" })));
134
134
  }
135
- function B(n) {
135
+ function B(l) {
136
136
  let u = -1;
137
137
  if (!o.value) {
138
- if (u = n.findIndex((r) => o.value === r.props.id && r.props.show !== !1 && !r.props.disabled), u > -1)
138
+ if (u = l.findIndex((r) => o.value === r.props.id && r.props.show !== !1 && !r.props.disabled), u > -1)
139
139
  return;
140
140
  f = o.value;
141
141
  }
142
- x(n, !1), y(f, o.value, () => {
143
- s(o.value), C && C();
142
+ O(l, !1), g(f, o.value, () => {
143
+ i(o.value), S && S();
144
144
  }, () => {
145
145
  o.value = f;
146
146
  });
147
147
  }
148
- function p(n) {
148
+ function y(l) {
149
149
  let u = !1;
150
- if (n) {
151
- const r = i.value.find((g) => g.props.id === n);
150
+ if (l) {
151
+ const r = a.value.find((m) => m.props.id === l);
152
152
  u = !r || r.props.show === !1 || r.props.disabled === !0;
153
153
  }
154
154
  if (u)
155
- B(i.value);
156
- else if (o.value !== n) {
155
+ B(a.value);
156
+ else if (o.value !== l) {
157
157
  const r = o.value;
158
- y(r, n, () => {
159
- f = r, o.value = n, s(o.value), C && C();
158
+ g(r, l, () => {
159
+ f = r, o.value = l, i(o.value), S && S();
160
160
  }, () => {
161
161
  o.value = r, t.emit("update:activeId", r);
162
162
  });
163
163
  } else
164
- s(o.value);
164
+ i(o.value);
165
165
  }
166
- A(() => e.activeId, (n, u) => {
167
- n !== u && e.activeId !== o.value && p(n);
166
+ k(() => e.activeId, (l, u) => {
167
+ l !== u && e.activeId !== o.value && y(l);
168
168
  });
169
- function H(n) {
169
+ function C(l) {
170
170
  var r;
171
171
  if (e.autoTitleWidth)
172
172
  return;
173
- const u = (r = n.value) == null ? void 0 : r.querySelectorAll(".st-tab-text");
173
+ const u = (r = l.value) == null ? void 0 : r.querySelectorAll(".st-tab-text");
174
174
  if (!(!u || e.tabType === "pill"))
175
- for (let g = 0; g < u.length; g++) {
176
- const O = u[g].parentNode;
177
- u[g].scrollWidth > O.offsetWidth ? u[g].classList.contains("farris-title-text-custom") || u[g].classList.add("farris-title-text-custom") : u[g].classList.remove("farris-title-text-custom");
175
+ for (let m = 0; m < u.length; m++) {
176
+ const P = u[m].parentNode;
177
+ u[m].scrollWidth > P.offsetWidth ? u[m].classList.contains("farris-title-text-custom") || u[m].classList.add("farris-title-text-custom") : u[m].classList.remove("farris-title-text-custom");
178
178
  }
179
179
  }
180
- const M = (n) => {
181
- n.preventDefault(), n.stopPropagation();
180
+ const j = (l) => {
181
+ l.preventDefault(), l.stopPropagation();
182
182
  };
183
- function k(n, u, r = !1) {
184
- const g = i.value.findIndex((O) => O.props.id === u);
185
- i.value = i.value.filter((O) => O.props.id !== u), o.value === u && (f = u, o.value = "", x(i.value)), M(n), L(() => {
186
- b.value++, H(l), r && (m.value = !0), t.emit("tabRemove", {
187
- removeIndex: g,
183
+ function A(l, u, r = !1) {
184
+ const m = a.value.findIndex((P) => P.props.id === u);
185
+ a.value = a.value.filter((P) => P.props.id !== u), o.value === u && (f = u, o.value = "", O(a.value)), j(l), F(() => {
186
+ b.value++, C(n), r && (h.value = !0), t.emit("tabRemove", {
187
+ removeIndex: m,
188
188
  removeId: u,
189
189
  activeId: o.value
190
190
  });
191
191
  });
192
192
  }
193
- function V(n, u = !0) {
194
- const r = i.value.find((g) => g.props.id === n);
195
- r && (r.props.show === !1 && o.value === n ? (o.value = "", f = n, p("")) : r.props.show === !0 && !o.value && B(i.value), L(() => {
196
- b.value++, u && (m.value = !0);
193
+ function D(l, u = !0) {
194
+ const r = a.value.find((m) => m.props.id === l);
195
+ r && (r.props.show === !1 && o.value === l ? (o.value = "", f = l, y("")) : r.props.show === !0 && !o.value && B(a.value), F(() => {
196
+ b.value++, u && (h.value = !0);
197
197
  }));
198
198
  }
199
- function R(n) {
200
- o.value !== n && y(f, n, () => {
201
- f = o.value, s(n), C && C();
199
+ function R(l) {
200
+ o.value !== l && g(f, l, () => {
201
+ f = o.value, i(l), S && S();
202
202
  }, null);
203
203
  }
204
- function F(n) {
205
- i.value.findIndex((r) => r.props.id === n.props.id) === -1 && i.value.push(n), b.value++;
204
+ function V(l) {
205
+ a.value.findIndex((r) => r.props.id === l.props.id) === -1 && a.value.push(l), b.value++;
206
206
  }
207
- function a(n) {
208
- i.value.findIndex((r) => r.props.id === n.props.id) !== -1 && (i.value.forEach((r) => {
209
- r.props.id === n.props.id && (r = n);
210
- }), n.props.id === o.value && w.value, L(() => {
211
- b.value++, H(l);
207
+ function s(l) {
208
+ a.value.findIndex((r) => r.props.id === l.props.id) !== -1 && (a.value.forEach((r) => {
209
+ r.props.id === l.props.id && (r = l);
210
+ }), l.props.id === o.value && w.value, F(() => {
211
+ b.value++, C(n);
212
212
  }));
213
213
  }
214
214
  return {
215
215
  activeId: o,
216
- addTab: F,
217
- changeTitleStyle: H,
218
- removeTab: k,
216
+ addTab: V,
217
+ changeTitleStyle: C,
218
+ removeTab: A,
219
219
  selectTab: R,
220
- tabPages: i,
221
- updateTab: a,
220
+ tabPages: a,
221
+ updateTab: s,
222
222
  toolbarItems: d,
223
223
  needUpdateNavigationLayout: b,
224
- checkActiveIdAndSelect: p,
225
- toggleShowTab: V,
224
+ checkActiveIdAndSelect: y,
225
+ toggleShowTab: D,
226
226
  hasInHeadClass: w,
227
- setScrollToSelectedTabFunction: P,
228
- toolbarVisible: h
227
+ setScrollToSelectedTabFunction: H,
228
+ toolbarVisible: p
229
229
  };
230
230
  }
231
- function Me(e, t, l, c, i) {
231
+ function Re(e, t, n, c, a) {
232
232
  const {
233
233
  activeId: o,
234
234
  removeTab: f,
235
- selectTab: m
236
- } = i, d = T(() => {
237
- const p = {
235
+ selectTab: h
236
+ } = a, d = T(() => {
237
+ const C = {
238
238
  "st-tab-text": !0,
239
239
  "text-truncate": e.tabType === "pill" && !e.autoTitleWidth,
240
240
  "farris-title-auto": e.autoTitleWidth
241
241
  };
242
- return Ce(p, t.customTitleClass);
243
- }), h = T(() => ({
242
+ return Be(C, t.customTitleClass);
243
+ }), p = T(() => ({
244
244
  "nav-item": !0,
245
245
  "d-none": t.show !== void 0 ? !t.show : !1,
246
246
  "f-state-active": t.id === o.value,
@@ -252,65 +252,66 @@ function Me(e, t, l, c, i) {
252
252
  "tabs-text-truncate": !0,
253
253
  active: t.id === o.value,
254
254
  disabled: t.disabled
255
- })), C = ve({
255
+ })), S = pe({
256
256
  content: t.title,
257
257
  overflowShown: !0
258
258
  });
259
- function P() {
260
- return e.tabType !== "pill" && !e.autoTitleWidth ? Z(v("span", {
259
+ function H() {
260
+ return e.tabType !== "pill" && !e.autoTitleWidth ? te(v("span", {
261
261
  class: d.value,
262
262
  "data-tabid": t.id
263
- }, [t.title]), [[be("tooltip"), C]]) : v("span", {
263
+ }, [t.title]), [[he("tooltip"), S]]) : v("span", {
264
264
  class: d.value,
265
265
  "data-tabid": t.id,
266
266
  title: t.title
267
267
  }, [t.title]);
268
268
  }
269
- const x = I(t.removeable);
270
- function s() {
271
- return x.value ? v("span", {
269
+ const O = x(t.removeable);
270
+ function i() {
271
+ return O.value ? v("span", {
272
272
  class: "st-drop-close",
273
- onClick: (p) => f(p, t.id)
273
+ onClick: (C) => f(C, t.id)
274
274
  }, [v("i", {
275
275
  class: "f-icon f-icon-close"
276
276
  }, null)]) : "";
277
277
  }
278
- function y(p) {
279
- m(t.id), e.tabType === "one-page" && c.scrollToByPaggId(t.id);
278
+ function g(C) {
279
+ h(t.id), e.tabType === "one-page" && c.scrollToByPaggId(t.id);
280
280
  }
281
- function B() {
282
- return l.slots.title ? v("a", {
281
+ const B = Ie(n.attrs);
282
+ function y() {
283
+ return n.slots.title ? v("a", W(B, {
283
284
  class: w.value,
284
- onClick: y,
285
+ onClick: g,
285
286
  id: `${t.id}-tab-title`
286
- }, [l.slots.title(l), s()]) : t.titleRenderFunction ? v("a", {
287
+ }), [n.slots.title(n), i()]) : t.titleRenderFunction ? v("a", W(B, {
287
288
  class: w.value,
288
- onClick: y,
289
+ onClick: g,
289
290
  id: `${t.id}-tab-title`
290
- }, [t.titleRenderFunction(), s()]) : v("a", {
291
+ }), [t.titleRenderFunction(), i()]) : v("a", W(B, {
291
292
  class: w.value,
292
- onClick: y,
293
+ onClick: g,
293
294
  id: `${t.id}-tab-title`
294
- }, [P(), s()]);
295
+ }), [H(), i()]);
295
296
  }
296
297
  return v("li", {
297
- class: h.value,
298
+ class: p.value,
298
299
  style: b.value
299
- }, [B()]);
300
+ }, [y()]);
300
301
  }
301
- function je(e, t, l, c, i) {
302
+ function ke(e, t, n, c, a) {
302
303
  const {
303
304
  shouldShowNavigationButtons: o
304
- } = l, {
305
+ } = n, {
305
306
  tabPages: f
306
- } = i, m = T(() => ({
307
+ } = a, h = T(() => ({
307
308
  spacer: !0,
308
309
  "f-utils-fill": !0,
309
310
  "spacer-sides-dropdown": o.value
310
311
  })), d = T(() => ({
311
312
  width: "100%",
312
313
  "justify-content": e.justifyContent
313
- })), h = T(() => ({
314
+ })), p = T(() => ({
314
315
  nav: !0,
315
316
  "farris-nav-tabs": !0,
316
317
  "flex-nowrap": !0,
@@ -320,180 +321,180 @@ function je(e, t, l, c, i) {
320
321
  "flex-column": e.position === "left" || e.position === "right"
321
322
  }));
322
323
  return () => v("div", {
323
- class: m.value,
324
+ class: h.value,
324
325
  style: d.value
325
326
  }, [v("ul", {
326
- class: h.value,
327
+ class: p.value,
327
328
  ref: t
328
- }, [f.value.map((b) => Me(e, b.props, b, c, i))])]);
329
+ }, [f.value.map((b) => Re(e, b.props, b, c, a))])]);
329
330
  }
330
- function ke(e, t, l, c, i) {
331
- const o = I(), {
331
+ function De(e, t, n, c, a) {
332
+ const o = x(), {
332
333
  shouldShowNavigationButtons: f
333
- } = l, {
334
- activeId: m,
334
+ } = n, {
335
+ activeId: h,
335
336
  tabPages: d,
336
- selectTab: h
337
- } = i, b = I(m.value), w = T(() => d.value.map((s) => ({
338
- name: s.props.title,
339
- value: s.props.id,
340
- show: s.props.show,
341
- disabled: s.props.disabled
342
- }))), C = T(() => ({
337
+ selectTab: p
338
+ } = a, b = x(h.value), w = T(() => d.value.map((i) => ({
339
+ name: i.props.title,
340
+ value: i.props.id,
341
+ show: i.props.show,
342
+ disabled: i.props.disabled
343
+ }))), S = T(() => ({
343
344
  spacer: !0,
344
345
  "f-utils-fill": !0,
345
346
  "spacer-sides-dropdown": f.value
346
- })), P = T(() => ({
347
+ })), H = T(() => ({
347
348
  width: "100%",
348
349
  display: "flex",
349
350
  "justify-content": e.justifyContent
350
351
  }));
351
- _(() => {
352
+ U(() => {
352
353
  o.value && (t.value = o.value.$el);
353
354
  });
354
- function x(s) {
355
- h(s);
355
+ function O(i) {
356
+ p(i);
356
357
  }
357
- return A(() => m.value, (s) => {
358
- s !== b.value && (b.value = s);
358
+ return k(() => h.value, (i) => {
359
+ i !== b.value && (b.value = i);
359
360
  }, {
360
361
  immediate: !0
361
362
  }), () => v("div", {
362
- class: C.value,
363
- style: P.value
364
- }, [v(Ie, {
363
+ class: S.value,
364
+ style: H.value
365
+ }, [v(Pe, {
365
366
  items: w.value,
366
367
  modelValue: b.value,
367
- "onUpdate:modelValue": (s) => b.value = s,
368
- onChange: x,
368
+ "onUpdate:modelValue": (i) => b.value = i,
369
+ onChange: O,
369
370
  ref: o
370
371
  }, null)]);
371
372
  }
372
- function Re(e, t, l, c) {
373
- const i = I(), {
373
+ function Ve(e, t, n, c) {
374
+ const a = x(), {
374
375
  activeId: o,
375
376
  removeTab: f,
376
- tabPages: m,
377
+ tabPages: h,
377
378
  selectTab: d
378
379
  } = c, {
379
- hideDropDown: h,
380
+ hideDropDown: p,
380
381
  searchTabText: b
381
382
  } = t, w = 600;
382
- let C = null;
383
- const P = T(() => {
384
- var n, u;
385
- let a = [];
386
- return e.searchBoxVisible ? a = (n = m.value) == null ? void 0 : n.filter((r) => r.props.title.includes(b.value)) : a = (u = m.value) == null ? void 0 : u.slice(), a;
387
- }), x = T(() => ({
383
+ let S = null;
384
+ const H = T(() => {
385
+ var l, u;
386
+ let s = [];
387
+ return e.searchBoxVisible ? s = (l = h.value) == null ? void 0 : l.filter((r) => r.props.title.includes(b.value)) : s = (u = h.value) == null ? void 0 : u.slice(), s;
388
+ }), O = T(() => ({
388
389
  "dropdown-menu": !0,
389
390
  "tabs-pt28": e.searchBoxVisible,
390
391
  // 未看到样式定义
391
- show: !h.value,
392
- "d-none": h.value
392
+ show: !p.value,
393
+ "d-none": p.value
393
394
  }));
394
- let s;
395
- function y(a) {
396
- s = a;
397
- }
398
- A(h, (a) => {
399
- if (s.value)
400
- if (a)
401
- i.value.style.width = null;
395
+ let i;
396
+ function g(s) {
397
+ i = s;
398
+ }
399
+ k(p, (s) => {
400
+ if (i.value)
401
+ if (s)
402
+ a.value.style.width = null;
402
403
  else {
403
- const n = s.value.querySelector(".farris-tabs-header"), u = s.value.clientHeight - n.clientHeight - 20, g = n.querySelector(".farris-tabs-title").clientWidth - 20;
404
- i.value.style.maxWidth = g + "px", i.value.style.maxHeight = u + "px", L(() => {
404
+ const l = i.value.querySelector(".farris-tabs-header"), u = i.value.clientHeight - l.clientHeight - 20, m = l.querySelector(".farris-tabs-title").clientWidth - 20;
405
+ a.value.style.maxWidth = m + "px", a.value.style.maxHeight = u + "px", F(() => {
405
406
  const {
406
- width: O
407
- } = i.value.getClientRects()[0];
408
- i.value.style.width = O ? O + "px" : null;
407
+ width: P
408
+ } = a.value.getClientRects()[0];
409
+ a.value.style.width = P ? P + "px" : null;
409
410
  });
410
411
  }
411
412
  });
412
- function B(a) {
413
+ function B(s) {
413
414
  return {
414
415
  "dropdown-item": !0,
415
416
  "text-truncate": !0,
416
417
  "px-2": !0,
417
- disabled: a.props.disabled,
418
- active: a.props.id === o.value,
419
- "d-none": a.props.show !== !0
418
+ disabled: s.props.disabled,
419
+ active: s.props.id === o.value,
420
+ "d-none": s.props.show !== !0
420
421
  };
421
422
  }
422
- function p(a) {
423
- a.preventDefault(), a.stopPropagation();
423
+ function y(s) {
424
+ s.preventDefault(), s.stopPropagation();
424
425
  }
425
- function H() {
426
- C && clearTimeout(C);
426
+ function C() {
427
+ S && clearTimeout(S);
427
428
  }
428
- function M() {
429
- h.value || (C = setTimeout(() => {
430
- h.value = !0;
429
+ function j() {
430
+ p.value || (S = setTimeout(() => {
431
+ p.value = !0;
431
432
  }, w));
432
433
  }
433
- function k(a, n) {
434
- a.stopPropagation(), n.disabled || d(n.id), h.value = !0;
434
+ function A(s, l) {
435
+ s.stopPropagation(), l.disabled || d(l.id), p.value = !0;
435
436
  }
436
- function V(a, n) {
437
- a.stopPropagation(), f(a, n, !0);
437
+ function D(s, l) {
438
+ s.stopPropagation(), f(s, l, !0);
438
439
  }
439
- function R(a) {
440
- return a.slots.title ? v("a", {
440
+ function R(s) {
441
+ return s.slots.title ? v("a", {
441
442
  class: "dropdown-title",
442
- id: `${a.props.id}-dropdown-item`
443
- }, [a.slots.title(a)]) : a.props.titleRenderFunction ? v("a", {
443
+ id: `${s.props.id}-dropdown-item`
444
+ }, [s.slots.title(s)]) : s.props.titleRenderFunction ? v("a", {
444
445
  class: "dropdown-title",
445
- id: `${a.props.id}-dropdown-item`
446
- }, [a.props.titleRenderFunction()]) : v("a", {
446
+ id: `${s.props.id}-dropdown-item`
447
+ }, [s.props.titleRenderFunction()]) : v("a", {
447
448
  class: "dropdown-title",
448
- id: `${a.props.id}-dropdown-item`
449
- }, [a.props.title]);
449
+ id: `${s.props.id}-dropdown-item`
450
+ }, [s.props.title]);
450
451
  }
451
- function F() {
452
+ function V() {
452
453
  return v("div", {
453
- ref: i,
454
- class: x.value,
455
- onMouseenter: () => H(),
456
- onMouseleave: () => M()
454
+ ref: a,
455
+ class: O.value,
456
+ onMouseenter: () => C(),
457
+ onMouseleave: () => j()
457
458
  }, [e.searchBoxVisible && v("div", {
458
- onClick: (a) => p(a),
459
+ onClick: (s) => y(s),
459
460
  class: "pb-1 tabs-li-absolute"
460
- }, [Z(v("input", {
461
+ }, [te(v("input", {
461
462
  type: "text",
462
463
  class: "form-control",
463
- "onUpdate:modelValue": (a) => b.value = a
464
- }, null), [[pe, b.value]]), v("span", {
464
+ "onUpdate:modelValue": (s) => b.value = s
465
+ }, null), [[me, b.value]]), v("span", {
465
466
  class: "f-icon f-icon-page-title-query tabs-icon-search"
466
- }, null)]), P.value.length ? v("ul", {
467
+ }, null)]), H.value.length ? v("ul", {
467
468
  class: "tab-dropdown-menu--items flex-fill"
468
- }, [P.value.map((a) => v("li", {
469
- class: B(a),
470
- onClick: (n) => k(n, a.props)
471
- }, [a.props.removeable && a.props.disabled !== !0 && v("span", {
469
+ }, [H.value.map((s) => v("li", {
470
+ class: B(s),
471
+ onClick: (l) => A(l, s.props)
472
+ }, [s.props.removeable && s.props.disabled !== !0 && v("span", {
472
473
  class: "float-right st-drop-close",
473
- onClick: (n) => V(n, a.props.id)
474
+ onClick: (l) => D(l, s.props.id)
474
475
  }, [v("i", {
475
476
  class: "f-icon f-icon-close"
476
- }, null)]), R(a)]))]) : v("div", {
477
+ }, null)]), R(s)]))]) : v("div", {
477
478
  class: "dropdown-no-data"
478
- }, [$.getLocaleValue("tabs.noData")])]);
479
+ }, [_.getLocaleValue("tabs.noData")])]);
479
480
  }
480
481
  return {
481
- renderDropdownMenu: F,
482
- setTabsRef: y
482
+ renderDropdownMenu: V,
483
+ setTabsRef: g
483
484
  };
484
485
  }
485
- function Ae(e, t, l, c) {
486
+ function Fe(e, t, n, c) {
486
487
  const {
487
- hideDropDown: i
488
+ hideDropDown: a
488
489
  } = t, {
489
490
  renderDropdownMenu: o,
490
491
  setTabsRef: f
491
- } = Re(e, t, l, c), m = I(e.showDropdown);
492
+ } = Ve(e, t, n, c), h = x(e.showDropdown);
492
493
  function d() {
493
- return m.value && v(he, null, [v("button", {
494
+ return h.value && v(ge, null, [v("button", {
494
495
  class: "btn dropdown-toggle-split dropdown-toggle",
495
496
  onClick: () => {
496
- i.value = !1;
497
+ a.value = !1;
497
498
  }
498
499
  }, null), o()]);
499
500
  }
@@ -502,135 +503,135 @@ function Ae(e, t, l, c) {
502
503
  setTabsRef: f
503
504
  };
504
505
  }
505
- function Ve(e, t, l, c) {
506
- const i = I(!1), { selectTab: o, tabPages: f, needUpdateNavigationLayout: m, activeId: d } = c, h = 4, b = T(() => ({
506
+ function Le(e, t, n, c) {
507
+ const a = x(!1), { selectTab: o, tabPages: f, needUpdateNavigationLayout: h, activeId: d } = c, p = 4, b = T(() => ({
507
508
  btn: !0,
508
509
  "sc-nav-btn": !0,
509
510
  "px-1": !0,
510
511
  "sc-nav-lr": !0,
511
- "d-none": !i.value
512
+ "d-none": !a.value
512
513
  })), w = T(() => ({
513
514
  "btn-group": !0,
514
515
  "sc-nav-btn": !0,
515
516
  dropdown: !0,
516
- "d-none": !i.value
517
- })), C = T(() => ({
517
+ "d-none": !a.value
518
+ })), S = T(() => ({
518
519
  btn: !0,
519
520
  "sc-nav-rg": !0,
520
- "d-none": !i.value
521
+ "d-none": !a.value
521
522
  }));
522
- function P(p, H) {
523
+ function H(y, C) {
523
524
  if (!t.value)
524
525
  return;
525
- const M = t.value.scrollLeft, k = t.value.scrollWidth - t.value.offsetWidth;
526
- if (H > 0) {
527
- if (t.value.scrollLeft >= k)
526
+ const j = t.value.scrollLeft, A = t.value.scrollWidth - t.value.offsetWidth;
527
+ if (C > 0) {
528
+ if (t.value.scrollLeft >= A)
528
529
  return;
529
- t.value.scrollLeft = M + e.scrollStep + p;
530
- } else if (H < 0) {
530
+ t.value.scrollLeft = j + e.scrollStep + y;
531
+ } else if (C < 0) {
531
532
  if (t.value.scrollLeft <= 0)
532
533
  return;
533
- t.value.scrollLeft = M - e.scrollStep - p;
534
+ t.value.scrollLeft = j - e.scrollStep - y;
534
535
  }
535
536
  }
536
- function x(p = -1) {
537
- if (!i.value || !t.value)
537
+ function O(y = -1) {
538
+ if (!a.value || !t.value)
538
539
  return;
539
- p < 0 && (p = f.value.findIndex((R) => R.props.id === d.value));
540
- const H = e.tabType === "pills" ? ".f-capsule-item" : ".nav-item", M = t.value.querySelectorAll(H), { parentElement: k } = t.value, V = M[p];
541
- if (V && k) {
542
- const R = k.getBoundingClientRect().left, F = k.getBoundingClientRect().right, a = V.getBoundingClientRect().left, n = V.getBoundingClientRect().right;
543
- a < R ? P(R - a, -1) : F < n && P(n - F, 1), e.tabType === "one-page" && l.scrollTo(p);
540
+ y < 0 && (y = f.value.findIndex((R) => R.props.id === d.value));
541
+ const C = e.tabType === "pills" ? ".f-capsule-item" : ".nav-item", j = t.value.querySelectorAll(C), { parentElement: A } = t.value, D = j[y];
542
+ if (D && A) {
543
+ const R = A.getBoundingClientRect().left, V = A.getBoundingClientRect().right, s = D.getBoundingClientRect().left, l = D.getBoundingClientRect().right;
544
+ s < R ? H(R - s, -1) : V < l && H(l - V, 1), e.tabType === "one-page" && n.scrollTo(y);
544
545
  }
545
546
  }
546
- function s() {
547
- var M;
547
+ function i() {
548
+ var j;
548
549
  if (!t.value)
549
550
  return;
550
- const p = t.value, H = (M = t.value) == null ? void 0 : M.parentElement;
551
- i.value = H && p && H.offsetWidth < p.scrollWidth - h, i.value && L(() => {
552
- x();
551
+ const y = t.value, C = (j = t.value) == null ? void 0 : j.parentElement;
552
+ a.value = C && y && C.offsetWidth < y.scrollWidth - p, a.value && F(() => {
553
+ O();
553
554
  });
554
555
  }
555
- function y(p) {
556
- p.disabled || o(p.id);
556
+ function g(y) {
557
+ y.disabled || o(y.id);
557
558
  }
558
559
  function B() {
559
- ["default", "one-page"].indexOf(e.tabType) > -1 && L(() => {
560
- x();
560
+ ["default", "one-page"].indexOf(e.tabType) > -1 && F(() => {
561
+ O();
561
562
  });
562
563
  }
563
- return A(m, () => {
564
- s();
564
+ return k(h, () => {
565
+ i();
565
566
  }), {
566
567
  previousButtonClass: b,
567
568
  nextButtonGroupClass: w,
568
- nextButtonClass: C,
569
- scrollTab: P,
570
- selectAndScrollToTab: y,
571
- shouldShowNavigationButtons: i,
572
- updateNavigationLayout: s,
569
+ nextButtonClass: S,
570
+ scrollTab: H,
571
+ selectAndScrollToTab: g,
572
+ shouldShowNavigationButtons: a,
573
+ updateNavigationLayout: i,
573
574
  scrollToSelectedTab: B
574
575
  };
575
576
  }
576
- function Fe(e, t) {
577
- const { tabPages: l } = t, c = I(""), i = I(!0), o = T(() => e.searchBoxVisible), f = T(() => o.value ? l.value.filter((d) => d.props.title.includes(c.value)) : l.value.slice());
578
- return A(i, (m) => {
579
- m || (c.value = "");
577
+ function We(e, t) {
578
+ const { tabPages: n } = t, c = x(""), a = x(!0), o = T(() => e.searchBoxVisible), f = T(() => o.value ? n.value.filter((d) => d.props.title.includes(c.value)) : n.value.slice());
579
+ return k(a, (h) => {
580
+ h || (c.value = "");
580
581
  }), {
581
582
  searchTabText: c,
582
- hideDropDown: i,
583
+ hideDropDown: a,
583
584
  shouldShowSearchBox: o,
584
585
  tabsInDropdownMenu: f
585
586
  };
586
587
  }
587
- function Le(e, t, l) {
588
- const c = ".farris-tab-page", { tabPages: i } = l;
588
+ function Ee(e, t, n) {
589
+ const c = ".farris-tab-page", { tabPages: a } = n;
589
590
  let o = -1;
590
591
  function f() {
591
592
  if (o < 0) {
592
- const h = document.querySelector(".farris-tabs-header");
593
- h && (o = h.clientHeight);
593
+ const p = document.querySelector(".farris-tabs-header");
594
+ p && (o = p.clientHeight);
594
595
  }
595
596
  return o;
596
597
  }
597
- function m(h) {
598
+ function h(p) {
598
599
  const b = t.value;
599
600
  if (b) {
600
601
  const w = t.value.querySelectorAll(c);
601
602
  if (w.length > 0) {
602
- const C = w[h], { offsetTop: P } = C, x = P - f();
603
- b.scrollTop = x > 0 ? x : 0;
603
+ const S = w[p], { offsetTop: H } = S, O = H - f();
604
+ b.scrollTop = O > 0 ? O : 0;
604
605
  }
605
606
  }
606
607
  }
607
- function d(h) {
608
- const b = i.value.findIndex((w) => w.props.id === h);
609
- b > -1 && m(b);
608
+ function d(p) {
609
+ const b = a.value.findIndex((w) => w.props.id === p);
610
+ b > -1 && h(b);
610
611
  }
611
- return { scrollTo: m, scrollToByPaggId: d };
612
+ return { scrollTo: h, scrollToByPaggId: d };
612
613
  }
613
- const De = ["moz", "ms", "webkit"];
614
- function We() {
614
+ const Ne = ["moz", "ms", "webkit"];
615
+ function qe() {
615
616
  let e = 0;
616
617
  return (t) => {
617
- const l = (/* @__PURE__ */ new Date()).getTime(), c = Math.max(0, 16 - (l - e)), i = setTimeout(() => {
618
- t(l + c);
618
+ const n = (/* @__PURE__ */ new Date()).getTime(), c = Math.max(0, 16 - (n - e)), a = setTimeout(() => {
619
+ t(n + c);
619
620
  }, c);
620
- return e = l + c, i;
621
+ return e = n + c, a;
621
622
  };
622
623
  }
623
- function Ee() {
624
+ function $e() {
624
625
  if (typeof window > "u")
625
626
  return () => 0;
626
627
  if (window.requestAnimationFrame)
627
628
  return window.requestAnimationFrame.bind(window);
628
- const e = De.filter((t) => `${t}RequestAnimationFrame` in window)[0];
629
- return e ? window[`${e}RequestAnimationFrame`] : We();
629
+ const e = Ne.filter((t) => `${t}RequestAnimationFrame` in window)[0];
630
+ return e ? window[`${e}RequestAnimationFrame`] : qe();
630
631
  }
631
- Ee();
632
- I("");
633
- function te() {
632
+ $e();
633
+ x("");
634
+ function le() {
634
635
  if (typeof window > "u" || typeof navigator > "u")
635
636
  return !1;
636
637
  const e = navigator.userAgent || navigator.vendor || window.opera, t = [
@@ -643,7 +644,7 @@ function te() {
643
644
  /IEMobile/i,
644
645
  /Opera Mini/i,
645
646
  /Harmony/i
646
- ], l = [
647
+ ], n = [
647
648
  /iPad/i,
648
649
  /Android(?!.*Mobile)/i,
649
650
  // Android 平板通常不含 "Mobile"
@@ -652,7 +653,7 @@ function te() {
652
653
  /Kindle/i,
653
654
  /Silk/i
654
655
  ];
655
- for (const d of l)
656
+ for (const d of n)
656
657
  if (d.test(e))
657
658
  return !1;
658
659
  for (const d of t)
@@ -660,177 +661,180 @@ function te() {
660
661
  return !0;
661
662
  if (typeof screen > "u")
662
663
  return !1;
663
- const c = "ontouchstart" in window || navigator.maxTouchPoints > 0, i = screen.width, o = screen.height, f = Math.min(i, o);
664
+ const c = "ontouchstart" in window || navigator.maxTouchPoints > 0, a = screen.width, o = screen.height, f = Math.min(a, o);
664
665
  return !!(c && f <= 768);
665
666
  }
666
- function Ne() {
667
- const e = te();
667
+ function _e() {
668
+ const e = le();
668
669
  return e && document.body.classList.add("f-mobile"), e;
669
670
  }
670
- typeof document < "u" && Ne();
671
- const q = /* @__PURE__ */ ee({
671
+ typeof document < "u" && _e();
672
+ function Q(e) {
673
+ return e ? Object.keys(e).reduce((t, n) => (n.startsWith("data-") && (t[n] = e[n]), t), {}) : {};
674
+ }
675
+ const $ = /* @__PURE__ */ ne({
672
676
  name: "FTabs",
673
- props: Pe,
677
+ props: Me,
674
678
  emits: ["tabChange", "tabRemove", "update:activeId", "Click"],
675
679
  setup(e, t) {
676
- const l = I(e.tabType), c = N(), i = te(), o = I(e.customClass), f = N();
677
- N();
678
- const m = I(), d = He(e, t, f), {
679
- activeId: h,
680
+ const n = x(e.tabType), c = q(), a = le(), o = x(e.customClass), f = q();
681
+ q();
682
+ const h = x(), d = Ae(e, t, f), {
683
+ activeId: p,
680
684
  changeTitleStyle: b,
681
685
  tabPages: w,
682
- addTab: C,
683
- updateTab: P,
684
- toolbarItems: x,
685
- checkActiveIdAndSelect: s,
686
- toggleShowTab: y,
686
+ addTab: S,
687
+ updateTab: H,
688
+ toolbarItems: O,
689
+ checkActiveIdAndSelect: i,
690
+ toggleShowTab: g,
687
691
  hasInHeadClass: B,
688
- toolbarVisible: p
689
- } = d, H = Le(e, c, d), M = Ve(e, f, H, d), {
690
- previousButtonClass: k,
691
- nextButtonClass: V,
692
+ toolbarVisible: y
693
+ } = d, C = Ee(e, c, d), j = Le(e, f, C, d), {
694
+ previousButtonClass: A,
695
+ nextButtonClass: D,
692
696
  nextButtonGroupClass: R,
693
- scrollTab: F,
694
- updateNavigationLayout: a,
695
- scrollToSelectedTab: n
696
- } = M;
697
- d.setScrollToSelectedTabFunction(n);
698
- const u = Fe(e, d), r = je(e, f, M, H, d), g = r, O = ke(e, f, M, H, d), E = /* @__PURE__ */ new Map([["default", r], ["one-page", g], ["pills", O]]);
697
+ scrollTab: V,
698
+ updateNavigationLayout: s,
699
+ scrollToSelectedTab: l
700
+ } = j;
701
+ d.setScrollToSelectedTabFunction(l);
702
+ const u = We(e, d), r = ke(e, f, j, C, d), m = r, P = De(e, f, j, C, d), N = /* @__PURE__ */ new Map([["default", r], ["one-page", m], ["pills", P]]);
699
703
  T(() => {
700
- const S = w.value.find((j) => j.props.id === h.value);
701
- return S == null ? void 0 : S.slots;
704
+ const I = w.value.find((M) => M.props.id === p.value);
705
+ return I == null ? void 0 : I.slots;
702
706
  });
703
- const D = T(() => e.fill), U = (S, j) => {
704
- t.emit("Click", S, j, h.value);
707
+ const L = T(() => e.fill), z = (I, M) => {
708
+ t.emit("Click", I, M, p.value);
705
709
  };
706
- me("tabs", {
707
- activeId: h,
708
- addTab: C,
709
- updateTab: P,
710
+ ye("tabs", {
711
+ activeId: p,
712
+ addTab: S,
713
+ updateTab: H,
710
714
  tabPages: w,
711
- tabType: l,
712
- shouldFillParentContaner: D,
713
- toggleShowTab: y,
714
- toolbarVisible: p,
715
- clickToolbarItemHandler: U
715
+ tabType: n,
716
+ shouldFillParentContaner: L,
717
+ toggleShowTab: g,
718
+ toolbarVisible: y,
719
+ clickToolbarItemHandler: z
716
720
  });
717
- let z = !1;
718
- const ne = T(() => ({
721
+ let G = !1;
722
+ const oe = T(() => ({
719
723
  "farris-tabs-header": !0,
720
724
  "farris-tabs-inHead": B.value,
721
725
  "farris-tabs-inContent": !B.value,
722
726
  "farris-tabs-nav-fill": e.tabType === "fill",
723
727
  "farris-tabs-nav-pills": e.tabType === "pills",
724
728
  "d-none": e.showHeader === !1
725
- })), le = T(() => {
726
- const S = {
729
+ })), ae = T(() => {
730
+ const I = {
727
731
  width: B.value && e.titleWidth ? `${e.titleWidth}%` : ""
728
732
  };
729
- return S.width && (S.flex = "unset"), S;
730
- }), oe = T(() => {
731
- const S = {
733
+ return I.width && (I.flex = "unset"), I;
734
+ }), ie = T(() => {
735
+ const I = {
732
736
  "farris-tabs": !0,
733
- "f-tabs-content-fill": D.value,
737
+ "f-tabs-content-fill": L.value,
734
738
  "flex-column": e.position === "top",
735
739
  "flex-column-reverse": e.position === "bottom",
736
740
  "flex-row": e.position === "left",
737
741
  "flex-row-reverse": e.position === "right",
738
742
  "one-page": e.tabType === "one-page"
739
743
  };
740
- return o.value && o.value.split(" ").reduce((j, W) => (j[W] = !0, j), S), S;
741
- }), ie = new ResizeObserver((S) => {
742
- S.length && a();
744
+ return o.value && o.value.split(" ").reduce((M, E) => (M[E] = !0, M), I), I;
745
+ }), se = new ResizeObserver((I) => {
746
+ I.length && s();
743
747
  });
744
- function G() {
745
- m.value && !z && (ie.observe(m.value), z = !0);
748
+ function X() {
749
+ h.value && !G && (se.observe(h.value), G = !0);
746
750
  }
747
- A(() => e.visible, (S) => {
748
- L(() => {
749
- w.value.length && s(e.activeId || w.value[0].props.id), a(), b(f), G();
751
+ k(() => e.visible, (I) => {
752
+ F(() => {
753
+ w.value.length && i(e.activeId || w.value[0].props.id), s(), b(f), X();
750
754
  });
751
- }), A(() => e.autoTitleWidth, (S) => {
752
- L(() => {
753
- a(), b(f);
755
+ }), k(() => e.autoTitleWidth, (I) => {
756
+ F(() => {
757
+ s(), b(f);
754
758
  });
755
- }), _(() => {
756
- e.visible && (w.value.length && s(e.activeId || w.value[0].props.id), L(() => {
757
- a(), b(f);
758
- }), G());
759
+ }), U(() => {
760
+ e.visible && (w.value.length && i(e.activeId || w.value[0].props.id), F(() => {
761
+ s(), b(f);
762
+ }), X());
759
763
  });
760
- function se() {
764
+ function re() {
761
765
  return v("button", {
762
- title: $.getLocaleValue("tabs.leftButton"),
766
+ title: _.getLocaleValue("tabs.leftButton"),
763
767
  type: "button",
764
- class: k.value,
768
+ class: A.value,
765
769
  onClick: () => {
766
- F(0, -1);
770
+ V(0, -1);
767
771
  }
768
772
  }, null);
769
773
  }
770
- function ae() {
774
+ function ue() {
771
775
  return v("button", {
772
- title: $.getLocaleValue("tabs.rightButton"),
776
+ title: _.getLocaleValue("tabs.rightButton"),
773
777
  type: "button",
774
- class: V.value,
778
+ class: D.value,
775
779
  onClick: () => {
776
- F(0, 1);
780
+ V(0, 1);
777
781
  }
778
782
  }, null);
779
783
  }
780
784
  const {
781
- renderMorePagesButtton: re,
782
- setTabsRef: ue
783
- } = Ae(e, u, M, d);
784
- ue(c);
785
- function ce() {
786
- return x.value.length ? v("div", {
785
+ renderMorePagesButtton: ce,
786
+ setTabsRef: de
787
+ } = Fe(e, u, j, d);
788
+ de(c);
789
+ function fe() {
790
+ return O.value.length ? v("div", {
787
791
  class: {
788
792
  "farris-tabs-toolbar": !0,
789
- "d-none": !p.value
793
+ "d-none": !y.value
790
794
  }
791
- }, [v(xe, {
795
+ }, [v(He, W(Q(t.attrs), {
792
796
  class: "f-utils-fill",
793
797
  alignment: B.value ? "right" : "left",
794
- items: x.value,
795
- visible: p.value,
796
- onClick: U
797
- }, null)]) : null;
798
+ items: O.value,
799
+ visible: y.value,
800
+ onClick: z
801
+ }), null)]) : null;
798
802
  }
799
- const X = E.get(e.tabType) || E.get("default");
800
- function de() {
801
- var S, j, W, K;
803
+ const K = N.get(e.tabType) || N.get("default");
804
+ function ve() {
805
+ var I, M, E, Y;
802
806
  return v("div", {
803
- class: ne.value
807
+ class: oe.value
804
808
  }, [v("div", {
805
809
  class: "farris-tabs-header-pre"
806
- }, [(j = (S = t.slots).headerPrefix) == null ? void 0 : j.call(S)]), v("div", {
810
+ }, [(M = (I = t.slots).headerPrefix) == null ? void 0 : M.call(I)]), v("div", {
807
811
  class: "farris-tabs-title scroll-tabs",
808
- style: le.value,
809
- ref: m
810
- }, [!i && se(), X && X(), v("div", {
811
- hidden: i,
812
+ style: ae.value,
813
+ ref: h
814
+ }, [!a && re(), K && K(), v("div", {
815
+ hidden: a,
812
816
  class: R.value
813
- }, [ae(), re()])]), ce(), v("div", {
817
+ }, [ue(), ce()])]), fe(), v("div", {
814
818
  class: "farris-tabs-header-post"
815
- }, [(K = (W = t.slots).headerSuffix) == null ? void 0 : K.call(W)])]);
819
+ }, [(Y = (E = t.slots).headerSuffix) == null ? void 0 : Y.call(E)])]);
816
820
  }
817
821
  T(() => ({
818
822
  "farris-tabs-content": !0,
819
- "f-utils-fill-flex-column": D.value
823
+ "f-utils-fill-flex-column": L.value
820
824
  }));
821
- function fe() {
822
- var S, j;
825
+ function be() {
826
+ var I, M;
823
827
  return (
824
828
  // <div class={tabsContentClass.value} ref={tabContentElementRef}>
825
- (j = (S = t.slots).default) == null ? void 0 : j.call(S)
829
+ (M = (I = t.slots).default) == null ? void 0 : M.call(I)
826
830
  );
827
831
  }
828
- return () => e.visible ? v("div", {
829
- class: oe.value,
832
+ return () => e.visible ? v("div", W(Q(t.attrs), {
833
+ class: ie.value,
830
834
  ref: c
831
- }, [de(), fe()]) : null;
835
+ }), [ve(), be()]) : null;
832
836
  }
833
- }), qe = {
837
+ }), Ue = {
834
838
  tabWidth: { type: Number },
835
839
  id: { type: String, default: "" },
836
840
  customTitleClass: { type: String, default: "" },
@@ -853,109 +857,111 @@ const q = /* @__PURE__ */ ee({
853
857
  /** 标题 */
854
858
  titleRenderFunction: { type: Function }
855
859
  };
856
- function J(e) {
857
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
860
+ function Z(e) {
861
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
858
862
  }
859
- const Q = /* @__PURE__ */ ee({
863
+ const ee = /* @__PURE__ */ ne({
860
864
  name: "FTabPage",
861
- props: qe,
865
+ props: Ue,
862
866
  emits: [],
863
867
  setup(e, t) {
864
- const l = ge("tabs");
865
- Se();
866
- const c = I(e.show), i = {
868
+ const n = Te("tabs");
869
+ xe();
870
+ const c = x(e.show), a = {
867
871
  slots: t.slots,
868
- props: e
869
- }, o = I((l == null ? void 0 : l.tabType.value) || "default");
870
- _(() => {
871
- const s = l == null ? void 0 : l.tabPages.value.findIndex((y) => y.props.id === e.id);
872
- (!s || s === -1) && (l == null || l.addTab(i));
873
- }), ye(() => {
872
+ props: e,
873
+ attrs: t.attrs
874
+ }, o = x((n == null ? void 0 : n.tabType.value) || "default");
875
+ U(() => {
876
+ const i = n == null ? void 0 : n.tabPages.value.findIndex((g) => g.props.id === e.id);
877
+ (!i || i === -1) && (n == null || n.addTab(a));
878
+ }), we(() => {
874
879
  });
875
- const f = T(() => (e == null ? void 0 : e.id) === (l == null ? void 0 : l.activeId.value)), m = T(() => ({
880
+ const f = T(() => (e == null ? void 0 : e.id) === (n == null ? void 0 : n.activeId.value)), h = T(() => ({
876
881
  display: f.value ? "" : "none"
877
882
  }));
878
- A(() => e, (s) => {
879
- l == null || l.updateTab({
880
- props: s,
881
- slots: t.slots
883
+ k(() => e, (i) => {
884
+ n == null || n.updateTab({
885
+ props: i,
886
+ slots: t.slots,
887
+ attrs: t.attrs
882
888
  });
883
889
  }, {
884
890
  immediate: !0,
885
891
  deep: !0
886
- }), A(() => e.show, (s) => {
887
- c.value = s, l == null || l.toggleShowTab(e.id);
888
- }), A(() => e.toolbarVisible, (s) => {
889
- f.value && l && (l.toolbarVisible.value = s);
892
+ }), k(() => e.show, (i) => {
893
+ c.value = i, n == null || n.toggleShowTab(e.id);
894
+ }), k(() => e.toolbarVisible, (i) => {
895
+ f.value && n && (n.toolbarVisible.value = i);
890
896
  });
891
897
  function d() {
892
- var y, B;
893
- const s = (B = (y = t.slots).default) == null ? void 0 : B.call(y);
894
- return v(Y, {
898
+ var g, B;
899
+ const i = (B = (g = t.slots).default) == null ? void 0 : B.call(g);
900
+ return v(J, {
895
901
  "main-title": e.title,
896
902
  class: ["farris-tab-page", c.value ? "" : "f-tab-d-none"]
897
- }, J(s) ? s : {
898
- default: () => [s]
903
+ }, Z(i) ? i : {
904
+ default: () => [i]
899
905
  });
900
906
  }
901
- function h(s, y) {
902
- l && (l.activeId.value = e.id, l.clickToolbarItemHandler && l.clickToolbarItemHandler(s, y));
907
+ function p(i, g) {
908
+ n && (n.activeId.value = e.id, n.clickToolbarItemHandler && n.clickToolbarItemHandler(i, g));
903
909
  }
904
910
  function b() {
905
- var y, B;
906
- const s = (B = (y = t.slots).default) == null ? void 0 : B.call(y);
907
- return v(Y, {
911
+ var g, B;
912
+ const i = (B = (g = t.slots).default) == null ? void 0 : B.call(g);
913
+ return v(J, {
908
914
  customClass: "section-in-tab is-mobile",
909
- onClick: h,
915
+ onClick: p,
910
916
  visible: e.show,
911
917
  "main-title": e.title,
912
918
  buttons: e.toolbar.buttons,
913
919
  "button-position": e.toolbar.position || e.toolbarPosition,
914
920
  "buttons-visible": e.toolbarVisible
915
- }, J(s) ? s : {
916
- default: () => [s]
921
+ }, Z(i) ? i : {
922
+ default: () => [i]
917
923
  });
918
924
  }
919
925
  const w = T(() => {
920
- var y;
926
+ var g;
921
927
  return {
922
928
  "farris-tab-page": !0,
923
929
  "f-tab-d-none": !c.value,
924
- "f-tab-active": f.value && l && ((y = l.shouldFillParentContaner) == null ? void 0 : y.value)
930
+ "f-tab-active": f.value && n && ((g = n.shouldFillParentContaner) == null ? void 0 : g.value)
925
931
  };
926
932
  });
927
- function C() {
928
- var y, B;
929
- const s = (B = (y = t.slots).default) == null ? void 0 : B.call(y);
933
+ function S() {
934
+ var g, B;
935
+ const i = (B = (g = t.slots).default) == null ? void 0 : B.call(g);
930
936
  return v("div", {
931
937
  class: w.value,
932
- style: m.value
933
- }, [s]);
938
+ style: h.value
939
+ }, [i]);
934
940
  }
935
- const x = (/* @__PURE__ */ new Map([["default", C], ["one-page", d], ["mobile", b]])).get(o.value) || C;
936
- return () => x();
941
+ const O = (/* @__PURE__ */ new Map([["default", S], ["one-page", d], ["mobile", b]])).get(o.value) || S;
942
+ return () => O();
937
943
  }
938
944
  });
939
- class et extends Oe {
940
- constructor(t, l) {
941
- super(t, l);
945
+ class lt extends je {
946
+ constructor(t, n) {
947
+ super(t, n);
942
948
  }
943
- getPropertyConfig(t, l = !1) {
949
+ getPropertyConfig(t, n = !1) {
944
950
  return this.propertyConfig.categories.basic = this.getBasicPropConfig(t), this.propertyConfig.categories.basic.properties.text = {
945
951
  title: "文本",
946
952
  type: "string",
947
953
  description: "",
948
954
  refreshPanelAfterChanged: !0
949
- }, this.getAppearanceProperties(t, l), this.getbBehaviorConfig(t), this.getEventPropConfig(t), this.propertyConfig;
955
+ }, this.getAppearanceProperties(t, n), this.getbBehaviorConfig(t), this.getEventPropConfig(t), this.propertyConfig;
950
956
  }
951
- getAppearanceProperties(t, l = !1) {
957
+ getAppearanceProperties(t, n = !1) {
952
958
  this.propertyConfig.categories.appearance = {
953
959
  title: "外观",
954
960
  properties: {
955
961
  class: {
956
962
  description: "组件的CSS样式",
957
963
  title: "class样式",
958
- visible: !l
964
+ visible: !n
959
965
  },
960
966
  icon: {
961
967
  title: "图标",
@@ -972,48 +978,48 @@ class et extends Oe {
972
978
  };
973
979
  }
974
980
  getbBehaviorConfig(t) {
975
- const l = this.getPropertyEditorParams(t, ["Const", "Variable", "StateMachine", "Custom", "Expression"], "disabled");
981
+ const n = this.getPropertyEditorParams(t, ["Const", "Variable", "StateMachine", "Custom", "Expression"], "disabled");
976
982
  this.propertyConfig.categories.behavior = this.getBehaviorConfig(t, "", {
977
983
  disabled: {
978
984
  title: "禁用",
979
985
  type: "boolean",
980
986
  description: "按钮禁用状态",
981
987
  refreshPanelAfterChanged: !0,
982
- editor: l
988
+ editor: n
983
989
  }
984
990
  });
985
991
  }
986
992
  getEventPropConfig(t) {
987
- const l = [
993
+ const n = [
988
994
  {
989
995
  label: "onClick",
990
996
  name: "点击事件"
991
997
  }
992
- ], c = this, i = c.eventsEditorUtils.formProperties(t, c.viewModelId, l), o = c.createBaseEventProperty(i);
998
+ ], c = this, a = c.eventsEditorUtils.formProperties(t, c.viewModelId, n), o = c.createBaseEventProperty(a);
993
999
  this.propertyConfig.categories.eventsEditor = {
994
1000
  title: "事件",
995
1001
  hideTitle: !0,
996
1002
  properties: o,
997
1003
  // 这个属性,标记当属性变更得时候触发重新更新属性
998
1004
  refreshPanelAfterChanged: !0,
999
- tabId: Be,
1005
+ tabId: Oe,
1000
1006
  tabName: "交互",
1001
- setPropertyRelates(f, m) {
1007
+ setPropertyRelates(f, h) {
1002
1008
  const d = f.propertyValue;
1003
1009
  delete t[c.viewModelId], d && (d.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(t, c.viewModelId, d.events, d));
1004
1010
  }
1005
1011
  };
1006
1012
  }
1007
1013
  }
1008
- q.install = (e) => {
1009
- e.component(q.name, q), e.component(Q.name, Q);
1014
+ $.install = (e) => {
1015
+ e.component($.name, $), e.component(ee.name, ee);
1010
1016
  };
1011
1017
  export {
1012
- Q as FTabPage,
1013
- q as FTabs,
1014
- et as TabToolbarItemProperty,
1015
- Ze as createTabsCallbackResolver,
1016
- q as default,
1017
- qe as tabPageProps,
1018
- Pe as tabsProps
1018
+ ee as FTabPage,
1019
+ $ as FTabs,
1020
+ lt as TabToolbarItemProperty,
1021
+ nt as createTabsCallbackResolver,
1022
+ $ as default,
1023
+ Ue as tabPageProps,
1024
+ Me as tabsProps
1019
1025
  };