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
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { defineComponent as N, reactive as S, getCurrentInstance as w, inject as k, computed as u, watch as M, resolveComponent as g, createElementBlock as f, openBlock as c, createVNode as L, mergeProps as B, unref as r, createSlots as O, withCtx as v, Fragment as D, renderList as E, createBlock as F, normalizeClass as P, createElementVNode as i, createCommentVNode as j, toDisplayString as m, createTextVNode as I } from "vue";
|
|
2
|
+
import { useMap as U } from "asamap";
|
|
3
|
+
const $ = { class: "SuperTimezone" }, A = { class: "flexMode vc hb g16" }, Z = { class: "flexMode vc" }, q = { key: 0 }, G = N({
|
|
4
|
+
name: "SuperTimezone"
|
|
5
|
+
}), R = /* @__PURE__ */ Object.assign(G, {
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
options: {
|
|
12
|
+
type: Array,
|
|
13
|
+
default: () => []
|
|
14
|
+
},
|
|
15
|
+
app: {
|
|
16
|
+
type: [String, Number],
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
org: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
usePreTimezone: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
value: !1
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: ["change", "update:modelValue", "update:timezone"],
|
|
29
|
+
setup(T, { emit: C }) {
|
|
30
|
+
const _ = T, l = S({
|
|
31
|
+
v: "",
|
|
32
|
+
timezone: "",
|
|
33
|
+
name: "",
|
|
34
|
+
options: [],
|
|
35
|
+
filterTxt: ""
|
|
36
|
+
}), { proxy: H } = w(), h = k("store");
|
|
37
|
+
h.common();
|
|
38
|
+
const d = h.asa(), n = C, V = (e) => {
|
|
39
|
+
s.value ? (n("update:modelValue", s.value.label), n("update:timezone", s.value.value)) : (n("update:modelValue", ""), n("update:timezone", "")), n("change");
|
|
40
|
+
}, y = (e) => {
|
|
41
|
+
l.filterTxt = e.toLowerCase();
|
|
42
|
+
}, z = u(() => U("common.timezone").map((e) => (e.v = e.value.toString(), e.des_en_us = e.label_en_us.toLowerCase(), e.des_zh_cn = e.label_zh_cn.toLowerCase(), e.hide = !1, e))), b = u(() => {
|
|
43
|
+
if (_.usePreTimezone) {
|
|
44
|
+
const e = [
|
|
45
|
+
{
|
|
46
|
+
label: "UTC",
|
|
47
|
+
value: 0,
|
|
48
|
+
hide: !1
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: d.accountTimezone.timezoneName,
|
|
52
|
+
tip: d.accountTimezone.tip,
|
|
53
|
+
value: d.accountTimezone.timezone,
|
|
54
|
+
hide: !1
|
|
55
|
+
},
|
|
56
|
+
{ ...x.value }
|
|
57
|
+
], o = [];
|
|
58
|
+
return z.value.forEach((a) => {
|
|
59
|
+
e.filter1((p) => p.label === a.label).data || o.push(a);
|
|
60
|
+
}), [...e, ...o];
|
|
61
|
+
} else
|
|
62
|
+
return z.value;
|
|
63
|
+
}), s = u(() => b.value.filter1((e) => e.label === l.v).data), x = u(() => {
|
|
64
|
+
const e = Intl.DateTimeFormat().resolvedOptions().timeZone, o = (/* @__PURE__ */ new Date()).getTimezoneOffset(), a = Math.floor(Math.abs(o) / 60);
|
|
65
|
+
return {
|
|
66
|
+
label: e,
|
|
67
|
+
tip: "Local",
|
|
68
|
+
value: a,
|
|
69
|
+
hide: !1
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
return M(
|
|
73
|
+
() => _.modelValue,
|
|
74
|
+
(e, o) => {
|
|
75
|
+
e !== void 0 && e !== o && (l.v = e);
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
immediate: !0
|
|
79
|
+
}
|
|
80
|
+
), (e, o) => {
|
|
81
|
+
const a = g("el-option"), p = g("el-select");
|
|
82
|
+
return c(), f("div", $, [
|
|
83
|
+
L(p, B({
|
|
84
|
+
modelValue: r(l).v,
|
|
85
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => r(l).v = t),
|
|
86
|
+
filterable: "",
|
|
87
|
+
placeholder: e.$l("Timezone"),
|
|
88
|
+
"filter-method": y
|
|
89
|
+
}, e.$attrs, {
|
|
90
|
+
onChange: V,
|
|
91
|
+
class: "wp100"
|
|
92
|
+
}), O({
|
|
93
|
+
default: v(() => [
|
|
94
|
+
(c(!0), f(D, null, E(r(b), (t, J) => (c(), F(a, {
|
|
95
|
+
key: t.label,
|
|
96
|
+
label: t.label,
|
|
97
|
+
value: t.label,
|
|
98
|
+
class: P(t.hide && "hide")
|
|
99
|
+
}, {
|
|
100
|
+
default: v(() => [
|
|
101
|
+
i("div", A, [
|
|
102
|
+
i("div", Z, [
|
|
103
|
+
i("span", null, m(t.label), 1),
|
|
104
|
+
t.tip ? (c(), f("span", q, "(" + m(t.tip) + ")", 1)) : j("", !0)
|
|
105
|
+
]),
|
|
106
|
+
i("span", null, m(t.value < 1 ? t.value : "+" + t.value), 1)
|
|
107
|
+
])
|
|
108
|
+
]),
|
|
109
|
+
_: 2
|
|
110
|
+
}, 1032, ["label", "value", "class"]))), 128))
|
|
111
|
+
]),
|
|
112
|
+
_: 2
|
|
113
|
+
}, [
|
|
114
|
+
r(s) ? {
|
|
115
|
+
name: "prefix",
|
|
116
|
+
fn: v(() => [
|
|
117
|
+
I(" [" + m(r(s).value) + "] ", 1)
|
|
118
|
+
]),
|
|
119
|
+
key: "0"
|
|
120
|
+
} : void 0
|
|
121
|
+
]), 1040, ["modelValue", "placeholder"])
|
|
122
|
+
]);
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
export {
|
|
127
|
+
R as default
|
|
128
|
+
};
|