lh-ui-next 0.0.55 → 0.0.56
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/README.md +2 -2
- package/lib/lh-ui-next.mjs +105 -84
- package/lib/lh-ui-next.umd.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
alpha version is use to self-test; beta version is use to public survey.for example:
|
|
5
5
|
1.0.0-alpha.1
|
|
6
6
|
1.0.0-test.2
|
|
7
|
-
## Official version : "0.0.
|
|
8
|
-
## test version : "0.0.
|
|
7
|
+
## Official version : "0.0.56",
|
|
8
|
+
## test version : "0.0.56",
|
|
9
9
|
## npmmirror
|
|
10
10
|
When cnpm sync execution is unsuccessful,you can go the website(http://www.npmmirror.com/package/lh-ui-next) and press sync button to
|
|
11
11
|
manual trigger the sync event
|
package/lib/lh-ui-next.mjs
CHANGED
|
@@ -851,7 +851,7 @@ const J = /* @__PURE__ */ k(St, [["render", Lt]]), Pt = {
|
|
|
851
851
|
class: "lh-scrollbar__view",
|
|
852
852
|
ref: "myScrollbarView"
|
|
853
853
|
};
|
|
854
|
-
function
|
|
854
|
+
function Nt(e, t, i, s, l, n) {
|
|
855
855
|
const a = Xe("resize");
|
|
856
856
|
return o(), c("div", {
|
|
857
857
|
class: "lh-scrollbar",
|
|
@@ -893,7 +893,7 @@ function Vt(e, t, i, s, l, n) {
|
|
|
893
893
|
], 2)
|
|
894
894
|
], 544);
|
|
895
895
|
}
|
|
896
|
-
const Z = /* @__PURE__ */ k(Pt, [["render",
|
|
896
|
+
const Z = /* @__PURE__ */ k(Pt, [["render", Nt]]), Vt = {
|
|
897
897
|
name: "lhSelect",
|
|
898
898
|
componentName: "lhSelect",
|
|
899
899
|
components: {
|
|
@@ -1305,7 +1305,7 @@ function Kt(e, t, i, s, l, n) {
|
|
|
1305
1305
|
_: 3
|
|
1306
1306
|
}, 8, ["width", "modelValue", "zIndex", "appendToBody", "onHide"]);
|
|
1307
1307
|
}
|
|
1308
|
-
const Q = /* @__PURE__ */ k(
|
|
1308
|
+
const Q = /* @__PURE__ */ k(Vt, [["render", Kt]]), Jt = {
|
|
1309
1309
|
name: "lhPagination",
|
|
1310
1310
|
componentName: "lhPagination",
|
|
1311
1311
|
emits: ["current-change", "prev-click", "next-click", "size-change"],
|
|
@@ -1842,12 +1842,12 @@ function Ze(e) {
|
|
|
1842
1842
|
}
|
|
1843
1843
|
return e;
|
|
1844
1844
|
}
|
|
1845
|
-
const
|
|
1845
|
+
const Ni = /([\:\-\_]+(.))/g, Vi = /^moz([A-Z])/, Di = Number(document.documentMode), Mi = function(e) {
|
|
1846
1846
|
return (e || "").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, "");
|
|
1847
1847
|
}, Ye = function(e) {
|
|
1848
|
-
return e.replace(
|
|
1848
|
+
return e.replace(Ni, function(t, i, s, l) {
|
|
1849
1849
|
return l ? s.toUpperCase() : s;
|
|
1850
|
-
}).replace(
|
|
1850
|
+
}).replace(Vi, "Moz$1");
|
|
1851
1851
|
};
|
|
1852
1852
|
function Ee(e, t) {
|
|
1853
1853
|
if (!e || !t)
|
|
@@ -1909,13 +1909,13 @@ const W = Di < 9 ? function(e, t) {
|
|
|
1909
1909
|
};
|
|
1910
1910
|
let Be = !1, Ke = !1, ke;
|
|
1911
1911
|
const Je = function() {
|
|
1912
|
-
let e =
|
|
1913
|
-
return e ? Be = !0 : (Be = !1, e = document.createElement("div"),
|
|
1912
|
+
let e = N.modalDom;
|
|
1913
|
+
return e ? Be = !0 : (Be = !1, e = document.createElement("div"), N.modalDom = e, e.addEventListener("touchmove", function(t) {
|
|
1914
1914
|
t.preventDefault(), t.stopPropagation();
|
|
1915
1915
|
}), e.addEventListener("click", function() {
|
|
1916
|
-
|
|
1916
|
+
N.doOnModalClick && N.doOnModalClick();
|
|
1917
1917
|
})), e;
|
|
1918
|
-
}, Ce = {},
|
|
1918
|
+
}, Ce = {}, N = {
|
|
1919
1919
|
modalFade: !0,
|
|
1920
1920
|
getInstance: function(e) {
|
|
1921
1921
|
return Ce[e];
|
|
@@ -1927,14 +1927,14 @@ const Je = function() {
|
|
|
1927
1927
|
e && (Ce[e] = null, delete Ce[e]);
|
|
1928
1928
|
},
|
|
1929
1929
|
nextZIndex: function() {
|
|
1930
|
-
return
|
|
1930
|
+
return N.zIndex++;
|
|
1931
1931
|
},
|
|
1932
1932
|
modalStack: [],
|
|
1933
1933
|
doOnModalClick: function() {
|
|
1934
|
-
const e =
|
|
1934
|
+
const e = N.modalStack[N.modalStack.length - 1];
|
|
1935
1935
|
if (!e)
|
|
1936
1936
|
return;
|
|
1937
|
-
const t =
|
|
1937
|
+
const t = N.getInstance(e.id);
|
|
1938
1938
|
t && t.closeOnClickModal && t.close();
|
|
1939
1939
|
},
|
|
1940
1940
|
openModal: function(e, t, i, s, l) {
|
|
@@ -1964,11 +1964,11 @@ const Je = function() {
|
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
1966
|
t.length === 0 && (this.modalFade && K(i, "v-modal-leave"), setTimeout(() => {
|
|
1967
|
-
t.length === 0 && (i.parentNode && i.parentNode.removeChild(i), i.style.display = "none",
|
|
1967
|
+
t.length === 0 && (i.parentNode && i.parentNode.removeChild(i), i.style.display = "none", N.modalDom = void 0), q(i, "v-modal-leave");
|
|
1968
1968
|
}, 200));
|
|
1969
1969
|
}
|
|
1970
1970
|
};
|
|
1971
|
-
Object.defineProperty(
|
|
1971
|
+
Object.defineProperty(N, "zIndex", {
|
|
1972
1972
|
configurable: !0,
|
|
1973
1973
|
get() {
|
|
1974
1974
|
return Ke || (ke = ke || 2100, Ke = !0), ke;
|
|
@@ -1978,9 +1978,9 @@ Object.defineProperty(V, "zIndex", {
|
|
|
1978
1978
|
}
|
|
1979
1979
|
});
|
|
1980
1980
|
const Ri = function() {
|
|
1981
|
-
if (
|
|
1982
|
-
const e =
|
|
1983
|
-
return e ?
|
|
1981
|
+
if (N.modalStack.length > 0) {
|
|
1982
|
+
const e = N.modalStack[N.modalStack.length - 1];
|
|
1983
|
+
return e ? N.getInstance(e.id) : void 0;
|
|
1984
1984
|
}
|
|
1985
1985
|
};
|
|
1986
1986
|
window.addEventListener("keydown", function(e) {
|
|
@@ -2002,7 +2002,7 @@ function Bi() {
|
|
|
2002
2002
|
const s = i.offsetWidth;
|
|
2003
2003
|
return e.parentNode.removeChild(e), we = t - s, we;
|
|
2004
2004
|
}
|
|
2005
|
-
let Ei = 1,
|
|
2005
|
+
let Ei = 1, Ne;
|
|
2006
2006
|
const Wi = {
|
|
2007
2007
|
props: {
|
|
2008
2008
|
visible: {
|
|
@@ -2039,10 +2039,10 @@ const Wi = {
|
|
|
2039
2039
|
}
|
|
2040
2040
|
},
|
|
2041
2041
|
beforeMount() {
|
|
2042
|
-
this._popupId = "popup-" + Ei++,
|
|
2042
|
+
this._popupId = "popup-" + Ei++, N.register(this._popupId, this);
|
|
2043
2043
|
},
|
|
2044
2044
|
beforeUnmount() {
|
|
2045
|
-
|
|
2045
|
+
N.deregister(this._popupId), N.closeModal(this._popupId), this.restoreBodyStyle();
|
|
2046
2046
|
},
|
|
2047
2047
|
data() {
|
|
2048
2048
|
return {
|
|
@@ -2080,12 +2080,12 @@ const Wi = {
|
|
|
2080
2080
|
return;
|
|
2081
2081
|
this._opening = !0;
|
|
2082
2082
|
const t = this.$el, i = e.modal, s = e.zIndex;
|
|
2083
|
-
if (s && (
|
|
2084
|
-
this.withoutHiddenClass = !Ee(document.body, "lh-popup-parent--hidden"), this.withoutHiddenClass && (this.bodyPaddingRight = document.body.style.paddingRight, this.computedBodyPaddingRight = parseInt(W(document.body, "paddingRight"), 10)),
|
|
2083
|
+
if (s && (N.zIndex = s), i && (this._closing && (N.closeModal(this._popupId), this._closing = !1), N.openModal(this._popupId, N.nextZIndex(), this.modalAppendToBody ? void 0 : t, e.modalClass, e.modalFade), e.lockScroll)) {
|
|
2084
|
+
this.withoutHiddenClass = !Ee(document.body, "lh-popup-parent--hidden"), this.withoutHiddenClass && (this.bodyPaddingRight = document.body.style.paddingRight, this.computedBodyPaddingRight = parseInt(W(document.body, "paddingRight"), 10)), Ne = Bi();
|
|
2085
2085
|
const l = document.documentElement.clientHeight < document.body.scrollHeight, n = W(document.body, "overflowY");
|
|
2086
|
-
|
|
2086
|
+
Ne > 0 && (l || n === "scroll") && this.withoutHiddenClass && (document.body.style.paddingRight = this.computedBodyPaddingRight + Ne + "px"), K(document.body, "lh-popup-parent--hidden");
|
|
2087
2087
|
}
|
|
2088
|
-
getComputedStyle(t).position === "static" && (t.style.position = "absolute"), t.style.zIndex =
|
|
2088
|
+
getComputedStyle(t).position === "static" && (t.style.position = "absolute"), t.style.zIndex = N.nextZIndex(), this.opened = !0, this.onOpen && this.onOpen(), this.doAfterOpen();
|
|
2089
2089
|
},
|
|
2090
2090
|
doAfterOpen() {
|
|
2091
2091
|
this._opening = !1;
|
|
@@ -2103,7 +2103,7 @@ const Wi = {
|
|
|
2103
2103
|
this._closing = !0, this.onClose && this.onClose(), this.lockScroll && setTimeout(this.restoreBodyStyle, 200), this.opened = !1, this.doAfterClose();
|
|
2104
2104
|
},
|
|
2105
2105
|
doAfterClose() {
|
|
2106
|
-
|
|
2106
|
+
N.closeModal(this._popupId), this._closing = !1;
|
|
2107
2107
|
},
|
|
2108
2108
|
restoreBodyStyle() {
|
|
2109
2109
|
this.modal && this.withoutHiddenClass && (document.body.style.paddingRight = this.bodyPaddingRight, q(
|
|
@@ -2920,8 +2920,8 @@ const Tl = {
|
|
|
2920
2920
|
this.$emit("handleResizeCallback", e);
|
|
2921
2921
|
}
|
|
2922
2922
|
}
|
|
2923
|
-
}, Il = { class: "lh-tree-select-div" }, Ll = { class: "tree-select-div-header" }, Pl = { class: "tree-select-div-content-wapper lh-scroll-common" }, zl = { class: "tree-select-div-content" },
|
|
2924
|
-
function
|
|
2923
|
+
}, Il = { class: "lh-tree-select-div" }, Ll = { class: "tree-select-div-header" }, Pl = { class: "tree-select-div-content-wapper lh-scroll-common" }, zl = { class: "tree-select-div-content" }, Nl = { class: "tree-select-div-footer" };
|
|
2924
|
+
function Vl(e, t, i, s, l, n) {
|
|
2925
2925
|
return o(), c("div", Il, [
|
|
2926
2926
|
d("div", Ll, [
|
|
2927
2927
|
L(e.$slots, "header")
|
|
@@ -2931,12 +2931,12 @@ function Nl(e, t, i, s, l, n) {
|
|
|
2931
2931
|
L(e.$slots, "content")
|
|
2932
2932
|
])
|
|
2933
2933
|
]),
|
|
2934
|
-
d("div",
|
|
2934
|
+
d("div", Nl, [
|
|
2935
2935
|
L(e.$slots, "footer")
|
|
2936
2936
|
])
|
|
2937
2937
|
]);
|
|
2938
2938
|
}
|
|
2939
|
-
const Dl = /* @__PURE__ */ k(Tl, [["render",
|
|
2939
|
+
const Dl = /* @__PURE__ */ k(Tl, [["render", Vl]]), Ml = {
|
|
2940
2940
|
name: "lhTreeSelect",
|
|
2941
2941
|
componentName: "lhTreeSelect",
|
|
2942
2942
|
emits: ["tree-check-click", "update:modelValue"],
|
|
@@ -3128,7 +3128,7 @@ function Hl(e, t, i, s, l, n) {
|
|
|
3128
3128
|
}, null, 8, El),
|
|
3129
3129
|
d("i", {
|
|
3130
3130
|
class: "lh-ui-font-component icon_component_close",
|
|
3131
|
-
onClick: t[1] || (t[1] = U((...
|
|
3131
|
+
onClick: t[1] || (t[1] = U((...V) => n.delTopItem && n.delTopItem(...V), ["stop"]))
|
|
3132
3132
|
})
|
|
3133
3133
|
], 8, Bl)) : p("", !0)
|
|
3134
3134
|
], 64))), 256)),
|
|
@@ -4192,10 +4192,10 @@ const Sn = {
|
|
|
4192
4192
|
ref: "condition"
|
|
4193
4193
|
}, In = { class: "lh-condition-side-head" }, Ln = { class: "lh-condition-side-head-right" }, Pn = /* @__PURE__ */ d("i", { class: "lh-ui-font-component icon_component_funnel" }, null, -1), zn = [
|
|
4194
4194
|
Pn
|
|
4195
|
-
],
|
|
4195
|
+
], Nn = {
|
|
4196
4196
|
class: "lh-condition-side-wapper canNotDown",
|
|
4197
4197
|
ref: "conditionWapper"
|
|
4198
|
-
},
|
|
4198
|
+
}, Vn = {
|
|
4199
4199
|
key: 0,
|
|
4200
4200
|
class: "title-img-wapper"
|
|
4201
4201
|
}, Dn = ["src"], Mn = { class: "lh-condition-content lh-scroll-common" }, Rn = { class: "lh-condition-footer" };
|
|
@@ -4218,12 +4218,12 @@ function Bn(e, t, i, s, l, n) {
|
|
|
4218
4218
|
}, 8, ["onClick"])
|
|
4219
4219
|
])
|
|
4220
4220
|
]),
|
|
4221
|
-
d("div",
|
|
4221
|
+
d("div", Nn, [
|
|
4222
4222
|
d("div", {
|
|
4223
4223
|
class: "lh-condition-title",
|
|
4224
4224
|
style: C({ paddingLeft: i.imgSrc ? "48px" : "0" })
|
|
4225
4225
|
}, [
|
|
4226
|
-
i.imgSrc ? (o(), c("span",
|
|
4226
|
+
i.imgSrc ? (o(), c("span", Vn, [
|
|
4227
4227
|
d("img", { src: i.imgSrc }, null, 8, Dn)
|
|
4228
4228
|
])) : p("", !0),
|
|
4229
4229
|
d("span", null, g(e.$lht("conditionSide.title")), 1)
|
|
@@ -4262,7 +4262,7 @@ const fe = /* @__PURE__ */ k(Sn, [["render", Bn]]);
|
|
|
4262
4262
|
fe.install = function(e) {
|
|
4263
4263
|
e.component(fe.name, fe);
|
|
4264
4264
|
};
|
|
4265
|
-
let
|
|
4265
|
+
let Ve = {
|
|
4266
4266
|
lunarInfo: [
|
|
4267
4267
|
19416,
|
|
4268
4268
|
19168,
|
|
@@ -4811,7 +4811,7 @@ let Ne = {
|
|
|
4811
4811
|
u < 0 && (u += n, l--);
|
|
4812
4812
|
var m = new Date(), _ = !1;
|
|
4813
4813
|
m.getFullYear() == a && m.getMonth() + 1 == r && m.getDate() == h && (_ = !0);
|
|
4814
|
-
var S = s.getDay(),
|
|
4814
|
+
var S = s.getDay(), V = this.nStr1[S];
|
|
4815
4815
|
S == 0 && (S = 7);
|
|
4816
4816
|
var D = l, B = this.leapMonth(l), z = !1;
|
|
4817
4817
|
for (l = 1; l < 13 && u > 0; l++)
|
|
@@ -4842,7 +4842,7 @@ let Ne = {
|
|
|
4842
4842
|
isToday: _,
|
|
4843
4843
|
isLeap: z,
|
|
4844
4844
|
nWeek: S,
|
|
4845
|
-
ncWeek: "\u661F\u671F" +
|
|
4845
|
+
ncWeek: "\u661F\u671F" + V,
|
|
4846
4846
|
isTerm: Pe,
|
|
4847
4847
|
Term: ze,
|
|
4848
4848
|
astro: ot
|
|
@@ -4861,7 +4861,7 @@ let Ne = {
|
|
|
4861
4861
|
for (var m = 0, _ = !1, u = 1; u < t; u++)
|
|
4862
4862
|
m = this.leapMonth(e), _ || m <= u && m > 0 && (h += this.leapDays(e), _ = !0), h += this.monthDays(e, u);
|
|
4863
4863
|
l && (h += a);
|
|
4864
|
-
var S = Date.UTC(1900, 1, 30, 0, 0, 0),
|
|
4864
|
+
var S = Date.UTC(1900, 1, 30, 0, 0, 0), V = new Date((h + i - 31) * 864e5 + S), D = V.getUTCFullYear(), B = V.getUTCMonth() + 1, z = V.getUTCDate();
|
|
4865
4865
|
return this.solar2lunar(D, B, z);
|
|
4866
4866
|
}
|
|
4867
4867
|
};
|
|
@@ -4902,23 +4902,23 @@ const Qe = {
|
|
|
4902
4902
|
let z = "", R = "";
|
|
4903
4903
|
t === 1 ? (z = 12, R = e - 1) : (z = t - 1, R = e);
|
|
4904
4904
|
let F = this.getDayCount4Month(R, z);
|
|
4905
|
-
u = h + F - s + 2, m =
|
|
4905
|
+
u = h + F - s + 2, m = Ve.solar2lunar(R, z, u), _ = this.disabledNotCurrentMonth;
|
|
4906
4906
|
} else if (h > l - 1) {
|
|
4907
4907
|
let z = "", R = "";
|
|
4908
4908
|
t === 12 ? (z = 1, R = e + 1) : (z = t + 1, R = e);
|
|
4909
4909
|
let F = (h + 1) % 7;
|
|
4910
|
-
F = F === 0 ? 7 : F, u = F - (7 - (a - l)), m =
|
|
4910
|
+
F = F === 0 ? 7 : F, u = F - (7 - (a - l)), m = Ve.solar2lunar(R, z, u), _ = this.disabledNotCurrentMonth;
|
|
4911
4911
|
} else
|
|
4912
|
-
u = h - s + 2, m =
|
|
4912
|
+
u = h - s + 2, m = Ve.solar2lunar(e, t, u);
|
|
4913
4913
|
let S = !1;
|
|
4914
4914
|
(h + 1) % 7 === 0 && (S = !0);
|
|
4915
|
-
let
|
|
4916
|
-
h >= n * 7 && (
|
|
4915
|
+
let V = !1;
|
|
4916
|
+
h >= n * 7 && (V = !0);
|
|
4917
4917
|
let D = Math.ceil((h + 1) / 7), B = m.date.replace(/-/g, "/") + " 00:00:00";
|
|
4918
4918
|
m.GMTTime = new Date(B), typeof this.pickerOptions.disabledDate == "function" && (_ = this.pickerOptions.disabledDate(m.GMTTime)), r[D - 1].push({
|
|
4919
4919
|
day: u,
|
|
4920
4920
|
noBorderRight: S,
|
|
4921
|
-
noBorderBottom:
|
|
4921
|
+
noBorderBottom: V,
|
|
4922
4922
|
dayDescription: m,
|
|
4923
4923
|
disabled: _
|
|
4924
4924
|
});
|
|
@@ -5093,18 +5093,18 @@ const Zn = {
|
|
|
5093
5093
|
let u = l * Math.tan(h), m = -1 * s * Math.tan(h);
|
|
5094
5094
|
for (let _ = 0; _ <= n; _ += s)
|
|
5095
5095
|
for (let S = 0; S < a; S += l) {
|
|
5096
|
-
let
|
|
5096
|
+
let V = 0, D = 0;
|
|
5097
5097
|
if (S == 0)
|
|
5098
5098
|
if (_ == 0)
|
|
5099
|
-
|
|
5099
|
+
V = 0, D = 0;
|
|
5100
5100
|
else {
|
|
5101
|
-
a / l >= 2 && (
|
|
5101
|
+
a / l >= 2 && (V = V + -1 * a, D = D + -1 * u * (a / l)), r.translate(m, s);
|
|
5102
5102
|
let B = l / 2 + 10, z = B * Math.cos(h), R = B * Math.sin(h);
|
|
5103
|
-
_ / s % 2 == 0 ? (
|
|
5103
|
+
_ / s % 2 == 0 ? (V = V + -1 * z, D = D + -1 * R) : (V = V + z, D = D + R);
|
|
5104
5104
|
}
|
|
5105
5105
|
else
|
|
5106
|
-
|
|
5107
|
-
r.translate(
|
|
5106
|
+
V = l, D = u;
|
|
5107
|
+
r.translate(V, D), r.fillText(t, 35, 48);
|
|
5108
5108
|
}
|
|
5109
5109
|
return i;
|
|
5110
5110
|
},
|
|
@@ -5835,7 +5835,7 @@ const zs = {
|
|
|
5835
5835
|
beforeUnmount() {
|
|
5836
5836
|
window.removeEventListener("resize", this.listenResize);
|
|
5837
5837
|
}
|
|
5838
|
-
},
|
|
5838
|
+
}, Ns = /* @__PURE__ */ d("div", { style: { clear: "both" } }, null, -1), Vs = ["onClick", "title"], Ds = ["title", "id"], Ms = /* @__PURE__ */ d("i", { class: "dropdown-icon lh-ui-font-component icon_component_arrow_down" }, null, -1);
|
|
5839
5839
|
function Rs(e, t, i, s, l, n) {
|
|
5840
5840
|
const a = w("lh-input"), r = w("lh-button"), h = w("lh-popover"), u = Xe("loading");
|
|
5841
5841
|
return o(), M(h, {
|
|
@@ -5892,7 +5892,7 @@ function Rs(e, t, i, s, l, n) {
|
|
|
5892
5892
|
onClick: n.search,
|
|
5893
5893
|
"prefix-icon": "icon_component_search"
|
|
5894
5894
|
}, null, 8, ["size", "onClick"])) : p("", !0),
|
|
5895
|
-
|
|
5895
|
+
Ns
|
|
5896
5896
|
], 2),
|
|
5897
5897
|
l.searchResultList && l.searchResultList.length > 0 ? (o(), c("div", {
|
|
5898
5898
|
key: 0,
|
|
@@ -5907,7 +5907,7 @@ function Rs(e, t, i, s, l, n) {
|
|
|
5907
5907
|
class: f(l.showContent && (i.labelField ? m[i.labelField] : m) == l.showContent ? "active" : m.disabled ? "disabled" : ""),
|
|
5908
5908
|
onClick: (_) => n.setShowContent(m),
|
|
5909
5909
|
title: i.labelField ? m[i.labelField] : m
|
|
5910
|
-
}, g(i.labelField ? m[i.labelField] : m), 11,
|
|
5910
|
+
}, g(i.labelField ? m[i.labelField] : m), 11, Vs))), 256))
|
|
5911
5911
|
], 4)
|
|
5912
5912
|
], 2)) : p("", !0)
|
|
5913
5913
|
])), [
|
|
@@ -6711,6 +6711,18 @@ const va = {
|
|
|
6711
6711
|
}
|
|
6712
6712
|
},
|
|
6713
6713
|
methods: {
|
|
6714
|
+
clearSort() {
|
|
6715
|
+
for (let e = 0; e < this.tableHeader.length; e++) {
|
|
6716
|
+
let t = this.tableHeader[e];
|
|
6717
|
+
t.ifAscending = !1, t.ifDescending = !1;
|
|
6718
|
+
}
|
|
6719
|
+
},
|
|
6720
|
+
ascending(e) {
|
|
6721
|
+
this.clearSort(), e.ifAscending = !0, e.sortable === "custom" && this.$emit("sortChange", { prop: e.prop, order: "ascending" });
|
|
6722
|
+
},
|
|
6723
|
+
descending(e) {
|
|
6724
|
+
this.clearSort(), e.ifDescending = !0, e.sortable === "custom" && this.$emit("sortChange", { prop: e.prop, order: "descending" });
|
|
6725
|
+
},
|
|
6714
6726
|
generateUUID() {
|
|
6715
6727
|
let e = new Date().getTime();
|
|
6716
6728
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(i) {
|
|
@@ -6733,20 +6745,33 @@ const va = {
|
|
|
6733
6745
|
handleHeader() {
|
|
6734
6746
|
setTimeout(() => {
|
|
6735
6747
|
let e = [];
|
|
6736
|
-
|
|
6737
|
-
let
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6748
|
+
const t = (i) => {
|
|
6749
|
+
let s = {
|
|
6750
|
+
label: i.props.label,
|
|
6751
|
+
prop: i.props.prop,
|
|
6752
|
+
sortable: i.props.sortable,
|
|
6753
|
+
fixed: i.props.fixed,
|
|
6754
|
+
ifAscending: !1,
|
|
6755
|
+
ifDescending: !1,
|
|
6756
|
+
type: i.props.type
|
|
6757
|
+
};
|
|
6758
|
+
i.props.width ? s.width = i.props.width : (i.props.minWidth || i.props["min-width"]) && (s.minWidth = i.props.minWidth || i.props["min-width"]), e.push(s);
|
|
6759
|
+
};
|
|
6760
|
+
for (let i = 0; i < this.$slots.default().length; i++) {
|
|
6761
|
+
let s = this.$slots.default()[i];
|
|
6762
|
+
if (s.type.componentName === "lhTableColumn")
|
|
6763
|
+
t(s);
|
|
6764
|
+
else if (s.children && Array.isArray(s.children))
|
|
6765
|
+
for (let l = 0; l < s.children.length; l++) {
|
|
6766
|
+
let n = s.children[l];
|
|
6767
|
+
if (n.type.componentName === "lhTableColumn")
|
|
6768
|
+
t(n);
|
|
6769
|
+
else if (n.children && Array.isArray(n.children))
|
|
6770
|
+
for (let a = 0; a < n.children.length; a++) {
|
|
6771
|
+
let r = n.children[a];
|
|
6772
|
+
r.type.componentName === "lhTableColumn" && t(r);
|
|
6773
|
+
}
|
|
6774
|
+
}
|
|
6750
6775
|
}
|
|
6751
6776
|
e = this.calColumnWidth(e), this.tableHeader = JSON.parse(JSON.stringify(e));
|
|
6752
6777
|
}, 0);
|
|
@@ -6782,18 +6807,6 @@ const va = {
|
|
|
6782
6807
|
}
|
|
6783
6808
|
return h !== null && (e[h].firstColumnRight = !0), e;
|
|
6784
6809
|
},
|
|
6785
|
-
clearSort() {
|
|
6786
|
-
for (let e = 0; e < this.tableHeader.length; e++) {
|
|
6787
|
-
let t = this.tableHeader[e];
|
|
6788
|
-
t.ifAscending = !1, t.ifDescending = !1;
|
|
6789
|
-
}
|
|
6790
|
-
},
|
|
6791
|
-
ascending(e) {
|
|
6792
|
-
this.clearSort(), e.ifAscending = !0, e.sortable === "custom" && this.$emit("sortChange", { prop: e.prop, order: "ascending" });
|
|
6793
|
-
},
|
|
6794
|
-
descending(e) {
|
|
6795
|
-
this.clearSort(), e.ifDescending = !0, e.sortable === "custom" && this.$emit("sortChange", { prop: e.prop, order: "descending" });
|
|
6796
|
-
},
|
|
6797
6810
|
onScrollHorizontal(e) {
|
|
6798
6811
|
this.$refs.myTableHeader.scrollLeft = e.scrollLeft, this.showLeftShadow = e.scrollLeft !== 0;
|
|
6799
6812
|
let t = this.$refs.myTableContent.offsetWidth;
|
|
@@ -6853,10 +6866,18 @@ const va = {
|
|
|
6853
6866
|
this.tableHeader[t].width = S, this.changeWidth(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", h);
|
|
6854
6867
|
};
|
|
6855
6868
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", h);
|
|
6869
|
+
},
|
|
6870
|
+
slotChange() {
|
|
6871
|
+
this.handleHeader();
|
|
6856
6872
|
}
|
|
6857
6873
|
},
|
|
6858
6874
|
mounted() {
|
|
6859
6875
|
this.handleHeader(), window.addEventListener("resize", this.listenResize);
|
|
6876
|
+
const e = new MutationObserver(this.slotChange);
|
|
6877
|
+
e.observe(this.$el, {
|
|
6878
|
+
childList: !0,
|
|
6879
|
+
subtree: !0
|
|
6880
|
+
}), this.observer = e;
|
|
6860
6881
|
},
|
|
6861
6882
|
beforeUnmount() {
|
|
6862
6883
|
window.removeEventListener("resize", this.listenResize);
|
|
@@ -6870,11 +6891,11 @@ const va = {
|
|
|
6870
6891
|
}, Ta = ["onClick"], Ia = ["onClick"], La = {
|
|
6871
6892
|
key: 0,
|
|
6872
6893
|
class: "lh-table__empty-block"
|
|
6873
|
-
}, Pa = { class: "lh-table__empty-text" }, za = ["width"],
|
|
6894
|
+
}, Pa = { class: "lh-table__empty-text" }, za = ["width"], Na = {
|
|
6874
6895
|
class: "lh-table__column-resize-proxy",
|
|
6875
6896
|
ref: "resizeProxy"
|
|
6876
6897
|
};
|
|
6877
|
-
function
|
|
6898
|
+
function Va(e, t, i, s, l, n) {
|
|
6878
6899
|
const a = w("lh-checkbox"), r = w("lh-scrollbar");
|
|
6879
6900
|
return o(), c("div", {
|
|
6880
6901
|
class: f(["lh-table", { "last-column-left-show": l.showLeftShadow && l.horizontalVisible, "first-column-right-show": l.showRightShadow && l.horizontalVisible }]),
|
|
@@ -6953,12 +6974,12 @@ function Na(e, t, i, s, l, n) {
|
|
|
6953
6974
|
_: 3
|
|
6954
6975
|
}, 8, ["style", "onOnScrollHorizontal", "onInit", "onHorizontalVisibleChange"])
|
|
6955
6976
|
]),
|
|
6956
|
-
v(d("div",
|
|
6977
|
+
v(d("div", Na, null, 512), [
|
|
6957
6978
|
[P, l.isDragging]
|
|
6958
6979
|
])
|
|
6959
6980
|
], 2);
|
|
6960
6981
|
}
|
|
6961
|
-
const xe = /* @__PURE__ */ k(va, [["render",
|
|
6982
|
+
const xe = /* @__PURE__ */ k(va, [["render", Va]]);
|
|
6962
6983
|
xe.install = function(e) {
|
|
6963
6984
|
e.component(xe.name, xe);
|
|
6964
6985
|
};
|