magtool 1.5.38 → 1.5.39
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/cpt/AiApp.js +117 -0
- package/dist/cpt/AiOrg.js +130 -0
- package/dist/cpt/AsaAdGroup.js +261 -0
- package/dist/cpt/AsaApp.js +126 -0
- package/dist/cpt/AsaCampaign.js +268 -0
- package/dist/cpt/AsaOrg.js +130 -0
- package/dist/cpt/Card.js +92 -0
- package/dist/cpt/Country.js +32 -0
- package/dist/cpt/CountryItem.js +56 -0
- package/dist/cpt/DatePicker.js +246 -0
- package/dist/cpt/EChart.js +271 -0
- package/dist/cpt/Form.js +75 -0
- package/dist/cpt/Header.js +786 -0
- package/dist/cpt/Icon.js +24 -0
- package/dist/cpt/Image.js +58 -0
- package/dist/cpt/Input.js +129 -0
- package/dist/cpt/Main.js +230 -0
- package/dist/cpt/MultipleSelect.js +143 -0
- package/dist/cpt/Nodata.js +39 -0
- package/dist/cpt/Org.js +99 -0
- package/dist/cpt/Page.js +74 -0
- package/dist/cpt/StatusItem.js +68 -0
- package/dist/cpt/StatusSelect.js +79 -0
- package/dist/cpt/Table.js +123 -0
- package/dist/cpt/Textarea.js +132 -0
- package/dist/cpt/Timezone.js +128 -0
- package/dist/cpt/chip.js +639 -0
- package/dist/cpt/component.js +21 -0
- package/dist/css/cpt/Card.css +1 -0
- package/dist/css/cpt/EChart.css +1 -0
- package/dist/css/cpt/Header.css +1 -0
- package/dist/css/cpt/Main.css +1 -0
- package/dist/css/cpt/MultipleSelect.css +1 -0
- package/dist/css/cpt/Nodata.css +1 -0
- package/dist/css/cpt/Page.css +1 -0
- package/dist/css/cpt/Table.css +1 -0
- package/dist/css/cpt/Textarea.css +1 -0
- package/dist/css/cpt/chip.css +1 -0
- package/dist/css/{magtool.css → css/scss.css} +1 -1
- package/dist/index.js +2 -2
- package/dist/util.js +5 -5
- package/dist/vendor.js +17 -14
- package/package.json +1 -1
- package/dist/component.js +0 -4427
package/dist/cpt/Org.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { defineComponent as M, reactive as I, inject as V, onMounted as b, nextTick as c, computed as k, watch as C, resolveComponent as g, createElementBlock as m, openBlock as r, createBlock as u, createCommentVNode as N, createVNode as x, unref as i, withCtx as S, Fragment as $, renderList as B } from "vue";
|
|
2
|
+
const L = { class: "SuperOrg relative wp100" }, j = M({
|
|
3
|
+
name: "SuperOrg",
|
|
4
|
+
inheritAttrs: !1
|
|
5
|
+
}), A = /* @__PURE__ */ Object.assign(j, {
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: [Number, String],
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
permission: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "all"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
emits: "change",
|
|
17
|
+
setup(f, { emit: O }) {
|
|
18
|
+
const p = f, e = I({
|
|
19
|
+
loading: !1,
|
|
20
|
+
v: "",
|
|
21
|
+
orgOptions: []
|
|
22
|
+
}), d = V("store").asa();
|
|
23
|
+
b(() => {
|
|
24
|
+
y();
|
|
25
|
+
});
|
|
26
|
+
const n = O, y = async () => {
|
|
27
|
+
if (d.orgOptions.length > 0) {
|
|
28
|
+
e.orgOptions = d.orgOptions, n("success", e.orgOptions), c(() => {
|
|
29
|
+
const t = e.orgOptions.filter1(
|
|
30
|
+
(s) => s.orgId === e.v
|
|
31
|
+
).data;
|
|
32
|
+
n("update:paymentModel", t == null ? void 0 : t.paymentModel);
|
|
33
|
+
});
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
e.loading = !0;
|
|
37
|
+
const { code: a, data: o } = await window.$post({
|
|
38
|
+
url: window.$api.asa.orgOptions
|
|
39
|
+
});
|
|
40
|
+
e.loading = !1, a === 200 && (e.orgOptions = o.map((t) => (t.label = `${t.orgName} (${t.orgId})`, t)), d.saveData("orgOptions", e.orgOptions), c(() => {
|
|
41
|
+
const t = e.orgOptions.filter1(
|
|
42
|
+
(s) => s.orgId === e.v
|
|
43
|
+
).data;
|
|
44
|
+
n("update:paymentModel", t == null ? void 0 : t.paymentModel);
|
|
45
|
+
}), n("success", e.orgOptions));
|
|
46
|
+
}, _ = (a) => {
|
|
47
|
+
n("update:modelValue", a);
|
|
48
|
+
const o = e.orgOptions.filter1((t) => t.orgId === a).data;
|
|
49
|
+
n("update:currency", o == null ? void 0 : o.currency), n("update:name", o == null ? void 0 : o.orgName), n("update:timezone", o == null ? void 0 : o.timezone), n("update:paymentModel", o == null ? void 0 : o.paymentModel), n("change", a);
|
|
50
|
+
}, v = k(() => {
|
|
51
|
+
if (p.permission === "all")
|
|
52
|
+
return e.orgOptions;
|
|
53
|
+
{
|
|
54
|
+
const a = p.permission === "readonly";
|
|
55
|
+
return e.orgOptions.filter((t) => t.readonly === a);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return C(
|
|
59
|
+
() => p.modelValue,
|
|
60
|
+
(a) => {
|
|
61
|
+
a ? a !== e.v && (e.v = a, c(() => {
|
|
62
|
+
const o = e.orgOptions.filter1(
|
|
63
|
+
(t) => t.orgId === e.v
|
|
64
|
+
).data;
|
|
65
|
+
n("update:paymentModel", o == null ? void 0 : o.paymentModel);
|
|
66
|
+
})) : e.v = "";
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
immediate: !0
|
|
70
|
+
}
|
|
71
|
+
), (a, o) => {
|
|
72
|
+
const t = g("IconLoading"), s = g("el-option"), h = g("el-select");
|
|
73
|
+
return r(), m("div", L, [
|
|
74
|
+
i(e).loading ? (r(), u(t, { key: 0 })) : N("", !0),
|
|
75
|
+
x(h, {
|
|
76
|
+
modelValue: i(e).v,
|
|
77
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => i(e).v = l),
|
|
78
|
+
filterable: "",
|
|
79
|
+
"collapse-tags": "",
|
|
80
|
+
placeholder: " ",
|
|
81
|
+
class: "wp100",
|
|
82
|
+
onChange: _
|
|
83
|
+
}, {
|
|
84
|
+
default: S(() => [
|
|
85
|
+
(r(!0), m($, null, B(i(v), (l, w) => (r(), u(s, {
|
|
86
|
+
key: w,
|
|
87
|
+
label: l.label,
|
|
88
|
+
value: l.orgId
|
|
89
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 8, ["modelValue"])
|
|
93
|
+
]);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
export {
|
|
98
|
+
A as default
|
|
99
|
+
};
|
package/dist/cpt/Page.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineComponent as g, computed as c, resolveComponent as _, createElementBlock as o, openBlock as s, createVNode as m, createCommentVNode as d, createElementVNode as a, normalizeClass as h, renderSlot as r, toDisplayString as l, normalizeStyle as y, unref as n } from "vue";
|
|
2
|
+
import { _ as v } from "../vendor.js";
|
|
3
|
+
const k = { class: "Page relative yscroll vh100" }, b = { key: 1 }, x = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "title fw700 fs24"
|
|
6
|
+
}, C = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "subtitle fs14 txt-dark7"
|
|
9
|
+
}, S = {
|
|
10
|
+
class: "PageFooter flexMode vc g8 fs14",
|
|
11
|
+
style: { padding: "14px 30px 24px 30px" }
|
|
12
|
+
}, $ = { class: "txt-dark5" }, w = { class: "txt-primary" }, B = { class: "txt-dark5" }, P = g({
|
|
13
|
+
name: "Page"
|
|
14
|
+
}), z = /* @__PURE__ */ Object.assign(P, {
|
|
15
|
+
props: {
|
|
16
|
+
loading: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
subtitle: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
headerClass: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "sticky"
|
|
31
|
+
},
|
|
32
|
+
noheader: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
setup(p) {
|
|
38
|
+
const e = p, i = c(() => window.global.config.meta), u = c(() => ({
|
|
39
|
+
minHeight: window.global.config.options.pageHeight + "px"
|
|
40
|
+
}));
|
|
41
|
+
return (t, H) => {
|
|
42
|
+
const f = _("Loading");
|
|
43
|
+
return s(), o("div", k, [
|
|
44
|
+
m(f, {
|
|
45
|
+
loading: e.loading
|
|
46
|
+
}, null, 8, ["loading"]),
|
|
47
|
+
e.noheader ? d("", !0) : (s(), o("div", {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: h(["PageHeader h80 p0-30 flexMode vc hb z9 xscroll nobar", e.headerClass])
|
|
50
|
+
}, [
|
|
51
|
+
t.$slots.title ? r(t.$slots, "title", { key: 0 }, void 0, !0) : (s(), o("div", b, [
|
|
52
|
+
e.title ? (s(), o("div", x, l(t.$l(e.title)), 1)) : d("", !0),
|
|
53
|
+
e.subtitle ? (s(), o("div", C, l(t.$l(e.subtitle)), 1)) : d("", !0)
|
|
54
|
+
])),
|
|
55
|
+
r(t.$slots, "tool", {}, void 0, !0)
|
|
56
|
+
], 2)),
|
|
57
|
+
a("div", {
|
|
58
|
+
class: "PageBody relative p0-30 z1",
|
|
59
|
+
style: y(n(u))
|
|
60
|
+
}, [
|
|
61
|
+
r(t.$slots, "default", {}, void 0, !0)
|
|
62
|
+
], 4),
|
|
63
|
+
a("div", S, [
|
|
64
|
+
a("span", $, l(n(i).copyright), 1),
|
|
65
|
+
a("span", w, l(n(i).campany), 1),
|
|
66
|
+
a("span", B, l(n(i).email), 1)
|
|
67
|
+
])
|
|
68
|
+
]);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}), E = /* @__PURE__ */ v(z, [["__scopeId", "data-v-fb447dc9"]]);
|
|
72
|
+
export {
|
|
73
|
+
E as default
|
|
74
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as S, computed as a, createElementBlock as n, openBlock as l, createCommentVNode as u, unref as e, normalizeClass as i, toDisplayString as y } from "vue";
|
|
2
|
+
import { useMap as _ } from "asamap";
|
|
3
|
+
const B = { class: "SuperStatusItem flexMode vc g8" }, h = S({
|
|
4
|
+
name: "SuperStatusItem"
|
|
5
|
+
}), x = /* @__PURE__ */ Object.assign(h, {
|
|
6
|
+
props: {
|
|
7
|
+
status: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
nolabel: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "small"
|
|
18
|
+
},
|
|
19
|
+
lang: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
isButton: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
id1: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
31
|
+
id2: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
id3: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ""
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
emits: ["changeStatus"],
|
|
41
|
+
setup(r, { emit: c }) {
|
|
42
|
+
const t = r, p = c, f = () => {
|
|
43
|
+
t.isButton && p("changeStatus", t.status, t.id1, t.id2, t.id3);
|
|
44
|
+
}, s = a(() => _("statusMap")[t.status] || !1), d = a(() => window.$toUpperCamel(t.status)), o = a(() => m[t.size] || "fs12"), m = {
|
|
45
|
+
small: "fs12",
|
|
46
|
+
default: "fs16",
|
|
47
|
+
large: "fs24"
|
|
48
|
+
};
|
|
49
|
+
return (g, C) => (l(), n("div", B, [
|
|
50
|
+
e(s) ? (l(), n("i", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: i(["imicon", [
|
|
53
|
+
e(s).class,
|
|
54
|
+
e(o),
|
|
55
|
+
t.isButton && t.status !== "DELETED" ? e(s).button_class : ""
|
|
56
|
+
]]),
|
|
57
|
+
onClick: f
|
|
58
|
+
}, null, 2)) : u("", !0),
|
|
59
|
+
t.nolabel ? u("", !0) : (l(), n("span", {
|
|
60
|
+
key: 1,
|
|
61
|
+
class: i(["txt-h1", e(o)])
|
|
62
|
+
}, y(g.$l(e(s) ? e(s).label : e(d))), 3))
|
|
63
|
+
]));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
x as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent as C, reactive as V, getCurrentInstance as $, computed as a, watchEffect as b, resolveComponent as r, createElementBlock as i, openBlock as s, createVNode as m, mergeProps as I, unref as e, createSlots as N, withCtx as p, Fragment as x, renderList as B, createBlock as f, renderSlot as E } from "vue";
|
|
2
|
+
import { useMap as M } from "asamap";
|
|
3
|
+
const U = { class: "SuperStatusSelect" }, A = C({
|
|
4
|
+
name: "SuperStatusSelect"
|
|
5
|
+
}), D = /* @__PURE__ */ Object.assign(A, {
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
options: {
|
|
12
|
+
type: Array,
|
|
13
|
+
default: () => []
|
|
14
|
+
},
|
|
15
|
+
placeholder: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ""
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(g) {
|
|
21
|
+
const n = g, l = V({
|
|
22
|
+
v: ""
|
|
23
|
+
}), { proxy: S } = $(), u = a(() => window.$getLang()), _ = a(() => S.$slots), h = a(() => n.options.length ? n.options : ["RUNNING", "PAUSED"]), v = a(() => {
|
|
24
|
+
const t = n.placeholder || "Status";
|
|
25
|
+
return window.$l(t);
|
|
26
|
+
});
|
|
27
|
+
b(() => {
|
|
28
|
+
l.v = n.modelValue;
|
|
29
|
+
});
|
|
30
|
+
const y = M("statusMap");
|
|
31
|
+
return (t, c) => {
|
|
32
|
+
const d = r("StatusItem"), k = r("el-option"), w = r("el-select");
|
|
33
|
+
return s(), i("div", U, [
|
|
34
|
+
m(w, I({
|
|
35
|
+
modelValue: e(l).v,
|
|
36
|
+
"onUpdate:modelValue": c[0] || (c[0] = (o) => e(l).v = o),
|
|
37
|
+
"collapse-tags": "",
|
|
38
|
+
"collapse-tags-tooltip": ""
|
|
39
|
+
}, t.$attrs, {
|
|
40
|
+
placeholder: e(v),
|
|
41
|
+
onChange: t.change
|
|
42
|
+
}), N({
|
|
43
|
+
default: p(() => [
|
|
44
|
+
(s(!0), i(x, null, B(e(h), (o, L) => (s(), f(k, {
|
|
45
|
+
key: o,
|
|
46
|
+
label: t.$l(e(y)[o].label),
|
|
47
|
+
value: o
|
|
48
|
+
}, {
|
|
49
|
+
default: p(() => [
|
|
50
|
+
m(d, {
|
|
51
|
+
status: o,
|
|
52
|
+
lang: e(u)
|
|
53
|
+
}, null, 8, ["status", "lang"])
|
|
54
|
+
]),
|
|
55
|
+
_: 2
|
|
56
|
+
}, 1032, ["label", "value"]))), 128))
|
|
57
|
+
]),
|
|
58
|
+
_: 2
|
|
59
|
+
}, [
|
|
60
|
+
e(l).v ? {
|
|
61
|
+
name: "prefix",
|
|
62
|
+
fn: p(() => [
|
|
63
|
+
e(_).prefix ? E(t.$slots, "prefix", { key: 0 }) : (s(), f(d, {
|
|
64
|
+
key: 1,
|
|
65
|
+
status: e(l).v,
|
|
66
|
+
nolabel: "",
|
|
67
|
+
lang: e(u)
|
|
68
|
+
}, null, 8, ["status", "lang"]))
|
|
69
|
+
]),
|
|
70
|
+
key: "0"
|
|
71
|
+
} : void 0
|
|
72
|
+
]), 1040, ["modelValue", "placeholder", "onChange"])
|
|
73
|
+
]);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
D as default
|
|
79
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { defineComponent as F, reactive as H, ref as a, getCurrentInstance as N, computed as f, createElementBlock as V, openBlock as d, normalizeClass as j, createBlock as z, createCommentVNode as p, createVNode as L, mergeProps as m, unref as r, createSlots as O, withCtx as l, renderSlot as i, nextTick as P } from "vue";
|
|
2
|
+
import { H as q, G as D } from "./chip.js";
|
|
3
|
+
import { _ as J } from "../vendor.js";
|
|
4
|
+
const K = F({
|
|
5
|
+
name: "Table",
|
|
6
|
+
inheritAttrs: !1
|
|
7
|
+
}), M = /* @__PURE__ */ Object.assign(K, {
|
|
8
|
+
props: {
|
|
9
|
+
noheader: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
tableClass: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
customRefresh: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
remote: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !0
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(g, { expose: h, emit: v }) {
|
|
27
|
+
const R = v, s = g, n = H({
|
|
28
|
+
columnInfo: {},
|
|
29
|
+
selection: [],
|
|
30
|
+
list: [],
|
|
31
|
+
groupInfo: {}
|
|
32
|
+
}), b = a();
|
|
33
|
+
a();
|
|
34
|
+
const t = a(), { proxy: c } = N(), C = (e) => {
|
|
35
|
+
t.value.toFilter(e);
|
|
36
|
+
}, w = (e) => {
|
|
37
|
+
t.value.initTable(e);
|
|
38
|
+
}, T = (e) => {
|
|
39
|
+
t.value.editRow(e);
|
|
40
|
+
}, u = () => {
|
|
41
|
+
t.value.refreshTable();
|
|
42
|
+
}, _ = (e) => {
|
|
43
|
+
n.list = e;
|
|
44
|
+
}, $ = (e) => {
|
|
45
|
+
n.selection = e;
|
|
46
|
+
}, y = (e) => {
|
|
47
|
+
t.value.toggleRowExpansion(e);
|
|
48
|
+
}, S = (e, o) => {
|
|
49
|
+
t.value.toggleRowSelection(e, o);
|
|
50
|
+
}, k = () => {
|
|
51
|
+
c.$attrs.list || t.value.initTable({ refresh: !0, remote: s.remote }), s.customRefresh && R("customRefreshFunc");
|
|
52
|
+
}, I = (e) => {
|
|
53
|
+
n.groupInfo = e, P(() => {
|
|
54
|
+
t.value.initTable();
|
|
55
|
+
});
|
|
56
|
+
}, B = () => {
|
|
57
|
+
var e, o;
|
|
58
|
+
(o = (e = t.value) == null ? void 0 : e.$refs) == null || o.table.clearSelection();
|
|
59
|
+
}, G = () => {
|
|
60
|
+
t.value.toStop();
|
|
61
|
+
}, x = (e) => {
|
|
62
|
+
t.value.toAdd(e);
|
|
63
|
+
}, A = (e, o) => {
|
|
64
|
+
t.value.removeRow(e, o);
|
|
65
|
+
}, E = f(() => c.$attrs["table-name"]);
|
|
66
|
+
return f(() => `${E.value}_Column`), h({
|
|
67
|
+
initTable: w,
|
|
68
|
+
editRow: T,
|
|
69
|
+
removeRow: A,
|
|
70
|
+
toFilter: C,
|
|
71
|
+
toggleRowExpansion: y,
|
|
72
|
+
toggleRowSelection: S,
|
|
73
|
+
toInitTable: u,
|
|
74
|
+
clearSelection: B,
|
|
75
|
+
toStop: G,
|
|
76
|
+
toAdd: x
|
|
77
|
+
}), (e, o) => (d(), V("div", {
|
|
78
|
+
class: j(["Table", s.tableClass])
|
|
79
|
+
}, [
|
|
80
|
+
s.noheader ? p("", !0) : (d(), z(q, m({
|
|
81
|
+
key: 0,
|
|
82
|
+
ref_key: "header",
|
|
83
|
+
ref: b
|
|
84
|
+
}, e.$attrs, {
|
|
85
|
+
list: r(n).list,
|
|
86
|
+
selection: r(n).selection,
|
|
87
|
+
onToInitTable: u,
|
|
88
|
+
onGroupChange: I,
|
|
89
|
+
onRefresh: k
|
|
90
|
+
}), O({
|
|
91
|
+
default: l(() => [
|
|
92
|
+
e.$slots.actions ? i(e.$slots, "actions", { key: 0 }, void 0, !0) : p("", !0)
|
|
93
|
+
]),
|
|
94
|
+
_: 2
|
|
95
|
+
}, [
|
|
96
|
+
e.$slots.filterRow ? {
|
|
97
|
+
name: "filterRow",
|
|
98
|
+
fn: l(() => [
|
|
99
|
+
i(e.$slots, "filterRow", {}, void 0, !0)
|
|
100
|
+
]),
|
|
101
|
+
key: "0"
|
|
102
|
+
} : void 0
|
|
103
|
+
]), 1040, ["list", "selection"])),
|
|
104
|
+
L(D, m({
|
|
105
|
+
ref_key: "main",
|
|
106
|
+
ref: t
|
|
107
|
+
}, e.$attrs, {
|
|
108
|
+
noheader: s.noheader,
|
|
109
|
+
"group-info": r(n).groupInfo,
|
|
110
|
+
onSelectionChange: $,
|
|
111
|
+
onListChange: _
|
|
112
|
+
}), {
|
|
113
|
+
default: l(() => [
|
|
114
|
+
i(e.$slots, "default", {}, void 0, !0)
|
|
115
|
+
]),
|
|
116
|
+
_: 3
|
|
117
|
+
}, 16, ["noheader", "group-info"])
|
|
118
|
+
], 2));
|
|
119
|
+
}
|
|
120
|
+
}), X = /* @__PURE__ */ J(M, [["__scopeId", "data-v-d7014bcf"]]);
|
|
121
|
+
export {
|
|
122
|
+
X as default
|
|
123
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { defineComponent as N, reactive as T, getCurrentInstance as E, onMounted as I, nextTick as j, computed as u, watchPostEffect as M, resolveComponent as F, createElementBlock as f, openBlock as m, createCommentVNode as b, createVNode as O, createElementVNode as i, normalizeClass as x, unref as n, toDisplayString as S, withModifiers as D, renderSlot as L } from "vue";
|
|
2
|
+
import { _ as P } from "../vendor.js";
|
|
3
|
+
const U = { class: "SuperTextarea relative" }, q = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "absFull flexMode hc vc z9"
|
|
6
|
+
}, G = N({
|
|
7
|
+
name: "SuperTextarea"
|
|
8
|
+
}), H = /* @__PURE__ */ Object.assign(G, {
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: [String, Array],
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
rows: {
|
|
15
|
+
type: [Number, String],
|
|
16
|
+
default: 8
|
|
17
|
+
},
|
|
18
|
+
max: {
|
|
19
|
+
type: [String, Number],
|
|
20
|
+
default: 10
|
|
21
|
+
},
|
|
22
|
+
placeholder: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
focus: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
loading: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
sep: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: `
|
|
41
|
+
`
|
|
42
|
+
},
|
|
43
|
+
resize: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "none"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
emits: ["total", "update:modelValue", "blur"],
|
|
49
|
+
setup(h, { expose: k, emit: C }) {
|
|
50
|
+
const e = h, t = T({ v: "", total: 0, mounted: !1 }), { proxy: g } = E();
|
|
51
|
+
I(() => {
|
|
52
|
+
e.focus && y(v);
|
|
53
|
+
});
|
|
54
|
+
const s = C, y = (a) => {
|
|
55
|
+
j(() => {
|
|
56
|
+
g.$refs.input.focus(), a && g.$refs.input.select();
|
|
57
|
+
});
|
|
58
|
+
}, V = (a) => {
|
|
59
|
+
let l = 0, r = [];
|
|
60
|
+
const d = [];
|
|
61
|
+
if (a) {
|
|
62
|
+
if (r = a.split(`
|
|
63
|
+
`), r.forEach(($) => {
|
|
64
|
+
$.trim() && (l++, d.push($));
|
|
65
|
+
}), !o.value) {
|
|
66
|
+
t.v = p.value ? [] : "";
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
o.value > -1 && l > o.value && (r = d.slice(0, o.value), t.v = r.join(e.sep), l = o.value), s("update:modelValue", p.value ? r : t.v);
|
|
70
|
+
} else
|
|
71
|
+
s("update:modelValue", p.value ? [] : "");
|
|
72
|
+
t.total = l, s("total", l);
|
|
73
|
+
}, _ = () => {
|
|
74
|
+
t.v = "", t.total = 0, s("update:modelValue", ""), s("change", ""), y();
|
|
75
|
+
}, B = () => {
|
|
76
|
+
s("blur");
|
|
77
|
+
}, o = u(() => Number(e.max) || 0), z = u(() => t.total === o.value ? "txt-red" : "txt-blue"), p = u(() => window.$getType(e.modelValue) === "Array"), w = u(() => window.$l("One per Line")), A = u(() => e.placeholder ? `${window.$l(e.placeholder)}
|
|
78
|
+
${w.value}` : `${w.value}`), c = u(() => p.value ? e.modelValue.join(e.sep) : e.modelValue);
|
|
79
|
+
return M(() => {
|
|
80
|
+
c.value && o.value ? c.value !== t.v && (t.v = c.value, V(c.value)) : (t.v = "", t.total = 0);
|
|
81
|
+
}), k({
|
|
82
|
+
toFocus: y
|
|
83
|
+
}), (a, l) => {
|
|
84
|
+
const r = F("el-input");
|
|
85
|
+
return m(), f("div", U, [
|
|
86
|
+
e.loading ? (m(), f("div", q, [...l[1] || (l[1] = [
|
|
87
|
+
i("i", { class: "imicon im-loading ani-rotate" }, null, -1)
|
|
88
|
+
])])) : b("", !0),
|
|
89
|
+
O(r, {
|
|
90
|
+
ref: "input",
|
|
91
|
+
modelValue: n(t).v,
|
|
92
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => n(t).v = d),
|
|
93
|
+
rows: e.rows,
|
|
94
|
+
resize: e.resize,
|
|
95
|
+
type: "textarea",
|
|
96
|
+
placeholder: a.$l(n(A)),
|
|
97
|
+
class: x(["fullTextArea", a.$slots.prefix && "prefix"]),
|
|
98
|
+
disabled: e.loading || e.disabled,
|
|
99
|
+
onInput: V,
|
|
100
|
+
onBlur: B
|
|
101
|
+
}, null, 8, ["modelValue", "rows", "resize", "placeholder", "class", "disabled"]),
|
|
102
|
+
n(o) > -1 ? (m(), f("div", {
|
|
103
|
+
key: 1,
|
|
104
|
+
class: x(["countArea abs fs12 txt-blue", e.rows > 1 && "lh20"])
|
|
105
|
+
}, [
|
|
106
|
+
i("span", {
|
|
107
|
+
class: x(n(z))
|
|
108
|
+
}, S(n(t).total), 3),
|
|
109
|
+
l[2] || (l[2] = i("span", null, " / ", -1)),
|
|
110
|
+
i("span", null, S(n(o)), 1)
|
|
111
|
+
], 2)) : b("", !0),
|
|
112
|
+
i("div", {
|
|
113
|
+
class: x(["clearArea abs txt-dark3 hover-txt-red5", [n(t).v && "content"]]),
|
|
114
|
+
onClick: _
|
|
115
|
+
}, [...l[3] || (l[3] = [
|
|
116
|
+
i("i", { class: "imicon im-close-circle" }, null, -1)
|
|
117
|
+
])], 2),
|
|
118
|
+
a.$slots.prefix ? (m(), f("div", {
|
|
119
|
+
key: 2,
|
|
120
|
+
class: "prefix abs l t",
|
|
121
|
+
style: { padding: "6px 11px" },
|
|
122
|
+
onClick: D((d) => null, ["stop"])
|
|
123
|
+
}, [
|
|
124
|
+
L(a.$slots, "prefix", {}, void 0, !0)
|
|
125
|
+
])) : b("", !0)
|
|
126
|
+
]);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}), Q = /* @__PURE__ */ P(H, [["__scopeId", "data-v-005d323b"]]);
|
|
130
|
+
export {
|
|
131
|
+
Q as default
|
|
132
|
+
};
|