vue-2024-ui 0.0.35 → 0.0.36
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/dist/index.es.js +70 -66
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +86 -0
- package/package.json +8 -10
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Je, { ElMessage as be, ElMessageBox as
|
|
1
|
+
import Je, { ElMessage as be, ElMessageBox as He, ElDialog as Ze, ElDrawer as Ke } from "element-plus";
|
|
2
2
|
import { mergeModels as we, useModel as _e, ref as me, onMounted as Ve, resolveComponent as F, openBlock as _, createElementBlock as te, unref as o, createBlock as I, mergeProps as V, withCtx as c, renderSlot as g, Fragment as pe, renderList as R, createTextVNode as ue, toDisplayString as K, createSlots as Z, normalizeProps as Ce, createVNode as A, createElementVNode as j, useSlots as et, inject as je, useAttrs as tt, watch as lt, computed as xe, normalizeStyle as Re, withModifiers as ot, createCommentVNode as de, guardReactiveProps as Te, Transition as rt, withDirectives as Oe, vShow as Ae, onBeforeUnmount as at, normalizeClass as Ne, watchEffect as nt, h as qe, createApp as ut } from "vue";
|
|
3
3
|
import { FullScreen as st, Remove as it } from "@element-plus/icons-vue";
|
|
4
4
|
import We from "sortablejs";
|
|
@@ -286,8 +286,8 @@ var Ye = { exports: {} };
|
|
|
286
286
|
case $:
|
|
287
287
|
return M ? P(1, r) : P(0, r + 1);
|
|
288
288
|
case p:
|
|
289
|
-
var k = this.$locale().weekStart || 0,
|
|
290
|
-
return P(M ? t -
|
|
289
|
+
var k = this.$locale().weekStart || 0, H = (Q < k ? Q + 7 : Q) - k;
|
|
290
|
+
return P(M ? t - H : t + (6 - H), r);
|
|
291
291
|
case h:
|
|
292
292
|
case d:
|
|
293
293
|
return Y(n + "Hours", 0);
|
|
@@ -333,7 +333,7 @@ var Ye = { exports: {} };
|
|
|
333
333
|
if (!this.isValid()) return b.invalidDate || G;
|
|
334
334
|
var M = v || "YYYY-MM-DDTHH:mm:ssZ", O = U.z(this), P = this.$H, Y = this.$m, Q = this.$M, r = b.weekdays, t = b.months, n = b.meridiem, k = function(ae, he, $e, S) {
|
|
335
335
|
return ae && (ae[he] || ae(C, M)) || $e[he].slice(0, S);
|
|
336
|
-
},
|
|
336
|
+
}, H = function(ae) {
|
|
337
337
|
return U.s(P % 12 || 12, ae, "0");
|
|
338
338
|
}, X = n || function(ae, he, $e) {
|
|
339
339
|
var S = ae < 12 ? "AM" : "PM";
|
|
@@ -371,9 +371,9 @@ var Ye = { exports: {} };
|
|
|
371
371
|
case "HH":
|
|
372
372
|
return U.s(P, 2, "0");
|
|
373
373
|
case "h":
|
|
374
|
-
return
|
|
374
|
+
return H(1);
|
|
375
375
|
case "hh":
|
|
376
|
-
return
|
|
376
|
+
return H(2);
|
|
377
377
|
case "a":
|
|
378
378
|
return X(P, Y, !0);
|
|
379
379
|
case "A":
|
|
@@ -603,12 +603,12 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
603
603
|
label: k.label
|
|
604
604
|
}, {
|
|
605
605
|
default: c(() => [
|
|
606
|
-
(_(!0), te(pe, null, R(k.options, (
|
|
607
|
-
key:
|
|
608
|
-
onClick: (X) => h.change && h.change(
|
|
606
|
+
(_(!0), te(pe, null, R(k.options, (H) => (_(), I(se, V({ ref_for: !0 }, H, {
|
|
607
|
+
key: H.value,
|
|
608
|
+
onClick: (X) => h.change && h.change(H)
|
|
609
609
|
}), {
|
|
610
610
|
default: c(() => [
|
|
611
|
-
g(w.$slots, `${l.t}-${o(a)}-options`, { option:
|
|
611
|
+
g(w.$slots, `${l.t}-${o(a)}-options`, { option: H })
|
|
612
612
|
]),
|
|
613
613
|
_: 2
|
|
614
614
|
}, 1040, ["onClick"]))), 128))
|
|
@@ -616,7 +616,7 @@ const Me = /* @__PURE__ */ mt(pt), vt = {
|
|
|
616
616
|
_: 2
|
|
617
617
|
}, 1032, ["label"]))), 128)) : (_(!0), te(pe, { key: 1 }, R(o(m)[o(a)].options, (k) => (_(), I(se, V({ ref_for: !0 }, k, {
|
|
618
618
|
key: k.value,
|
|
619
|
-
onClick: (
|
|
619
|
+
onClick: (H) => h.change && h.change(k)
|
|
620
620
|
}), {
|
|
621
621
|
default: c(() => [
|
|
622
622
|
g(w.$slots, `${l.t}-${o(a)}-options`, { option: k })
|
|
@@ -1605,7 +1605,7 @@ const St = {
|
|
|
1605
1605
|
});
|
|
1606
1606
|
}
|
|
1607
1607
|
}, E = () => {
|
|
1608
|
-
|
|
1608
|
+
He.confirm("确定要复位吗?", "提示", {
|
|
1609
1609
|
confirmButtonText: "确定",
|
|
1610
1610
|
cancelButtonText: "取消",
|
|
1611
1611
|
type: "warning"
|
|
@@ -1673,7 +1673,7 @@ const St = {
|
|
|
1673
1673
|
]);
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
|
-
}, jt = /* @__PURE__ */ Fe(It, [["__scopeId", "data-v-fe875b13"]]), Rt = { class: "table-query-container" }, Lt = { class: "btns" }, Pt = { class: "btns" },
|
|
1676
|
+
}, jt = /* @__PURE__ */ Fe(It, [["__scopeId", "data-v-fe875b13"]]), Rt = { class: "table-query-container" }, Lt = { class: "btns" }, Pt = { class: "btns" }, zt = ["innerHTML"], Ht = ["src"], Nt = { style: { display: "flex", "margin-top": "-2px" } }, Wt = { style: { display: "flex", flex: "1" } }, Yt = {
|
|
1677
1677
|
style: { display: "flex", "justify-content": "center", width: "100%", height: "100%" },
|
|
1678
1678
|
id: "table-form"
|
|
1679
1679
|
}, Gt = { style: { display: "flex" } }, Qt = { style: { display: "flex", flex: "1" } }, Xt = /* @__PURE__ */ Object.assign({
|
|
@@ -1790,6 +1790,7 @@ const St = {
|
|
|
1790
1790
|
label: "下载",
|
|
1791
1791
|
text: !1,
|
|
1792
1792
|
type: "primary",
|
|
1793
|
+
mode: "dialog",
|
|
1793
1794
|
style: {
|
|
1794
1795
|
marginLeft: "10px"
|
|
1795
1796
|
},
|
|
@@ -1800,6 +1801,7 @@ const St = {
|
|
|
1800
1801
|
label: "设置列",
|
|
1801
1802
|
text: !1,
|
|
1802
1803
|
type: "primary",
|
|
1804
|
+
mode: "dialog",
|
|
1803
1805
|
style: {
|
|
1804
1806
|
marginLeft: "10px"
|
|
1805
1807
|
},
|
|
@@ -1859,13 +1861,13 @@ const St = {
|
|
|
1859
1861
|
);
|
|
1860
1862
|
const f = Object.fromEntries(Object.entries(ge(e.value, (r, t) => t.type != "control" && t.editor !== !1 && t.type != "hidden")).map(([r, t]) => [r, t.value])), q = (r, t) => {
|
|
1861
1863
|
let n = t;
|
|
1862
|
-
if (r.decimals && !isNaN(t) && (typeof r.decimals == "number" ? n = parseFloat(n).toFixed(r.decimals) : typeof r.decimals == "object" && r.decimals.num && (r.decimals.pad ? n = parseFloat(n).toFixed(r.decimals.num) : n = parseFloat(parseFloat(n).toFixed(r.decimals.num)).toString())), ["date", "datetime", "time"].includes(r.type) && Me(t).isValid()) {
|
|
1863
|
-
const
|
|
1864
|
+
if (r.decimals && !isNaN(t) && (typeof r.decimals == "number" ? n = parseFloat(n).toFixed(r.decimals) : typeof r.decimals == "object" && r.decimals.num && (r.decimals.pad ? n = parseFloat(n).toFixed(r.decimals.num) : n = parseFloat(parseFloat(n).toFixed(r.decimals.num)).toString())), ["date", "datetime", "time", "time-select"].includes(r.type) && Me(t).isValid()) {
|
|
1865
|
+
const H = {
|
|
1864
1866
|
date: "YYYY-MM-DD",
|
|
1865
1867
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
1866
1868
|
time: "HH:mm:ss"
|
|
1867
1869
|
};
|
|
1868
|
-
n = r.dateFormat ? Me(n).format(r.dateFormat) : Me(n).format(
|
|
1870
|
+
n = r.dateFormat ? Me(n).format(r.dateFormat) : Me(n).format(H[r.type]);
|
|
1869
1871
|
}
|
|
1870
1872
|
return r.type === "money" && (r.align = r.align || "right", r.width = r.width || 130, n = `<span title="${Ie(parseFloat(n))}">${tl(parseFloat(n))}</span>`), r.prefix && n && (n = `<span>${r.prefix}${n}</span>`), r.suffix && n && (n = `${n}<span>${r.suffix}</span>`), n;
|
|
1871
1873
|
}, ie = (r) => {
|
|
@@ -1878,12 +1880,12 @@ const St = {
|
|
|
1878
1880
|
e.value[n] && (e.value[n].value = f[n]);
|
|
1879
1881
|
}), m.value = !0, l("open", r, "add"));
|
|
1880
1882
|
}, W = (r, t, n, k) => {
|
|
1881
|
-
var
|
|
1882
|
-
if ((
|
|
1883
|
+
var H;
|
|
1884
|
+
if ((H = e.value.control.delete) != null && H.click)
|
|
1883
1885
|
e.value.control.delete.click(r, t, n, k);
|
|
1884
1886
|
else {
|
|
1885
1887
|
let { message: X, title: ae, options: he } = e.value.control.delete.dialog;
|
|
1886
|
-
|
|
1888
|
+
He.confirm(X, ae, he).then(() => {
|
|
1887
1889
|
l("delete", { row: r, column: t, $index: n }, ($e) => {
|
|
1888
1890
|
$e && (e.value.table.data.splice(n, 1), e.value.table.page.total--);
|
|
1889
1891
|
});
|
|
@@ -1891,13 +1893,13 @@ const St = {
|
|
|
1891
1893
|
});
|
|
1892
1894
|
}
|
|
1893
1895
|
}, B = (r, t, n, k) => {
|
|
1894
|
-
var
|
|
1895
|
-
E.value = "edit", (
|
|
1896
|
+
var H;
|
|
1897
|
+
E.value = "edit", (H = e.value.control.edit) != null && H.click ? e.value.control.edit.click(r, t, n, k) : (e.value.form.disabled = !1, e.value.dialog.mode = e.value.control.edit.mode, e.value.dialog.title = e.value.control.edit.label, Object.keys(r).forEach((X) => {
|
|
1896
1898
|
e.value[X] && (e.value[X].value = r[X]);
|
|
1897
1899
|
}), m.value = !0, l("open", k, "edit", r, t, n));
|
|
1898
1900
|
}, re = (r, t, n, k) => {
|
|
1899
|
-
var
|
|
1900
|
-
E.value = void 0, (
|
|
1901
|
+
var H;
|
|
1902
|
+
E.value = void 0, (H = e.value.control.view) != null && H.click ? e.value.control.view.click(r, t, n, k) : (e.value.form.disabled = !0, e.value.dialog.mode = e.value.control.view.mode, e.value.dialog.title = e.value.control.view.label, Object.keys(r).forEach((X) => {
|
|
1901
1903
|
e.value[X] && (e.value[X].value = r[X]);
|
|
1902
1904
|
}), m.value = !0, l("open", k, "view", r, t, n));
|
|
1903
1905
|
}, fe = (r, t) => {
|
|
@@ -1913,22 +1915,24 @@ const St = {
|
|
|
1913
1915
|
else {
|
|
1914
1916
|
let k = Ue({
|
|
1915
1917
|
title: r.control.download.label,
|
|
1918
|
+
size: 480,
|
|
1916
1919
|
width: 600,
|
|
1917
1920
|
slots: {
|
|
1918
1921
|
default: () => qe(Tt, {
|
|
1919
1922
|
items: t,
|
|
1920
1923
|
commitText: r.control.download.excelLabel,
|
|
1921
|
-
onExcel: (
|
|
1922
|
-
l("download",
|
|
1924
|
+
onExcel: (H, X) => {
|
|
1925
|
+
l("download", H, X), k();
|
|
1923
1926
|
}
|
|
1924
1927
|
})
|
|
1925
1928
|
}
|
|
1926
|
-
});
|
|
1929
|
+
}, r.control.download.mode);
|
|
1927
1930
|
}
|
|
1928
1931
|
}, ye = (r) => {
|
|
1929
1932
|
var t;
|
|
1930
1933
|
(t = r.control.setting) != null && t.click ? r.control.setting.click(r) : Ue({
|
|
1931
1934
|
title: r.control.setting.label,
|
|
1935
|
+
size: 470,
|
|
1932
1936
|
width: 600,
|
|
1933
1937
|
slots: {
|
|
1934
1938
|
default: () => qe(jt, {
|
|
@@ -1936,13 +1940,13 @@ const St = {
|
|
|
1936
1940
|
name: p.name
|
|
1937
1941
|
})
|
|
1938
1942
|
}
|
|
1939
|
-
});
|
|
1943
|
+
}, r.control.setting.mode);
|
|
1940
1944
|
}, le = xe(() => Object.fromEntries(
|
|
1941
1945
|
Object.entries(e.value).filter(([r, t]) => t.type !== "hidden").filter(([r, t]) => t.visible !== !1).filter(([r, t]) => t.showCol !== !1).map(([r, t]) => (t.sort = typeof t.sort == "number" ? t.sort : 0, [r, t])).sort((r, t) => r[1].sort - t[1].sort)
|
|
1942
1946
|
)), D = me({}), y = (r) => {
|
|
1943
1947
|
if (r.getDicts) {
|
|
1944
1948
|
const t = r.getDicts.toString();
|
|
1945
|
-
return D.value[t] ? (r.options = D.value[t], Promise.resolve()) : r.getDicts().then((n) => {
|
|
1949
|
+
return D.value[t] ? (r.options = D.value[t], Promise.resolve()) : r.getDicts(r, e.value).then((n) => {
|
|
1946
1950
|
D.value[t] = n, r.options = n;
|
|
1947
1951
|
});
|
|
1948
1952
|
}
|
|
@@ -1953,15 +1957,15 @@ const St = {
|
|
|
1953
1957
|
if (e.value[t].getDicts) {
|
|
1954
1958
|
const n = y(e.value[t]).then(() => {
|
|
1955
1959
|
e.value.table.data.forEach((k) => {
|
|
1956
|
-
var
|
|
1957
|
-
k[t] && (k[t] = ((
|
|
1960
|
+
var H;
|
|
1961
|
+
k[t] && (k[t] = ((H = e.value[t].options.find((X) => X.value == k[t])) == null ? void 0 : H.label) || k[t]);
|
|
1958
1962
|
});
|
|
1959
1963
|
}).catch((k) => {
|
|
1960
1964
|
console.error(`加载字典${t}:出现了错误!`, k);
|
|
1961
1965
|
});
|
|
1962
1966
|
r.push(n);
|
|
1963
1967
|
}
|
|
1964
|
-
}), Promise.all(r).then(() => {
|
|
1968
|
+
}), Promise.all(r).then((t) => {
|
|
1965
1969
|
});
|
|
1966
1970
|
};
|
|
1967
1971
|
return nt(() => {
|
|
@@ -1997,7 +2001,7 @@ const St = {
|
|
|
1997
2001
|
console.error("Error fetching table column settings:", t);
|
|
1998
2002
|
}
|
|
1999
2003
|
}), (r, t) => {
|
|
2000
|
-
const n = F("el-button"), k = F("el-table-column"),
|
|
2004
|
+
const n = F("el-button"), k = F("el-table-column"), H = F("el-table"), X = F("el-pagination"), ae = F("el-icon"), he = F("el-dialog"), $e = F("el-drawer");
|
|
2001
2005
|
return _(), te(pe, null, [
|
|
2002
2006
|
j("div", Rt, [
|
|
2003
2007
|
g(r.$slots, "query", {}, () => [
|
|
@@ -2049,7 +2053,7 @@ const St = {
|
|
|
2049
2053
|
]),
|
|
2050
2054
|
_: 2
|
|
2051
2055
|
}, [
|
|
2052
|
-
R(r.$slots, (S, ne,
|
|
2056
|
+
R(r.$slots, (S, ne, z) => ({
|
|
2053
2057
|
name: ne,
|
|
2054
2058
|
fn: c((N) => [
|
|
2055
2059
|
g(r.$slots, ne, { model: e.value }, void 0, !0)
|
|
@@ -2058,7 +2062,7 @@ const St = {
|
|
|
2058
2062
|
]), 1032, ["modelValue"])
|
|
2059
2063
|
], !0)
|
|
2060
2064
|
]),
|
|
2061
|
-
A(
|
|
2065
|
+
A(H, V({ class: "g-table-container" }, { ...r.$attrs, ...o(ge)(e.value.table, (S) => !["dblclickType", "page"].includes(S)) }), {
|
|
2062
2066
|
append: c(() => [
|
|
2063
2067
|
g(r.$slots, "append", {}, void 0, !0)
|
|
2064
2068
|
]),
|
|
@@ -2071,53 +2075,53 @@ const St = {
|
|
|
2071
2075
|
prop: ne,
|
|
2072
2076
|
key: ne,
|
|
2073
2077
|
ref_for: !0
|
|
2074
|
-
}, { ...e.value.tableColumns, ...o(ge)(S, (
|
|
2075
|
-
header: c(({ column:
|
|
2078
|
+
}, { ...e.value.tableColumns, ...o(ge)(S, (z) => T.includes(z)) }, { "header-align": "center" }), Z({
|
|
2079
|
+
header: c(({ column: z, $index: N }) => [
|
|
2076
2080
|
g(r.$slots, `${ne}-header`, {
|
|
2077
|
-
column:
|
|
2081
|
+
column: z,
|
|
2078
2082
|
$index: N
|
|
2079
2083
|
}, void 0, !0)
|
|
2080
2084
|
]),
|
|
2081
|
-
"filter-icon": c((
|
|
2082
|
-
g(r.$slots, `${ne}-filter-icon`, { data:
|
|
2085
|
+
"filter-icon": c((z) => [
|
|
2086
|
+
g(r.$slots, `${ne}-filter-icon`, { data: z }, void 0, !0)
|
|
2083
2087
|
]),
|
|
2084
2088
|
_: 2
|
|
2085
2089
|
}, [
|
|
2086
2090
|
S.type != "selection" && S.type != "index" && S.type != "expand" ? {
|
|
2087
2091
|
name: "default",
|
|
2088
|
-
fn: c(({ row:
|
|
2092
|
+
fn: c(({ row: z, column: N, $index: oe }) => [
|
|
2089
2093
|
g(r.$slots, `${ne}`, {
|
|
2090
|
-
row:
|
|
2094
|
+
row: z,
|
|
2091
2095
|
column: N,
|
|
2092
2096
|
$index: oe
|
|
2093
2097
|
}, () => [
|
|
2094
2098
|
j("div", {
|
|
2095
|
-
innerHTML: q(S, N.formatter(
|
|
2096
|
-
}, null, 8,
|
|
2099
|
+
innerHTML: q(S, N.formatter(z, N, z[ne], oe))
|
|
2100
|
+
}, null, 8, zt)
|
|
2097
2101
|
], !0)
|
|
2098
2102
|
]),
|
|
2099
2103
|
key: "0"
|
|
2100
2104
|
} : void 0,
|
|
2101
2105
|
S.type === "image" ? {
|
|
2102
2106
|
name: "default",
|
|
2103
|
-
fn: c(({ row:
|
|
2107
|
+
fn: c(({ row: z, column: N, $index: oe }) => [
|
|
2104
2108
|
g(r.$slots, `${ne}`, {
|
|
2105
|
-
row:
|
|
2109
|
+
row: z,
|
|
2106
2110
|
column: N,
|
|
2107
2111
|
$index: oe
|
|
2108
2112
|
}, () => [
|
|
2109
2113
|
j("img", V({
|
|
2110
|
-
style: { width: "80px", height: "80px", "object-fit": "cover" },
|
|
2114
|
+
style: { width: "80px", height: "80px", "object-fit": "cover", "border-radius": "3px" },
|
|
2111
2115
|
src: S.value,
|
|
2112
2116
|
ref_for: !0
|
|
2113
|
-
}, S), null, 16,
|
|
2117
|
+
}, S), null, 16, Ht)
|
|
2114
2118
|
], !0)
|
|
2115
2119
|
]),
|
|
2116
2120
|
key: "1"
|
|
2117
2121
|
} : void 0,
|
|
2118
2122
|
S.type == "control" ? {
|
|
2119
2123
|
name: "default",
|
|
2120
|
-
fn: c(({ row:
|
|
2124
|
+
fn: c(({ row: z, column: N, $index: oe }) => {
|
|
2121
2125
|
var Le, Pe;
|
|
2122
2126
|
return [
|
|
2123
2127
|
j("div", {
|
|
@@ -2126,18 +2130,18 @@ const St = {
|
|
|
2126
2130
|
}, [
|
|
2127
2131
|
g(r.$slots, "control", {}, () => [
|
|
2128
2132
|
g(r.$slots, "control-left", {
|
|
2129
|
-
row:
|
|
2133
|
+
row: z,
|
|
2130
2134
|
column: N,
|
|
2131
2135
|
$index: oe
|
|
2132
2136
|
}, void 0, !0),
|
|
2133
|
-
e.value.control.view.auth(
|
|
2137
|
+
e.value.control.view.auth(z, N, oe) ? g(r.$slots, "control-view", {
|
|
2134
2138
|
key: 0,
|
|
2135
|
-
row:
|
|
2139
|
+
row: z,
|
|
2136
2140
|
column: N,
|
|
2137
2141
|
$index: oe
|
|
2138
2142
|
}, () => [
|
|
2139
2143
|
A(n, V({ ref_for: !0 }, e.value.control.view, {
|
|
2140
|
-
onClick: (
|
|
2144
|
+
onClick: (ze) => re(z, N, oe, e.value)
|
|
2141
2145
|
}), {
|
|
2142
2146
|
default: c(() => [
|
|
2143
2147
|
ue(K(e.value.control.view.label), 1)
|
|
@@ -2146,18 +2150,18 @@ const St = {
|
|
|
2146
2150
|
}, 1040, ["onClick"])
|
|
2147
2151
|
], !0) : de("", !0),
|
|
2148
2152
|
g(r.$slots, "control-edit-left", {
|
|
2149
|
-
row:
|
|
2153
|
+
row: z,
|
|
2150
2154
|
column: N,
|
|
2151
2155
|
$index: oe
|
|
2152
2156
|
}, void 0, !0),
|
|
2153
|
-
e.value.control.edit.auth(
|
|
2157
|
+
e.value.control.edit.auth(z, N, oe) ? g(r.$slots, "control-edit", {
|
|
2154
2158
|
key: 1,
|
|
2155
|
-
row:
|
|
2159
|
+
row: z,
|
|
2156
2160
|
column: N,
|
|
2157
2161
|
$index: oe
|
|
2158
2162
|
}, () => [
|
|
2159
2163
|
A(n, V({ ref_for: !0 }, e.value.control.edit, {
|
|
2160
|
-
onClick: (
|
|
2164
|
+
onClick: (ze) => B(z, N, oe, e.value)
|
|
2161
2165
|
}), {
|
|
2162
2166
|
default: c(() => [
|
|
2163
2167
|
ue(K(e.value.control.edit.label), 1)
|
|
@@ -2166,18 +2170,18 @@ const St = {
|
|
|
2166
2170
|
}, 1040, ["onClick"])
|
|
2167
2171
|
], !0) : de("", !0),
|
|
2168
2172
|
g(r.$slots, "control-edit-right", {
|
|
2169
|
-
row:
|
|
2173
|
+
row: z,
|
|
2170
2174
|
column: N,
|
|
2171
2175
|
$index: oe
|
|
2172
2176
|
}, void 0, !0),
|
|
2173
|
-
e.value.control.delete.auth(
|
|
2177
|
+
e.value.control.delete.auth(z, N, oe) ? g(r.$slots, "control-delete", {
|
|
2174
2178
|
key: 2,
|
|
2175
|
-
row:
|
|
2179
|
+
row: z,
|
|
2176
2180
|
column: N,
|
|
2177
2181
|
$index: oe
|
|
2178
2182
|
}, () => [
|
|
2179
2183
|
A(n, V({ ref_for: !0 }, e.value.control.delete, {
|
|
2180
|
-
onClick: (
|
|
2184
|
+
onClick: (ze) => W(z, N, oe, e.value)
|
|
2181
2185
|
}), {
|
|
2182
2186
|
default: c(() => [
|
|
2183
2187
|
ue(K(e.value.control.delete.label), 1)
|
|
@@ -2186,7 +2190,7 @@ const St = {
|
|
|
2186
2190
|
}, 1040, ["onClick"])
|
|
2187
2191
|
], !0) : de("", !0),
|
|
2188
2192
|
g(r.$slots, "control-right", {
|
|
2189
|
-
row:
|
|
2193
|
+
row: z,
|
|
2190
2194
|
column: N,
|
|
2191
2195
|
$index: oe
|
|
2192
2196
|
}, void 0, !0)
|
|
@@ -2223,7 +2227,7 @@ const St = {
|
|
|
2223
2227
|
width: o(Xe)(e.value.dialog.width) + 35
|
|
2224
2228
|
}), {
|
|
2225
2229
|
header: c(() => {
|
|
2226
|
-
var S, ne,
|
|
2230
|
+
var S, ne, z, N;
|
|
2227
2231
|
return [
|
|
2228
2232
|
j("div", Nt, [
|
|
2229
2233
|
j("div", Wt, [
|
|
@@ -2245,7 +2249,7 @@ const St = {
|
|
|
2245
2249
|
_: 1
|
|
2246
2250
|
})
|
|
2247
2251
|
])) : de("", !0),
|
|
2248
|
-
((N = (
|
|
2252
|
+
((N = (z = e.value) == null ? void 0 : z.dialog) == null ? void 0 : N.fullScreen) === !0 ? (_(), te("div", {
|
|
2249
2253
|
key: 1,
|
|
2250
2254
|
onClick: t[7] || (t[7] = (oe) => {
|
|
2251
2255
|
e.value.dialog.fullScreen = !1;
|
|
@@ -2270,7 +2274,7 @@ const St = {
|
|
|
2270
2274
|
onSubmit: fe,
|
|
2271
2275
|
onReset: L
|
|
2272
2276
|
}, Z({ _: 2 }, [
|
|
2273
|
-
R(r.$slots, (S, ne,
|
|
2277
|
+
R(r.$slots, (S, ne, z) => ({
|
|
2274
2278
|
name: ne,
|
|
2275
2279
|
fn: c((N) => [
|
|
2276
2280
|
g(r.$slots, ne, { model: N }, void 0, !0)
|
|
@@ -2305,7 +2309,7 @@ const St = {
|
|
|
2305
2309
|
onSubmit: fe,
|
|
2306
2310
|
onReset: L
|
|
2307
2311
|
}, Z({ _: 2 }, [
|
|
2308
|
-
R(r.$slots, (S, ne,
|
|
2312
|
+
R(r.$slots, (S, ne, z) => ({
|
|
2309
2313
|
name: ne,
|
|
2310
2314
|
fn: c((N) => [
|
|
2311
2315
|
g(r.$slots, ne, { model: N }, void 0, !0)
|
|
@@ -2321,7 +2325,7 @@ const St = {
|
|
|
2321
2325
|
], 64);
|
|
2322
2326
|
};
|
|
2323
2327
|
}
|
|
2324
|
-
}), Jt = /* @__PURE__ */ Fe(Xt, [["__scopeId", "data-v-
|
|
2328
|
+
}), Jt = /* @__PURE__ */ Fe(Xt, [["__scopeId", "data-v-bd57fa4a"]]), Zt = Object.freeze({}), Qe = [
|
|
2325
2329
|
Jt,
|
|
2326
2330
|
Se
|
|
2327
2331
|
];
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.g-query-container[data-v-86d5e1cc]{display:flex;flex:1;flex-direction:column;padding:10px;box-sizing:border-box}.outer[data-v-86d5e1cc]{min-height:100px;border-radius:10px;background-color:#fffc;box-shadow:0 0 10px #0000001a;top:60px;padding:10px;width:100%;box-sizing:border-box}.inner[data-v-86d5e1cc]{border-radius:6px;min-height:100px;border:1px solid #f2f2f2;padding:20px;box-sizing:border-box;width:100%;background-color:#fffc}.nested-enter-active[data-v-86d5e1cc],.nested-leave-active[data-v-86d5e1cc]{transition:all .3s ease-in-out}.nested-leave-active[data-v-86d5e1cc]{transition-delay:.25s}.nested-enter-from[data-v-86d5e1cc],.nested-leave-to[data-v-86d5e1cc]{transform:translateY(-100px);opacity:0}.nested-enter-active .inner[data-v-86d5e1cc],.nested-leave-active .inner[data-v-86d5e1cc]{transition:all .3s ease-in-out}.nested-enter-active .inner[data-v-86d5e1cc]{transition-delay:.25s}.nested-enter-from .inner[data-v-86d5e1cc],.nested-leave-to .inner[data-v-86d5e1cc]{transform:translateY(-100px);opacity:.001}.check-box-hover[data-v-64e6e1c0]:hover,.check-box-hover[data-v-fe875b13]:hover{background:#f5f1f1}.allcheck a[data-v-fe875b13]{cursor:pointer}.filtered[data-v-fe875b13]{pointer-events:none}.max[data-v-
|
|
1
|
+
.g-query-container[data-v-86d5e1cc]{display:flex;flex:1;flex-direction:column;padding:10px;box-sizing:border-box}.outer[data-v-86d5e1cc]{min-height:100px;border-radius:10px;background-color:#fffc;box-shadow:0 0 10px #0000001a;top:60px;padding:10px;width:100%;box-sizing:border-box}.inner[data-v-86d5e1cc]{border-radius:6px;min-height:100px;border:1px solid #f2f2f2;padding:20px;box-sizing:border-box;width:100%;background-color:#fffc}.nested-enter-active[data-v-86d5e1cc],.nested-leave-active[data-v-86d5e1cc]{transition:all .3s ease-in-out}.nested-leave-active[data-v-86d5e1cc]{transition-delay:.25s}.nested-enter-from[data-v-86d5e1cc],.nested-leave-to[data-v-86d5e1cc]{transform:translateY(-100px);opacity:0}.nested-enter-active .inner[data-v-86d5e1cc],.nested-leave-active .inner[data-v-86d5e1cc]{transition:all .3s ease-in-out}.nested-enter-active .inner[data-v-86d5e1cc]{transition-delay:.25s}.nested-enter-from .inner[data-v-86d5e1cc],.nested-leave-to .inner[data-v-86d5e1cc]{transform:translateY(-100px);opacity:.001}.check-box-hover[data-v-64e6e1c0]:hover,.check-box-hover[data-v-fe875b13]:hover{background:#f5f1f1}.allcheck a[data-v-fe875b13]{cursor:pointer}.filtered[data-v-fe875b13]{pointer-events:none}.max[data-v-bd57fa4a]{cursor:pointer;color:#333}.max[data-v-bd57fa4a]:hover{color:var(--el-color-primary)}.btns[data-v-bd57fa4a]{display:flex}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { ElDialog, ElDrawer } from 'element-plus';
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
|
+
|
|
5
|
+
// 定义全局选项类型
|
|
6
|
+
type GlobalOptions = Readonly<Record<string, unknown>>;
|
|
7
|
+
|
|
8
|
+
// 定义模态框属性类型
|
|
9
|
+
interface ModalProps {
|
|
10
|
+
slots?: {
|
|
11
|
+
default?: () => any;
|
|
12
|
+
header?: () => any;
|
|
13
|
+
footer?: () => any;
|
|
14
|
+
};
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 定义插件安装函数类型
|
|
19
|
+
type InstallFunction = (app: App, options?: GlobalOptions) => void;
|
|
20
|
+
|
|
21
|
+
// 定义默认导出的插件类型
|
|
22
|
+
interface Plugin {
|
|
23
|
+
install: InstallFunction;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// 导出默认插件
|
|
27
|
+
export default Plugin;
|
|
28
|
+
|
|
29
|
+
// 定义创建动态组件函数的类型
|
|
30
|
+
export declare function createDynamicComponent(mode: string): typeof ElDialog | typeof ElDrawer | null;
|
|
31
|
+
|
|
32
|
+
// 定义打开模态框函数的类型
|
|
33
|
+
export declare function openModal(modalProps?: ModalProps, mode?: 'dialog' | 'drawer'): () => void;
|
|
34
|
+
|
|
35
|
+
// 定义转换为像素函数的类型
|
|
36
|
+
export declare function convertToPx(value: string | number, referenceSize?: number): number;
|
|
37
|
+
|
|
38
|
+
// 定义合并对象函数的类型
|
|
39
|
+
export declare function mergeObjects(...objects: Record<string, unknown>[]): Record<string, unknown>;
|
|
40
|
+
|
|
41
|
+
// 定义过滤对象函数的类型
|
|
42
|
+
export declare function filterObject(
|
|
43
|
+
obj: Record<string, unknown>,
|
|
44
|
+
filter?: (key: string, value: unknown) => boolean
|
|
45
|
+
): Record<string, unknown>;
|
|
46
|
+
|
|
47
|
+
// 定义在树形结构中查找标签函数的类型
|
|
48
|
+
export declare function findTreeLabelByValue(
|
|
49
|
+
treeData: Array<Record<string, unknown>>,
|
|
50
|
+
value: unknown,
|
|
51
|
+
valueKey?: string,
|
|
52
|
+
labelKey?: string,
|
|
53
|
+
childrenKey?: string
|
|
54
|
+
): string | null;
|
|
55
|
+
|
|
56
|
+
// 定义金额转中文大写函数的类型
|
|
57
|
+
export declare function moneyToChinese(money: number): string;
|
|
58
|
+
|
|
59
|
+
// 定义格式化金额函数的类型
|
|
60
|
+
export declare function formatAmount(amount: number): string;
|
|
61
|
+
|
|
62
|
+
// 定义 CT 常量类型
|
|
63
|
+
export declare const CT: {
|
|
64
|
+
RADIO: 'radio';
|
|
65
|
+
RADIOBUTTON: 'radio-button';
|
|
66
|
+
CHECKBOX: 'checkbox';
|
|
67
|
+
CHECKBOXGROUP: 'checkbox-group';
|
|
68
|
+
CHECKBOXGROUPBUTTON: 'checkbox-group-button';
|
|
69
|
+
SELECT: 'select';
|
|
70
|
+
TREESELECT: 'tree-select';
|
|
71
|
+
TIME: 'time';
|
|
72
|
+
TIMESELECT: 'time-select';
|
|
73
|
+
DATE: 'date';
|
|
74
|
+
DATETIME: 'datetime';
|
|
75
|
+
COLOR: 'color';
|
|
76
|
+
RATE: 'rate';
|
|
77
|
+
SLIDER: 'slider';
|
|
78
|
+
SWITCH: 'switch';
|
|
79
|
+
TRANSFER: 'transfer';
|
|
80
|
+
CASCADER: 'cascader';
|
|
81
|
+
IMAGE: 'image';
|
|
82
|
+
AUTOCOMPLETE: 'autocomplete';
|
|
83
|
+
INPUTNUMBER: 'input-number';
|
|
84
|
+
MONEY: 'money';
|
|
85
|
+
NUMBER: 'number';
|
|
86
|
+
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-2024-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A Vue 3 and Element Plus based plugin",
|
|
7
|
-
"module": "dist/index.es.js",
|
|
7
|
+
"module": "dist/index.es.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
9
9
|
"author": {
|
|
10
10
|
"name": "guoyuanchao",
|
|
@@ -16,17 +16,14 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"i": "pnpm i",
|
|
18
18
|
"dev": "vite",
|
|
19
|
-
"build": "vite build"
|
|
20
|
-
"prepublishOnly": "npm run build"
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {
|
|
19
|
+
"build": "vite build"
|
|
23
20
|
},
|
|
24
21
|
"peerDependencies": {
|
|
22
|
+
"@element-plus/icons-vue": "^2.3.1",
|
|
25
23
|
"dexie": "^4.0.0",
|
|
26
24
|
"element-plus": "^2.8.0",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"sortablejs": "^1.15.6"
|
|
25
|
+
"sortablejs": "^1.15.6",
|
|
26
|
+
"vue": "^3.4.0"
|
|
30
27
|
},
|
|
31
28
|
"license": "MIT",
|
|
32
29
|
"devDependencies": {
|
|
@@ -35,6 +32,7 @@
|
|
|
35
32
|
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
|
36
33
|
"@vue/compiler-sfc": "^3.4.29",
|
|
37
34
|
"vite": "^5.3.1",
|
|
38
|
-
"vite-plugin-dts": "^4.5.0"
|
|
35
|
+
"vite-plugin-dts": "^4.5.0",
|
|
36
|
+
"vite-plugin-vue-devtools": "^7.7.2"
|
|
39
37
|
}
|
|
40
38
|
}
|