act-plus 1.1.18 → 1.1.19
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/act-plus.js +5 -3
- package/act-plus.umd.cjs +1729 -16
- package/assets/editor.worker-df55e1ff.js +8 -0
- package/assets/ts.worker-e151483b.js +33972 -0
- package/lib/abap-1354785f.js +1314 -0
- package/lib/apex-279d4f27.js +315 -0
- package/lib/azcli-ba812c55.js +74 -0
- package/lib/bat-4d77495d.js +95 -0
- package/lib/bicep-7b240724.js +108 -0
- package/lib/cameligo-5d2daeb8.js +168 -0
- package/lib/clojure-b7ea12a3.js +754 -0
- package/lib/coffee-1a8cfbf4.js +228 -0
- package/lib/{configBtns-58f43801.js → configBtns-3772e689.js} +2 -2
- package/lib/{configFileds-b537fd99.js → configFileds-d0911c87.js} +3 -3
- package/lib/{configForm-b9e9ca98.js → configForm-ae4b725e.js} +1 -1
- package/lib/{configTable-bdb56a9e.js → configTable-879063d4.js} +31 -24
- package/lib/cpp-642b10c4.js +387 -0
- package/lib/csharp-d987ddad.js +320 -0
- package/lib/csp-96407af0.js +57 -0
- package/lib/css-5dd354ac.js +186 -0
- package/lib/cssMode-6d02ab39.js +1448 -0
- package/lib/cypher-11e5a4b6.js +262 -0
- package/lib/dart-5d209f63.js +270 -0
- package/lib/{dialogAddField-b60d14ab.js → dialogAddField-d6b18048.js} +69 -69
- package/lib/{dialogConfigBtn-f5f8703d.js → dialogConfigBtn-75e37dc9.js} +74 -78
- package/lib/dockerfile-8739cff7.js +132 -0
- package/lib/ecl-a20c5155.js +454 -0
- package/lib/elixir-8b028584.js +467 -0
- package/lib/{enum-99519ce0.js → enum-cc58b8fe.js} +25 -22
- package/lib/flow9-0dea2e73.js +141 -0
- package/lib/freemarker2-205877bf.js +646 -0
- package/lib/fsharp-49a70fad.js +210 -0
- package/lib/go-46e3b371.js +208 -0
- package/lib/graphql-51a577e5.js +141 -0
- package/lib/handlebars-2d920faa.js +394 -0
- package/lib/hcl-56b85754.js +177 -0
- package/lib/html-6b99359b.js +284 -0
- package/lib/htmlMode-498c17d9.js +1458 -0
- package/lib/index-68063c4c.js +96 -0
- package/lib/index-7c264775.js +192 -0
- package/lib/index-a36b2284.js +304 -0
- package/lib/index-aff95ab9.js +63 -0
- package/lib/index-da0a0bfe.js +162173 -0
- package/lib/index-e2f2023d.js +35 -0
- package/lib/{index-9e3ed108.js → index-fb2754ee.js} +1 -1
- package/lib/ini-1d58d82f.js +68 -0
- package/lib/java-cd017f60.js +221 -0
- package/lib/javascript-5e40fe11.js +78 -0
- package/lib/jsonMode-2a821e9e.js +1869 -0
- package/lib/julia-a0caf483.js +496 -0
- package/lib/kotlin-c6e52a56.js +245 -0
- package/lib/less-718543b4.js +168 -0
- package/lib/lexon-5e6e7a44.js +151 -0
- package/lib/liquid-dc78aaf7.js +241 -0
- package/lib/lua-f159160b.js +157 -0
- package/lib/m3-aadaf771.js +210 -0
- package/lib/markdown-9b448c46.js +202 -0
- package/lib/mips-161e49ce.js +194 -0
- package/lib/msdax-f65cb1e6.js +377 -0
- package/lib/mysql-24549dd1.js +875 -0
- package/lib/objective-c-e129a5ca.js +188 -0
- package/lib/pascal-4ccdf5ce.js +245 -0
- package/lib/pascaligo-a9603dcd.js +158 -0
- package/lib/perl-ba1fb97a.js +599 -0
- package/lib/pgsql-89978310.js +843 -0
- package/lib/php-987b9d87.js +471 -0
- package/lib/pla-96c2695d.js +131 -0
- package/lib/postiats-7b52ebac.js +544 -0
- package/lib/powerquery-8954ec26.js +890 -0
- package/lib/powershell-f00d0274.js +233 -0
- package/lib/protobuf-3eb85f80.js +422 -0
- package/lib/pug-6fab415a.js +393 -0
- package/lib/python-e55144b2.js +262 -0
- package/lib/qsharp-4792f872.js +282 -0
- package/lib/r-630f5d6b.js +245 -0
- package/lib/razor-1fb88f53.js +515 -0
- package/lib/redis-276b8288.js +298 -0
- package/lib/redshift-520a7359.js +806 -0
- package/lib/restructuredtext-4676a3fc.js +162 -0
- package/lib/ruby-764137cd.js +444 -0
- package/lib/rust-97f8f6e1.js +337 -0
- package/lib/sb-8c22f14c.js +110 -0
- package/lib/scala-c68c650c.js +353 -0
- package/lib/scheme-e6a52cb0.js +114 -0
- package/lib/scss-45104c77.js +244 -0
- package/lib/shell-09452d42.js +224 -0
- package/lib/solidity-d4979008.js +1351 -0
- package/lib/sophia-21995caf.js +190 -0
- package/lib/sparql-5088743c.js +193 -0
- package/lib/sql-63ec8e76.js +818 -0
- package/lib/st-fa9ab362.js +414 -0
- package/lib/swift-abdf1835.js +315 -0
- package/lib/systemverilog-a4f858ed.js +556 -0
- package/lib/tcl-8adf937f.js +232 -0
- package/lib/tsMode-8d12d976.js +792 -0
- package/lib/twig-404eb73e.js +323 -0
- package/lib/typescript-97ed77ae.js +330 -0
- package/lib/vb-e21e8153.js +364 -0
- package/lib/xml-e843c667.js +98 -0
- package/lib/yaml-62bcf3fa.js +187 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/lib/index-14f7a543.js +0 -165
- package/lib/index-1f8ed34b.js +0 -11178
- package/lib/index-56217e0e.js +0 -96
- package/lib/index-8cb975d8.js +0 -297
- package/lib/index-9a1abd6b.js +0 -139
package/lib/index-56217e0e.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { ref as R, inject as l, watch as j, resolveComponent as g, openBlock as s, createElementBlock as m, Fragment as y, renderList as q, unref as f, createBlock as c, resolveDynamicComponent as A, withCtx as _, createVNode as O, createCommentVNode as i, createTextVNode as B, toDisplayString as k } from "vue";
|
|
2
|
-
import { _ as E } from "./index-1f8ed34b.js";
|
|
3
|
-
import "vue-router";
|
|
4
|
-
import "element-plus";
|
|
5
|
-
const H = { class: "header-operate-container" }, M = {
|
|
6
|
-
__name: "index",
|
|
7
|
-
props: {
|
|
8
|
-
data: { type: Object, default: () => ({}) }
|
|
9
|
-
},
|
|
10
|
-
emits: ["operate"],
|
|
11
|
-
setup(w, { emit: N }) {
|
|
12
|
-
const T = N, x = w;
|
|
13
|
-
let b = R([]);
|
|
14
|
-
const V = l("globalProps"), v = l("menuPermissionBtns"), F = l("stringToBoolean"), $ = l("matchCondition"), D = l("getTableData"), S = l("tableBtnRefs"), P = (n) => {
|
|
15
|
-
if (!n.matchFields.length)
|
|
16
|
-
return !0;
|
|
17
|
-
const o = n.matchFields.filter((t) => t.matchType != "default"), a = (t) => V.matchData[t.matchType][t.matchFieldName];
|
|
18
|
-
let e = o.reduce((t, r, p) => {
|
|
19
|
-
const L = a(r);
|
|
20
|
-
return t += $(r.matchCondition, L, r.fieldValue == "" ? null : r.fieldValue == "true" ? F(r.fieldValue) : r.fieldValue), p !== o.length - 1 && (t += r.spliceCondition || "&&"), t;
|
|
21
|
-
}, "").split("||"), d = e.reduce((t, r, p) => (t += `(${r})`, p < e.length - 1 && (t += "||"), t), "");
|
|
22
|
-
return new Function(`return ${d}`)();
|
|
23
|
-
}, h = (n) => v.value.some((o) => o.unique == n.permissionCode) && P(n), I = (n) => {
|
|
24
|
-
b.value = (n || []).filter((o) => o.permissionCode !== 1001 && o.btnPostion.includes("header")).sort((o, a) => o.sort - a.sort);
|
|
25
|
-
};
|
|
26
|
-
j(
|
|
27
|
-
() => x.data,
|
|
28
|
-
(n, o) => {
|
|
29
|
-
I(n.buttons);
|
|
30
|
-
},
|
|
31
|
-
{ immediate: !0 }
|
|
32
|
-
);
|
|
33
|
-
const C = (n) => {
|
|
34
|
-
T("operate", n, {});
|
|
35
|
-
};
|
|
36
|
-
return (n, o) => {
|
|
37
|
-
const a = g("a-svg-icon"), u = g("el-button");
|
|
38
|
-
return s(), m("div", H, [
|
|
39
|
-
(s(!0), m(y, null, q(f(b), (e, d) => (s(), m(y, { key: d }, [
|
|
40
|
-
e.isCustomBtn && e.customType == "component" && h(e) ? (s(), c(A(e[e.customComponentName]), {
|
|
41
|
-
key: 0,
|
|
42
|
-
ref_for: !0,
|
|
43
|
-
ref: (t) => f(S)[`${e.customComponentName}-${e.permissionCode}`] = t,
|
|
44
|
-
buttonData: e,
|
|
45
|
-
onRefresh: o[0] || (o[0] = (t) => f(D)())
|
|
46
|
-
}, {
|
|
47
|
-
default: _(() => [
|
|
48
|
-
O(u, {
|
|
49
|
-
class: "el-btn",
|
|
50
|
-
type: e.btnColor,
|
|
51
|
-
onClick: (t) => C(e)
|
|
52
|
-
}, {
|
|
53
|
-
default: _(() => [
|
|
54
|
-
e.btnIcon ? (s(), c(a, {
|
|
55
|
-
key: 0,
|
|
56
|
-
class: "mr4",
|
|
57
|
-
name: e.btnIcon,
|
|
58
|
-
width: "12",
|
|
59
|
-
height: "12",
|
|
60
|
-
color: "#fff"
|
|
61
|
-
}, null, 8, ["name"])) : i("", !0),
|
|
62
|
-
B(" " + k(e.btnName), 1)
|
|
63
|
-
]),
|
|
64
|
-
_: 2
|
|
65
|
-
}, 1032, ["type", "onClick"])
|
|
66
|
-
]),
|
|
67
|
-
_: 2
|
|
68
|
-
}, 1064, ["buttonData"])) : i("", !0),
|
|
69
|
-
!e.isCustomBtn && h(e) ? (s(), c(u, {
|
|
70
|
-
key: 1,
|
|
71
|
-
class: "el-btn",
|
|
72
|
-
type: e.btnColor,
|
|
73
|
-
loading: e.opeateLoading,
|
|
74
|
-
onClick: (t) => C(e)
|
|
75
|
-
}, {
|
|
76
|
-
default: _(() => [
|
|
77
|
-
e.btnIcon ? (s(), c(a, {
|
|
78
|
-
key: 0,
|
|
79
|
-
class: "mr4",
|
|
80
|
-
name: e.btnIcon,
|
|
81
|
-
width: "12",
|
|
82
|
-
height: "12",
|
|
83
|
-
color: "#fff"
|
|
84
|
-
}, null, 8, ["name"])) : i("", !0),
|
|
85
|
-
B(" " + k(e.opeateLoading ? e.btnName + n.t("act.中") + "..." : e.btnName), 1)
|
|
86
|
-
]),
|
|
87
|
-
_: 2
|
|
88
|
-
}, 1032, ["type", "loading", "onClick"])) : i("", !0)
|
|
89
|
-
], 64))), 128))
|
|
90
|
-
]);
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
}, Q = /* @__PURE__ */ E(M, [["__scopeId", "data-v-67a827c3"]]);
|
|
94
|
-
export {
|
|
95
|
-
Q as default
|
|
96
|
-
};
|
package/lib/index-8cb975d8.js
DELETED
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
import { inject as R, reactive as de, ref as x, watch as re, resolveComponent as y, openBlock as i, createBlock as p, withCtx as h, createElementVNode as z, createVNode as T, unref as l, createTextVNode as L, toDisplayString as D, createElementBlock as V, Fragment as w, renderList as $, createCommentVNode as ie, resolveDynamicComponent as ne, isRef as ce, toRaw as ue } from "vue";
|
|
2
|
-
import { a as fe, e as pe, r as me, b as ye, _ as be, u as he, T as J, P as _e } from "./index-1f8ed34b.js";
|
|
3
|
-
import { ElMessage as G, ElNotification as ge } from "element-plus";
|
|
4
|
-
import "vue-router";
|
|
5
|
-
const A = fe.create({
|
|
6
|
-
baseURL: "",
|
|
7
|
-
// ""
|
|
8
|
-
timeout: 15e3
|
|
9
|
-
});
|
|
10
|
-
A.interceptors.request.use(
|
|
11
|
-
(d) => {
|
|
12
|
-
let b = sessionStorage.getItem("accessToken");
|
|
13
|
-
return b && (d.headers.Authorization = "Bearer " + b), d.headers["Content-Type"] != "application/x-www-form-urlencoded" && (d.data = { ...d.data }, Reflect.has(d.data, "dynamicFilters") && (d.data.dynamicFilters = pe(JSON.stringify(d.data.dynamicFilters)))), d;
|
|
14
|
-
},
|
|
15
|
-
(d) => Promise.reject(d)
|
|
16
|
-
);
|
|
17
|
-
A.interceptors.response.use(
|
|
18
|
-
(d) => {
|
|
19
|
-
const b = d.data;
|
|
20
|
-
if (b.code == 200)
|
|
21
|
-
return b;
|
|
22
|
-
if (b.code == 401)
|
|
23
|
-
sessionStorage.clear(), me.replace("/"), ye(), G.error({ title: "错误", message: "登陆超时,请重新登录" });
|
|
24
|
-
else
|
|
25
|
-
return G.error({ title: "错误", message: b.msg }), Promise.reject(b.msg);
|
|
26
|
-
},
|
|
27
|
-
(d) => {
|
|
28
|
-
if (d.response.status != -1)
|
|
29
|
-
return Promise.reject(d);
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
const Fe = { class: "no-config-field" }, Ce = { class: "dialog-footer" }, Ve = {
|
|
33
|
-
__name: "index",
|
|
34
|
-
props: {
|
|
35
|
-
visible: { type: Boolean, default: !1 },
|
|
36
|
-
title: { type: String, default: "" },
|
|
37
|
-
data: { type: Object, default: () => ({}) }
|
|
38
|
-
},
|
|
39
|
-
emits: ["update:visible", "refresh"],
|
|
40
|
-
setup(d, { emit: b }) {
|
|
41
|
-
const { t: c } = he(), H = R("loadComponents"), O = R("formatDataType"), E = R("globalProps"), M = b, u = d;
|
|
42
|
-
let F = de((() => ({
|
|
43
|
-
btnLoading: !1
|
|
44
|
-
}))()), K = x([]), o = x({}), k = x(null), Q = {};
|
|
45
|
-
const X = (a) => a.formColumnCol == null || a.customFiledsComponentes[a.customFiledsComponentes.customComponentName] ? 24 : a.formColumnCol ? a.formColumnCol : 24 / a.formRow, Y = (a) => {
|
|
46
|
-
if (["input", "textarea"].includes(a.fieldType))
|
|
47
|
-
return "blur";
|
|
48
|
-
if (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(a.fieldType))
|
|
49
|
-
return "change";
|
|
50
|
-
}, Z = (a) => {
|
|
51
|
-
if (!["input", "textarea"].includes(a) && ["multipleSelect", "dateRange"].includes(a))
|
|
52
|
-
return [];
|
|
53
|
-
}, I = (a, m) => {
|
|
54
|
-
if (["string"].includes(m))
|
|
55
|
-
return a.join(";");
|
|
56
|
-
if (["number"].includes(m))
|
|
57
|
-
return Number(a);
|
|
58
|
-
if (["array"].includes(m))
|
|
59
|
-
return a;
|
|
60
|
-
}, ee = (a) => {
|
|
61
|
-
if (["multipleSelect"].includes(a.fieldType))
|
|
62
|
-
return u.data.rowData[a.fieldKey] ? u.data.rowData[a.fieldKey].split(";") : [];
|
|
63
|
-
if (["dateRange"].includes(a.fieldType)) {
|
|
64
|
-
const m = a.fieldKey.split("&");
|
|
65
|
-
return u.data.rowData[a.fieldKey] = m.map((n) => u.data.rowData[n]), u.data.rowData[a.fieldKey];
|
|
66
|
-
}
|
|
67
|
-
return u.data.rowData[a.fieldKey];
|
|
68
|
-
}, le = (a) => A({ url: u.data.dataItem.requestUrl, method: "post", data: a });
|
|
69
|
-
re(
|
|
70
|
-
() => u.visible,
|
|
71
|
-
async (a, m) => {
|
|
72
|
-
a && (u.data.formList.forEach(async (n) => {
|
|
73
|
-
Q[n.fieldKey] = { submitFieldType: n.fieldSubmitType, isFormSetValue: n.isFormSetValue }, o.value[n.fieldKey] = Object.keys(u.data.rowData).length && n.isFormSetValue ? ee(n) : Z(n.fieldType);
|
|
74
|
-
const { isFiledCustom: _, customComponentName: f, customComponentUrl: g } = n.customFiledsComponentes;
|
|
75
|
-
if (_ && !n.customFiledsComponentes[f]) {
|
|
76
|
-
const C = await H(g, f);
|
|
77
|
-
n.customFiledsComponentes[f] = C;
|
|
78
|
-
}
|
|
79
|
-
}), K.value = u.data.formList || []);
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
const ae = (a) => {
|
|
83
|
-
N(), a();
|
|
84
|
-
}, N = () => {
|
|
85
|
-
K.value = [], k.value.resetFields(), M("update:visible", !1);
|
|
86
|
-
}, te = (a) => {
|
|
87
|
-
a && a.validate((m) => {
|
|
88
|
-
if (m) {
|
|
89
|
-
F.btnLoading = !0;
|
|
90
|
-
const { dataItem: n, rowData: _ } = u.data;
|
|
91
|
-
let f = { ...ue(o.value) };
|
|
92
|
-
Object.keys(f).forEach((s) => {
|
|
93
|
-
s.includes("&") ? f[s].split("&").forEach((U, v) => {
|
|
94
|
-
f[U] = f[s][v];
|
|
95
|
-
}) : Array.isArray(f[s]) && (f[s] = I(f[s], "string"));
|
|
96
|
-
});
|
|
97
|
-
const g = n.submitFields.filter((s) => s.matchType == "default").reduce((s, r) => (r.submitFieldType === "string" && (s[r.submitFieldName] = r.matchFieldName.toString()), s), {}), C = n.submitFields.filter((s) => s.matchType == "match").reduce((s, r) => (Reflect.has(r, "submitFieldMatchOrigin") && r.submitFieldMatchOrigin != "rowData" ? Reflect.has(E.matchData, r.submitFieldMatchOrigin) && (s[r.submitFieldName] = O(r.submitFieldType, E.matchData[r.submitFieldMatchOrigin][r.matchFieldName])) : s[r.submitFieldName] = O(r.submitFieldType, _[r.matchFieldName]), s), {});
|
|
98
|
-
le({
|
|
99
|
-
...f,
|
|
100
|
-
...g,
|
|
101
|
-
...C
|
|
102
|
-
}).then((s) => {
|
|
103
|
-
try {
|
|
104
|
-
ge({ title: c("act.tip"), message: c("act.saveSuccessfully"), type: "success", duration: 2500 }), N(), M("refresh");
|
|
105
|
-
} catch (r) {
|
|
106
|
-
console.error(r);
|
|
107
|
-
}
|
|
108
|
-
F.btnLoading = !1;
|
|
109
|
-
}).catch((s) => {
|
|
110
|
-
console.error(s), F.btnLoading = !1;
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
};
|
|
115
|
-
return (a, m) => {
|
|
116
|
-
var q;
|
|
117
|
-
const n = y("el-input"), _ = y("el-option"), f = y("el-select"), g = y("el-date-picker"), C = y("el-cascader"), s = y("el-switch"), r = y("el-form-item"), U = y("el-col"), v = y("el-row"), oe = y("el-form"), j = y("el-button"), se = y("el-dialog");
|
|
118
|
-
return i(), p(se, {
|
|
119
|
-
"model-value": u.visible,
|
|
120
|
-
title: u.title,
|
|
121
|
-
top: "5vh",
|
|
122
|
-
width: (q = d.data.formConfig) == null ? void 0 : q.dialogWidth,
|
|
123
|
-
"append-to-body": "",
|
|
124
|
-
"destroy-on-close": "",
|
|
125
|
-
"close-on-click-modal": !1,
|
|
126
|
-
"before-close": ae
|
|
127
|
-
}, {
|
|
128
|
-
footer: h(() => [
|
|
129
|
-
z("span", Ce, [
|
|
130
|
-
T(j, {
|
|
131
|
-
loading: l(F).btnLoading,
|
|
132
|
-
onClick: N
|
|
133
|
-
}, {
|
|
134
|
-
default: h(() => [
|
|
135
|
-
L(D(l(c)("act.cancel")), 1)
|
|
136
|
-
]),
|
|
137
|
-
_: 1
|
|
138
|
-
}, 8, ["loading"]),
|
|
139
|
-
T(j, {
|
|
140
|
-
type: "primary",
|
|
141
|
-
loading: l(F).btnLoading,
|
|
142
|
-
onClick: m[1] || (m[1] = (P) => te(l(k)))
|
|
143
|
-
}, {
|
|
144
|
-
default: h(() => [
|
|
145
|
-
L(D(l(c)("act.save")), 1)
|
|
146
|
-
]),
|
|
147
|
-
_: 1
|
|
148
|
-
}, 8, ["loading"])
|
|
149
|
-
])
|
|
150
|
-
]),
|
|
151
|
-
default: h(() => {
|
|
152
|
-
var P, B;
|
|
153
|
-
return [
|
|
154
|
-
T(oe, {
|
|
155
|
-
ref_key: "formRef",
|
|
156
|
-
ref: k,
|
|
157
|
-
model: l(o),
|
|
158
|
-
"label-suffix": ":",
|
|
159
|
-
"label-width": (P = d.data.formConfig) == null ? void 0 : P.formLabelWidth,
|
|
160
|
-
"label-position": (B = d.data.formConfig) == null ? void 0 : B.formLabelPosition
|
|
161
|
-
}, {
|
|
162
|
-
default: h(() => [
|
|
163
|
-
T(v, { gutter: 40 }, {
|
|
164
|
-
default: h(() => [
|
|
165
|
-
(i(!0), V(w, null, $(l(K), (e, W) => (i(), p(U, {
|
|
166
|
-
span: X(e),
|
|
167
|
-
key: W
|
|
168
|
-
}, {
|
|
169
|
-
default: h(() => [
|
|
170
|
-
e.customFiledsComponentes.isFiledCustom ? (i(), V(w, { key: 1 }, [
|
|
171
|
-
e.customFiledsComponentes[e.customFiledsComponentes.customComponentName] ? (i(), p(ne(e.customFiledsComponentes[e.customFiledsComponentes.customComponentName]), {
|
|
172
|
-
key: 0,
|
|
173
|
-
fieldCofnigItem: e,
|
|
174
|
-
rowData: u.data.rowData,
|
|
175
|
-
form: l(o),
|
|
176
|
-
"onUpdate:form": m[0] || (m[0] = (t) => ce(o) ? o.value = t : o = t)
|
|
177
|
-
}, null, 40, ["fieldCofnigItem", "rowData", "form"])) : (i(), V("div", {
|
|
178
|
-
class: "no-config",
|
|
179
|
-
key: W
|
|
180
|
-
}, [
|
|
181
|
-
z("span", Fe, "【" + D(e.fieldName) + "】", 1),
|
|
182
|
-
L(D(l(c)("act.fieldCustom")), 1)
|
|
183
|
-
]))
|
|
184
|
-
], 64)) : (i(), p(r, {
|
|
185
|
-
key: 0,
|
|
186
|
-
label: e.fieldName,
|
|
187
|
-
prop: e.fieldKey,
|
|
188
|
-
rules: [{ required: e.isFormFieldRequired, message: l(c)("act.requiredMessage"), trigger: Y(e) }]
|
|
189
|
-
}, {
|
|
190
|
-
default: h(() => [
|
|
191
|
-
e.fieldType === "input" ? (i(), p(n, {
|
|
192
|
-
key: 0,
|
|
193
|
-
modelValue: l(o)[e.fieldKey],
|
|
194
|
-
"onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
|
|
195
|
-
type: "text",
|
|
196
|
-
placeholder: `${l(c)("act.inputPlaceholder")}${e.fieldName}`,
|
|
197
|
-
disabled: e.isFormDisabled,
|
|
198
|
-
clearable: ""
|
|
199
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "textarea" ? (i(), p(n, {
|
|
200
|
-
key: 1,
|
|
201
|
-
modelValue: l(o)[e.fieldKey],
|
|
202
|
-
"onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
|
|
203
|
-
type: "textarea",
|
|
204
|
-
placeholder: `${l(c)("act.inputPlaceholder")}${e.fieldName}`,
|
|
205
|
-
disabled: e.isFormDisabled,
|
|
206
|
-
rows: 4
|
|
207
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "multipleSelect" ? (i(), p(f, {
|
|
208
|
-
key: 2,
|
|
209
|
-
modelValue: l(o)[e.fieldKey],
|
|
210
|
-
"onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
|
|
211
|
-
placeholder: `${l(c)("act.selectPlaceholder")}${e.fieldName}`,
|
|
212
|
-
disabled: e.isFormDisabled,
|
|
213
|
-
multiple: "",
|
|
214
|
-
clearable: "",
|
|
215
|
-
filterable: ""
|
|
216
|
-
}, {
|
|
217
|
-
default: h(() => [
|
|
218
|
-
(i(!0), V(w, null, $(e.dataList, (t, S) => (i(), p(_, {
|
|
219
|
-
key: S,
|
|
220
|
-
label: t.key,
|
|
221
|
-
value: t.value
|
|
222
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
223
|
-
]),
|
|
224
|
-
_: 2
|
|
225
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "select" ? (i(), p(f, {
|
|
226
|
-
key: 3,
|
|
227
|
-
modelValue: l(o)[e.fieldKey],
|
|
228
|
-
"onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
|
|
229
|
-
placeholder: `${l(c)("act.selectPlaceholder")}${e.fieldName}`,
|
|
230
|
-
disabled: e.isFormDisabled,
|
|
231
|
-
clearable: "",
|
|
232
|
-
filterable: ""
|
|
233
|
-
}, {
|
|
234
|
-
default: h(() => [
|
|
235
|
-
(i(!0), V(w, null, $(e.dataList, (t, S) => (i(), p(_, {
|
|
236
|
-
key: S,
|
|
237
|
-
label: t.key,
|
|
238
|
-
value: t.value
|
|
239
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
240
|
-
]),
|
|
241
|
-
_: 2
|
|
242
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "date" ? (i(), p(g, {
|
|
243
|
-
key: 4,
|
|
244
|
-
modelValue: l(o)[e.fieldKey],
|
|
245
|
-
"onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
|
|
246
|
-
type: e.fieldUiType,
|
|
247
|
-
placeholder: `${l(c)("act.selectPlaceholder")}${l(c)("act.time")}`,
|
|
248
|
-
"value-format": l(J)[e.fieldUiType],
|
|
249
|
-
disabled: e.isFormDisabled
|
|
250
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "disabled"])) : e.fieldType === "dateRange" ? (i(), p(g, {
|
|
251
|
-
key: 5,
|
|
252
|
-
modelValue: l(o)[e.fieldKey],
|
|
253
|
-
"onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
|
|
254
|
-
type: e.fieldUiType,
|
|
255
|
-
"start-placeholder": l(c)("act.startTime"),
|
|
256
|
-
"end-placeholder": l(c)("act.endTime"),
|
|
257
|
-
"value-format": l(J)[e.fieldUiType],
|
|
258
|
-
disabled: e.isFormDisabled
|
|
259
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "start-placeholder", "end-placeholder", "value-format", "disabled"])) : e.fieldType === "provinceCascade" ? (i(), p(C, {
|
|
260
|
-
key: 6,
|
|
261
|
-
modelValue: l(o)[e.fieldKey],
|
|
262
|
-
"onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
|
|
263
|
-
options: e.dataList,
|
|
264
|
-
props: l(_e),
|
|
265
|
-
clearable: "",
|
|
266
|
-
filterable: "",
|
|
267
|
-
placeholder: `${l(c)("act.selectPlaceholder")}${e.fieldName}`,
|
|
268
|
-
disabled: e.isFormDisabled
|
|
269
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (i(), p(s, {
|
|
270
|
-
key: 7,
|
|
271
|
-
modelValue: l(o)[e.fieldKey],
|
|
272
|
-
"onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
|
|
273
|
-
"active-value": !0,
|
|
274
|
-
"inactive-value": !1
|
|
275
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : ie("", !0)
|
|
276
|
-
]),
|
|
277
|
-
_: 2
|
|
278
|
-
}, 1032, ["label", "prop", "rules"]))
|
|
279
|
-
]),
|
|
280
|
-
_: 2
|
|
281
|
-
}, 1032, ["span"]))), 128))
|
|
282
|
-
]),
|
|
283
|
-
_: 1
|
|
284
|
-
})
|
|
285
|
-
]),
|
|
286
|
-
_: 1
|
|
287
|
-
}, 8, ["model", "label-width", "label-position"])
|
|
288
|
-
];
|
|
289
|
-
}),
|
|
290
|
-
_: 1
|
|
291
|
-
}, 8, ["model-value", "title", "width"]);
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
}, Ne = /* @__PURE__ */ be(Ve, [["__scopeId", "data-v-53e47c95"]]);
|
|
295
|
-
export {
|
|
296
|
-
Ne as default
|
|
297
|
-
};
|
package/lib/index-9a1abd6b.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { ref as P, watch as R, resolveComponent as u, resolveDirective as T, openBlock as a, createElementBlock as d, withDirectives as D, createBlock as n, withCtx as c, createTextVNode as K, toDisplayString as O, unref as f, Fragment as s, renderList as j, renderSlot as y, createCommentVNode as A, nextTick as w } from "vue";
|
|
2
|
-
import { _ as E, u as H } from "./index-1f8ed34b.js";
|
|
3
|
-
import "vue-router";
|
|
4
|
-
import "element-plus";
|
|
5
|
-
const U = { class: "act-table" }, V = {
|
|
6
|
-
__name: "index",
|
|
7
|
-
props: {
|
|
8
|
-
loading: { type: Boolean, default: !1 },
|
|
9
|
-
maxHeight: { type: Number, default: 600 },
|
|
10
|
-
total: { type: Number, default: 0 },
|
|
11
|
-
tableQuery: { type: Object, default: () => ({ pageIndex: 1, pageSize: 10 }) },
|
|
12
|
-
selection: { type: Array, default: () => [] },
|
|
13
|
-
headers: { type: Array, default: () => [] },
|
|
14
|
-
data: { type: Array, default: () => [] },
|
|
15
|
-
showSerialNumber: { type: Boolean, default: !0 },
|
|
16
|
-
showPagination: { type: Boolean, default: !0 },
|
|
17
|
-
rowKey: { type: String, default: "id" },
|
|
18
|
-
treeProps: { type: Object, default: () => ({ children: "children", hasChildren: "hasChildren" }) }
|
|
19
|
-
},
|
|
20
|
-
emits: ["update:tableQuery", "update:selection", "refresh"],
|
|
21
|
-
setup(g, { expose: b, emit: x }) {
|
|
22
|
-
const { t: h } = H(), i = x, t = g;
|
|
23
|
-
let p = P(null);
|
|
24
|
-
const _ = (o) => t.showPagination ? o + 1 + (t.tableQuery.pageIndex - 1) * t.tableQuery.pageSize : o + 1, S = (o) => {
|
|
25
|
-
w(() => {
|
|
26
|
-
t.data.forEach((l) => {
|
|
27
|
-
o.includes(l[t.rowKey]) && p.value.toggleRowSelection(l, !0);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
}, k = (o) => p.value.getSelectionRows();
|
|
31
|
-
R(
|
|
32
|
-
() => t.selection,
|
|
33
|
-
(o, l) => {
|
|
34
|
-
o && o.length && S(o);
|
|
35
|
-
},
|
|
36
|
-
{ deep: !0, immediate: !0 }
|
|
37
|
-
);
|
|
38
|
-
const m = (o) => {
|
|
39
|
-
i("update:selection", o);
|
|
40
|
-
}, v = (o, l) => {
|
|
41
|
-
o && w(() => {
|
|
42
|
-
t.data.forEach((r) => {
|
|
43
|
-
o.includes(r[t.rowKey]) && p.value.toggleRowSelection(r, !0);
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
}, C = (o) => {
|
|
47
|
-
i("update:tableQuery", { ...t.tableQuery, pageSize: o }), i("refresh", []);
|
|
48
|
-
}, z = (o) => {
|
|
49
|
-
i("update:tableQuery", { ...t.tableQuery, pageIndex: o }), i("refresh", []);
|
|
50
|
-
};
|
|
51
|
-
return b({ getSelectionRows: k, updateSelection: v }), (o, l) => {
|
|
52
|
-
const r = u("el-table-column"), Q = u("el-table"), I = u("el-pagination"), B = T("loading");
|
|
53
|
-
return a(), d("div", U, [
|
|
54
|
-
D((a(), n(Q, {
|
|
55
|
-
ref_key: "tableRef",
|
|
56
|
-
ref: p,
|
|
57
|
-
data: t.data,
|
|
58
|
-
stripe: "",
|
|
59
|
-
border: "",
|
|
60
|
-
"highlight-current-row": "",
|
|
61
|
-
"max-height": t.maxHeight,
|
|
62
|
-
"row-key": t.rowKey,
|
|
63
|
-
"default-expand-all": "",
|
|
64
|
-
"tree-props": g.treeProps,
|
|
65
|
-
"header-cell-style": { backgroundColor: "#eef1f6", color: "#1f2d3d", fontSize: "14px" },
|
|
66
|
-
onSelectionChange: m
|
|
67
|
-
}, {
|
|
68
|
-
empty: c(() => [
|
|
69
|
-
K(O(t.data.length || t.data.length == 0 ? f(h)("act.noData") : ""), 1)
|
|
70
|
-
]),
|
|
71
|
-
default: c(() => [
|
|
72
|
-
(a(!0), d(s, null, j(t.headers, (e) => (a(), d(s, { key: e }, [
|
|
73
|
-
e.isCustomTableHeader ? y(o.$slots, e.prop, { key: 0 }, void 0, !0) : (a(), d(s, { key: 1 }, [
|
|
74
|
-
e.render ? (a(), n(r, {
|
|
75
|
-
key: 0,
|
|
76
|
-
label: e.label,
|
|
77
|
-
align: "center",
|
|
78
|
-
width: e.width,
|
|
79
|
-
"show-overflow-tooltip": e.prop == "operate" ? !1 : e.showOverflowTooltip,
|
|
80
|
-
fixed: e.fixed
|
|
81
|
-
}, {
|
|
82
|
-
default: c((N) => [
|
|
83
|
-
y(o.$slots, e.prop, { scope: N }, void 0, !0)
|
|
84
|
-
]),
|
|
85
|
-
_: 2
|
|
86
|
-
}, 1032, ["label", "width", "show-overflow-tooltip", "fixed"])) : (a(), d(s, { key: 1 }, [
|
|
87
|
-
e.prop == "checkbox" ? (a(), n(r, {
|
|
88
|
-
key: 0,
|
|
89
|
-
type: "selection",
|
|
90
|
-
align: "center",
|
|
91
|
-
width: e.width,
|
|
92
|
-
fixed: ""
|
|
93
|
-
}, null, 8, ["width"])) : e.prop == "serialNumber" ? (a(), n(r, {
|
|
94
|
-
key: 1,
|
|
95
|
-
index: _,
|
|
96
|
-
type: "index",
|
|
97
|
-
align: "center",
|
|
98
|
-
width: e.width,
|
|
99
|
-
label: f(h)("act.sort"),
|
|
100
|
-
fixed: ""
|
|
101
|
-
}, null, 8, ["width", "label"])) : (a(), n(r, {
|
|
102
|
-
key: 2,
|
|
103
|
-
prop: e.prop,
|
|
104
|
-
label: e.label,
|
|
105
|
-
align: "center",
|
|
106
|
-
"show-overflow-tooltip": e.showOverflowTooltip,
|
|
107
|
-
width: e.width,
|
|
108
|
-
"min-width": e.minWidth,
|
|
109
|
-
fixed: e.fixed
|
|
110
|
-
}, null, 8, ["prop", "label", "show-overflow-tooltip", "width", "min-width", "fixed"]))
|
|
111
|
-
], 64))
|
|
112
|
-
], 64))
|
|
113
|
-
], 64))), 128))
|
|
114
|
-
]),
|
|
115
|
-
_: 3
|
|
116
|
-
}, 8, ["data", "max-height", "row-key", "tree-props"])), [
|
|
117
|
-
[B, t.loading]
|
|
118
|
-
]),
|
|
119
|
-
t.showPagination ? (a(), n(I, {
|
|
120
|
-
key: 0,
|
|
121
|
-
class: "table-pagination",
|
|
122
|
-
"current-page": t.tableQuery.pageIndex,
|
|
123
|
-
"onUpdate:currentPage": l[0] || (l[0] = (e) => t.tableQuery.pageIndex = e),
|
|
124
|
-
"page-size": t.tableQuery.pageSize,
|
|
125
|
-
"onUpdate:pageSize": l[1] || (l[1] = (e) => t.tableQuery.pageSize = e),
|
|
126
|
-
"page-sizes": [20, 50, 75, 100],
|
|
127
|
-
background: "",
|
|
128
|
-
layout: "total, sizes, prev, pager, next, jumper",
|
|
129
|
-
total: t.total,
|
|
130
|
-
onSizeChange: C,
|
|
131
|
-
onCurrentChange: z
|
|
132
|
-
}, null, 8, ["current-page", "page-size", "total"])) : A("", !0)
|
|
133
|
-
]);
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
}, W = /* @__PURE__ */ E(V, [["__scopeId", "data-v-3c7bb62d"]]);
|
|
137
|
-
export {
|
|
138
|
-
W as default
|
|
139
|
-
};
|