@farris/ui-vue 1.3.4 → 1.3.6
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/accordion/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +9 -7
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +746 -730
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +9 -7
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3096 -3069
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +78 -82
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +501 -487
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +487 -472
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +440 -433
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +594 -587
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +2766 -2739
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +314 -298
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +862 -843
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1031 -1015
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +776 -770
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +296 -283
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +634 -619
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +383 -376
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +595 -575
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +5492 -5470
- package/farris.all.umd.cjs +13 -13
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ze = Object.defineProperty;
|
|
2
2
|
var _e = (e, t, n) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var N = (e, t, n) => _e(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { defineComponent as U, ref as
|
|
4
|
+
import { defineComponent as U, ref as o, watch as A, computed as R, onMounted as Q, createVNode as i, nextTick as fe, toRefs as Ke, onBeforeMount as ve, createTextVNode as q, Fragment as ue, withModifiers as le, inject as Se, provide as et, onUnmounted as Ce, Teleport as tt, Transition as nt, shallowRef as at, createApp as lt, render as ce, h as ot, cloneVNode as it, mergeProps as Me, reactive as Z } from "vue";
|
|
5
5
|
import { isPlainObject as be, cloneDeep as X } from "lodash-es";
|
|
6
6
|
import ut from "../list-view/index.esm.js";
|
|
7
7
|
import st from "../button-edit/index.esm.js";
|
|
@@ -439,117 +439,131 @@ const rt = {
|
|
|
439
439
|
required: gt
|
|
440
440
|
}, Ie = {}, xe = {};
|
|
441
441
|
function pe(e) {
|
|
442
|
-
const { properties: t, title: n, ignore: a } = e,
|
|
443
|
-
if (n && (!
|
|
444
|
-
const
|
|
445
|
-
|
|
442
|
+
const { properties: t, title: n, ignore: a } = e, l = a && Array.isArray(a), s = Object.keys(t).reduce((r, d) => ((!l || !a.find((v) => v === d)) && (r[d] = t[d].type === "object" && t[d].properties ? pe(t[d]) : X(t[d].default)), r), {});
|
|
443
|
+
if (n && (!l || !a.find((r) => r === "id"))) {
|
|
444
|
+
const r = n.toLowerCase().replace(/-/g, "_");
|
|
445
|
+
s.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return s;
|
|
448
|
+
}
|
|
449
|
+
function wt(e) {
|
|
450
|
+
const { properties: t, title: n, required: a } = e;
|
|
451
|
+
if (a && Array.isArray(a)) {
|
|
452
|
+
const l = a.reduce((s, r) => (s[r] = t[r].type === "object" && t[r].properties ? pe(t[r]) : X(t[r].default), s), {});
|
|
453
|
+
if (n && a.find((s) => s === "id")) {
|
|
454
|
+
const s = n.toLowerCase().replace(/-/g, "_");
|
|
455
|
+
l.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
456
|
+
}
|
|
457
|
+
return l;
|
|
458
|
+
}
|
|
459
|
+
return {
|
|
460
|
+
type: n
|
|
461
|
+
};
|
|
448
462
|
}
|
|
449
463
|
function Ee(e, t = {}, n) {
|
|
450
464
|
const a = Ie[e];
|
|
451
465
|
if (a) {
|
|
452
|
-
let
|
|
453
|
-
const
|
|
454
|
-
return
|
|
466
|
+
let l = wt(a);
|
|
467
|
+
const s = xe[e];
|
|
468
|
+
return l = s ? s({ getSchemaByType: Ee }, l, t, n) : l, l;
|
|
455
469
|
}
|
|
456
470
|
return null;
|
|
457
471
|
}
|
|
458
|
-
function
|
|
472
|
+
function St(e, t) {
|
|
459
473
|
const n = pe(t);
|
|
460
|
-
return Object.keys(n).reduce((a,
|
|
474
|
+
return Object.keys(n).reduce((a, l) => (Object.prototype.hasOwnProperty.call(e, l) && (a[l] && be(a[l]) && be(e[l] || !e[l]) ? Object.assign(a[l], e[l] || {}) : a[l] = e[l]), a), n), n;
|
|
461
475
|
}
|
|
462
|
-
function
|
|
463
|
-
return Object.keys(e).filter((a) => e[a] != null).reduce((a,
|
|
464
|
-
if (t.has(
|
|
465
|
-
const
|
|
466
|
-
if (typeof
|
|
467
|
-
a[
|
|
476
|
+
function Ct(e, t) {
|
|
477
|
+
return Object.keys(e).filter((a) => e[a] != null).reduce((a, l) => {
|
|
478
|
+
if (t.has(l)) {
|
|
479
|
+
const s = t.get(l);
|
|
480
|
+
if (typeof s == "string")
|
|
481
|
+
a[s] = e[l];
|
|
468
482
|
else {
|
|
469
|
-
const
|
|
470
|
-
Object.assign(a,
|
|
483
|
+
const r = s(l, e[l], e);
|
|
484
|
+
Object.assign(a, r);
|
|
471
485
|
}
|
|
472
486
|
} else
|
|
473
|
-
a[
|
|
487
|
+
a[l] = e[l];
|
|
474
488
|
return a;
|
|
475
489
|
}, {});
|
|
476
490
|
}
|
|
477
|
-
function
|
|
478
|
-
const a =
|
|
479
|
-
return
|
|
491
|
+
function Mt(e, t, n = /* @__PURE__ */ new Map()) {
|
|
492
|
+
const a = St(e, t);
|
|
493
|
+
return Ct(a, n);
|
|
480
494
|
}
|
|
481
|
-
function
|
|
482
|
-
function t(
|
|
495
|
+
function It(e = {}) {
|
|
496
|
+
function t(c, m, u, f) {
|
|
483
497
|
if (typeof u == "number")
|
|
484
|
-
return f[
|
|
498
|
+
return f[c].length === u;
|
|
485
499
|
if (typeof u == "object") {
|
|
486
500
|
const h = Object.keys(u)[0], w = u[h];
|
|
487
501
|
if (h === "not")
|
|
488
|
-
return Number(f[
|
|
502
|
+
return Number(f[c].length) !== Number(w);
|
|
489
503
|
if (h === "moreThan")
|
|
490
|
-
return Number(f[
|
|
504
|
+
return Number(f[c].length) >= Number(w);
|
|
491
505
|
if (h === "lessThan")
|
|
492
|
-
return Number(f[
|
|
506
|
+
return Number(f[c].length) <= Number(w);
|
|
493
507
|
}
|
|
494
508
|
return !1;
|
|
495
509
|
}
|
|
496
|
-
function n(
|
|
497
|
-
return f[
|
|
510
|
+
function n(c, m, u, f) {
|
|
511
|
+
return f[c] && f[c].propertyValue && String(f[c].propertyValue.value) === String(u);
|
|
498
512
|
}
|
|
499
513
|
const a = /* @__PURE__ */ new Map([
|
|
500
514
|
["length", t],
|
|
501
515
|
["getProperty", n]
|
|
502
516
|
]);
|
|
503
|
-
Object.keys(e).reduce((
|
|
504
|
-
function
|
|
505
|
-
const u =
|
|
506
|
-
return typeof m == "number" ? [{ target: u, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: u, operator: "getProperty", param:
|
|
517
|
+
Object.keys(e).reduce((c, m) => (c.set(m, e[m]), c), a);
|
|
518
|
+
function l(c, m) {
|
|
519
|
+
const u = c;
|
|
520
|
+
return typeof m == "number" ? [{ target: u, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: u, operator: "getProperty", param: c, value: !!m }] : typeof m == "object" ? Object.keys(m).map((f) => {
|
|
507
521
|
if (f === "length")
|
|
508
522
|
return { target: u, operator: "length", param: null, value: m[f] };
|
|
509
523
|
const h = f, w = m[f];
|
|
510
524
|
return { target: u, operator: "getProperty", param: h, value: w };
|
|
511
525
|
}) : [];
|
|
512
526
|
}
|
|
513
|
-
function
|
|
514
|
-
return Object.keys(
|
|
515
|
-
const h =
|
|
527
|
+
function s(c) {
|
|
528
|
+
return Object.keys(c).reduce((u, f) => {
|
|
529
|
+
const h = l(f, c[f]);
|
|
516
530
|
return u.push(...h), u;
|
|
517
531
|
}, []);
|
|
518
532
|
}
|
|
519
|
-
function c
|
|
520
|
-
if (a.has(
|
|
521
|
-
const u = a.get(
|
|
522
|
-
return u && u(
|
|
533
|
+
function r(c, m) {
|
|
534
|
+
if (a.has(c.operator)) {
|
|
535
|
+
const u = a.get(c.operator);
|
|
536
|
+
return u && u(c.target, c.param, c.value, m) || !1;
|
|
523
537
|
}
|
|
524
538
|
return !1;
|
|
525
539
|
}
|
|
526
|
-
function d(
|
|
527
|
-
return
|
|
540
|
+
function d(c, m) {
|
|
541
|
+
return s(c).reduce((h, w) => h && r(w, m), !0);
|
|
528
542
|
}
|
|
529
|
-
function v(
|
|
530
|
-
const u = Object.keys(
|
|
543
|
+
function v(c, m) {
|
|
544
|
+
const u = Object.keys(c), f = u.includes("allOf"), h = u.includes("anyOf"), w = f || h, S = (w ? c[w ? f ? "allOf" : "anyOf" : "allOf"] : [c]).map((L) => d(L, m));
|
|
531
545
|
return f ? !S.includes(!1) : S.includes(!0);
|
|
532
546
|
}
|
|
533
547
|
return { parseValueSchema: v };
|
|
534
548
|
}
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
function K(e, t, n = /* @__PURE__ */ new Map(), a = (
|
|
538
|
-
return Ie[t.title] = t, xe[t.title] = a,
|
|
539
|
-
const d =
|
|
549
|
+
const xt = {}, Et = {};
|
|
550
|
+
It();
|
|
551
|
+
function K(e, t, n = /* @__PURE__ */ new Map(), a = (r, d, v, c) => d, l = {}, s = (r) => r) {
|
|
552
|
+
return Ie[t.title] = t, xe[t.title] = a, xt[t.title] = l, Et[t.title] = s, (r = {}) => {
|
|
553
|
+
const d = Mt(r, t, n), v = Object.keys(e).reduce((c, m) => (c[m] = e[m].default, c), {});
|
|
540
554
|
return Object.assign(v, d);
|
|
541
555
|
};
|
|
542
556
|
}
|
|
543
557
|
function ee(e, t) {
|
|
544
558
|
return { customClass: t.class, customStyle: t.style };
|
|
545
559
|
}
|
|
546
|
-
const
|
|
560
|
+
const Bt = /* @__PURE__ */ new Map([
|
|
547
561
|
["appearance", ee]
|
|
548
562
|
]);
|
|
549
|
-
function
|
|
563
|
+
function Dt(e, t, n) {
|
|
550
564
|
return t;
|
|
551
565
|
}
|
|
552
|
-
const
|
|
566
|
+
const Tt = "capsule", Lt = "A Farris Component", Rt = "object", Ft = {
|
|
553
567
|
basic: {
|
|
554
568
|
description: "Basic Infomation",
|
|
555
569
|
title: "基本信息",
|
|
@@ -571,11 +585,11 @@ const Dt = "capsule", Tt = "A Farris Component", Lt = "object", Rt = {
|
|
|
571
585
|
}
|
|
572
586
|
}
|
|
573
587
|
}
|
|
574
|
-
},
|
|
575
|
-
title:
|
|
576
|
-
description:
|
|
577
|
-
type:
|
|
578
|
-
categories:
|
|
588
|
+
}, kt = {
|
|
589
|
+
title: Tt,
|
|
590
|
+
description: Lt,
|
|
591
|
+
type: Rt,
|
|
592
|
+
categories: Ft
|
|
579
593
|
}, Be = {
|
|
580
594
|
items: {
|
|
581
595
|
Type: Array,
|
|
@@ -589,7 +603,7 @@ const Dt = "capsule", Tt = "A Farris Component", Lt = "object", Rt = {
|
|
|
589
603
|
*/
|
|
590
604
|
modelValue: { type: String, default: "" },
|
|
591
605
|
type: { type: String, default: "primary" }
|
|
592
|
-
},
|
|
606
|
+
}, Wt = {
|
|
593
607
|
name: { type: String, default: "" },
|
|
594
608
|
value: { type: String, default: "" },
|
|
595
609
|
isActive: { type: Boolean, default: !1 },
|
|
@@ -598,17 +612,17 @@ const Dt = "capsule", Tt = "A Farris Component", Lt = "object", Rt = {
|
|
|
598
612
|
show: { type: Boolean, default: !0 },
|
|
599
613
|
disabled: { type: Boolean, default: !1 }
|
|
600
614
|
};
|
|
601
|
-
K(Be, bt,
|
|
602
|
-
const
|
|
615
|
+
K(Be, bt, Bt, Dt, kt);
|
|
616
|
+
const $t = /* @__PURE__ */ U({
|
|
603
617
|
name: "FCapsuleItem",
|
|
604
|
-
props:
|
|
618
|
+
props: Wt,
|
|
605
619
|
emits: ["mounted", "active"],
|
|
606
620
|
setup(e, t) {
|
|
607
|
-
const n =
|
|
608
|
-
A(() => e.isActive, (
|
|
609
|
-
a.value =
|
|
621
|
+
const n = o(), a = o(e.isActive);
|
|
622
|
+
A(() => e.isActive, (r) => {
|
|
623
|
+
a.value = r;
|
|
610
624
|
});
|
|
611
|
-
const
|
|
625
|
+
const l = R(() => ({
|
|
612
626
|
"f-capsule-item": !0,
|
|
613
627
|
"f-capsule-active-item": a.value,
|
|
614
628
|
"f-capsule-disabled": e.disabled
|
|
@@ -616,36 +630,36 @@ const Wt = /* @__PURE__ */ U({
|
|
|
616
630
|
Q(() => {
|
|
617
631
|
t.emit("mounted", n, e.value);
|
|
618
632
|
});
|
|
619
|
-
function r
|
|
620
|
-
e.disabled || t.emit("active",
|
|
633
|
+
function s(r) {
|
|
634
|
+
e.disabled || t.emit("active", r, {
|
|
621
635
|
name: e.name,
|
|
622
636
|
value: e.value
|
|
623
637
|
});
|
|
624
638
|
}
|
|
625
639
|
return () => i("div", {
|
|
626
640
|
ref: n,
|
|
627
|
-
class:
|
|
628
|
-
onClick: (
|
|
641
|
+
class: l.value,
|
|
642
|
+
onClick: (r) => s(r)
|
|
629
643
|
}, [e.icon && i("i", {
|
|
630
644
|
class: e.icon
|
|
631
645
|
}, null), e.name]);
|
|
632
646
|
}
|
|
633
|
-
}),
|
|
647
|
+
}), Ot = /* @__PURE__ */ U({
|
|
634
648
|
name: "FCapsule",
|
|
635
649
|
props: Be,
|
|
636
650
|
emits: ["change", "update:modelValue"],
|
|
637
651
|
setup(e, t) {
|
|
638
|
-
const n =
|
|
652
|
+
const n = o(e.items), a = o(), l = 2, s = o(e.modelValue), r = o("none"), d = o(e.type), v = R(() => {
|
|
639
653
|
const y = {
|
|
640
654
|
"f-capsule-container": !0
|
|
641
655
|
};
|
|
642
656
|
return d.value && (y[d.value] = !0), y;
|
|
643
|
-
}),
|
|
657
|
+
}), c = R(() => ({})), m = R(() => ({
|
|
644
658
|
"f-capsule": !0
|
|
645
|
-
})), u = l
|
|
659
|
+
})), u = o(l), f = o(0), h = o(0), w = R(() => ({
|
|
646
660
|
left: `${u.value}px`,
|
|
647
661
|
width: `${f.value}px`,
|
|
648
|
-
transition:
|
|
662
|
+
transition: r.value
|
|
649
663
|
})), M = R(() => ({
|
|
650
664
|
width: `${h.value}px`
|
|
651
665
|
})), b = /* @__PURE__ */ new Map();
|
|
@@ -655,22 +669,22 @@ const Wt = /* @__PURE__ */ U({
|
|
|
655
669
|
const F = (p = b.get(y.value)) == null ? void 0 : p.value;
|
|
656
670
|
if (F) {
|
|
657
671
|
const O = F.getBoundingClientRect(), P = a.value.getBoundingClientRect();
|
|
658
|
-
u.value = O.left - P.left +
|
|
672
|
+
u.value = O.left - P.left + l + a.value.scrollLeft, f.value = O.width - 2 * l;
|
|
659
673
|
}
|
|
660
674
|
}
|
|
661
675
|
}
|
|
662
676
|
function D(y, p) {
|
|
663
677
|
const F = y.value;
|
|
664
|
-
|
|
678
|
+
s.value = F, t.emit("update:modelValue", F), S(y), p && t.emit("change", F);
|
|
665
679
|
}
|
|
666
680
|
function L(y) {
|
|
667
681
|
const p = n.value.findIndex((F) => F.value === y);
|
|
668
682
|
p > -1 && D(n.value[p], !1);
|
|
669
683
|
}
|
|
670
684
|
A(() => e.modelValue, (y) => {
|
|
671
|
-
|
|
685
|
+
s.value = y, L(s.value);
|
|
672
686
|
}), Q(async () => {
|
|
673
|
-
L(
|
|
687
|
+
L(s.value), await fe(), r.value = "0.1s ease-out all", h.value = Array.from(b.values()).reduce((y, p) => (y += p.value.clientWidth, y), 0);
|
|
674
688
|
});
|
|
675
689
|
function j(y, p) {
|
|
676
690
|
D(p, !0);
|
|
@@ -684,10 +698,10 @@ const Wt = /* @__PURE__ */ U({
|
|
|
684
698
|
});
|
|
685
699
|
}
|
|
686
700
|
function g(y, p) {
|
|
687
|
-
return i(
|
|
701
|
+
return i($t, {
|
|
688
702
|
name: y.name,
|
|
689
703
|
value: y.value,
|
|
690
|
-
isActive: y.value ===
|
|
704
|
+
isActive: y.value === s.value,
|
|
691
705
|
index: p,
|
|
692
706
|
disabled: y.disabled,
|
|
693
707
|
key: y.value,
|
|
@@ -697,11 +711,11 @@ const Wt = /* @__PURE__ */ U({
|
|
|
697
711
|
}
|
|
698
712
|
return A(() => e.items, async (y) => {
|
|
699
713
|
const p = y.filter((F) => F.show);
|
|
700
|
-
$(p), n.value = p, await fe(), L(
|
|
714
|
+
$(p), n.value = p, await fe(), L(s.value), h.value = Array.from(b.values()).reduce((F, O) => (F += O.value.clientWidth, F), 0);
|
|
701
715
|
}), () => i("span", {
|
|
702
716
|
ref: a,
|
|
703
717
|
class: v.value,
|
|
704
|
-
style:
|
|
718
|
+
style: c.value
|
|
705
719
|
}, [i("span", {
|
|
706
720
|
class: "f-capsule-pane"
|
|
707
721
|
}, [n.value.map((y, p) => g(y, p))]), i("small", {
|
|
@@ -712,9 +726,9 @@ const Wt = /* @__PURE__ */ U({
|
|
|
712
726
|
style: M.value
|
|
713
727
|
}, null)]);
|
|
714
728
|
}
|
|
715
|
-
}),
|
|
729
|
+
}), At = /* @__PURE__ */ new Map([
|
|
716
730
|
["appearance", ee]
|
|
717
|
-
]),
|
|
731
|
+
]), jt = "https://json-schema.org/draft/2020-12/schema", Vt = "https://farris-design.gitee.io/switch.schema.json", zt = "switch", Ht = "A Farris Component", Nt = "object", Pt = {
|
|
718
732
|
id: {
|
|
719
733
|
description: "The unique identifier for a switch",
|
|
720
734
|
type: "string"
|
|
@@ -786,24 +800,23 @@ const Wt = /* @__PURE__ */ U({
|
|
|
786
800
|
type: "enum",
|
|
787
801
|
default: "medium"
|
|
788
802
|
}
|
|
789
|
-
},
|
|
790
|
-
"id",
|
|
803
|
+
}, Gt = [
|
|
791
804
|
"type"
|
|
792
|
-
],
|
|
805
|
+
], qt = [
|
|
793
806
|
"id",
|
|
794
807
|
"appearance",
|
|
795
808
|
"binding"
|
|
796
|
-
],
|
|
797
|
-
$schema:
|
|
798
|
-
$id:
|
|
799
|
-
title:
|
|
800
|
-
description:
|
|
801
|
-
type:
|
|
802
|
-
properties:
|
|
803
|
-
required:
|
|
804
|
-
ignore:
|
|
809
|
+
], Ut = {
|
|
810
|
+
$schema: jt,
|
|
811
|
+
$id: Vt,
|
|
812
|
+
title: zt,
|
|
813
|
+
description: Ht,
|
|
814
|
+
type: Nt,
|
|
815
|
+
properties: Pt,
|
|
816
|
+
required: Gt,
|
|
817
|
+
ignore: qt
|
|
805
818
|
};
|
|
806
|
-
function
|
|
819
|
+
function Xt(e, t, n) {
|
|
807
820
|
return t;
|
|
808
821
|
}
|
|
809
822
|
const De = {
|
|
@@ -827,8 +840,8 @@ const De = {
|
|
|
827
840
|
onModelValueChanged: { type: Function, default: () => {
|
|
828
841
|
} }
|
|
829
842
|
};
|
|
830
|
-
K(De,
|
|
831
|
-
const
|
|
843
|
+
K(De, Ut, At, Xt);
|
|
844
|
+
const Yt = /* @__PURE__ */ U({
|
|
832
845
|
name: "FSwitch",
|
|
833
846
|
props: De,
|
|
834
847
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
@@ -836,14 +849,14 @@ const Xt = /* @__PURE__ */ U({
|
|
|
836
849
|
const {
|
|
837
850
|
disabled: n,
|
|
838
851
|
size: a,
|
|
839
|
-
onLabel:
|
|
840
|
-
offLabel:
|
|
841
|
-
onBackground:
|
|
852
|
+
onLabel: l,
|
|
853
|
+
offLabel: s,
|
|
854
|
+
onBackground: r,
|
|
842
855
|
offBackground: d,
|
|
843
856
|
onColor: v,
|
|
844
|
-
offColor:
|
|
857
|
+
offColor: c,
|
|
845
858
|
readonly: m
|
|
846
|
-
} = Ke(e), u =
|
|
859
|
+
} = Ke(e), u = o(e.modelValue), f = R(() => ({
|
|
847
860
|
switch: !0,
|
|
848
861
|
"f-cmp-switch": !0,
|
|
849
862
|
checked: u.value,
|
|
@@ -853,15 +866,15 @@ const Xt = /* @__PURE__ */ U({
|
|
|
853
866
|
"switch-small": a.value === "small"
|
|
854
867
|
})), h = R(() => u.value ? {
|
|
855
868
|
outline: "none",
|
|
856
|
-
background:
|
|
869
|
+
background: r.value
|
|
857
870
|
} : {
|
|
858
871
|
outline: "none",
|
|
859
872
|
backgroundColor: d.value
|
|
860
873
|
}), w = R(() => u.value ? {
|
|
861
874
|
background: v.value
|
|
862
875
|
} : {
|
|
863
|
-
backgroundColor:
|
|
864
|
-
}), M = R(() => (
|
|
876
|
+
backgroundColor: c.value
|
|
877
|
+
}), M = R(() => (l == null ? void 0 : l.value) || (s == null ? void 0 : s.value));
|
|
865
878
|
function b() {
|
|
866
879
|
m.value || n.value || (u.value = !u.value, t.emit("update:modelValue", u.value));
|
|
867
880
|
}
|
|
@@ -879,18 +892,18 @@ const Xt = /* @__PURE__ */ U({
|
|
|
879
892
|
class: "switch-pane"
|
|
880
893
|
}, [i("span", {
|
|
881
894
|
class: "switch-label-checked"
|
|
882
|
-
}, [
|
|
895
|
+
}, [l == null ? void 0 : l.value]), i("span", {
|
|
883
896
|
class: "switch-label-unchecked"
|
|
884
|
-
}, [
|
|
897
|
+
}, [s == null ? void 0 : s.value])]), i("small", {
|
|
885
898
|
style: w.value
|
|
886
899
|
}, [t.slots.default && t.slots.default()])]);
|
|
887
900
|
}
|
|
888
|
-
}),
|
|
901
|
+
}), Jt = /* @__PURE__ */ U({
|
|
889
902
|
name: "FScreenResolutionSelector",
|
|
890
903
|
props: dt,
|
|
891
904
|
emits: ["screenNameChanged", "currentScreenResolutionChanged", "switchInStandardModeChanged"],
|
|
892
905
|
setup(e, t) {
|
|
893
|
-
const n =
|
|
906
|
+
const n = o([{
|
|
894
907
|
name: "小屏幕",
|
|
895
908
|
code: "SM",
|
|
896
909
|
value: "SM",
|
|
@@ -910,25 +923,25 @@ const Xt = /* @__PURE__ */ U({
|
|
|
910
923
|
code: "EL",
|
|
911
924
|
value: "EL",
|
|
912
925
|
active: !1
|
|
913
|
-
}]), a =
|
|
926
|
+
}]), a = o(e.defaultStates), l = o("MD"), s = o("中等屏幕"), r = o(!0);
|
|
914
927
|
function d(m) {
|
|
915
928
|
n.value.forEach((u) => {
|
|
916
|
-
u.active = u.code === m, u.active && (
|
|
929
|
+
u.active = u.code === m, u.active && (l.value = u.code, s.value = u.name, t.emit("screenNameChanged", s.value), t.emit("currentScreenResolutionChanged", l.value));
|
|
917
930
|
});
|
|
918
931
|
}
|
|
919
932
|
function v() {
|
|
920
|
-
t.emit("switchInStandardModeChanged",
|
|
933
|
+
t.emit("switchInStandardModeChanged", r.value);
|
|
921
934
|
}
|
|
922
|
-
A(
|
|
935
|
+
A(r, () => {
|
|
923
936
|
}), ve(() => {
|
|
924
|
-
a.value.model === "standard" ?
|
|
937
|
+
a.value.model === "standard" ? r.value = !0 : (r.value = !1, v());
|
|
925
938
|
});
|
|
926
|
-
function
|
|
927
|
-
return i(
|
|
939
|
+
function c() {
|
|
940
|
+
return i(Ot, {
|
|
928
941
|
class: "f-layout-editor-screen-resolution-selector-frame",
|
|
929
942
|
items: n.value,
|
|
930
|
-
modelValue:
|
|
931
|
-
"onUpdate:modelValue": (m) =>
|
|
943
|
+
modelValue: l.value,
|
|
944
|
+
"onUpdate:modelValue": (m) => l.value = m,
|
|
932
945
|
onChange: d
|
|
933
946
|
}, null);
|
|
934
947
|
}
|
|
@@ -938,20 +951,20 @@ const Xt = /* @__PURE__ */ U({
|
|
|
938
951
|
class: "f-layout-editor-screen-resolution-selector-header"
|
|
939
952
|
}, [i("div", {
|
|
940
953
|
class: "f-layout-editor-screen-resolution-selector-form"
|
|
941
|
-
}, [q("表单布局配置")])]),
|
|
954
|
+
}, [q("表单布局配置")])]), c(), i("div", {
|
|
942
955
|
class: "f-layout-editor-screen-resolution-selector-switch"
|
|
943
|
-
}, [i(
|
|
956
|
+
}, [i(Yt, {
|
|
944
957
|
class: "f-layout-editor-show-switch",
|
|
945
|
-
modelValue:
|
|
946
|
-
"onUpdate:modelValue": (m) =>
|
|
958
|
+
modelValue: r.value,
|
|
959
|
+
"onUpdate:modelValue": (m) => r.value = m,
|
|
947
960
|
onModelValueChanged: v
|
|
948
|
-
}, null),
|
|
961
|
+
}, null), r.value ? i("div", {
|
|
949
962
|
class: "f-layout-editor-show-switch-label"
|
|
950
963
|
}, [q("标准模式")]) : i("div", {
|
|
951
964
|
class: "f-layout-editor-show-switch-label"
|
|
952
965
|
}, [q("自定义模式")])])]);
|
|
953
966
|
}
|
|
954
|
-
}),
|
|
967
|
+
}), Qt = {
|
|
955
968
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
956
969
|
currentScreenResolution: { type: String, default: "" },
|
|
957
970
|
/** 模式开关 */
|
|
@@ -960,23 +973,23 @@ const Xt = /* @__PURE__ */ U({
|
|
|
960
973
|
currentArea: { type: Object, default: [] },
|
|
961
974
|
/** 接受组件列表区传入的二维数组 */
|
|
962
975
|
twoDimensionalArray: { type: Array, default: [] }
|
|
963
|
-
},
|
|
976
|
+
}, Zt = {
|
|
964
977
|
/** 单个组件的预览状态 */
|
|
965
978
|
item: { type: Object, default: {} },
|
|
966
979
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
967
980
|
currentScreenResolution: { type: String, default: "" },
|
|
968
981
|
/** 接受switch状态,若为自定义模式,则需要改变Col-num的num来源;*/
|
|
969
982
|
switchInStandardMode: { type: Boolean, default: !1 }
|
|
970
|
-
},
|
|
983
|
+
}, _t = /* @__PURE__ */ U({
|
|
971
984
|
name: "FColumnWidthView",
|
|
972
|
-
props:
|
|
985
|
+
props: Zt,
|
|
973
986
|
emits: [],
|
|
974
987
|
setup(e, t) {
|
|
975
|
-
const n =
|
|
976
|
-
return A([() => e.item, () => e.currentScreenResolution], ([
|
|
977
|
-
|
|
988
|
+
const n = o(e.item), a = o(e.currentScreenResolution), l = R(() => `col-${n.value[`columnIn${a.value}`]}`);
|
|
989
|
+
return A([() => e.item, () => e.currentScreenResolution], ([s, r], [d, v]) => {
|
|
990
|
+
s !== d && (n.value = s), r !== v && (a.value = r);
|
|
978
991
|
}), () => i("div", {
|
|
979
|
-
class:
|
|
992
|
+
class: l.value
|
|
980
993
|
}, [i("div", {
|
|
981
994
|
class: "f-layout-editor-column-width-view",
|
|
982
995
|
title: n.value.label
|
|
@@ -984,14 +997,14 @@ const Xt = /* @__PURE__ */ U({
|
|
|
984
997
|
class: "f-layout-editor-column-width-view-label"
|
|
985
998
|
}, [n.value.label])])]);
|
|
986
999
|
}
|
|
987
|
-
}),
|
|
1000
|
+
}), Kt = /* @__PURE__ */ U({
|
|
988
1001
|
name: "FPreview",
|
|
989
|
-
props:
|
|
1002
|
+
props: Qt,
|
|
990
1003
|
emits: ["update:twoDimensionalArray"],
|
|
991
1004
|
setup(e, t) {
|
|
992
|
-
const n =
|
|
1005
|
+
const n = o(e.currentScreenResolution), a = o(e.switchInStandardMode), l = o(e.currentArea), s = o(e.twoDimensionalArray), r = o([]);
|
|
993
1006
|
A([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([u, f, h], [w, M, b]) => {
|
|
994
|
-
u !== w && (
|
|
1007
|
+
u !== w && (l.value = u), f !== M && (a.value = f), h !== b && (n.value = h);
|
|
995
1008
|
});
|
|
996
1009
|
function d(u, f) {
|
|
997
1010
|
const h = [];
|
|
@@ -1003,18 +1016,18 @@ const Xt = /* @__PURE__ */ U({
|
|
|
1003
1016
|
function v() {
|
|
1004
1017
|
const u = [];
|
|
1005
1018
|
let f = 1;
|
|
1006
|
-
return
|
|
1019
|
+
return r.value.forEach((h) => {
|
|
1007
1020
|
const w = d(h, f);
|
|
1008
1021
|
f += w.length, u.push(w);
|
|
1009
1022
|
}), u;
|
|
1010
1023
|
}
|
|
1011
|
-
function
|
|
1012
|
-
|
|
1024
|
+
function c() {
|
|
1025
|
+
r.value = X(s.value), r.value = v();
|
|
1013
1026
|
}
|
|
1014
1027
|
A(() => e.twoDimensionalArray, () => {
|
|
1015
|
-
|
|
1028
|
+
s.value = e.twoDimensionalArray, c();
|
|
1016
1029
|
}), Q(() => {
|
|
1017
|
-
|
|
1030
|
+
c();
|
|
1018
1031
|
});
|
|
1019
1032
|
function m() {
|
|
1020
1033
|
if (a.value)
|
|
@@ -1038,11 +1051,11 @@ const Xt = /* @__PURE__ */ U({
|
|
|
1038
1051
|
class: "f-layout-editor-preview-view f-utils-overflow-xhya"
|
|
1039
1052
|
}, [i("div", {
|
|
1040
1053
|
class: "f-layout-editor-preview-row-group"
|
|
1041
|
-
}, [
|
|
1054
|
+
}, [r.value.map((u) => {
|
|
1042
1055
|
var f, h;
|
|
1043
|
-
return ((f = u[0][0]) == null ? void 0 : f.group.toString()) === ((h =
|
|
1056
|
+
return ((f = u[0][0]) == null ? void 0 : f.group.toString()) === ((h = l.value[0]) == null ? void 0 : h.id) && u.map((w) => i("div", {
|
|
1044
1057
|
class: "f-layout-editor-row"
|
|
1045
|
-
}, [w.map((M) => i(
|
|
1058
|
+
}, [w.map((M) => i(_t, {
|
|
1046
1059
|
item: M,
|
|
1047
1060
|
"onUpdate:item": (b) => M = b,
|
|
1048
1061
|
currentScreenResolution: n.value,
|
|
@@ -1050,7 +1063,7 @@ const Xt = /* @__PURE__ */ U({
|
|
|
1050
1063
|
}, null))]));
|
|
1051
1064
|
})])])]);
|
|
1052
1065
|
}
|
|
1053
|
-
}),
|
|
1066
|
+
}), en = {
|
|
1054
1067
|
/** 用户切换屏幕分辨率-缩写-例:MD; */
|
|
1055
1068
|
currentScreenResolution: { type: String, default: "" },
|
|
1056
1069
|
/** 检测用户是否切换模式 */
|
|
@@ -1068,15 +1081,15 @@ const Xt = /* @__PURE__ */ U({
|
|
|
1068
1081
|
onOriginalDataChanged: { type: Function, default: () => {
|
|
1069
1082
|
} }
|
|
1070
1083
|
};
|
|
1071
|
-
function
|
|
1072
|
-
const n =
|
|
1073
|
-
function
|
|
1084
|
+
function tn(e, t) {
|
|
1085
|
+
const n = o(-1), a = o(!1);
|
|
1086
|
+
function l(u) {
|
|
1074
1087
|
if (u.target.offsetParent) {
|
|
1075
1088
|
const f = u.target.offsetParent, h = f.offsetWidth - u.target.offsetWidth / 2 - 4, w = f.offsetHeight / 2;
|
|
1076
1089
|
u.dataTransfer && u.dataTransfer.setDragImage(f, h, w);
|
|
1077
1090
|
}
|
|
1078
1091
|
}
|
|
1079
|
-
function
|
|
1092
|
+
function s(u) {
|
|
1080
1093
|
if (u) {
|
|
1081
1094
|
const f = e.value.findIndex((h) => h.label === u.label);
|
|
1082
1095
|
setTimeout(() => {
|
|
@@ -1084,8 +1097,8 @@ function en(e, t) {
|
|
|
1084
1097
|
});
|
|
1085
1098
|
}
|
|
1086
1099
|
}
|
|
1087
|
-
function
|
|
1088
|
-
u.stopPropagation(),
|
|
1100
|
+
function r(u, f) {
|
|
1101
|
+
u.stopPropagation(), l(u), s(f);
|
|
1089
1102
|
}
|
|
1090
1103
|
function d(u) {
|
|
1091
1104
|
const f = e.value.findIndex((h) => h.label === u.label);
|
|
@@ -1097,23 +1110,23 @@ function en(e, t) {
|
|
|
1097
1110
|
function v(u, f) {
|
|
1098
1111
|
u.preventDefault(), d(f);
|
|
1099
1112
|
}
|
|
1100
|
-
function
|
|
1113
|
+
function c(u) {
|
|
1101
1114
|
u.preventDefault(), u.dataTransfer && (u.dataTransfer.dropEffect = "move");
|
|
1102
1115
|
}
|
|
1103
1116
|
function m(u, f) {
|
|
1104
1117
|
f && (f.moving = !1), a.value = !1;
|
|
1105
1118
|
}
|
|
1106
1119
|
return {
|
|
1107
|
-
dragstart:
|
|
1120
|
+
dragstart: r,
|
|
1108
1121
|
dragenter: v,
|
|
1109
|
-
dragover:
|
|
1122
|
+
dragover: c,
|
|
1110
1123
|
dragend: m,
|
|
1111
1124
|
isDragging: a
|
|
1112
1125
|
};
|
|
1113
1126
|
}
|
|
1114
|
-
const
|
|
1127
|
+
const nn = /* @__PURE__ */ new Map([
|
|
1115
1128
|
["appearance", ee]
|
|
1116
|
-
]),
|
|
1129
|
+
]), an = "https://json-schema.org/draft/2020-12/schema", ln = "https://farris-design.gitee.io/combo-list.schema.json", on = "combo-list", un = "A Farris Input Component", sn = "object", rn = {
|
|
1117
1130
|
id: {
|
|
1118
1131
|
description: "The unique identifier for a combo list",
|
|
1119
1132
|
type: "string"
|
|
@@ -1239,25 +1252,24 @@ const tn = /* @__PURE__ */ new Map([
|
|
|
1239
1252
|
type: "sting",
|
|
1240
1253
|
default: ""
|
|
1241
1254
|
}
|
|
1242
|
-
},
|
|
1243
|
-
"id",
|
|
1255
|
+
}, cn = [
|
|
1244
1256
|
"type"
|
|
1245
|
-
],
|
|
1257
|
+
], dn = [
|
|
1246
1258
|
"id",
|
|
1247
1259
|
"appearance",
|
|
1248
1260
|
"binding",
|
|
1249
1261
|
"visible"
|
|
1250
|
-
],
|
|
1251
|
-
$schema:
|
|
1252
|
-
$id:
|
|
1253
|
-
title:
|
|
1254
|
-
description:
|
|
1255
|
-
type:
|
|
1256
|
-
properties:
|
|
1257
|
-
required:
|
|
1258
|
-
ignore:
|
|
1262
|
+
], fn = {
|
|
1263
|
+
$schema: an,
|
|
1264
|
+
$id: ln,
|
|
1265
|
+
title: on,
|
|
1266
|
+
description: un,
|
|
1267
|
+
type: sn,
|
|
1268
|
+
properties: rn,
|
|
1269
|
+
required: cn,
|
|
1270
|
+
ignore: dn
|
|
1259
1271
|
};
|
|
1260
|
-
function
|
|
1272
|
+
function vn(e, t, n) {
|
|
1261
1273
|
return t;
|
|
1262
1274
|
}
|
|
1263
1275
|
const Te = {
|
|
@@ -1427,8 +1439,8 @@ const Te = {
|
|
|
1427
1439
|
// 搜索启用高亮
|
|
1428
1440
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1429
1441
|
};
|
|
1430
|
-
K(Te,
|
|
1431
|
-
const
|
|
1442
|
+
K(Te, fn, nn, vn);
|
|
1443
|
+
const pn = {
|
|
1432
1444
|
dataSource: { type: Array, default: [] },
|
|
1433
1445
|
enableSearch: { type: Boolean, default: !1 },
|
|
1434
1446
|
idField: { type: String, default: "id" },
|
|
@@ -1449,16 +1461,16 @@ const vn = {
|
|
|
1449
1461
|
},
|
|
1450
1462
|
// 搜索启用高亮
|
|
1451
1463
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1452
|
-
},
|
|
1464
|
+
}, mn = /* @__PURE__ */ U({
|
|
1453
1465
|
name: "FComboListContainer",
|
|
1454
|
-
props:
|
|
1466
|
+
props: pn,
|
|
1455
1467
|
emits: ["selectionChange"],
|
|
1456
1468
|
setup(e, t) {
|
|
1457
|
-
const n =
|
|
1469
|
+
const n = o(), a = o(e.dataSource), l = o([]), s = o(e.separator), r = o(e.width), d = o(e.maxHeight), v = o(String(e.selectedValues).split(s.value)), c = R(() => e.multiSelect), m = R(() => ({
|
|
1458
1470
|
enableSelectRow: !0,
|
|
1459
1471
|
multiSelect: e.multiSelect,
|
|
1460
1472
|
multiSelectMode: "OnCheckAndClick",
|
|
1461
|
-
showCheckbox:
|
|
1473
|
+
showCheckbox: c.value,
|
|
1462
1474
|
showSelectAll: !1,
|
|
1463
1475
|
showSelection: !0
|
|
1464
1476
|
}));
|
|
@@ -1467,10 +1479,10 @@ const vn = {
|
|
|
1467
1479
|
});
|
|
1468
1480
|
const u = R(() => e.enableSearch ? "SearchBar" : "ContentHeader"), f = R(() => {
|
|
1469
1481
|
const M = {};
|
|
1470
|
-
return
|
|
1482
|
+
return r.value !== void 0 && (M.width = `${r.value}px`), d.value !== void 0 && d.value > 0 && (M.maxHeight = `${d.value}px`), M;
|
|
1471
1483
|
});
|
|
1472
1484
|
function h(M) {
|
|
1473
|
-
|
|
1485
|
+
l.value = M.map((b) => Object.assign({}, b)), v.value = M.map((b) => b[e.idField]), t.emit("selectionChange", l.value);
|
|
1474
1486
|
}
|
|
1475
1487
|
function w(M) {
|
|
1476
1488
|
if (e.enableHighlightSearch)
|
|
@@ -1482,7 +1494,7 @@ const vn = {
|
|
|
1482
1494
|
typeof S == "function" ? b = a.value.filter((D) => S(M, D)) : b = a.value.filter((D) => D[e.valueField].indexOf(M) > -1 || D[e.textField].indexOf(M) > -1), n.value.updateDataSource(b);
|
|
1483
1495
|
}
|
|
1484
1496
|
return A([() => e.selectedValues], ([M]) => {
|
|
1485
|
-
v.value = M.split(
|
|
1497
|
+
v.value = M.split(s.value);
|
|
1486
1498
|
}), () => i("div", {
|
|
1487
1499
|
class: "f-combo-list-container pl-1",
|
|
1488
1500
|
style: f.value
|
|
@@ -1505,18 +1517,18 @@ const vn = {
|
|
|
1505
1517
|
}, null)]);
|
|
1506
1518
|
}
|
|
1507
1519
|
});
|
|
1508
|
-
function
|
|
1509
|
-
const t =
|
|
1510
|
-
function
|
|
1520
|
+
function hn(e) {
|
|
1521
|
+
const t = o(""), n = o(e.modelValue), a = o(e.data || []), l = o(e.editable);
|
|
1522
|
+
function s(u) {
|
|
1511
1523
|
const f = String(u).split(e.separator), h = f.map((b) => [b, !0]), w = new Map(h);
|
|
1512
1524
|
return a.value.filter((b) => w.has(String(b[e.valueField]))).sort((b, S) => {
|
|
1513
1525
|
const D = f.indexOf(b[e.valueField]), L = f.indexOf(S[e.valueField]);
|
|
1514
1526
|
return D - L;
|
|
1515
1527
|
});
|
|
1516
1528
|
}
|
|
1517
|
-
function
|
|
1518
|
-
const f =
|
|
1519
|
-
t.value =
|
|
1529
|
+
function r(u) {
|
|
1530
|
+
const f = s(u).map((h) => h[e.textField]).join(e.separator);
|
|
1531
|
+
t.value = l.value ? f || u : f;
|
|
1520
1532
|
}
|
|
1521
1533
|
function d(u) {
|
|
1522
1534
|
const f = u.split(e.separator).map((w) => [w, !0]), h = new Map(f);
|
|
@@ -1526,10 +1538,10 @@ function mn(e) {
|
|
|
1526
1538
|
const f = {};
|
|
1527
1539
|
return f[e.idField] = u, f[e.textField] = u, [f];
|
|
1528
1540
|
}
|
|
1529
|
-
function
|
|
1541
|
+
function c(u) {
|
|
1530
1542
|
let f = d(u);
|
|
1531
1543
|
const h = f && f.length > 0;
|
|
1532
|
-
return
|
|
1544
|
+
return l.value && !h && (f = v(u)), f;
|
|
1533
1545
|
}
|
|
1534
1546
|
function m() {
|
|
1535
1547
|
const { url: u, method: f = "GET", headers: h = {}, body: w = null } = e.remote, M = f.toLowerCase() === "get" ? { method: f, headers: h } : { method: f, headers: h, body: w };
|
|
@@ -1553,21 +1565,21 @@ function mn(e) {
|
|
|
1553
1565
|
f && (t.value = f[e.textField]);
|
|
1554
1566
|
}
|
|
1555
1567
|
}), A(() => e.modelValue, (u) => {
|
|
1556
|
-
n.value = u,
|
|
1557
|
-
}),
|
|
1568
|
+
n.value = u, r(u);
|
|
1569
|
+
}), r(e.modelValue), { dataSource: a, displayText: t, editable: l, modelValue: n, getItemsByDisplayText: d, getItemsByValue: s, getSelectedItemsByDisplayText: c };
|
|
1558
1570
|
}
|
|
1559
|
-
const
|
|
1571
|
+
const yn = /* @__PURE__ */ U({
|
|
1560
1572
|
name: "FComboList",
|
|
1561
1573
|
props: Te,
|
|
1562
1574
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1563
1575
|
setup(e, t) {
|
|
1564
|
-
const n =
|
|
1576
|
+
const n = o(), a = o(e.disabled), l = o(e.enableClear), s = o(e.enableSearch), r = o(e.readonly), {
|
|
1565
1577
|
dataSource: d,
|
|
1566
1578
|
displayText: v,
|
|
1567
|
-
editable:
|
|
1579
|
+
editable: c,
|
|
1568
1580
|
modelValue: m,
|
|
1569
1581
|
getSelectedItemsByDisplayText: u
|
|
1570
|
-
} =
|
|
1582
|
+
} = hn(e), f = R(() => e.multiSelect), h = R(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1571
1583
|
function w() {
|
|
1572
1584
|
!f.value && n.value && n.value.hidePopup();
|
|
1573
1585
|
}
|
|
@@ -1575,7 +1587,7 @@ const hn = /* @__PURE__ */ U({
|
|
|
1575
1587
|
v.value = B.map(($) => $[e.textField]).join(e.separator), B.length === 1 ? m.value = B[0][e.valueField] : m.value = B.map(($) => $[e.valueField]).join(e.separator), t.emit("update:modelValue", m.value), t.emit("change", B, m.value), w();
|
|
1576
1588
|
}
|
|
1577
1589
|
function b() {
|
|
1578
|
-
|
|
1590
|
+
r.value || n.value.togglePopup();
|
|
1579
1591
|
}
|
|
1580
1592
|
function S(B) {
|
|
1581
1593
|
m.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
@@ -1593,17 +1605,17 @@ const hn = /* @__PURE__ */ U({
|
|
|
1593
1605
|
return t.expose({
|
|
1594
1606
|
getDisplayText: L
|
|
1595
1607
|
}), A([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([B, $, g, y, p]) => {
|
|
1596
|
-
a.value = B,
|
|
1608
|
+
a.value = B, c.value = $, l.value = g, s.value = y, r.value = p;
|
|
1597
1609
|
}), () => i(st, {
|
|
1598
1610
|
ref: n,
|
|
1599
1611
|
id: e.id,
|
|
1600
1612
|
disable: a.value,
|
|
1601
|
-
readonly:
|
|
1613
|
+
readonly: r.value,
|
|
1602
1614
|
forcePlaceholder: e.forcePlaceholder,
|
|
1603
|
-
editable:
|
|
1615
|
+
editable: c.value,
|
|
1604
1616
|
buttonContent: e.dropDownIcon,
|
|
1605
1617
|
placeholder: e.placeholder,
|
|
1606
|
-
enableClear:
|
|
1618
|
+
enableClear: l.value,
|
|
1607
1619
|
maxLength: e.maxLength,
|
|
1608
1620
|
tabIndex: e.tabIndex,
|
|
1609
1621
|
enableTitle: e.enableTitle,
|
|
@@ -1619,7 +1631,7 @@ const hn = /* @__PURE__ */ U({
|
|
|
1619
1631
|
onInput: j,
|
|
1620
1632
|
beforeOpen: e.beforeOpen
|
|
1621
1633
|
}, {
|
|
1622
|
-
default: () => [i(
|
|
1634
|
+
default: () => [i(mn, {
|
|
1623
1635
|
idField: e.idField,
|
|
1624
1636
|
valueField: e.valueField,
|
|
1625
1637
|
textField: e.textField,
|
|
@@ -1627,7 +1639,7 @@ const hn = /* @__PURE__ */ U({
|
|
|
1627
1639
|
dataSource: d.value,
|
|
1628
1640
|
selectedValues: m.value,
|
|
1629
1641
|
multiSelect: e.multiSelect,
|
|
1630
|
-
enableSearch:
|
|
1642
|
+
enableSearch: s.value,
|
|
1631
1643
|
maxHeight: e.maxHeight,
|
|
1632
1644
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1633
1645
|
width: e.fitEditor ? h.value : void 0,
|
|
@@ -1635,7 +1647,7 @@ const hn = /* @__PURE__ */ U({
|
|
|
1635
1647
|
}, null)]
|
|
1636
1648
|
});
|
|
1637
1649
|
}
|
|
1638
|
-
}),
|
|
1650
|
+
}), gn = {
|
|
1639
1651
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
1640
1652
|
currentScreenResolution: { type: String, default: "" },
|
|
1641
1653
|
/** 传入的单个控件的响应式列宽值 */
|
|
@@ -1645,13 +1657,13 @@ const hn = /* @__PURE__ */ U({
|
|
|
1645
1657
|
/** 列数值变化事件 */
|
|
1646
1658
|
fieldChanged: { type: Function, default: () => {
|
|
1647
1659
|
} }
|
|
1648
|
-
},
|
|
1660
|
+
}, bn = /* @__PURE__ */ new Map([
|
|
1649
1661
|
["appearance", ee]
|
|
1650
1662
|
]);
|
|
1651
|
-
function
|
|
1663
|
+
function wn(e, t, n) {
|
|
1652
1664
|
return t;
|
|
1653
1665
|
}
|
|
1654
|
-
const
|
|
1666
|
+
const Sn = "https://json-schema.org/draft/2020-12/schema", Cn = "https://farris-design.gitee.io/radio-button.schema.json", Mn = "radio-button", In = "A Farris Component", xn = "object", En = {
|
|
1655
1667
|
id: {
|
|
1656
1668
|
description: "The unique identifier for radio-button",
|
|
1657
1669
|
type: "string"
|
|
@@ -1713,18 +1725,18 @@ const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-
|
|
|
1713
1725
|
type: "boolean",
|
|
1714
1726
|
default: !0
|
|
1715
1727
|
}
|
|
1716
|
-
},
|
|
1728
|
+
}, Bn = [
|
|
1717
1729
|
"id",
|
|
1718
1730
|
"type"
|
|
1719
|
-
],
|
|
1720
|
-
$schema:
|
|
1721
|
-
$id:
|
|
1722
|
-
title:
|
|
1723
|
-
description:
|
|
1724
|
-
type:
|
|
1725
|
-
properties:
|
|
1726
|
-
required:
|
|
1727
|
-
},
|
|
1731
|
+
], Dn = {
|
|
1732
|
+
$schema: Sn,
|
|
1733
|
+
$id: Cn,
|
|
1734
|
+
title: Mn,
|
|
1735
|
+
description: In,
|
|
1736
|
+
type: xn,
|
|
1737
|
+
properties: En,
|
|
1738
|
+
required: Bn
|
|
1739
|
+
}, Tn = "radio-button", Ln = "A Farris Component", Rn = "object", Fn = {
|
|
1728
1740
|
basic: {
|
|
1729
1741
|
description: "Basic Infomation",
|
|
1730
1742
|
title: "基本信息",
|
|
@@ -1746,11 +1758,11 @@ const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-
|
|
|
1746
1758
|
}
|
|
1747
1759
|
}
|
|
1748
1760
|
}
|
|
1749
|
-
},
|
|
1750
|
-
title:
|
|
1751
|
-
description:
|
|
1752
|
-
type:
|
|
1753
|
-
categories:
|
|
1761
|
+
}, kn = {
|
|
1762
|
+
title: Tn,
|
|
1763
|
+
description: Ln,
|
|
1764
|
+
type: Rn,
|
|
1765
|
+
categories: Fn
|
|
1754
1766
|
}, Le = {
|
|
1755
1767
|
/**
|
|
1756
1768
|
* 单选组枚举数组
|
|
@@ -1766,45 +1778,45 @@ const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-
|
|
|
1766
1778
|
onSelectedValueChanged: { type: Function, default: () => {
|
|
1767
1779
|
} }
|
|
1768
1780
|
};
|
|
1769
|
-
K(Le,
|
|
1770
|
-
const
|
|
1781
|
+
K(Le, Dn, bn, wn, kn);
|
|
1782
|
+
const Wn = /* @__PURE__ */ U({
|
|
1771
1783
|
name: "FRadioButton",
|
|
1772
1784
|
props: Le,
|
|
1773
1785
|
emits: ["selectedValueChanged"],
|
|
1774
1786
|
setup(e, t) {
|
|
1775
|
-
const n =
|
|
1776
|
-
function a(
|
|
1777
|
-
if (
|
|
1787
|
+
const n = o(e.enumData);
|
|
1788
|
+
function a(s, r) {
|
|
1789
|
+
if (s.currentTarget.classList.value = "btn btn-secondary active", s.currentTarget.tagName.toLowerCase() === "label") {
|
|
1778
1790
|
const {
|
|
1779
1791
|
currentTarget: d
|
|
1780
|
-
} =
|
|
1792
|
+
} = s, v = d.parentElement;
|
|
1781
1793
|
Array.from(v.querySelectorAll("label")).filter((m) => m !== d).forEach((m) => m.classList.remove("active"));
|
|
1782
1794
|
}
|
|
1783
|
-
t.emit("selectedValueChanged",
|
|
1795
|
+
t.emit("selectedValueChanged", r);
|
|
1784
1796
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return `${
|
|
1797
|
+
function l(s) {
|
|
1798
|
+
return `${s.text}${e.suffixValue}`;
|
|
1787
1799
|
}
|
|
1788
|
-
return A(() => e.enumData, (
|
|
1789
|
-
|
|
1800
|
+
return A(() => e.enumData, (s, r) => {
|
|
1801
|
+
s !== r && (n.value = e.enumData);
|
|
1790
1802
|
}), () => i("div", {
|
|
1791
1803
|
class: "f-radio-button"
|
|
1792
1804
|
}, [i("div", {
|
|
1793
1805
|
class: ["farris-input-wrap"]
|
|
1794
|
-
}, [n.value.map((
|
|
1795
|
-
class:
|
|
1796
|
-
onClick: (d) => a(d,
|
|
1806
|
+
}, [n.value.map((s, r) => i(ue, null, [i("label", {
|
|
1807
|
+
class: s.active ? "btn btn-secondary active" : "btn btn-secondary",
|
|
1808
|
+
onClick: (d) => a(d, s)
|
|
1797
1809
|
}, [i("span", {
|
|
1798
1810
|
class: "f-radio-button-text"
|
|
1799
|
-
}, [
|
|
1811
|
+
}, [l(s)])])]))])]);
|
|
1800
1812
|
}
|
|
1801
|
-
}),
|
|
1813
|
+
}), $n = /* @__PURE__ */ new Map([
|
|
1802
1814
|
["appearance", ee]
|
|
1803
1815
|
]);
|
|
1804
|
-
function
|
|
1816
|
+
function On(e, t, n) {
|
|
1805
1817
|
return t;
|
|
1806
1818
|
}
|
|
1807
|
-
const
|
|
1819
|
+
const An = "https://json-schema.org/draft/2020-12/schema", jn = "https://farris-design.gitee.io/rate.schema.json", Vn = "rate", zn = "A Farris Component", Hn = "object", Nn = {
|
|
1808
1820
|
id: {
|
|
1809
1821
|
description: "The unique identifier for rate",
|
|
1810
1822
|
type: "string"
|
|
@@ -1866,23 +1878,23 @@ const On = "https://json-schema.org/draft/2020-12/schema", An = "https://farris-
|
|
|
1866
1878
|
type: "boolean",
|
|
1867
1879
|
default: !0
|
|
1868
1880
|
}
|
|
1869
|
-
},
|
|
1881
|
+
}, Pn = [
|
|
1870
1882
|
"id",
|
|
1871
1883
|
"type"
|
|
1872
|
-
],
|
|
1884
|
+
], Gn = [
|
|
1873
1885
|
"id",
|
|
1874
1886
|
"appearance",
|
|
1875
1887
|
"binding"
|
|
1876
|
-
],
|
|
1877
|
-
$schema:
|
|
1878
|
-
$id:
|
|
1879
|
-
title:
|
|
1880
|
-
description:
|
|
1881
|
-
type:
|
|
1882
|
-
properties:
|
|
1883
|
-
required:
|
|
1884
|
-
ignore:
|
|
1885
|
-
},
|
|
1888
|
+
], qn = {
|
|
1889
|
+
$schema: An,
|
|
1890
|
+
$id: jn,
|
|
1891
|
+
title: Vn,
|
|
1892
|
+
description: zn,
|
|
1893
|
+
type: Hn,
|
|
1894
|
+
properties: Nn,
|
|
1895
|
+
required: Pn,
|
|
1896
|
+
ignore: Gn
|
|
1897
|
+
}, Un = "rate", Xn = "A Farris Component", Yn = "object", Jn = {
|
|
1886
1898
|
basic: {
|
|
1887
1899
|
description: "Basic Infomation",
|
|
1888
1900
|
title: "基本信息",
|
|
@@ -1904,12 +1916,12 @@ const On = "https://json-schema.org/draft/2020-12/schema", An = "https://farris-
|
|
|
1904
1916
|
}
|
|
1905
1917
|
}
|
|
1906
1918
|
}
|
|
1907
|
-
},
|
|
1908
|
-
title:
|
|
1909
|
-
description:
|
|
1910
|
-
type:
|
|
1911
|
-
categories:
|
|
1912
|
-
},
|
|
1919
|
+
}, Qn = {
|
|
1920
|
+
title: Un,
|
|
1921
|
+
description: Xn,
|
|
1922
|
+
type: Yn,
|
|
1923
|
+
categories: Jn
|
|
1924
|
+
}, Zn = ["很不满意", "不满意", "一般", "满意", "非常满意"], Re = {
|
|
1913
1925
|
/** 星星大小 */
|
|
1914
1926
|
size: { type: String, default: "large" },
|
|
1915
1927
|
/** 启用半颗星模式 */
|
|
@@ -1931,7 +1943,7 @@ const On = "https://json-schema.org/draft/2020-12/schema", An = "https://farris-
|
|
|
1931
1943
|
/** 禁用单个星星的文字提示 */
|
|
1932
1944
|
toolTipDisabled: { type: Boolean, default: !0 },
|
|
1933
1945
|
/** 默认的满意度文案 */
|
|
1934
|
-
toolTipContents: { type: Array, default:
|
|
1946
|
+
toolTipContents: { type: Array, default: Zn },
|
|
1935
1947
|
/** 启用评分 */
|
|
1936
1948
|
enableScore: { type: Boolean, default: !0 },
|
|
1937
1949
|
/** 启用满意度 */
|
|
@@ -1942,15 +1954,15 @@ const On = "https://json-schema.org/draft/2020-12/schema", An = "https://farris-
|
|
|
1942
1954
|
value: { type: Number, default: 0 },
|
|
1943
1955
|
modelValue: { type: Number, default: 0 }
|
|
1944
1956
|
};
|
|
1945
|
-
K(Re,
|
|
1946
|
-
const
|
|
1957
|
+
K(Re, qn, $n, On, Qn);
|
|
1958
|
+
const _n = /* @__PURE__ */ U({
|
|
1947
1959
|
name: "FRate",
|
|
1948
1960
|
props: Re,
|
|
1949
1961
|
emits: ["selectedValue", "update:modelValue"],
|
|
1950
1962
|
setup(e, t) {
|
|
1951
|
-
const n =
|
|
1963
|
+
const n = o(e.size), a = o(e.enableHalf), l = o(e.enableClear), s = o(e.disabled), r = o(e.pointSystem), d = o(e.lightColor), v = o(e.darkColor), c = o(e.iconClass), m = o(e.numOfStar), u = o(e.toolTipDisabled), f = o(e.toolTipContents), h = o(e.enableScore), w = o(e.enableSatisfaction);
|
|
1952
1964
|
let M;
|
|
1953
|
-
const b =
|
|
1965
|
+
const b = o(0), S = o(0), D = o(0), L = o(e.modelValue);
|
|
1954
1966
|
let j = 1, B, $, g;
|
|
1955
1967
|
const y = 4;
|
|
1956
1968
|
Q(() => {
|
|
@@ -1982,18 +1994,18 @@ const Zn = /* @__PURE__ */ U({
|
|
|
1982
1994
|
M = 24;
|
|
1983
1995
|
break;
|
|
1984
1996
|
}
|
|
1985
|
-
p(), m.value && (j =
|
|
1997
|
+
p(), m.value && (j = r.value / m.value), L.value && F();
|
|
1986
1998
|
}
|
|
1987
1999
|
O();
|
|
1988
2000
|
function P(E) {
|
|
1989
2001
|
return E.className.indexOf("f-icon") !== -1;
|
|
1990
2002
|
}
|
|
1991
2003
|
function Y() {
|
|
1992
|
-
return b.value === S.value &&
|
|
2004
|
+
return b.value === S.value && l.value && S.value !== 0 ? (S.value = 0, L.value = 0, $ = null, b.value = 0, D.value = 0, t.emit("selectedValue", L.value), t.emit("update:modelValue", L.value), !0) : !1;
|
|
1993
2005
|
}
|
|
1994
2006
|
function T(E, W, H) {
|
|
1995
2007
|
if (E.movementX || E.movementY) {
|
|
1996
|
-
if (
|
|
2008
|
+
if (s.value)
|
|
1997
2009
|
return;
|
|
1998
2010
|
w.value && (B = f.value[W - 1]), E.offsetX < M / 2 && a.value === !0 ? (b.value = M * W - M / 2 + y * (W - 1), D.value = j * W - j / 2) : (b.value = M * W + y * (W - 1), D.value = j * W);
|
|
1999
2011
|
}
|
|
@@ -2028,7 +2040,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2028
2040
|
class: "star-light-area",
|
|
2029
2041
|
style: I.value
|
|
2030
2042
|
}, [g.map((E) => i("span", {
|
|
2031
|
-
class: ["f-icon default-light-color ",
|
|
2043
|
+
class: ["f-icon default-light-color ", c.value, {
|
|
2032
2044
|
"f-star-sm": n.value === "small"
|
|
2033
2045
|
}, {
|
|
2034
2046
|
"f-star-md": n.value === "middle"
|
|
@@ -2052,7 +2064,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2052
2064
|
large: n.value === "large"
|
|
2053
2065
|
}]
|
|
2054
2066
|
}, [g.map((E) => i("span", {
|
|
2055
|
-
class: ["f-icon default-dark-color",
|
|
2067
|
+
class: ["f-icon default-dark-color", c.value, {
|
|
2056
2068
|
"f-star-sm": n.value === "small"
|
|
2057
2069
|
}, {
|
|
2058
2070
|
"f-star-md": n.value === "middle"
|
|
@@ -2077,9 +2089,9 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2077
2089
|
}]
|
|
2078
2090
|
}, [h.value && i("span", null, [q(" "), z.value, q(" ")]), w.value && ($ || B) && i("span", null, [q(" "), B || $])])]);
|
|
2079
2091
|
}
|
|
2080
|
-
}),
|
|
2092
|
+
}), Kn = /* @__PURE__ */ U({
|
|
2081
2093
|
name: "FColumnWidthEditor",
|
|
2082
|
-
props:
|
|
2094
|
+
props: gn,
|
|
2083
2095
|
emits: ["fieldChanged"],
|
|
2084
2096
|
setup(e, t) {
|
|
2085
2097
|
const n = {
|
|
@@ -2087,30 +2099,30 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2087
2099
|
MD: ["1", "2"],
|
|
2088
2100
|
LG: ["1", "2", "3", "4"],
|
|
2089
2101
|
EL: ["1", "2", "3", "4", "5", "6"]
|
|
2090
|
-
}, a =
|
|
2102
|
+
}, a = o(e.currentScreenResolution), l = o(e.field), s = o(e.switchInStandardMode), r = o(), d = o(""), v = o(), c = o("customize"), m = o(), u = Se("ResponseLayoutEditorDraggableComposition"), {
|
|
2091
2103
|
dragstart: f,
|
|
2092
2104
|
dragenter: h,
|
|
2093
2105
|
dragover: w,
|
|
2094
2106
|
dragend: M
|
|
2095
2107
|
} = u;
|
|
2096
2108
|
function b() {
|
|
2097
|
-
|
|
2109
|
+
r.value = n == null ? void 0 : n[a.value], s.value ? (d.value = `displayWidthIn${a.value}`, c.value = `${l.value[d.value]}`) : (d.value = `columnIn${a.value}`, m.value = l.value[d.value]);
|
|
2098
2110
|
}
|
|
2099
2111
|
function S(p) {
|
|
2100
|
-
if (
|
|
2112
|
+
if (s.value === !0) {
|
|
2101
2113
|
const F = Number(p == null ? void 0 : p.text);
|
|
2102
2114
|
v.value = F;
|
|
2103
|
-
const O =
|
|
2104
|
-
|
|
2115
|
+
const O = l.value[`columnIn${a.value}`] / l.value[`displayWidthIn${a.value}`];
|
|
2116
|
+
l.value[`columnIn${a.value}`] = F * O, l.value[`displayWidthIn${a.value}`] = Number(F), t.emit("fieldChanged", l.value);
|
|
2105
2117
|
}
|
|
2106
2118
|
}
|
|
2107
2119
|
function D(p) {
|
|
2108
2120
|
m.value = p;
|
|
2109
|
-
const F =
|
|
2110
|
-
|
|
2121
|
+
const F = l.value[`columnIn${a.value}`] / l.value[`displayWidthIn${a.value}`];
|
|
2122
|
+
l.value[`columnIn${a.value}`] = m.value, l.value[`displayWidthIn${a.value}`] = m.value / F, t.emit("fieldChanged", l.value);
|
|
2111
2123
|
}
|
|
2112
2124
|
function L() {
|
|
2113
|
-
return i(
|
|
2125
|
+
return i(_n, {
|
|
2114
2126
|
enableHalf: !0,
|
|
2115
2127
|
size: "extraLarge",
|
|
2116
2128
|
pointSystem: 12,
|
|
@@ -2126,9 +2138,9 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2126
2138
|
}
|
|
2127
2139
|
function j() {
|
|
2128
2140
|
const p = [];
|
|
2129
|
-
|
|
2130
|
-
const F =
|
|
2131
|
-
return
|
|
2141
|
+
r.value = n == null ? void 0 : n[a.value];
|
|
2142
|
+
const F = l.value[`displayWidthIn${a.value}`];
|
|
2143
|
+
return r.value.forEach((O) => {
|
|
2132
2144
|
const P = {
|
|
2133
2145
|
text: O,
|
|
2134
2146
|
active: F.toString() === O
|
|
@@ -2138,7 +2150,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2138
2150
|
}
|
|
2139
2151
|
function B() {
|
|
2140
2152
|
const p = j();
|
|
2141
|
-
return i(
|
|
2153
|
+
return i(Wn, {
|
|
2142
2154
|
enumData: p,
|
|
2143
2155
|
suffixValue: "列",
|
|
2144
2156
|
onSelectedValueChanged: S
|
|
@@ -2148,26 +2160,26 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2148
2160
|
}
|
|
2149
2161
|
function $() {
|
|
2150
2162
|
var p;
|
|
2151
|
-
if (((p =
|
|
2163
|
+
if (((p = l == null ? void 0 : l.value) == null ? void 0 : p.showTopBorder) === 1)
|
|
2152
2164
|
return i("div", {
|
|
2153
2165
|
class: "f-layout-editor-column-width-editor-row"
|
|
2154
2166
|
}, [i("span", {
|
|
2155
2167
|
class: "f-layout-editor-column-width-editor-row-left"
|
|
2156
2168
|
}, null), i("span", {
|
|
2157
2169
|
class: "f-layout-editor-column-width-editor-row-middle"
|
|
2158
|
-
}, [q("第"),
|
|
2170
|
+
}, [q("第"), l.value.componentRow, q("行")]), i("span", {
|
|
2159
2171
|
class: "f-layout-editor-column-width-editor-row-right"
|
|
2160
2172
|
}, null)]);
|
|
2161
2173
|
}
|
|
2162
2174
|
function g() {
|
|
2163
|
-
return
|
|
2175
|
+
return s.value ? i("div", {
|
|
2164
2176
|
class: "f-column-width-editor-switch-standard"
|
|
2165
2177
|
}, [i("div", {
|
|
2166
2178
|
class: "f-layout-editor-column-width-editor-click-button"
|
|
2167
2179
|
}, [B()])]) : i("div", {
|
|
2168
2180
|
class: "f-column-width-editor-switch-customize",
|
|
2169
|
-
onDragenter: (p) => h(p,
|
|
2170
|
-
onDragend: (p) => M(p,
|
|
2181
|
+
onDragenter: (p) => h(p, l.value),
|
|
2182
|
+
onDragend: (p) => M(p, l.value),
|
|
2171
2183
|
onDragover: (p) => w(p)
|
|
2172
2184
|
}, [i("div", {
|
|
2173
2185
|
class: "f-layout-editor-column-width-editor-rectangle"
|
|
@@ -2176,7 +2188,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2176
2188
|
}, [m.value, q("列")]), i("span", {
|
|
2177
2189
|
class: "f-layout-editor-drag-handler f-icon f-icon-drag-vertical",
|
|
2178
2190
|
draggable: "true",
|
|
2179
|
-
onDragstart: (p) => f(p,
|
|
2191
|
+
onDragstart: (p) => f(p, l.value)
|
|
2180
2192
|
}, null)])]);
|
|
2181
2193
|
}
|
|
2182
2194
|
function y() {
|
|
@@ -2185,30 +2197,30 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2185
2197
|
class: "f-layout-editor-column-width-editor-component"
|
|
2186
2198
|
}, [i("div", {
|
|
2187
2199
|
class: "f-layout-editor-column-width-editor-label"
|
|
2188
|
-
}, [(p =
|
|
2200
|
+
}, [(p = l == null ? void 0 : l.value) == null ? void 0 : p.label]), g()]);
|
|
2189
2201
|
}
|
|
2190
2202
|
return A(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([p, F, O], [P, Y, T]) => {
|
|
2191
|
-
O !== T && (a.value = O,
|
|
2203
|
+
O !== T && (a.value = O, r.value = n[a.value], b()), F !== Y && (s.value = F), s.value === !1 && b(), p !== P && (l.value = p);
|
|
2192
2204
|
}), Q(() => {
|
|
2193
2205
|
b();
|
|
2194
2206
|
}), () => i("div", {
|
|
2195
2207
|
class: "f-layout-editor-column-width-editor"
|
|
2196
2208
|
}, [$(), y()]);
|
|
2197
2209
|
}
|
|
2198
|
-
}),
|
|
2210
|
+
}), ea = /* @__PURE__ */ U({
|
|
2199
2211
|
name: "FFieldList",
|
|
2200
|
-
props:
|
|
2212
|
+
props: en,
|
|
2201
2213
|
emits: ["update:currentArea", "twoDimensionalArrayChanged", "originalDataChanged"],
|
|
2202
2214
|
setup(e, t) {
|
|
2203
|
-
const n =
|
|
2215
|
+
const n = o(e.currentScreenResolution), a = o(e.switchInStandardMode), l = o(e.originalData), s = o(e.originalDataCopy), r = o(e.defaultStates), d = o(""), v = o([]), c = o(e.currentArea), m = o(0), u = o(), f = o(0), h = o("1"), w = o([]);
|
|
2204
2216
|
function M() {
|
|
2205
2217
|
const T = [];
|
|
2206
|
-
return
|
|
2218
|
+
return l.value.forEach((k) => {
|
|
2207
2219
|
T.indexOf(k.group) === -1 && T.push(k.group);
|
|
2208
2220
|
}), T;
|
|
2209
2221
|
}
|
|
2210
2222
|
function b() {
|
|
2211
|
-
h.value =
|
|
2223
|
+
h.value = r.value.defaultGroupNumber.toString(), d.value = `区域${h.value}`, c.value = [v.value[Number(h.value) - 1]], t.emit("update:currentArea", c.value);
|
|
2212
2224
|
}
|
|
2213
2225
|
function S() {
|
|
2214
2226
|
var k;
|
|
@@ -2226,7 +2238,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2226
2238
|
let T = [];
|
|
2227
2239
|
u.value = [];
|
|
2228
2240
|
let k = 1;
|
|
2229
|
-
|
|
2241
|
+
l.value.forEach((z) => {
|
|
2230
2242
|
z.group === k || (k += 1, u.value.push(T), T = []), T.push(z);
|
|
2231
2243
|
}), u.value.push(T);
|
|
2232
2244
|
}
|
|
@@ -2242,10 +2254,10 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2242
2254
|
let k = [];
|
|
2243
2255
|
for (const z of T)
|
|
2244
2256
|
k = k.concat(z);
|
|
2245
|
-
|
|
2257
|
+
l.value = X(k), f.value = 0;
|
|
2246
2258
|
}
|
|
2247
2259
|
function B() {
|
|
2248
|
-
u.value[
|
|
2260
|
+
u.value[c.value[0].id - 1] = X(w.value);
|
|
2249
2261
|
const T = [];
|
|
2250
2262
|
f.value = 0, u.value.forEach((k) => {
|
|
2251
2263
|
const z = L(k, f.value);
|
|
@@ -2258,15 +2270,15 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2258
2270
|
return f.value = 0, u.value.forEach((k) => {
|
|
2259
2271
|
const z = L(k, f.value);
|
|
2260
2272
|
T.push(z), f.value = z[z.length - 1].componentRow;
|
|
2261
|
-
}), t.emit("twoDimensionalArrayChanged", u.value), j(T),
|
|
2273
|
+
}), t.emit("twoDimensionalArrayChanged", u.value), j(T), l.value;
|
|
2262
2274
|
}
|
|
2263
2275
|
function g() {
|
|
2264
|
-
w.value = [],
|
|
2265
|
-
T.group === Number(
|
|
2276
|
+
w.value = [], l.value.forEach((T) => {
|
|
2277
|
+
T.group === Number(c.value[0].id) && w.value.push(T);
|
|
2266
2278
|
});
|
|
2267
2279
|
}
|
|
2268
2280
|
function y() {
|
|
2269
|
-
|
|
2281
|
+
l.value = X($()), t.emit("originalDataChanged", l.value);
|
|
2270
2282
|
}
|
|
2271
2283
|
function p(T) {
|
|
2272
2284
|
w.value.forEach((k) => {
|
|
@@ -2275,11 +2287,11 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2275
2287
|
}
|
|
2276
2288
|
function F(T) {
|
|
2277
2289
|
for (let k = 0; k < T.length; k++)
|
|
2278
|
-
|
|
2290
|
+
c.value = [{
|
|
2279
2291
|
id: T[k].id,
|
|
2280
2292
|
label: T[k].label
|
|
2281
2293
|
}];
|
|
2282
|
-
t.emit("update:currentArea",
|
|
2294
|
+
t.emit("update:currentArea", c.value), g(), B();
|
|
2283
2295
|
}
|
|
2284
2296
|
function O() {
|
|
2285
2297
|
return i("div", {
|
|
@@ -2288,7 +2300,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2288
2300
|
class: "f-layout-editor-field-list-header"
|
|
2289
2301
|
}, [q("组件列表")]), i("div", {
|
|
2290
2302
|
class: "f-layout-editor-choose-group"
|
|
2291
|
-
}, [i(
|
|
2303
|
+
}, [i(yn, {
|
|
2292
2304
|
modelValue: h.value,
|
|
2293
2305
|
"onUpdate:modelValue": (T) => h.value = T,
|
|
2294
2306
|
placeholder: "当前可编辑组",
|
|
@@ -2303,7 +2315,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2303
2315
|
function P() {
|
|
2304
2316
|
return i("div", {
|
|
2305
2317
|
class: "f-layout-editor-field-list-content f-utils-overflow-xhya"
|
|
2306
|
-
}, [w.value.map((T) => i(
|
|
2318
|
+
}, [w.value.map((T) => i(Kn, {
|
|
2307
2319
|
key: T.label,
|
|
2308
2320
|
currentScreenResolution: n.value,
|
|
2309
2321
|
field: T,
|
|
@@ -2313,20 +2325,20 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2313
2325
|
onFieldChanged: p
|
|
2314
2326
|
}, null))]);
|
|
2315
2327
|
}
|
|
2316
|
-
const Y =
|
|
2328
|
+
const Y = tn(w, () => {
|
|
2317
2329
|
B(), y(), g();
|
|
2318
2330
|
});
|
|
2319
2331
|
return et("ResponseLayoutEditorDraggableComposition", Y), A(() => e.currentArea, (T, k) => {
|
|
2320
|
-
T !== k && (
|
|
2321
|
-
}), A(
|
|
2332
|
+
T !== k && (c.value = e.currentArea, g());
|
|
2333
|
+
}), A(c, (T, k) => {
|
|
2322
2334
|
T !== k && g();
|
|
2323
2335
|
}), A(() => e.currentGroup, (T, k) => {
|
|
2324
2336
|
T !== k && (d.value = e.currentGroup);
|
|
2325
2337
|
}), A(() => e.currentScreenResolution, (T, k) => {
|
|
2326
|
-
T !== k && (n.value = e.currentScreenResolution, y(), D(),
|
|
2338
|
+
T !== k && (n.value = e.currentScreenResolution, y(), D(), c.value[0] && (w.value = X(u.value[Number(c.value[0].id) - 1])));
|
|
2327
2339
|
}), A(() => e.switchInStandardMode, (T, k) => {
|
|
2328
|
-
T !== k && (a.value = e.switchInStandardMode,
|
|
2329
|
-
}), A(
|
|
2340
|
+
T !== k && (a.value = e.switchInStandardMode, l.value = X(s.value));
|
|
2341
|
+
}), A(r, (T, k) => {
|
|
2330
2342
|
T !== k && y();
|
|
2331
2343
|
}), ve(() => {
|
|
2332
2344
|
S(), $(), g();
|
|
@@ -2349,20 +2361,20 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2349
2361
|
props: ct,
|
|
2350
2362
|
emits: ["close", "submit"],
|
|
2351
2363
|
setup(e, t) {
|
|
2352
|
-
const n =
|
|
2364
|
+
const n = o(e.initialState), a = o(), l = o(), s = o(""), r = o(""), d = o(!0), v = o([{
|
|
2353
2365
|
id: "1",
|
|
2354
2366
|
label: "区域1"
|
|
2355
|
-
}]),
|
|
2367
|
+
}]), c = o([]), m = o(), u = o(e.width), f = o(e.height);
|
|
2356
2368
|
A(() => e.initialState, (p) => {
|
|
2357
2369
|
n.value = p;
|
|
2358
2370
|
}), A([() => e.currentArea, () => e.switchInStandardMode], ([p, F], [O, P]) => {
|
|
2359
2371
|
p !== O && (v.value = p), F !== P && (d.value = F);
|
|
2360
2372
|
});
|
|
2361
2373
|
function h(p) {
|
|
2362
|
-
|
|
2374
|
+
s.value = p;
|
|
2363
2375
|
}
|
|
2364
2376
|
function w(p) {
|
|
2365
|
-
|
|
2377
|
+
r.value = p;
|
|
2366
2378
|
}
|
|
2367
2379
|
function M(p) {
|
|
2368
2380
|
d.value = p;
|
|
@@ -2374,7 +2386,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2374
2386
|
a.value = X(p);
|
|
2375
2387
|
}
|
|
2376
2388
|
function D(p) {
|
|
2377
|
-
|
|
2389
|
+
c.value = p;
|
|
2378
2390
|
}
|
|
2379
2391
|
function L() {
|
|
2380
2392
|
t.emit("close");
|
|
@@ -2383,12 +2395,12 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2383
2395
|
t.emit("submit", a.value);
|
|
2384
2396
|
}
|
|
2385
2397
|
function B() {
|
|
2386
|
-
return i(
|
|
2398
|
+
return i(ea, {
|
|
2387
2399
|
class: "f-utils-fill-flex-column",
|
|
2388
|
-
defaultStates:
|
|
2400
|
+
defaultStates: l.value,
|
|
2389
2401
|
originalDataCopy: m.value,
|
|
2390
|
-
currentScreenResolution:
|
|
2391
|
-
"onUpdate:currentScreenResolution": (p) =>
|
|
2402
|
+
currentScreenResolution: r.value,
|
|
2403
|
+
"onUpdate:currentScreenResolution": (p) => r.value = p,
|
|
2392
2404
|
originalData: a.value,
|
|
2393
2405
|
"onUpdate:originalData": (p) => a.value = p,
|
|
2394
2406
|
switchInStandardMode: d.value,
|
|
@@ -2401,27 +2413,27 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2401
2413
|
}, null);
|
|
2402
2414
|
}
|
|
2403
2415
|
function $() {
|
|
2404
|
-
return i(
|
|
2416
|
+
return i(Kt, {
|
|
2405
2417
|
class: "f-utils-fill-flex-column",
|
|
2406
2418
|
currentArea: v.value,
|
|
2407
2419
|
"onUpdate:currentArea": (p) => v.value = p,
|
|
2408
|
-
currentScreenResolution:
|
|
2409
|
-
"onUpdate:currentScreenResolution": (p) =>
|
|
2420
|
+
currentScreenResolution: r.value,
|
|
2421
|
+
"onUpdate:currentScreenResolution": (p) => r.value = p,
|
|
2410
2422
|
switchInStandardMode: d.value,
|
|
2411
|
-
twoDimensionalArray:
|
|
2412
|
-
"onUpdate:twoDimensionalArray": (p) =>
|
|
2423
|
+
twoDimensionalArray: c.value,
|
|
2424
|
+
"onUpdate:twoDimensionalArray": (p) => c.value = p
|
|
2413
2425
|
}, null);
|
|
2414
2426
|
}
|
|
2415
2427
|
const g = R(() => d.value ? "f-layout-editor-left-standard f-utils-fill-flex-column" : "f-layout-editor-left-customize f-utils-fill-flex-column"), y = R(() => d.value ? "f-layout-editor-right-standard f-utils-fill-flex-column" : "f-layout-editor-right-customize f-utils-fill-flex-column");
|
|
2416
2428
|
return ve(() => {
|
|
2417
|
-
a.value = X(n.value.importData), m.value = X(n.value.importData),
|
|
2429
|
+
a.value = X(n.value.importData), m.value = X(n.value.importData), l.value = n.value.defaultState, s.value = "中等屏幕", r.value = "MD";
|
|
2418
2430
|
}), (p) => i("div", {
|
|
2419
2431
|
class: "f-layout-editor f-utils-flex-column",
|
|
2420
2432
|
style: "height:" + f.value + "px;width:" + u.value + "px;"
|
|
2421
2433
|
}, [i("div", {
|
|
2422
2434
|
class: "f-layout-editor-top"
|
|
2423
|
-
}, [i(
|
|
2424
|
-
defaultStates:
|
|
2435
|
+
}, [i(Jt, {
|
|
2436
|
+
defaultStates: l.value,
|
|
2425
2437
|
onScreenNameChanged: h,
|
|
2426
2438
|
onCurrentScreenResolutionChanged: w,
|
|
2427
2439
|
onSwitchInStandardModeChanged: M
|
|
@@ -2451,25 +2463,25 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2451
2463
|
class: "f-layout-editor-text-sure"
|
|
2452
2464
|
}, [q("确认")])])])])]);
|
|
2453
2465
|
}
|
|
2454
|
-
}),
|
|
2466
|
+
}), ta = /* @__PURE__ */ new Map([
|
|
2455
2467
|
["appearance", ee]
|
|
2456
2468
|
]);
|
|
2457
|
-
function ta(e, t, n, a) {
|
|
2458
|
-
const o = e.getSchemaByType("section");
|
|
2459
|
-
return o.id = `${a}-section`, o.appearance = { class: "f-section-form f-section-in-main" }, o.mainTitle = "标题", o.contents = [t], o;
|
|
2460
|
-
}
|
|
2461
2469
|
function na(e, t, n, a) {
|
|
2462
|
-
const
|
|
2463
|
-
return
|
|
2470
|
+
const l = e.getSchemaByType("section");
|
|
2471
|
+
return l.id = `${a}-section`, l.appearance = { class: "f-section-form f-section-in-main" }, l.mainTitle = "标题", l.contents = [t], l;
|
|
2472
|
+
}
|
|
2473
|
+
function aa(e, t, n, a) {
|
|
2474
|
+
const l = e.getSchemaByType("component");
|
|
2475
|
+
return l.id = `${a}-component`, l.componentType = "form-col-1", l.appearance = {
|
|
2464
2476
|
class: "f-struct-form f-struct-wrapper"
|
|
2465
|
-
},
|
|
2477
|
+
}, l.contents = [t], l;
|
|
2466
2478
|
}
|
|
2467
|
-
function
|
|
2479
|
+
function la(e, t, n) {
|
|
2468
2480
|
t.appearance = { class: "f-form-layout farris-form farris-form-controls-inline" };
|
|
2469
|
-
const a =
|
|
2470
|
-
return
|
|
2481
|
+
const a = na(e, t, n, t.id);
|
|
2482
|
+
return aa(e, a, n, t.id);
|
|
2471
2483
|
}
|
|
2472
|
-
const
|
|
2484
|
+
const oa = "https://json-schema.org/draft/2020-12/schema", ia = "https://farris-design.gitee.io/response-layout-editor-setting.schema.json", ua = "response-layout-editor-setting", sa = "A Farris Data Collection Component", ra = "object", ca = {
|
|
2473
2485
|
id: {
|
|
2474
2486
|
description: "The unique identifier for response layout editor",
|
|
2475
2487
|
type: "string"
|
|
@@ -2497,18 +2509,18 @@ const la = "https://json-schema.org/draft/2020-12/schema", oa = "https://farris-
|
|
|
2497
2509
|
type: "array",
|
|
2498
2510
|
default: []
|
|
2499
2511
|
}
|
|
2500
|
-
},
|
|
2512
|
+
}, da = [
|
|
2501
2513
|
"id",
|
|
2502
2514
|
"type"
|
|
2503
|
-
],
|
|
2504
|
-
$schema:
|
|
2505
|
-
$id:
|
|
2506
|
-
title:
|
|
2507
|
-
description:
|
|
2508
|
-
type:
|
|
2509
|
-
properties:
|
|
2510
|
-
required:
|
|
2511
|
-
},
|
|
2515
|
+
], fa = {
|
|
2516
|
+
$schema: oa,
|
|
2517
|
+
$id: ia,
|
|
2518
|
+
title: ua,
|
|
2519
|
+
description: sa,
|
|
2520
|
+
type: ra,
|
|
2521
|
+
properties: ca,
|
|
2522
|
+
required: da
|
|
2523
|
+
}, va = "response-form", pa = "A Farris Component", ma = "object", ha = {
|
|
2512
2524
|
basic: {
|
|
2513
2525
|
description: "Basic Infomation",
|
|
2514
2526
|
title: "基本信息",
|
|
@@ -2530,11 +2542,11 @@ const la = "https://json-schema.org/draft/2020-12/schema", oa = "https://farris-
|
|
|
2530
2542
|
}
|
|
2531
2543
|
}
|
|
2532
2544
|
}
|
|
2533
|
-
},
|
|
2534
|
-
title:
|
|
2535
|
-
description:
|
|
2536
|
-
type:
|
|
2537
|
-
categories:
|
|
2545
|
+
}, ya = {
|
|
2546
|
+
title: va,
|
|
2547
|
+
description: pa,
|
|
2548
|
+
type: ma,
|
|
2549
|
+
categories: ha
|
|
2538
2550
|
}, me = {
|
|
2539
2551
|
/** 接受传入的原始数据的defaultState */
|
|
2540
2552
|
initialState: { type: Object },
|
|
@@ -2543,7 +2555,7 @@ const la = "https://json-schema.org/draft/2020-12/schema", oa = "https://farris-
|
|
|
2543
2555
|
/** 页面宽度 */
|
|
2544
2556
|
width: { type: Number, default: 750 },
|
|
2545
2557
|
modelValue: { type: Object }
|
|
2546
|
-
}, we = K(me,
|
|
2558
|
+
}, we = K(me, fa, ta, la, ya), ga = {
|
|
2547
2559
|
/**
|
|
2548
2560
|
* 自定义类
|
|
2549
2561
|
*/
|
|
@@ -2611,8 +2623,8 @@ class G {
|
|
|
2611
2623
|
static getTransformInfo(t) {
|
|
2612
2624
|
const a = window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
2613
2625
|
if (a.length >= 6) {
|
|
2614
|
-
const
|
|
2615
|
-
return { x:
|
|
2626
|
+
const l = parseInt(a[4], 10), s = parseInt(a[5], 10);
|
|
2627
|
+
return { x: l, y: s };
|
|
2616
2628
|
}
|
|
2617
2629
|
return { x: 0, y: 0 };
|
|
2618
2630
|
}
|
|
@@ -2636,8 +2648,8 @@ class G {
|
|
|
2636
2648
|
if (window) {
|
|
2637
2649
|
const a = window.getComputedStyle(t);
|
|
2638
2650
|
if (a) {
|
|
2639
|
-
const
|
|
2640
|
-
n.x = isNaN(
|
|
2651
|
+
const l = parseInt(a.getPropertyValue("left"), 10), s = parseInt(a.getPropertyValue("top"), 10);
|
|
2652
|
+
n.x = isNaN(l) ? 0 : l, n.y = isNaN(s) ? 0 : s;
|
|
2641
2653
|
}
|
|
2642
2654
|
return n;
|
|
2643
2655
|
}
|
|
@@ -2687,8 +2699,8 @@ class _ {
|
|
|
2687
2699
|
return this.width = t.width, this.height = t.height, this;
|
|
2688
2700
|
}
|
|
2689
2701
|
}
|
|
2690
|
-
function
|
|
2691
|
-
const n =
|
|
2702
|
+
function ba(e, t) {
|
|
2703
|
+
const n = o(), a = o(), l = o(), s = o(), r = o(), d = o(), v = o(), c = o(), m = o(), u = o(), f = o(), h = o(), w = o(e.draggable), M = o(!1);
|
|
2692
2704
|
function b() {
|
|
2693
2705
|
const I = a.value || document.body, x = window.getComputedStyle(I);
|
|
2694
2706
|
if (!x || !n.value)
|
|
@@ -2700,9 +2712,9 @@ function ga(e, t) {
|
|
|
2700
2712
|
}
|
|
2701
2713
|
function S(I) {
|
|
2702
2714
|
if (n.value) {
|
|
2703
|
-
|
|
2715
|
+
s.value = _.getCurrent(n.value), r.value = G.getCurrent(n.value), d.value = s.value ? _.copy(s.value) : null, v.value = r.value ? G.copy(r.value) : null, b();
|
|
2704
2716
|
const x = I.target.getAttribute("type") || "";
|
|
2705
|
-
|
|
2717
|
+
c.value = {
|
|
2706
2718
|
n: !!x.match(/n/),
|
|
2707
2719
|
s: !!x.match(/s/),
|
|
2708
2720
|
w: !!x.match(/w/),
|
|
@@ -2714,28 +2726,28 @@ function ga(e, t) {
|
|
|
2714
2726
|
var I, x, E, W;
|
|
2715
2727
|
if (n.value) {
|
|
2716
2728
|
const H = n.value;
|
|
2717
|
-
|
|
2729
|
+
c.value && ((c.value.n || c.value.s) && ((I = d.value) != null && I.height) && (H.style.height = d.value.height + "px"), (c.value.w || c.value.e) && ((x = d.value) != null && x.width) && (H.style.width = d.value.width + "px"), v.value && ((E = v.value) != null && E.x && (H.style.left = v.value.x + "px"), (W = v.value) != null && W.y && (H.style.top = v.value.y + "px")));
|
|
2718
2730
|
}
|
|
2719
2731
|
}
|
|
2720
2732
|
function L() {
|
|
2721
2733
|
const I = e.minHeight ? e.minHeight : 1, x = e.minWidth ? e.minWidth : 1;
|
|
2722
|
-
d.value && v.value &&
|
|
2734
|
+
d.value && v.value && c.value && s.value && (d.value.height < I && (d.value.height = I, c.value.n && r.value && (v.value.y = r.value.y + (s.value.height - I))), d.value.width < x && (d.value.width = x, c.value.w && r.value && (v.value.x = r.value.x + (s.value.width - x))), e.maxHeight && d.value.height > e.maxHeight && (d.value.height = e.maxHeight, r.value && c.value.n && (v.value.y = r.value.y + (s.value.height - e.maxHeight))), e.maxWidth && d.value.width > e.maxWidth && (d.value.width = e.maxWidth, c.value.w && r.value && (v.value.x = r.value.x + (s.value.width - e.maxWidth))));
|
|
2723
2735
|
}
|
|
2724
2736
|
function j() {
|
|
2725
2737
|
if (a.value) {
|
|
2726
2738
|
const I = u.value;
|
|
2727
|
-
if (v.value && d.value &&
|
|
2739
|
+
if (v.value && d.value && c.value && s.value) {
|
|
2728
2740
|
const x = I.width - I.pr - I.deltaL - I.translateX - v.value.x, E = I.height - I.pb - I.deltaT - I.translateY - v.value.y;
|
|
2729
|
-
|
|
2741
|
+
c.value.n && v.value.y + I.translateY < 0 && r.value && (v.value.y = -I.translateY, d.value.height = s.value.height + r.value.y + I.translateY), c.value.w && v.value.x + I.translateX < 0 && r.value && (v.value.x = -I.translateX, d.value.width = s.value.width + r.value.x + I.translateX), d.value.width > x && (d.value.width = x), d.value.height > E && (d.value.height = E);
|
|
2730
2742
|
}
|
|
2731
2743
|
}
|
|
2732
2744
|
}
|
|
2733
2745
|
function B(I) {
|
|
2734
|
-
if (!
|
|
2746
|
+
if (!l.value || !s.value || !r.value || !c.value)
|
|
2735
2747
|
return;
|
|
2736
|
-
I.subtract(
|
|
2748
|
+
I.subtract(l.value);
|
|
2737
2749
|
const x = I.x, E = I.y;
|
|
2738
|
-
|
|
2750
|
+
c.value.n ? (v.value.y = r.value.y + E, d.value.height = s.value.height - E) : c.value.s && (d.value.height = s.value.height + E), c.value.e ? d.value.width = s.value.width + x : c.value.w && (d.value.width = s.value.width - x, v.value.x = r.value.x + x), j(), L(), D();
|
|
2739
2751
|
}
|
|
2740
2752
|
function $(I) {
|
|
2741
2753
|
if (!m.value)
|
|
@@ -2769,13 +2781,13 @@ function ga(e, t) {
|
|
|
2769
2781
|
const x = g();
|
|
2770
2782
|
f.value = x;
|
|
2771
2783
|
}
|
|
2772
|
-
|
|
2784
|
+
l.value = void 0, s.value = null, r.value = null, d.value = null, v.value = null, c.value = null, m.value = null, document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", y);
|
|
2773
2785
|
}
|
|
2774
2786
|
function p() {
|
|
2775
2787
|
document.addEventListener("mousemove", $), document.addEventListener("mouseup", y);
|
|
2776
2788
|
}
|
|
2777
2789
|
function F(I) {
|
|
2778
|
-
I instanceof MouseEvent && I.button === 2 || w.value && (I.stopPropagation(), I.preventDefault(),
|
|
2790
|
+
I instanceof MouseEvent && I.button === 2 || w.value && (I.stopPropagation(), I.preventDefault(), l.value = G.fromEvent(I), m.value = I.target, S(I), p());
|
|
2779
2791
|
}
|
|
2780
2792
|
function O(I) {
|
|
2781
2793
|
return n.value = I, i(ue, null, [i("div", {
|
|
@@ -2872,10 +2884,10 @@ function ga(e, t) {
|
|
|
2872
2884
|
unWindowResizeHandle: z
|
|
2873
2885
|
};
|
|
2874
2886
|
}
|
|
2875
|
-
function
|
|
2876
|
-
const a =
|
|
2887
|
+
function wa(e, t, n) {
|
|
2888
|
+
const a = o(), l = o(e.draggable), s = o(e.lockAxis), r = o(), d = o(), v = o(!1), c = o(new G(0, 0)), m = o(new G(0, 0)), u = o(new G(0, 0)), f = o(new G(0, 0));
|
|
2877
2889
|
A(() => n.value, (g) => {
|
|
2878
|
-
|
|
2890
|
+
r.value.style.cursor = g ? "move" : "default";
|
|
2879
2891
|
});
|
|
2880
2892
|
function h(g, y) {
|
|
2881
2893
|
if (y.tagName === "BUTTON")
|
|
@@ -2890,7 +2902,7 @@ function ba(e, t, n) {
|
|
|
2890
2902
|
function w() {
|
|
2891
2903
|
var F, O;
|
|
2892
2904
|
let g = u.value.x + m.value.x, y = u.value.y + m.value.y;
|
|
2893
|
-
|
|
2905
|
+
s.value === "x" ? (g = ((F = c.value) == null ? void 0 : F.x) || 0, u.value.x = 0) : s.value === "y" && (y = ((O = c.value) == null ? void 0 : O.y) || 0, u.value.y = 0);
|
|
2894
2906
|
const p = `translate3d(${Math.round(g)}px, ${Math.round(y)}px, 0px)`;
|
|
2895
2907
|
a.value && (a.value.style.transform = p), f.value.x = g, f.value.y = y;
|
|
2896
2908
|
}
|
|
@@ -2906,17 +2918,17 @@ function ba(e, t, n) {
|
|
|
2906
2918
|
return p.top || (u.value.y -= y.top - g.top), p.bottom || (u.value.y -= y.bottom - g.bottom), p.right || (u.value.x -= y.right - g.right), p.left || (u.value.x -= y.left - g.left), w(), p;
|
|
2907
2919
|
}
|
|
2908
2920
|
function b(g) {
|
|
2909
|
-
g && (
|
|
2921
|
+
g && (c.value && g.subtract(c.value), u.value.set(g), w(), M());
|
|
2910
2922
|
}
|
|
2911
2923
|
function S(g) {
|
|
2912
|
-
v.value &&
|
|
2924
|
+
v.value && l.value && (g.stopPropagation(), g.preventDefault(), b(G.fromEvent(g, r.value)));
|
|
2913
2925
|
}
|
|
2914
2926
|
function D() {
|
|
2915
2927
|
var g;
|
|
2916
2928
|
v.value && (v.value = !1, m.value.add(u.value), u.value.reset(), (g = a.value) == null || g.classList.remove("ng-dragging"), document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", D));
|
|
2917
2929
|
}
|
|
2918
2930
|
function L() {
|
|
2919
|
-
!v.value &&
|
|
2931
|
+
!v.value && r.value && (v.value = !0, r.value.classList.add("ng-dragging"), document.addEventListener("mousemove", S), document.addEventListener("mouseup", D));
|
|
2920
2932
|
}
|
|
2921
2933
|
function j() {
|
|
2922
2934
|
if (a.value) {
|
|
@@ -2930,21 +2942,21 @@ function ba(e, t, n) {
|
|
|
2930
2942
|
if (!n.value || g instanceof MouseEvent && g.button === 2)
|
|
2931
2943
|
return;
|
|
2932
2944
|
const y = g.target || g.srcElement;
|
|
2933
|
-
|
|
2945
|
+
r.value !== void 0 && y && !h(y, r.value) || l.value !== !1 && (document.body.click(), g.stopPropagation(), g.preventDefault(), c.value = G.fromEvent(g, a.value), j(), L());
|
|
2934
2946
|
}
|
|
2935
2947
|
function $(g, y, p) {
|
|
2936
|
-
if (
|
|
2948
|
+
if (l.value && y) {
|
|
2937
2949
|
if (g)
|
|
2938
|
-
|
|
2950
|
+
r.value = g;
|
|
2939
2951
|
else if (e.dragHandle) {
|
|
2940
2952
|
if (e.dragHandle instanceof HTMLElement)
|
|
2941
|
-
|
|
2953
|
+
r.value = e.dragHandle;
|
|
2942
2954
|
else if (typeof e.dragHandle == "string") {
|
|
2943
2955
|
const F = y.querySelector(e.dragHandle);
|
|
2944
|
-
F && (
|
|
2956
|
+
F && (r.value = F);
|
|
2945
2957
|
}
|
|
2946
2958
|
}
|
|
2947
|
-
a.value = y, d.value = p,
|
|
2959
|
+
a.value = y, d.value = p, r.value.classList.add("ng-draggable"), r.value.addEventListener("mousedown", B);
|
|
2948
2960
|
}
|
|
2949
2961
|
}
|
|
2950
2962
|
return {
|
|
@@ -2962,32 +2974,32 @@ function Fe(e, t) {
|
|
|
2962
2974
|
};
|
|
2963
2975
|
}
|
|
2964
2976
|
}
|
|
2965
|
-
function
|
|
2966
|
-
const n =
|
|
2977
|
+
function Sa(e, t) {
|
|
2978
|
+
const n = o(e.enableEsc);
|
|
2967
2979
|
let a = null;
|
|
2968
|
-
return n.value ? (a = Fe("Escape", (
|
|
2969
|
-
t.emit("esc", { event:
|
|
2980
|
+
return n.value ? (a = Fe("Escape", (l) => {
|
|
2981
|
+
t.emit("esc", { event: l.event, type: "esc" });
|
|
2970
2982
|
}), {
|
|
2971
2983
|
remove: a
|
|
2972
2984
|
}) : null;
|
|
2973
2985
|
}
|
|
2974
|
-
function
|
|
2975
|
-
const n =
|
|
2986
|
+
function Ca(e, t) {
|
|
2987
|
+
const n = o(e.enableEnter);
|
|
2976
2988
|
let a = null;
|
|
2977
|
-
return n.value ? (a = Fe("Enter", (
|
|
2978
|
-
t.emit("enter", { event:
|
|
2989
|
+
return n.value ? (a = Fe("Enter", (l) => {
|
|
2990
|
+
t.emit("enter", { event: l.event, type: "enter" });
|
|
2979
2991
|
}), {
|
|
2980
2992
|
remove: a
|
|
2981
2993
|
}) : null;
|
|
2982
2994
|
}
|
|
2983
2995
|
const ke = /* @__PURE__ */ U({
|
|
2984
2996
|
name: "FModal",
|
|
2985
|
-
props:
|
|
2997
|
+
props: ga,
|
|
2986
2998
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
|
|
2987
2999
|
setup(e, t) {
|
|
2988
|
-
const n =
|
|
3000
|
+
const n = o(e.width || 300), a = o(e.height || 200), l = o(e.modelValue), s = o(""), r = o(e.class), d = o(e.fitContent), v = o(e.showHeader), c = o(""), m = o(e.showCloseButton), u = o(e.showMaxButton), f = o(!1), h = o(""), w = o(""), M = o(""), b = o(e.showButtons), S = o(e.title), D = o(e.reiszeable), L = o(e.containment || null), j = o();
|
|
2989
3001
|
function B(C, V) {
|
|
2990
|
-
|
|
3002
|
+
l.value = !1, t.emit("update:modelValue", !1), V != null && t.emit(V ? "accept" : "cancel"), t.emit("closed", C);
|
|
2991
3003
|
}
|
|
2992
3004
|
const $ = [{
|
|
2993
3005
|
name: "cancel",
|
|
@@ -3003,7 +3015,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3003
3015
|
handle: (C) => {
|
|
3004
3016
|
B(C, !0);
|
|
3005
3017
|
}
|
|
3006
|
-
}], g =
|
|
3018
|
+
}], g = o(e.buttons && e.buttons.length ? e.buttons : $), y = R(() => !!c.value), p = R(() => !!b.value && !!g.value), F = o(), O = o(), P = o(!1), {
|
|
3007
3019
|
renderResizeBar: Y,
|
|
3008
3020
|
maximize: T,
|
|
3009
3021
|
restore: k,
|
|
@@ -3011,13 +3023,13 @@ const ke = /* @__PURE__ */ U({
|
|
|
3011
3023
|
resizedEventParam: I,
|
|
3012
3024
|
allowDrag: x,
|
|
3013
3025
|
unWindowResizeHandle: E
|
|
3014
|
-
} =
|
|
3026
|
+
} = ba(e), {
|
|
3015
3027
|
registerDraggle: W
|
|
3016
|
-
} =
|
|
3028
|
+
} = wa(e, t, x);
|
|
3017
3029
|
A(() => e.title, (C, V) => {
|
|
3018
3030
|
C !== V && (S.value = C);
|
|
3019
3031
|
}), A(() => e.modelValue, (C, V) => {
|
|
3020
|
-
C !== V && (
|
|
3032
|
+
C !== V && (l.value = C);
|
|
3021
3033
|
}), A(() => e.showHeader, (C, V) => {
|
|
3022
3034
|
C !== V && (v.value = C);
|
|
3023
3035
|
}), A(() => e.showButtons, (C, V) => {
|
|
@@ -3033,7 +3045,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3033
3045
|
const C = document.querySelectorAll(".farris-modal").length;
|
|
3034
3046
|
(!C || C - 1 <= 0) && document.body.classList.remove("modal-open"), j.value && j.value.classList.remove("show");
|
|
3035
3047
|
}
|
|
3036
|
-
const te = R(() => (
|
|
3048
|
+
const te = R(() => (l.value ? document.body.classList.add("modal-open") : H(), l.value)), $e = R(() => {
|
|
3037
3049
|
const C = {
|
|
3038
3050
|
modal: !0,
|
|
3039
3051
|
"farris-modal": !0,
|
|
@@ -3044,7 +3056,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3044
3056
|
var ne;
|
|
3045
3057
|
const C = {
|
|
3046
3058
|
"modal-dialog": !0
|
|
3047
|
-
}, V = (ne =
|
|
3059
|
+
}, V = (ne = r.value) == null ? void 0 : ne.split(" ");
|
|
3048
3060
|
return V == null || V.reduce((ae, Qe) => (ae[Qe] = !0, ae), C), C;
|
|
3049
3061
|
}), Ae = R(() => ({
|
|
3050
3062
|
position: "absolute",
|
|
@@ -3092,7 +3104,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3092
3104
|
}
|
|
3093
3105
|
let se = null, re = null;
|
|
3094
3106
|
Q(() => {
|
|
3095
|
-
O.value && !L.value && (L.value = O.value.parentElement, z.value = L.value, W(F.value, O.value, z.value)), te.value && document.body.classList.add("modal-open"), se =
|
|
3107
|
+
O.value && !L.value && (L.value = O.value.parentElement, z.value = L.value, W(F.value, O.value, z.value)), te.value && document.body.classList.add("modal-open"), se = Sa(e, t), re = Ca(e, t);
|
|
3096
3108
|
}), Ce(() => {
|
|
3097
3109
|
H(), E && E(), se && se.remove(), re && re.remove();
|
|
3098
3110
|
}), t.expose({
|
|
@@ -3143,7 +3155,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3143
3155
|
}, [i("div", {
|
|
3144
3156
|
class: "modal-title"
|
|
3145
3157
|
}, [y.value && i("span", {
|
|
3146
|
-
class:
|
|
3158
|
+
class: c.value,
|
|
3147
3159
|
style: "margin-right: 8px"
|
|
3148
3160
|
}, null), i("span", {
|
|
3149
3161
|
class: "modal-title-label"
|
|
@@ -3169,7 +3181,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3169
3181
|
ref: j,
|
|
3170
3182
|
onClick: Je
|
|
3171
3183
|
}, [i("div", {
|
|
3172
|
-
id:
|
|
3184
|
+
id: s.value,
|
|
3173
3185
|
class: Oe.value,
|
|
3174
3186
|
style: Ae.value,
|
|
3175
3187
|
ref: O
|
|
@@ -3178,7 +3190,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3178
3190
|
}, [v.value && Ye(), i("div", {
|
|
3179
3191
|
class: He.value
|
|
3180
3192
|
}, [(V = (C = t.slots).default) == null ? void 0 : V.call(C), h.value === "iframe" && i("iframe", {
|
|
3181
|
-
title:
|
|
3193
|
+
title: s.value,
|
|
3182
3194
|
class: "f-utils-fill",
|
|
3183
3195
|
width: "100%",
|
|
3184
3196
|
frameborder: "0",
|
|
@@ -3195,15 +3207,15 @@ function We(e) {
|
|
|
3195
3207
|
if (e.render && typeof e.render == "function")
|
|
3196
3208
|
return e.render;
|
|
3197
3209
|
}
|
|
3198
|
-
function
|
|
3210
|
+
function Ma(e) {
|
|
3199
3211
|
const t = document.createElement("div");
|
|
3200
3212
|
t.style.display = "contents";
|
|
3201
3213
|
const n = lt({
|
|
3202
|
-
setup(a,
|
|
3214
|
+
setup(a, l) {
|
|
3203
3215
|
Ce(() => {
|
|
3204
3216
|
document.body.removeChild(t);
|
|
3205
3217
|
});
|
|
3206
|
-
const
|
|
3218
|
+
const s = o(), r = o(e.class || ""), d = o(!!e.showButtons), v = o(!!e.showHeader), c = o(e.showCloseButton == null ? !0 : e.showCloseButton), m = o(!0), u = o(e.title || ""), f = e.acceptCallback || (() => {
|
|
3207
3219
|
}), h = e.rejectCallback || (() => {
|
|
3208
3220
|
}), w = e.closedCallback || ((D) => {
|
|
3209
3221
|
}), M = e.resizeHandle || ((D) => {
|
|
@@ -3211,11 +3223,11 @@ function Ca(e) {
|
|
|
3211
3223
|
m.value = !1, n.unmount(), w(D);
|
|
3212
3224
|
};
|
|
3213
3225
|
return Q(() => {
|
|
3214
|
-
}),
|
|
3215
|
-
modalRef:
|
|
3226
|
+
}), l.expose({
|
|
3227
|
+
modalRef: s
|
|
3216
3228
|
}), () => i(ke, {
|
|
3217
|
-
ref:
|
|
3218
|
-
class:
|
|
3229
|
+
ref: s,
|
|
3230
|
+
class: r.value,
|
|
3219
3231
|
modelValue: m.value,
|
|
3220
3232
|
"onUpdate:modelValue": (D) => m.value = D,
|
|
3221
3233
|
title: u.value,
|
|
@@ -3224,7 +3236,7 @@ function Ca(e) {
|
|
|
3224
3236
|
buttons: e.buttons,
|
|
3225
3237
|
"show-header": v.value,
|
|
3226
3238
|
"show-buttons": d.value,
|
|
3227
|
-
"show-close-button":
|
|
3239
|
+
"show-close-button": c.value,
|
|
3228
3240
|
"show-max-button": !1,
|
|
3229
3241
|
onAccept: f,
|
|
3230
3242
|
onCancel: h,
|
|
@@ -3241,10 +3253,10 @@ function Ca(e) {
|
|
|
3241
3253
|
class he {
|
|
3242
3254
|
constructor(t) {
|
|
3243
3255
|
N(this, "appContext", null);
|
|
3244
|
-
N(this, "modalRef",
|
|
3245
|
-
N(this, "activeModalIndex",
|
|
3256
|
+
N(this, "modalRef", o());
|
|
3257
|
+
N(this, "activeModalIndex", o(0));
|
|
3246
3258
|
N(this, "modalRefs", {});
|
|
3247
|
-
N(this, "isUseEscCloseModal",
|
|
3259
|
+
N(this, "isUseEscCloseModal", o(!1));
|
|
3248
3260
|
N(this, "activeModalInstance", R(() => this.modalRefs[this.activeModalIndex.value]));
|
|
3249
3261
|
this.app = t, this.appContext = t ? t._context : null;
|
|
3250
3262
|
}
|
|
@@ -3257,7 +3269,7 @@ class he {
|
|
|
3257
3269
|
showButtons: !0,
|
|
3258
3270
|
showHeader: !0
|
|
3259
3271
|
}, t);
|
|
3260
|
-
return
|
|
3272
|
+
return Ma(n);
|
|
3261
3273
|
}
|
|
3262
3274
|
open(t) {
|
|
3263
3275
|
const n = document.createDocumentFragment();
|
|
@@ -3266,20 +3278,20 @@ class he {
|
|
|
3266
3278
|
title: "",
|
|
3267
3279
|
showButtons: !0,
|
|
3268
3280
|
showHeader: !0
|
|
3269
|
-
}, t)),
|
|
3270
|
-
}),
|
|
3281
|
+
}, t)), l = o(!0), s = a.value.acceptCallback || (() => {
|
|
3282
|
+
}), r = a.value.rejectCallback || (() => {
|
|
3271
3283
|
}), d = a.value.closedCallback || ((S, D) => {
|
|
3272
3284
|
}), v = a.value.resizeHandle || ((S) => {
|
|
3273
3285
|
});
|
|
3274
|
-
let
|
|
3286
|
+
let c;
|
|
3275
3287
|
const m = We(a.value), u = (S) => {
|
|
3276
3288
|
var L;
|
|
3277
|
-
|
|
3289
|
+
l.value = !1;
|
|
3278
3290
|
const D = (L = S == null ? void 0 : S.target) == null ? void 0 : L.classList.contains("modal_close");
|
|
3279
3291
|
d(S, this.isUseEscCloseModal.value ? "esc" : D ? "icon" : "button");
|
|
3280
3292
|
}, f = (S) => {
|
|
3281
|
-
u(S),
|
|
3282
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], ce(null, n),
|
|
3293
|
+
u(S), c && fe(() => {
|
|
3294
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], ce(null, n), c = null, this.modalRef.value = null, this.modalRefs) {
|
|
3283
3295
|
const D = Object.keys(this.modalRefs).map((L) => Number(L));
|
|
3284
3296
|
D.length > 0 ? this.activeModalIndex.value = Math.max(...D) : this.activeModalIndex.value = 0;
|
|
3285
3297
|
}
|
|
@@ -3290,18 +3302,18 @@ class he {
|
|
|
3290
3302
|
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((D = this.activeModalInstance.value) == null || D.close(S == null ? void 0 : S.event));
|
|
3291
3303
|
}, w = () => i(ke, Me({
|
|
3292
3304
|
ref: this.modalRef,
|
|
3293
|
-
modelValue:
|
|
3294
|
-
"onUpdate:modelValue": (S) =>
|
|
3305
|
+
modelValue: l.value,
|
|
3306
|
+
"onUpdate:modelValue": (S) => l.value = S
|
|
3295
3307
|
}, a.value, {
|
|
3296
|
-
onAccept:
|
|
3297
|
-
onCancel:
|
|
3308
|
+
onAccept: s,
|
|
3309
|
+
onCancel: r,
|
|
3298
3310
|
onClosed: f,
|
|
3299
3311
|
onResize: v,
|
|
3300
3312
|
onEsc: h
|
|
3301
3313
|
}), {
|
|
3302
3314
|
default: () => [m && m(this.app)]
|
|
3303
3315
|
});
|
|
3304
|
-
return
|
|
3316
|
+
return c = ((S) => {
|
|
3305
3317
|
const D = ot(w, S);
|
|
3306
3318
|
return D.appContext = this.appContext, ce(D, n), D;
|
|
3307
3319
|
})({
|
|
@@ -3312,7 +3324,7 @@ class he {
|
|
|
3312
3324
|
a.value = {
|
|
3313
3325
|
...a.value,
|
|
3314
3326
|
...S
|
|
3315
|
-
},
|
|
3327
|
+
}, c && ce(it(c, {
|
|
3316
3328
|
...a
|
|
3317
3329
|
}), n);
|
|
3318
3330
|
},
|
|
@@ -3321,10 +3333,10 @@ class he {
|
|
|
3321
3333
|
};
|
|
3322
3334
|
}
|
|
3323
3335
|
}
|
|
3324
|
-
function
|
|
3336
|
+
function Ia(e, t, n) {
|
|
3325
3337
|
var j;
|
|
3326
|
-
const a = "",
|
|
3327
|
-
function
|
|
3338
|
+
const a = "", l = "", s = o();
|
|
3339
|
+
function r() {
|
|
3328
3340
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
3329
3341
|
}
|
|
3330
3342
|
function d() {
|
|
@@ -3333,7 +3345,7 @@ function Ma(e, t, n) {
|
|
|
3333
3345
|
function v() {
|
|
3334
3346
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
3335
3347
|
}
|
|
3336
|
-
function
|
|
3348
|
+
function c() {
|
|
3337
3349
|
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
3338
3350
|
}
|
|
3339
3351
|
function m(B) {
|
|
@@ -3341,7 +3353,7 @@ function Ma(e, t, n) {
|
|
|
3341
3353
|
return null;
|
|
3342
3354
|
if (B.value.schema && B.value.schema.type === "component")
|
|
3343
3355
|
return B.value;
|
|
3344
|
-
const $ =
|
|
3356
|
+
const $ = o(B == null ? void 0 : B.value.parent), g = m($);
|
|
3345
3357
|
return g || null;
|
|
3346
3358
|
}
|
|
3347
3359
|
function u(B = t) {
|
|
@@ -3377,17 +3389,17 @@ function Ma(e, t, n) {
|
|
|
3377
3389
|
(y = g == null ? void 0 : g.componentInstance) != null && y.value.onRemoveComponent && g.componentInstance.value.onRemoveComponent();
|
|
3378
3390
|
});
|
|
3379
3391
|
}
|
|
3380
|
-
return
|
|
3381
|
-
canMove:
|
|
3392
|
+
return s.value = {
|
|
3393
|
+
canMove: r(),
|
|
3382
3394
|
canSelectParent: d(),
|
|
3383
3395
|
canDelete: v(),
|
|
3384
|
-
canNested: !
|
|
3396
|
+
canNested: !c(),
|
|
3385
3397
|
contents: t == null ? void 0 : t.schema.contents,
|
|
3386
3398
|
elementRef: e,
|
|
3387
3399
|
parent: (j = t == null ? void 0 : t.parent) == null ? void 0 : j.componentInstance,
|
|
3388
3400
|
schema: t == null ? void 0 : t.schema,
|
|
3389
3401
|
styles: a,
|
|
3390
|
-
designerClass:
|
|
3402
|
+
designerClass: l,
|
|
3391
3403
|
canAccepts: f,
|
|
3392
3404
|
getBelongedComponentInstance: m,
|
|
3393
3405
|
getDraggableDesignItemElement: u,
|
|
@@ -3397,27 +3409,27 @@ function Ma(e, t, n) {
|
|
|
3397
3409
|
onAcceptMovedChildElement: M,
|
|
3398
3410
|
onChildElementMovedOut: S,
|
|
3399
3411
|
addNewChildComponentSchema: b,
|
|
3400
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
3401
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3412
|
+
triggerBelongedComponentToMoveWhenMoved: o(!1),
|
|
3413
|
+
triggerBelongedComponentToDeleteWhenDeleted: o(!1),
|
|
3402
3414
|
onRemoveComponent: L
|
|
3403
|
-
},
|
|
3415
|
+
}, s;
|
|
3404
3416
|
}
|
|
3405
|
-
const
|
|
3417
|
+
const xa = /* @__PURE__ */ U({
|
|
3406
3418
|
name: "FResponseLayoutEditorSettingDesign",
|
|
3407
3419
|
props: me,
|
|
3408
3420
|
emits: [],
|
|
3409
3421
|
setup(e, t) {
|
|
3410
|
-
const n =
|
|
3422
|
+
const n = o(e.initialState), a = o(e.width), l = o(e.height), s = o(), r = Se("design-item-context"), d = Ia(s, r);
|
|
3411
3423
|
Q(() => {
|
|
3412
|
-
|
|
3424
|
+
s.value.componentInstance = d;
|
|
3413
3425
|
}), t.expose(d.value);
|
|
3414
3426
|
function v() {
|
|
3415
|
-
const
|
|
3427
|
+
const c = he.show({
|
|
3416
3428
|
// title: '响应式列宽编辑器',
|
|
3417
3429
|
render: () => i(ie, {
|
|
3418
3430
|
initialState: n,
|
|
3419
3431
|
width: a,
|
|
3420
|
-
height:
|
|
3432
|
+
height: l
|
|
3421
3433
|
}, null),
|
|
3422
3434
|
width: 900,
|
|
3423
3435
|
height: 500,
|
|
@@ -3426,20 +3438,20 @@ const Ia = /* @__PURE__ */ U({
|
|
|
3426
3438
|
text: "确定",
|
|
3427
3439
|
iconClass: "f-icon f-icon-check",
|
|
3428
3440
|
handle: () => {
|
|
3429
|
-
|
|
3441
|
+
c.destroy();
|
|
3430
3442
|
}
|
|
3431
3443
|
}, {
|
|
3432
3444
|
class: "btn btn-light",
|
|
3433
3445
|
text: "取消",
|
|
3434
3446
|
iconClass: "f-icon f-icon-close",
|
|
3435
3447
|
handle: () => {
|
|
3436
|
-
|
|
3448
|
+
c.destroy();
|
|
3437
3449
|
}
|
|
3438
3450
|
}]
|
|
3439
3451
|
});
|
|
3440
3452
|
}
|
|
3441
3453
|
return () => i("div", {
|
|
3442
|
-
ref:
|
|
3454
|
+
ref: s,
|
|
3443
3455
|
class: "f-column-width-setting-button",
|
|
3444
3456
|
onClick: v
|
|
3445
3457
|
}, [i("div", {
|
|
@@ -3450,7 +3462,7 @@ const Ia = /* @__PURE__ */ U({
|
|
|
3450
3462
|
class: "f-column-width-setting-button-center"
|
|
3451
3463
|
}, [q("高级设置")])])]);
|
|
3452
3464
|
}
|
|
3453
|
-
}),
|
|
3465
|
+
}), Ea = {
|
|
3454
3466
|
width: { Type: Number, default: 400 },
|
|
3455
3467
|
type: { Type: String, default: "info" },
|
|
3456
3468
|
title: { Type: String, default: "" },
|
|
@@ -3463,45 +3475,45 @@ const Ia = /* @__PURE__ */ U({
|
|
|
3463
3475
|
function ye() {
|
|
3464
3476
|
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
3465
3477
|
}
|
|
3466
|
-
async function
|
|
3478
|
+
async function Ba(e) {
|
|
3467
3479
|
if (!navigator.clipboard)
|
|
3468
3480
|
throw ye();
|
|
3469
3481
|
return navigator.clipboard.writeText(e);
|
|
3470
3482
|
}
|
|
3471
|
-
async function
|
|
3483
|
+
async function Da(e) {
|
|
3472
3484
|
const t = document.createElement("span");
|
|
3473
3485
|
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
3474
3486
|
const n = window.getSelection(), a = window.document.createRange();
|
|
3475
3487
|
n == null || n.removeAllRanges(), a.selectNode(t), n == null || n.addRange(a);
|
|
3476
|
-
let
|
|
3488
|
+
let l = !1;
|
|
3477
3489
|
try {
|
|
3478
|
-
|
|
3490
|
+
l = window.document.execCommand("copy");
|
|
3479
3491
|
} finally {
|
|
3480
3492
|
n == null || n.removeAllRanges(), window.document.body.removeChild(t);
|
|
3481
3493
|
}
|
|
3482
|
-
if (!
|
|
3494
|
+
if (!l)
|
|
3483
3495
|
throw ye();
|
|
3484
3496
|
}
|
|
3485
|
-
async function
|
|
3497
|
+
async function Ta(e) {
|
|
3486
3498
|
try {
|
|
3487
|
-
await
|
|
3499
|
+
await Ba(e);
|
|
3488
3500
|
} catch (t) {
|
|
3489
3501
|
try {
|
|
3490
|
-
await
|
|
3502
|
+
await Da(e);
|
|
3491
3503
|
} catch (n) {
|
|
3492
3504
|
throw n || t || ye();
|
|
3493
3505
|
}
|
|
3494
3506
|
}
|
|
3495
3507
|
}
|
|
3496
|
-
function
|
|
3508
|
+
function La() {
|
|
3497
3509
|
async function e(t) {
|
|
3498
|
-
await
|
|
3510
|
+
await Ta(t);
|
|
3499
3511
|
}
|
|
3500
3512
|
return { onCopy: e };
|
|
3501
3513
|
}
|
|
3502
|
-
function
|
|
3503
|
-
const
|
|
3504
|
-
"font-size": `${
|
|
3514
|
+
function Ra(e, t, n, a) {
|
|
3515
|
+
const l = o(14), s = o(140), r = o(""), d = o(a.value.length), v = R(() => a.value), c = R(() => ({
|
|
3516
|
+
"font-size": `${l.value}px`,
|
|
3505
3517
|
height: "100%"
|
|
3506
3518
|
}));
|
|
3507
3519
|
function m(u) {
|
|
@@ -3514,25 +3526,25 @@ function La(e, t, n, a) {
|
|
|
3514
3526
|
title: "promptMessage",
|
|
3515
3527
|
name: "promptMessage",
|
|
3516
3528
|
class: "form-control",
|
|
3517
|
-
style:
|
|
3529
|
+
style: c.value,
|
|
3518
3530
|
rows: "4",
|
|
3519
|
-
maxlength:
|
|
3531
|
+
maxlength: s.value,
|
|
3520
3532
|
onInput: (u) => m(u)
|
|
3521
3533
|
}, [v.value]), i("span", {
|
|
3522
3534
|
class: "textarea-wordcount",
|
|
3523
|
-
title:
|
|
3535
|
+
title: r.value,
|
|
3524
3536
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
3525
|
-
}, [d.value + " / " +
|
|
3537
|
+
}, [d.value + " / " + s.value])]);
|
|
3526
3538
|
}
|
|
3527
|
-
function
|
|
3528
|
-
const
|
|
3529
|
-
function
|
|
3530
|
-
return
|
|
3539
|
+
function Fa(e, t, n, a) {
|
|
3540
|
+
const l = Ra(e, t, n, a), s = /* @__PURE__ */ new Map([["text-area", l]]);
|
|
3541
|
+
function r(d) {
|
|
3542
|
+
return s.get(d) || null;
|
|
3531
3543
|
}
|
|
3532
|
-
return { getEditorRender:
|
|
3544
|
+
return { getEditorRender: r };
|
|
3533
3545
|
}
|
|
3534
|
-
function
|
|
3535
|
-
const e =
|
|
3546
|
+
function ka() {
|
|
3547
|
+
const e = o(!1), t = o("复制成功");
|
|
3536
3548
|
return {
|
|
3537
3549
|
feedbackStyle: R(() => {
|
|
3538
3550
|
const a = {
|
|
@@ -3557,12 +3569,12 @@ function Fa() {
|
|
|
3557
3569
|
toShowFeedback: e
|
|
3558
3570
|
};
|
|
3559
3571
|
}
|
|
3560
|
-
function
|
|
3572
|
+
function Wa(e, t) {
|
|
3561
3573
|
const n = t.getEditorRender(e.promptEditorType);
|
|
3562
3574
|
return () => n && n();
|
|
3563
3575
|
}
|
|
3564
|
-
function
|
|
3565
|
-
const t =
|
|
3576
|
+
function $a(e) {
|
|
3577
|
+
const t = o(3), n = o(480), a = R(() => !!e.value && !!e.value.date), l = R(() => `发生时间 : ${e.value && e.value.date || ""}`), s = R(() => !!e.value && !!e.value.detail), r = R(() => {
|
|
3566
3578
|
const b = `${n.value}px`;
|
|
3567
3579
|
return {
|
|
3568
3580
|
overflow: "hidden",
|
|
@@ -3572,15 +3584,15 @@ function Wa(e) {
|
|
|
3572
3584
|
"-webkit-line-clamp": t.value,
|
|
3573
3585
|
"max-height": b
|
|
3574
3586
|
};
|
|
3575
|
-
}), d = R(() => e.value && e.value.detail || ""), v = R(() => !0),
|
|
3587
|
+
}), d = R(() => e.value && e.value.detail || ""), v = R(() => !0), c = o(!1), m = o("展开"), u = o("收起"), f = R(() => {
|
|
3576
3588
|
const b = {
|
|
3577
3589
|
display: "block",
|
|
3578
3590
|
color: "#2A87FF"
|
|
3579
3591
|
};
|
|
3580
|
-
return b["text-align"] =
|
|
3592
|
+
return b["text-align"] = c.value ? "" : "right", b;
|
|
3581
3593
|
});
|
|
3582
3594
|
function h(b, S) {
|
|
3583
|
-
|
|
3595
|
+
c.value = !c.value, t.value = c.value ? 20 : 3;
|
|
3584
3596
|
}
|
|
3585
3597
|
function w(b) {
|
|
3586
3598
|
return h();
|
|
@@ -3590,83 +3602,83 @@ function Wa(e) {
|
|
|
3590
3602
|
}
|
|
3591
3603
|
return () => i("div", {
|
|
3592
3604
|
class: "toast-msg-detail"
|
|
3593
|
-
}, [a.value && i("div", null, [
|
|
3605
|
+
}, [a.value && i("div", null, [l.value]), s.value && i("div", {
|
|
3594
3606
|
id: "exception_error_msg",
|
|
3595
3607
|
ref: "exceptionMessageRef",
|
|
3596
|
-
style:
|
|
3608
|
+
style: r.value
|
|
3597
3609
|
}, [q("详细信息 : "), i("span", {
|
|
3598
3610
|
innerHTML: d.value
|
|
3599
3611
|
}, null)]), v.value && i("span", {
|
|
3600
3612
|
style: f.value
|
|
3601
|
-
}, [
|
|
3613
|
+
}, [c.value && i("span", {
|
|
3602
3614
|
onClick: w,
|
|
3603
3615
|
style: "cursor: pointer;"
|
|
3604
|
-
}, [u.value]), !
|
|
3616
|
+
}, [u.value]), !c.value && i("span", {
|
|
3605
3617
|
onClick: M,
|
|
3606
3618
|
style: "cursor: pointer;"
|
|
3607
3619
|
}, [m.value])])]);
|
|
3608
3620
|
}
|
|
3609
|
-
function
|
|
3621
|
+
function Oa(e) {
|
|
3610
3622
|
return () => i("p", {
|
|
3611
3623
|
class: "toast-msg-detail",
|
|
3612
3624
|
innerHTML: e.value
|
|
3613
3625
|
}, null);
|
|
3614
3626
|
}
|
|
3615
|
-
function
|
|
3616
|
-
const
|
|
3627
|
+
function Aa(e, t, n, a) {
|
|
3628
|
+
const l = o(e.exceptionInfo), s = R(() => {
|
|
3617
3629
|
const f = {
|
|
3618
3630
|
"f-icon": !0
|
|
3619
3631
|
}, h = `f-icon-${t.value}`;
|
|
3620
3632
|
return f[h] = !0, f;
|
|
3621
|
-
}),
|
|
3633
|
+
}), r = R(() => n.value || l.value && l.value.message), d = R(() => a.value), v = R(() => !!a.value), c = R(() => !!l.value);
|
|
3622
3634
|
function m() {
|
|
3623
|
-
return
|
|
3635
|
+
return c.value ? $a(l) : v.value ? Oa(d) : () => null;
|
|
3624
3636
|
}
|
|
3625
3637
|
const u = m();
|
|
3626
3638
|
return () => i(ue, null, [i("div", {
|
|
3627
3639
|
class: "float-left modal-tips-iconwrap"
|
|
3628
3640
|
}, [i("span", {
|
|
3629
|
-
class:
|
|
3641
|
+
class: s.value
|
|
3630
3642
|
}, null)]), i("div", {
|
|
3631
3643
|
class: "modal-tips-content"
|
|
3632
3644
|
}, [i("p", {
|
|
3633
3645
|
class: "toast-msg-title",
|
|
3634
|
-
innerHTML:
|
|
3646
|
+
innerHTML: r.value
|
|
3635
3647
|
}, null), u()])]);
|
|
3636
3648
|
}
|
|
3637
|
-
function
|
|
3649
|
+
function ja(e, t, n) {
|
|
3638
3650
|
const {
|
|
3639
3651
|
onCopy: a
|
|
3640
3652
|
} = t, {
|
|
3641
|
-
toShowFeedback:
|
|
3642
|
-
} = n,
|
|
3653
|
+
toShowFeedback: l
|
|
3654
|
+
} = n, s = o("复制成功"), r = o("复制详细信息"), d = o(e.exceptionInfo || {
|
|
3643
3655
|
date: "",
|
|
3644
3656
|
message: "",
|
|
3645
3657
|
detail: ""
|
|
3646
3658
|
}), v = R(() => d.value && d.value.detail || "");
|
|
3647
|
-
function
|
|
3659
|
+
function c(m) {
|
|
3648
3660
|
a(v.value).catch((u) => {
|
|
3649
|
-
|
|
3661
|
+
s.value = "复制失败";
|
|
3650
3662
|
}).finally(() => {
|
|
3651
|
-
|
|
3652
|
-
|
|
3663
|
+
l.value = !0, setTimeout(() => {
|
|
3664
|
+
l.value = !1;
|
|
3653
3665
|
}, 700);
|
|
3654
3666
|
});
|
|
3655
3667
|
}
|
|
3656
3668
|
return () => i("span", {
|
|
3657
3669
|
style: "width: 100%;color: #2A87FF;padding-left: 37px;"
|
|
3658
3670
|
}, [i("span", {
|
|
3659
|
-
onClick:
|
|
3671
|
+
onClick: c,
|
|
3660
3672
|
style: "cursor: pointer;"
|
|
3661
|
-
}, [
|
|
3673
|
+
}, [r.value])]);
|
|
3662
3674
|
}
|
|
3663
|
-
function
|
|
3664
|
-
const
|
|
3675
|
+
function Va(e, t, n, a) {
|
|
3676
|
+
const l = o(e.type), s = o([]), r = o(e.exceptionInfo), d = o(e.okButtonText), v = o(e.cancelButtonText), c = o(!0), m = o(!0), u = R(() => !!(s.value && s.value.length)), f = R(() => r.value && r.value.date && r.value.message && r.value.detail), h = R(() => !(s.value && s.value.length) && (d.value || v.value)), w = R(() => m.value && d.value), M = R(() => c.value && v.value), b = ja(e, n, a);
|
|
3665
3677
|
function S(L) {
|
|
3666
|
-
|
|
3678
|
+
l.value === "question" && t.emit("reject"), t.emit("close");
|
|
3667
3679
|
}
|
|
3668
3680
|
function D(L) {
|
|
3669
|
-
|
|
3681
|
+
l.value === "question" && t.emit("accept"), t.emit("close");
|
|
3670
3682
|
}
|
|
3671
3683
|
return () => i("div", {
|
|
3672
3684
|
class: "modal-footer"
|
|
@@ -3678,7 +3690,7 @@ function ja(e, t, n, a) {
|
|
|
3678
3690
|
type: "button",
|
|
3679
3691
|
class: "btn btn-primary btn-lg",
|
|
3680
3692
|
onClick: D
|
|
3681
|
-
}, [d.value]), u.value &&
|
|
3693
|
+
}, [d.value]), u.value && s.value.length && s.value.map((L) => i("button", {
|
|
3682
3694
|
type: "button",
|
|
3683
3695
|
onClick: L.handle,
|
|
3684
3696
|
class: L.class
|
|
@@ -3688,23 +3700,23 @@ function ja(e, t, n, a) {
|
|
|
3688
3700
|
}
|
|
3689
3701
|
const oe = /* @__PURE__ */ U({
|
|
3690
3702
|
name: "FMessageBox",
|
|
3691
|
-
props:
|
|
3703
|
+
props: Ea,
|
|
3692
3704
|
emits: ["accept", "reject", "close"],
|
|
3693
3705
|
setup(e, t) {
|
|
3694
|
-
const n =
|
|
3706
|
+
const n = o(e.type), a = o(e.title), l = o(e.detail), s = R(() => {
|
|
3695
3707
|
const b = {
|
|
3696
3708
|
"modal-tips": !0,
|
|
3697
3709
|
"d-flex": !0,
|
|
3698
3710
|
"flex-row": !0
|
|
3699
3711
|
}, S = `messager-type-${n.value}`;
|
|
3700
3712
|
return b[S] = !0, b;
|
|
3701
|
-
}),
|
|
3713
|
+
}), r = R(() => {
|
|
3702
3714
|
const b = {};
|
|
3703
3715
|
return n.value === "prompt" ? b.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (b.padding = "0.5rem 1.5rem 1rem 1.5rem"), b;
|
|
3704
|
-
}), d =
|
|
3716
|
+
}), d = La(), v = Fa(e, n, a, l), c = ka(), {
|
|
3705
3717
|
feedbackStyle: m,
|
|
3706
3718
|
feedbackMessage: u
|
|
3707
|
-
} =
|
|
3719
|
+
} = c;
|
|
3708
3720
|
function f() {
|
|
3709
3721
|
return i("div", {
|
|
3710
3722
|
style: m.value
|
|
@@ -3713,17 +3725,17 @@ const oe = /* @__PURE__ */ U({
|
|
|
3713
3725
|
function h() {
|
|
3714
3726
|
switch (n.value) {
|
|
3715
3727
|
case "prompt":
|
|
3716
|
-
return
|
|
3728
|
+
return Wa(e, v);
|
|
3717
3729
|
default:
|
|
3718
|
-
return
|
|
3730
|
+
return Aa(e, n, a, l);
|
|
3719
3731
|
}
|
|
3720
3732
|
}
|
|
3721
|
-
const w = h(), M =
|
|
3733
|
+
const w = h(), M = Va(e, t, d, c);
|
|
3722
3734
|
return () => i("div", {
|
|
3723
3735
|
class: "farris-messager"
|
|
3724
3736
|
}, [i("section", {
|
|
3725
|
-
class:
|
|
3726
|
-
style:
|
|
3737
|
+
class: s.value,
|
|
3738
|
+
style: r.value
|
|
3727
3739
|
}, [w()]), M(), f()]);
|
|
3728
3740
|
}
|
|
3729
3741
|
});
|
|
@@ -3731,23 +3743,23 @@ class J {
|
|
|
3731
3743
|
static show(t) {
|
|
3732
3744
|
const n = Z({
|
|
3733
3745
|
...t
|
|
3734
|
-
}), a = !1,
|
|
3746
|
+
}), a = !1, l = n.type === "error" || n.type === "prompt", s = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "", r = n.acceptCallback || (() => {
|
|
3735
3747
|
}), d = n.rejectCallback || (() => {
|
|
3736
3748
|
});
|
|
3737
|
-
let v = null,
|
|
3749
|
+
let v = null, c = new he(v);
|
|
3738
3750
|
const m = () => {
|
|
3739
|
-
v && (v == null || v.destroy(),
|
|
3751
|
+
v && (v == null || v.destroy(), c = null);
|
|
3740
3752
|
};
|
|
3741
|
-
v =
|
|
3753
|
+
v = c == null ? void 0 : c.open({
|
|
3742
3754
|
class: "modal-message modal-message-type-info",
|
|
3743
|
-
title:
|
|
3755
|
+
title: s,
|
|
3744
3756
|
showButtons: a,
|
|
3745
|
-
showHeader:
|
|
3757
|
+
showHeader: l,
|
|
3746
3758
|
width: n.width || 400,
|
|
3747
3759
|
fitContent: !0,
|
|
3748
3760
|
showMaxButton: !1,
|
|
3749
3761
|
render: () => i(oe, Me(n, {
|
|
3750
|
-
onAccept:
|
|
3762
|
+
onAccept: r,
|
|
3751
3763
|
onReject: d,
|
|
3752
3764
|
onClose: m
|
|
3753
3765
|
}), null)
|
|
@@ -3784,7 +3796,7 @@ class J {
|
|
|
3784
3796
|
J.show(a);
|
|
3785
3797
|
}
|
|
3786
3798
|
static error(t, n, a) {
|
|
3787
|
-
const
|
|
3799
|
+
const l = Z({
|
|
3788
3800
|
width: 500,
|
|
3789
3801
|
type: "error",
|
|
3790
3802
|
okButtonText: "关闭",
|
|
@@ -3795,7 +3807,7 @@ class J {
|
|
|
3795
3807
|
detail: n
|
|
3796
3808
|
}
|
|
3797
3809
|
});
|
|
3798
|
-
J.show(
|
|
3810
|
+
J.show(l);
|
|
3799
3811
|
}
|
|
3800
3812
|
static prompt(t, n) {
|
|
3801
3813
|
const a = Z({
|
|
@@ -3807,17 +3819,17 @@ class J {
|
|
|
3807
3819
|
});
|
|
3808
3820
|
J.show(a);
|
|
3809
3821
|
}
|
|
3810
|
-
static question(t, n, a,
|
|
3811
|
-
const
|
|
3822
|
+
static question(t, n, a, l) {
|
|
3823
|
+
const s = Z({
|
|
3812
3824
|
type: "question",
|
|
3813
3825
|
title: t,
|
|
3814
3826
|
detail: n,
|
|
3815
3827
|
okButtonText: "确定",
|
|
3816
3828
|
cancelButtonText: "取消",
|
|
3817
3829
|
acceptCallback: a,
|
|
3818
|
-
rejectCallback:
|
|
3830
|
+
rejectCallback: l
|
|
3819
3831
|
});
|
|
3820
|
-
J.show(
|
|
3832
|
+
J.show(s);
|
|
3821
3833
|
}
|
|
3822
3834
|
}
|
|
3823
3835
|
oe.install = (e) => {
|
|
@@ -3828,14 +3840,14 @@ const de = /* @__PURE__ */ U({
|
|
|
3828
3840
|
props: me,
|
|
3829
3841
|
emits: ["change"],
|
|
3830
3842
|
setup(e, t) {
|
|
3831
|
-
const n =
|
|
3843
|
+
const n = o(e.initialState), a = o(e.width), l = o(e.height);
|
|
3832
3844
|
A(() => e.initialState, (v) => {
|
|
3833
3845
|
n.value = v;
|
|
3834
3846
|
});
|
|
3835
|
-
function
|
|
3836
|
-
n.value.importData =
|
|
3847
|
+
function s(v, c) {
|
|
3848
|
+
n.value.importData = c, t.emit("change", c), v && v.unmount();
|
|
3837
3849
|
}
|
|
3838
|
-
function
|
|
3850
|
+
function r(v) {
|
|
3839
3851
|
v && v.unmount();
|
|
3840
3852
|
}
|
|
3841
3853
|
function d() {
|
|
@@ -3848,9 +3860,9 @@ const de = /* @__PURE__ */ U({
|
|
|
3848
3860
|
render: (v) => i(ie, {
|
|
3849
3861
|
initialState: n,
|
|
3850
3862
|
width: a.value,
|
|
3851
|
-
height:
|
|
3852
|
-
onClose: () =>
|
|
3853
|
-
onSubmit: (
|
|
3863
|
+
height: l.value,
|
|
3864
|
+
onClose: () => r(v),
|
|
3865
|
+
onSubmit: (c) => s(v, c)
|
|
3854
3866
|
}, null),
|
|
3855
3867
|
width: 900,
|
|
3856
3868
|
height: 500,
|
|
@@ -3871,7 +3883,7 @@ const de = /* @__PURE__ */ U({
|
|
|
3871
3883
|
}, [q("高级设置")])])]);
|
|
3872
3884
|
}
|
|
3873
3885
|
});
|
|
3874
|
-
class
|
|
3886
|
+
class qa {
|
|
3875
3887
|
constructor() {
|
|
3876
3888
|
/** 控件标题 */
|
|
3877
3889
|
N(this, "label", "");
|
|
@@ -3901,7 +3913,7 @@ class Ga {
|
|
|
3901
3913
|
N(this, "fieldSetId", "");
|
|
3902
3914
|
}
|
|
3903
3915
|
}
|
|
3904
|
-
const
|
|
3916
|
+
const Ua = {
|
|
3905
3917
|
install(e) {
|
|
3906
3918
|
e.component(ie.name, ie), e.component(de.name, de);
|
|
3907
3919
|
},
|
|
@@ -3909,13 +3921,13 @@ const qa = {
|
|
|
3909
3921
|
e["response-layout-editor-setting"] = de, t["response-layout-editor-setting"] = we;
|
|
3910
3922
|
},
|
|
3911
3923
|
registerDesigner(e, t, n) {
|
|
3912
|
-
e["response-layout-editor-setting"] =
|
|
3924
|
+
e["response-layout-editor-setting"] = xa, t["response-layout-editor-setting"] = we;
|
|
3913
3925
|
}
|
|
3914
3926
|
};
|
|
3915
3927
|
export {
|
|
3916
|
-
|
|
3928
|
+
qa as ResponseFormLayoutContext,
|
|
3917
3929
|
ie as ResponseLayoutEditor,
|
|
3918
3930
|
de as ResponseLayoutEditorSetting,
|
|
3919
|
-
|
|
3931
|
+
Ua as default,
|
|
3920
3932
|
ct as responseLayoutEditorProps
|
|
3921
3933
|
};
|