@farris/ui-vue 1.2.4 → 1.2.5
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 +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/common/index.esm.js +2 -2
- package/components/common/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +137 -135
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +2316 -2299
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +1929 -1920
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1 -1
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/style.css +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +836 -790
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +382 -378
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +1167 -1150
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +131 -127
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +1 -1
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/style.css +1 -1
- package/components/list-view/index.esm.js +128 -124
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +2156 -2139
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +3137 -3120
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/order/index.esm.js +859 -815
- package/components/order/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +75 -73
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +63 -61
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2002 -1956
- package/components/schema-selector/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +165 -192
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2 -2
- package/components/tabs/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +95 -93
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2316 -2299
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +296 -295
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +2517 -2483
- package/farris.all.umd.cjs +7 -7
- package/package.json +1 -1
- package/style.css +1 -1
- package/types/condition/index.d.ts +60 -1
- package/types/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +3 -3
- package/types/list-view/src/composition/types.d.ts +1 -1
- package/types/message-box/index.d.ts +84 -1
- package/types/notify/index.d.ts +84 -1
- package/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var qe = Object.defineProperty;
|
|
2
2
|
var Ue = (e, t, n) => t in e ? qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Q = (e, t, n) => Ue(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { defineComponent as q, ref as l, watch as
|
|
4
|
+
import { defineComponent as q, ref as l, watch as O, computed as R, onMounted as J, createVNode as i, nextTick as ce, toRefs as Xe, onBeforeMount as fe, createTextVNode as G, Fragment as ie, withModifiers as ae, inject as ge, provide as Ye, onUnmounted as be, Teleport as Je, shallowRef as Qe, createApp as Ze, render as se, h as _e, cloneVNode as Ke, mergeProps as we, reactive as Z } from "vue";
|
|
5
5
|
import { cloneDeep as U } from "lodash-es";
|
|
6
6
|
import et from "@farris/ui-vue/components/list-view";
|
|
7
7
|
import tt from "@farris/ui-vue/components/button-edit";
|
|
@@ -601,7 +601,7 @@ const Et = /* @__PURE__ */ q({
|
|
|
601
601
|
emits: ["mounted", "active"],
|
|
602
602
|
setup(e, t) {
|
|
603
603
|
const n = l(), a = l(e.isActive);
|
|
604
|
-
|
|
604
|
+
O(() => e.isActive, (d) => {
|
|
605
605
|
a.value = d;
|
|
606
606
|
});
|
|
607
607
|
const o = R(() => ({
|
|
@@ -613,7 +613,7 @@ const Et = /* @__PURE__ */ q({
|
|
|
613
613
|
t.emit("mounted", n, e.value);
|
|
614
614
|
});
|
|
615
615
|
function u(d) {
|
|
616
|
-
t.emit("active", d, {
|
|
616
|
+
e.disabled || t.emit("active", d, {
|
|
617
617
|
name: e.name,
|
|
618
618
|
value: e.value
|
|
619
619
|
});
|
|
@@ -663,15 +663,15 @@ const Et = /* @__PURE__ */ q({
|
|
|
663
663
|
const m = n.value.findIndex((E) => E.value === g);
|
|
664
664
|
m > -1 && k(n.value[m], !1);
|
|
665
665
|
}
|
|
666
|
-
|
|
666
|
+
O(() => e.modelValue, (g) => {
|
|
667
667
|
u.value = g, L(u.value);
|
|
668
|
-
}),
|
|
668
|
+
}), O(() => e.items, async (g) => {
|
|
669
669
|
const m = g.filter((E) => E.show);
|
|
670
670
|
y(m), n.value = m, await ce(), L(u.value), h.value = Array.from(w.values()).reduce((E, A) => (E += A.value.clientWidth, E), 0);
|
|
671
671
|
}), J(async () => {
|
|
672
672
|
L(u.value), await ce(), d.value = "0.1s ease-out all", h.value = Array.from(w.values()).reduce((g, m) => (g += m.value.clientWidth, g), 0);
|
|
673
673
|
});
|
|
674
|
-
function
|
|
674
|
+
function j(g, m) {
|
|
675
675
|
k(m, !0);
|
|
676
676
|
}
|
|
677
677
|
function W(g, m) {
|
|
@@ -691,7 +691,7 @@ const Et = /* @__PURE__ */ q({
|
|
|
691
691
|
disabled: g.disabled,
|
|
692
692
|
key: g.value,
|
|
693
693
|
onMounted: W,
|
|
694
|
-
onActive:
|
|
694
|
+
onActive: j
|
|
695
695
|
}, null);
|
|
696
696
|
}
|
|
697
697
|
return () => i("span", {
|
|
@@ -851,8 +851,10 @@ const jt = /* @__PURE__ */ q({
|
|
|
851
851
|
function B() {
|
|
852
852
|
n.value || (p.value = !p.value, t.emit("update:modelValue", p.value));
|
|
853
853
|
}
|
|
854
|
-
return
|
|
854
|
+
return O(p, (w, S) => {
|
|
855
855
|
w !== S && t.emit("modelValueChanged", w);
|
|
856
|
+
}), O(() => e.modelValue, (w, S) => {
|
|
857
|
+
w !== S && (p.value = w);
|
|
856
858
|
}), () => i("span", {
|
|
857
859
|
tabindex: "0",
|
|
858
860
|
role: "button",
|
|
@@ -903,7 +905,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
903
905
|
function v() {
|
|
904
906
|
t.emit("switchInStandardModeChanged", d.value);
|
|
905
907
|
}
|
|
906
|
-
|
|
908
|
+
O(d, () => {
|
|
907
909
|
}), fe(() => {
|
|
908
910
|
a.value.mode === "standard" ? (d.value = !0, v()) : d.value = !1;
|
|
909
911
|
});
|
|
@@ -957,7 +959,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
957
959
|
emits: [],
|
|
958
960
|
setup(e, t) {
|
|
959
961
|
const n = l(e.item), a = l(e.currentScreenResolution), o = R(() => `col-${n.value[`columnIn${a.value}`]}`);
|
|
960
|
-
return
|
|
962
|
+
return O([() => e.item, () => e.currentScreenResolution], ([u, d], [f, v]) => {
|
|
961
963
|
u !== f && (n.value = u), d !== v && (a.value = d);
|
|
962
964
|
}), () => i("div", {
|
|
963
965
|
class: o.value
|
|
@@ -974,9 +976,9 @@ const jt = /* @__PURE__ */ q({
|
|
|
974
976
|
emits: ["update:twoDimensionalArray"],
|
|
975
977
|
setup(e, t) {
|
|
976
978
|
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.currentArea), u = l(e.twoDimensionalArray), d = l([]);
|
|
977
|
-
|
|
979
|
+
O([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([s, c, h], [b, B, w]) => {
|
|
978
980
|
s !== b && (o.value = s), c !== B && (a.value = c), h !== w && (n.value = h);
|
|
979
|
-
}),
|
|
981
|
+
}), O(() => e.twoDimensionalArray, () => {
|
|
980
982
|
u.value = e.twoDimensionalArray, f();
|
|
981
983
|
}), J(() => {
|
|
982
984
|
f();
|
|
@@ -1405,7 +1407,7 @@ const nn = {
|
|
|
1405
1407
|
emits: ["selectionChange"],
|
|
1406
1408
|
setup(e, t) {
|
|
1407
1409
|
const n = l(e.dataSource), a = l([]), o = l(e.separator), u = l(e.width), d = l(e.maxHeight), f = l(String(e.selectedValues).split(o.value));
|
|
1408
|
-
|
|
1410
|
+
O(e.dataSource, () => {
|
|
1409
1411
|
n.value = e.dataSource;
|
|
1410
1412
|
});
|
|
1411
1413
|
const v = R(() => e.enableSearch ? "SearchBar" : "ContentHeader"), r = R(() => {
|
|
@@ -1415,7 +1417,7 @@ const nn = {
|
|
|
1415
1417
|
function p(s) {
|
|
1416
1418
|
a.value = s.map((c) => Object.assign({}, c)), f.value = s.map((c) => c[e.idField]), t.emit("selectionChange", a.value);
|
|
1417
1419
|
}
|
|
1418
|
-
return
|
|
1420
|
+
return O([() => e.selectedValues], ([s]) => {
|
|
1419
1421
|
f.value = s.split(o.value);
|
|
1420
1422
|
}), () => i("div", {
|
|
1421
1423
|
class: "f-combo-list-container pl-3",
|
|
@@ -1463,9 +1465,9 @@ function ln(e) {
|
|
|
1463
1465
|
const { url: s, method: c = "GET", headers: h = {}, body: b = null } = e.remote, B = c.toLowerCase() == "get" ? { method: c, headers: h } : { method: c, headers: h, body: b };
|
|
1464
1466
|
let w = !1;
|
|
1465
1467
|
fetch(s, B).then((S) => {
|
|
1466
|
-
var L,
|
|
1468
|
+
var L, j;
|
|
1467
1469
|
if (S.status === 200)
|
|
1468
|
-
return w = !!((
|
|
1470
|
+
return w = !!((j = (L = S.headers) == null ? void 0 : L.get("content-type")) != null && j.includes("application/json")), w ? S.text() : S.json();
|
|
1469
1471
|
throw new Error(S.statusText);
|
|
1470
1472
|
}).then((S) => {
|
|
1471
1473
|
a.value = w ? JSON.parse(S) : S;
|
|
@@ -1473,14 +1475,14 @@ function ln(e) {
|
|
|
1473
1475
|
console.error(S);
|
|
1474
1476
|
});
|
|
1475
1477
|
}
|
|
1476
|
-
return e.remote && p(),
|
|
1478
|
+
return e.remote && p(), O(() => e.data, () => {
|
|
1477
1479
|
a.value = e.data;
|
|
1478
|
-
}),
|
|
1480
|
+
}), O([a], ([s]) => {
|
|
1479
1481
|
if (e.modelValue) {
|
|
1480
1482
|
const c = s.find((h) => h[e.valueField] === e.modelValue);
|
|
1481
1483
|
c && (t.value = c[e.textField]);
|
|
1482
1484
|
}
|
|
1483
|
-
}),
|
|
1485
|
+
}), O(() => e.modelValue, (s) => {
|
|
1484
1486
|
n.value = s, d(s);
|
|
1485
1487
|
}), d(e.modelValue), { dataSource: a, displayText: t, editable: o, modelValue: n, getItemsByDisplayText: f, getItemsByValue: u, getSelectedItemsByDisplayText: r };
|
|
1486
1488
|
}
|
|
@@ -1515,12 +1517,12 @@ const on = /* @__PURE__ */ q({
|
|
|
1515
1517
|
function L() {
|
|
1516
1518
|
return v.value;
|
|
1517
1519
|
}
|
|
1518
|
-
function
|
|
1520
|
+
function j(W) {
|
|
1519
1521
|
t.emit("input", W);
|
|
1520
1522
|
}
|
|
1521
1523
|
return t.expose({
|
|
1522
1524
|
getDisplayText: L
|
|
1523
|
-
}),
|
|
1525
|
+
}), O([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([W, y, T, g, m]) => {
|
|
1524
1526
|
a.value = W, r.value = y, o.value = T, u.value = g, d.value = m;
|
|
1525
1527
|
}), () => i(tt, {
|
|
1526
1528
|
ref: n,
|
|
@@ -1544,7 +1546,7 @@ const on = /* @__PURE__ */ q({
|
|
|
1544
1546
|
onClear: S,
|
|
1545
1547
|
onClick: w,
|
|
1546
1548
|
onChange: k,
|
|
1547
|
-
onInput:
|
|
1549
|
+
onInput: j,
|
|
1548
1550
|
beforeOpen: e.beforeOpen
|
|
1549
1551
|
}, {
|
|
1550
1552
|
default: () => [i(an, {
|
|
@@ -1712,7 +1714,7 @@ const Mn = /* @__PURE__ */ q({
|
|
|
1712
1714
|
function o(u) {
|
|
1713
1715
|
return `${u.text}${e.suffixValue}`;
|
|
1714
1716
|
}
|
|
1715
|
-
return
|
|
1717
|
+
return O(() => e.enumData, (u, d) => {
|
|
1716
1718
|
u !== d && (n.value = e.enumData);
|
|
1717
1719
|
}), () => i("div", {
|
|
1718
1720
|
class: "f-radio-button"
|
|
@@ -1873,7 +1875,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1873
1875
|
const n = l(e.size), a = l(e.enableHalf), o = l(e.enableClear), u = l(e.disabled), d = l(e.pointSystem), f = l(e.lightColor), v = l(e.darkColor), r = l(e.iconClass), p = l(e.numOfStar), s = l(e.toolTipDisabled), c = l(e.toolTipContents), h = l(e.enableScore), b = l(e.enableSatisfaction);
|
|
1874
1876
|
let B;
|
|
1875
1877
|
const w = l(0), S = l(0), k = l(0), L = l(e.modelValue);
|
|
1876
|
-
let
|
|
1878
|
+
let j = 1, W, y, T;
|
|
1877
1879
|
const g = 4;
|
|
1878
1880
|
J(() => {
|
|
1879
1881
|
});
|
|
@@ -1887,7 +1889,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1887
1889
|
}
|
|
1888
1890
|
function E() {
|
|
1889
1891
|
let x;
|
|
1890
|
-
a.value ? x = Math.ceil(L.value /
|
|
1892
|
+
a.value ? x = Math.ceil(L.value / j) : x = L.value, S.value = (B * L.value + Math.floor(L.value) * g) / j, W = c.value[x - 1];
|
|
1891
1893
|
}
|
|
1892
1894
|
function A() {
|
|
1893
1895
|
switch (n.value) {
|
|
@@ -1904,7 +1906,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1904
1906
|
B = 24;
|
|
1905
1907
|
break;
|
|
1906
1908
|
}
|
|
1907
|
-
m(), p.value && (
|
|
1909
|
+
m(), p.value && (j = d.value / p.value), L.value && E();
|
|
1908
1910
|
}
|
|
1909
1911
|
A();
|
|
1910
1912
|
function H(x) {
|
|
@@ -1917,7 +1919,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1917
1919
|
if (x.movementX || x.movementY) {
|
|
1918
1920
|
if (u.value)
|
|
1919
1921
|
return;
|
|
1920
|
-
b.value && (W = c.value[$ - 1]), x.offsetX < B / 2 && a.value === !0 ? (w.value = B * $ - B / 2 + g * ($ - 1), k.value =
|
|
1922
|
+
b.value && (W = c.value[$ - 1]), x.offsetX < B / 2 && a.value === !0 ? (w.value = B * $ - B / 2 + g * ($ - 1), k.value = j * $ - j / 2) : (w.value = B * $ + g * ($ - 1), k.value = j * $);
|
|
1921
1923
|
}
|
|
1922
1924
|
if (N === !0) {
|
|
1923
1925
|
if (X())
|
|
@@ -1938,7 +1940,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1938
1940
|
function I() {
|
|
1939
1941
|
w.value = 0;
|
|
1940
1942
|
}
|
|
1941
|
-
return
|
|
1943
|
+
return O(() => e.modelValue, (x) => {
|
|
1942
1944
|
L.value = x, E();
|
|
1943
1945
|
}), () => i("div", {
|
|
1944
1946
|
class: "farris-star-rating",
|
|
@@ -2046,7 +2048,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2046
2048
|
onSelectedValue: () => k(p.value)
|
|
2047
2049
|
}, null);
|
|
2048
2050
|
}
|
|
2049
|
-
function
|
|
2051
|
+
function j() {
|
|
2050
2052
|
const m = [];
|
|
2051
2053
|
d.value = n == null ? void 0 : n[a.value];
|
|
2052
2054
|
const E = o.value[`displayWidthIn${a.value}`];
|
|
@@ -2059,7 +2061,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2059
2061
|
}), m;
|
|
2060
2062
|
}
|
|
2061
2063
|
function W() {
|
|
2062
|
-
const m =
|
|
2064
|
+
const m = j();
|
|
2063
2065
|
return i(Mn, {
|
|
2064
2066
|
enumData: m,
|
|
2065
2067
|
suffixValue: "列",
|
|
@@ -2109,7 +2111,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2109
2111
|
class: "f-layout-editor-column-width-editor-label"
|
|
2110
2112
|
}, [(m = o == null ? void 0 : o.value) == null ? void 0 : m.label]), T()]);
|
|
2111
2113
|
}
|
|
2112
|
-
return
|
|
2114
|
+
return O(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([m, E, A], [H, X, D]) => {
|
|
2113
2115
|
A !== D && (a.value = A, d.value = n[a.value], w()), E !== X && (u.value = E), u.value === !1 && w(), m !== H && (o.value = m);
|
|
2114
2116
|
}), J(() => {
|
|
2115
2117
|
w();
|
|
@@ -2160,7 +2162,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2160
2162
|
D.push(z), c.value = z[z.length - 1].componentRow;
|
|
2161
2163
|
}), y(D);
|
|
2162
2164
|
}
|
|
2163
|
-
function
|
|
2165
|
+
function j() {
|
|
2164
2166
|
k();
|
|
2165
2167
|
let D = [];
|
|
2166
2168
|
return c.value = 0, s.value.forEach((F) => {
|
|
@@ -2225,7 +2227,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2225
2227
|
});
|
|
2226
2228
|
}
|
|
2227
2229
|
function A() {
|
|
2228
|
-
o.value = U(
|
|
2230
|
+
o.value = U(j()), t.emit("originalDataChanged", o.value);
|
|
2229
2231
|
}
|
|
2230
2232
|
function H(D) {
|
|
2231
2233
|
for (let F = 0; F < D.length; F++)
|
|
@@ -2238,20 +2240,20 @@ const zn = /* @__PURE__ */ q({
|
|
|
2238
2240
|
const X = qt(b, () => {
|
|
2239
2241
|
L(), A(), E();
|
|
2240
2242
|
});
|
|
2241
|
-
return Ye("ResponseLayoutEditorDraggableComposition", X),
|
|
2243
|
+
return Ye("ResponseLayoutEditorDraggableComposition", X), O(() => e.currentArea, (D, F) => {
|
|
2242
2244
|
D !== F && (r.value = e.currentArea, E());
|
|
2243
|
-
}),
|
|
2245
|
+
}), O(r, (D, F) => {
|
|
2244
2246
|
D !== F && E();
|
|
2245
|
-
}),
|
|
2247
|
+
}), O(() => e.currentGroup, (D, F) => {
|
|
2246
2248
|
D !== F && (f.value = e.currentGroup);
|
|
2247
|
-
}),
|
|
2249
|
+
}), O(() => e.currentScreenResolution, (D, F) => {
|
|
2248
2250
|
D !== F && (n.value = e.currentScreenResolution, A(), k(), r.value[0] && (b.value = U(s.value[Number(r.value[0].id) - 1])));
|
|
2249
|
-
}),
|
|
2251
|
+
}), O(() => e.switchInStandardMode, (D, F) => {
|
|
2250
2252
|
D !== F && (a.value = e.switchInStandardMode, o.value = U(u.value));
|
|
2251
|
-
}),
|
|
2253
|
+
}), O(d, (D, F) => {
|
|
2252
2254
|
D !== F && A();
|
|
2253
2255
|
}), fe(() => {
|
|
2254
|
-
B(),
|
|
2256
|
+
B(), j(), E();
|
|
2255
2257
|
}), () => i("div", {
|
|
2256
2258
|
class: "f-layout-editor-field-list f-utils-fill-flex-column"
|
|
2257
2259
|
}, [a.value ? (
|
|
@@ -2275,9 +2277,9 @@ const zn = /* @__PURE__ */ q({
|
|
|
2275
2277
|
id: "1",
|
|
2276
2278
|
label: "区域1"
|
|
2277
2279
|
}]), r = l([]), p = l(), s = l(e.width), c = l(e.height);
|
|
2278
|
-
|
|
2280
|
+
O(() => e.initialState, (m) => {
|
|
2279
2281
|
n.value = m;
|
|
2280
|
-
}),
|
|
2282
|
+
}), O([() => e.currentArea, () => e.switchInStandardMode], ([m, E], [A, H]) => {
|
|
2281
2283
|
m !== A && (v.value = m), E !== H && (f.value = E);
|
|
2282
2284
|
});
|
|
2283
2285
|
function h(m) {
|
|
@@ -2301,7 +2303,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2301
2303
|
function L() {
|
|
2302
2304
|
t.emit("close");
|
|
2303
2305
|
}
|
|
2304
|
-
function
|
|
2306
|
+
function j() {
|
|
2305
2307
|
t.emit("submit", a.value);
|
|
2306
2308
|
}
|
|
2307
2309
|
function W() {
|
|
@@ -2368,7 +2370,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2368
2370
|
class: "f-layout-editor-text-cancel"
|
|
2369
2371
|
}, [G("取消")])]), i("div", {
|
|
2370
2372
|
class: "f-layout-editor-sure-btn",
|
|
2371
|
-
onClick:
|
|
2373
|
+
onClick: j
|
|
2372
2374
|
}, [i("span", {
|
|
2373
2375
|
class: "f-layout-editor-text-sure"
|
|
2374
2376
|
}, [G("确认")])])])])]);
|
|
@@ -2642,7 +2644,7 @@ function ua(e, t) {
|
|
|
2642
2644
|
const C = e.minHeight ? e.minHeight : 1, I = e.minWidth ? e.minWidth : 1;
|
|
2643
2645
|
f.value && v.value && r.value && u.value && (f.value.height < C && (f.value.height = C, r.value.n && d.value && (v.value.y = d.value.y + (u.value.height - C))), f.value.width < I && (f.value.width = I, r.value.w && d.value && (v.value.x = d.value.x + (u.value.width - I))), e.maxHeight && f.value.height > e.maxHeight && (f.value.height = e.maxHeight, d.value && r.value.n && (v.value.y = d.value.y + (u.value.height - e.maxHeight))), e.maxWidth && f.value.width > e.maxWidth && (f.value.width = e.maxWidth, r.value.w && d.value && (v.value.x = d.value.x + (u.value.width - e.maxWidth))));
|
|
2644
2646
|
}
|
|
2645
|
-
function
|
|
2647
|
+
function j() {
|
|
2646
2648
|
if (a.value) {
|
|
2647
2649
|
const C = s.value;
|
|
2648
2650
|
if (v.value && f.value && r.value && u.value) {
|
|
@@ -2656,7 +2658,7 @@ function ua(e, t) {
|
|
|
2656
2658
|
return;
|
|
2657
2659
|
C.subtract(o.value);
|
|
2658
2660
|
const I = C.x, x = C.y;
|
|
2659
|
-
r.value.n ? (v.value.y = d.value.y + x, f.value.height = u.value.height - x) : r.value.s && (f.value.height = u.value.height + x), r.value.e ? f.value.width = u.value.width + I : r.value.w && (f.value.width = u.value.width - I, v.value.x = d.value.x + I),
|
|
2661
|
+
r.value.n ? (v.value.y = d.value.y + x, f.value.height = u.value.height - x) : r.value.s && (f.value.height = u.value.height + x), r.value.e ? f.value.width = u.value.width + I : r.value.w && (f.value.width = u.value.width - I, v.value.x = d.value.x + I), j(), L(), k();
|
|
2660
2662
|
}
|
|
2661
2663
|
function y(C) {
|
|
2662
2664
|
if (!p.value)
|
|
@@ -2844,14 +2846,14 @@ function sa(e, t) {
|
|
|
2844
2846
|
}
|
|
2845
2847
|
r.value.reset();
|
|
2846
2848
|
}
|
|
2847
|
-
function
|
|
2849
|
+
function j(y) {
|
|
2848
2850
|
if (y instanceof MouseEvent && y.button === 2)
|
|
2849
2851
|
return;
|
|
2850
2852
|
const T = y.target || y.srcElement;
|
|
2851
2853
|
u.value !== void 0 && T && !c(T, u.value) || a.value !== !1 && (y.stopPropagation(), y.preventDefault(), v.value = P.fromEvent(y, n.value), L(), k());
|
|
2852
2854
|
}
|
|
2853
2855
|
function W(y, T, g) {
|
|
2854
|
-
y && a.value && T && (u.value = y, n.value = T, d.value = g, y.classList.add("ng-draggable"), y.addEventListener("mousedown",
|
|
2856
|
+
y && a.value && T && (u.value = y, n.value = T, d.value = g, y.classList.add("ng-draggable"), y.addEventListener("mousedown", j));
|
|
2855
2857
|
}
|
|
2856
2858
|
return {
|
|
2857
2859
|
registerDraggle: W,
|
|
@@ -2871,7 +2873,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
2871
2873
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc"],
|
|
2872
2874
|
setup(e, t) {
|
|
2873
2875
|
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue), u = l(""), d = l(e.class), f = l(e.fitContent), v = l(e.showHeader), r = l(""), p = l(e.showCloseButton), s = l(e.showMaxButton), c = l(!1), h = l(""), b = l(""), B = l(""), w = l(e.showButtons), S = l(e.title), k = l(e.reiszeable), L = l(e.containment || null);
|
|
2874
|
-
function
|
|
2876
|
+
function j(M, V) {
|
|
2875
2877
|
o.value = !1, t.emit("update:modelValue", !1), V != null && t.emit(V ? "accept" : "cancel"), t.emit("closed", M);
|
|
2876
2878
|
}
|
|
2877
2879
|
const W = [{
|
|
@@ -2879,14 +2881,14 @@ const Be = /* @__PURE__ */ q({
|
|
|
2879
2881
|
text: "取消",
|
|
2880
2882
|
class: "btn btn-light",
|
|
2881
2883
|
handle: (M) => {
|
|
2882
|
-
|
|
2884
|
+
j(M, !1);
|
|
2883
2885
|
}
|
|
2884
2886
|
}, {
|
|
2885
2887
|
name: "accept",
|
|
2886
2888
|
text: "确定",
|
|
2887
2889
|
class: "btn btn-primary",
|
|
2888
2890
|
handle: (M) => {
|
|
2889
|
-
|
|
2891
|
+
j(M, !0);
|
|
2890
2892
|
}
|
|
2891
2893
|
}], y = l(e.buttons && e.buttons.length ? e.buttons : W), T = R(() => !!r.value), g = R(() => !!w.value && !!y.value), m = l(), E = l(), A = l(!1), {
|
|
2892
2894
|
renderResizeBar: H,
|
|
@@ -2899,15 +2901,15 @@ const Be = /* @__PURE__ */ q({
|
|
|
2899
2901
|
} = ua(e), {
|
|
2900
2902
|
registerDraggle: x
|
|
2901
2903
|
} = sa(e);
|
|
2902
|
-
|
|
2904
|
+
O(() => e.title, (M, V) => {
|
|
2903
2905
|
M !== V && (S.value = M);
|
|
2904
|
-
}),
|
|
2906
|
+
}), O(() => e.modelValue, (M, V) => {
|
|
2905
2907
|
M !== V && (o.value = M);
|
|
2906
|
-
}),
|
|
2908
|
+
}), O(() => e.showHeader, (M, V) => {
|
|
2907
2909
|
M !== V && (v.value = M);
|
|
2908
|
-
}),
|
|
2910
|
+
}), O(() => e.showButtons, (M, V) => {
|
|
2909
2911
|
M !== V && (w.value = M);
|
|
2910
|
-
}),
|
|
2912
|
+
}), O(() => z.value, (M, V) => {
|
|
2911
2913
|
const te = M || {}, ne = V || {};
|
|
2912
2914
|
JSON.stringify(te) !== JSON.stringify(ne) && t.emit("resize", {
|
|
2913
2915
|
newSize: M,
|
|
@@ -2983,7 +2985,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
2983
2985
|
}), t.expose({
|
|
2984
2986
|
modalElementRef: E,
|
|
2985
2987
|
updateModalOptions: Ne,
|
|
2986
|
-
close:
|
|
2988
|
+
close: j
|
|
2987
2989
|
});
|
|
2988
2990
|
function Pe() {
|
|
2989
2991
|
return i("ul", null, [c.value && i("li", {
|
|
@@ -2998,7 +3000,7 @@ const Be = /* @__PURE__ */ q({
|
|
|
2998
3000
|
class: We.value
|
|
2999
3001
|
}, null)]), p.value && i("li", {
|
|
3000
3002
|
class: "f-btn-icon f-bare",
|
|
3001
|
-
onClick: (M) =>
|
|
3003
|
+
onClick: (M) => j(M, !1),
|
|
3002
3004
|
style: "pointer-events: auto;"
|
|
3003
3005
|
}, [i("span", {
|
|
3004
3006
|
class: "f-icon modal_close"
|
|
@@ -3246,7 +3248,7 @@ function da(e, t, n) {
|
|
|
3246
3248
|
}
|
|
3247
3249
|
function L(y) {
|
|
3248
3250
|
}
|
|
3249
|
-
function
|
|
3251
|
+
function j(...y) {
|
|
3250
3252
|
}
|
|
3251
3253
|
return d.value = {
|
|
3252
3254
|
canMove: f(),
|
|
@@ -3263,7 +3265,7 @@ function da(e, t, n) {
|
|
|
3263
3265
|
getBelongedComponentInstance: s,
|
|
3264
3266
|
getDraggableDesignItemElement: c,
|
|
3265
3267
|
getDraggingDisplayText: b,
|
|
3266
|
-
getPropConfig:
|
|
3268
|
+
getPropConfig: j,
|
|
3267
3269
|
getDragScopeElement: B,
|
|
3268
3270
|
onAcceptMovedChildElement: w,
|
|
3269
3271
|
onAcceptNewChildElement: k,
|
|
@@ -3701,7 +3703,7 @@ const re = /* @__PURE__ */ q({
|
|
|
3701
3703
|
emits: ["change"],
|
|
3702
3704
|
setup(e, t) {
|
|
3703
3705
|
const n = l(e.modelValue), a = l(e.width), o = l(e.height);
|
|
3704
|
-
|
|
3706
|
+
O(() => e.modelValue, (v) => {
|
|
3705
3707
|
n.value = v;
|
|
3706
3708
|
});
|
|
3707
3709
|
function u(v, r) {
|