@web-utils/component 2.7.13 → 2.7.14
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/chunks/{ConfigSelect.vue_vue_type_template_lang.e7a9d5b7.js → ConfigSelect.vue_vue_type_template_lang.dfc91f07.js} +20 -15
- package/dist/chunks/{ConfigTable.vue_vue_type_template_lang.e9060616.js → ConfigTable.vue_vue_type_template_lang.b27540fd.js} +1 -1
- package/dist/chunks/{ConfigUpload.vue_vue_type_template_lang.48dd814b.js → ConfigUpload.vue_vue_type_template_lang.129c0ced.js} +18 -13
- package/dist/chunks/{WidgetConfig.vue_vue_type_template_lang.7928c468.js → WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js} +16 -16
- package/dist/chunks/{WidgetForm.vue_vue_type_template_lang.e3e800a6.js → WidgetForm.vue_vue_type_template_lang.d4b05679.js} +10 -10
- package/dist/chunks/{WidgetFormGroup.vue_vue_type_template_lang.6a693e5e.js → WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js} +13 -13
- package/dist/chunks/{WidgetFormTable.vue_vue_type_template_lang.291bf39a.js → WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js} +3 -2
- package/dist/chunks/{dataformat.d3fd2d1b.js → dataformat.65b92bfe.js} +36 -35
- package/dist/chunks/detail.d67573b1.js +28 -0
- package/dist/chunks/dic.70feb9b4.js +135 -0
- package/dist/chunks/{event.43b42228.js → event.dd6f522d.js} +3 -3
- package/dist/chunks/{init.3b47bb80.js → init.7c58eb34.js} +10 -10
- package/dist/chunks/{monaco.1dbdc960.js → monaco.cefcb9f5.js} +92 -85
- package/dist/chunks/{packages.6f252850.js → packages.1fc9ccba.js} +1 -1
- package/dist/chunks/slot.4b391395.js +27 -0
- package/dist/chunks/util.23fe58fb.js +261 -0
- package/dist/components/afd-column/index.js +1 -1
- package/dist/components/affix/index.js +2 -2
- package/dist/components/base.css +1 -1
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/chat/index.js +9 -9
- package/dist/components/column/index.js +25 -25
- package/dist/components/column-default/index.js +3 -2
- package/dist/components/column-dynamic/index.js +1 -1
- package/dist/components/column-menu/index.js +11 -11
- package/dist/components/column-slot/index.js +54 -53
- package/dist/components/config-custom/index.js +3 -3
- package/dist/components/config-event/index.js +5 -5
- package/dist/components/config-rate/index.js +1 -1
- package/dist/components/config-rate/style.css +1 -1
- package/dist/components/config-select/index.js +3 -3
- package/dist/components/config-switch/index.js +5 -5
- package/dist/components/config-switch/style.css +1 -1
- package/dist/components/config-table/index.js +3 -3
- package/dist/components/config-tree/index.js +3 -3
- package/dist/components/config-tree/style.css +1 -1
- package/dist/components/config-upload/index.js +1 -1
- package/dist/components/dialog-excel/index.js +37 -40
- package/dist/components/dialog-filter/index.js +19 -19
- package/dist/components/dialog-form/index.js +1 -1
- package/dist/components/element-dialog/index.js +2 -2
- package/dist/components/element-dialog/style.css +1 -1
- package/dist/components/flow/index.js +17 -18
- package/dist/components/flow-node/index.js +1 -1
- package/dist/components/form-temp/index.js +3 -3
- package/dist/components/fy-array/index.js +2 -2
- package/dist/components/fy-cascader/index.js +13 -13
- package/dist/components/fy-checkbox/index.js +4 -4
- package/dist/components/fy-code/index.js +1 -1
- package/dist/components/fy-curd/index.js +68 -69
- package/dist/components/fy-date/index.js +1 -1
- package/dist/components/fy-dialog-form/index.js +11 -11
- package/dist/components/fy-draggable/index.js +5 -7
- package/dist/components/fy-dynamic/index.js +32 -28
- package/dist/components/fy-empty/index.js +1 -1
- package/dist/components/fy-form/index.js +153 -141
- package/dist/components/fy-form-design/index.js +31 -31
- package/dist/components/fy-input/index.js +60 -46
- package/dist/components/fy-input-color/index.js +34 -29
- package/dist/components/fy-input-icon/index.js +1 -1
- package/dist/components/fy-input-map/index.js +14 -14
- package/dist/components/fy-input-number/index.js +1 -1
- package/dist/components/fy-input-table/index.js +2 -2
- package/dist/components/fy-input-tree/index.js +12 -12
- package/dist/components/fy-radio/index.js +1 -1
- package/dist/components/fy-rate/index.js +1 -1
- package/dist/components/fy-select/index.js +3 -3
- package/dist/components/fy-slider/index.js +2 -2
- package/dist/components/fy-switch/index.js +1 -1
- package/dist/components/fy-tabs/index.js +2 -2
- package/dist/components/fy-time/index.js +2 -2
- package/dist/components/fy-title/index.js +1 -1
- package/dist/components/fy-tree/index.js +3 -3
- package/dist/components/fy-u-editor/index.js +26 -24
- package/dist/components/fy-upload/index.js +146 -282
- package/dist/components/header-menu/index.js +2 -2
- package/dist/components/header-search/index.js +16 -15
- package/dist/components/image-cropper/index.js +299 -0
- package/dist/components/image-cropper/style.css +1 -0
- package/dist/components/image-preview/index.js +346 -0
- package/dist/components/image-preview/style.css +1 -0
- package/dist/components/keyboard/index.js +58 -63
- package/dist/components/license/index.js +7 -7
- package/dist/components/login/index.js +37 -32
- package/dist/components/name-avatar/index.js +1 -1
- package/dist/components/pageable-table/index.js +1 -1
- package/dist/components/pageable-view/index.js +26 -26
- package/dist/components/photo-swipe/index.js +71 -166
- package/dist/components/queue/index.js +6 -6
- package/dist/components/record-video/index.js +18 -18
- package/dist/components/search/index.js +3 -3
- package/dist/components/sign/index.js +64 -59
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/table-page/index.js +5 -5
- package/dist/components/text-ellipsis/index.js +11 -10
- package/dist/components/verify/index.js +25 -25
- package/dist/components/widget-config/index.js +8 -8
- package/dist/components/widget-form/index.js +7 -7
- package/dist/components/widget-form-group/index.js +8 -8
- package/dist/components/widget-form-item/index.js +14 -13
- package/dist/components/widget-form-table/index.js +14 -14
- package/dist/index.css +109 -40
- package/dist/index.es.js +4048 -3732
- package/package.json +5 -56
- package/web-types.json +28 -10
- package/dist/chunks/detail.ac4d421a.js +0 -28
- package/dist/chunks/dic.79d9f595.js +0 -133
- package/dist/chunks/slot.1b8d2b1b.js +0 -27
- package/dist/chunks/util.80e28481.js +0 -250
- package/dist/components/photo-swipe/style.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web-utils/component",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,11 +37,12 @@
|
|
|
37
37
|
"lodash": "^4.17.21",
|
|
38
38
|
"monaco-editor": "^0.30.1",
|
|
39
39
|
"overlayscrollbars": "^1.13.3",
|
|
40
|
-
"photoswipe": "^
|
|
40
|
+
"photoswipe": "^5.3.5",
|
|
41
41
|
"resize-detector": "^0.3.0",
|
|
42
42
|
"simple-uploader.js": "^0.6.0",
|
|
43
43
|
"tinymce": "4.5.12",
|
|
44
44
|
"viewerjs": "^1.11.1",
|
|
45
|
+
"vue-cropper": "^0.5.8",
|
|
45
46
|
"vuedraggable": "^2.24.3"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
@@ -120,62 +121,10 @@
|
|
|
120
121
|
},
|
|
121
122
|
"extends": [
|
|
122
123
|
"@vue/typescript",
|
|
123
|
-
"
|
|
124
|
+
"@web-utils/eslint-config-vue2"
|
|
124
125
|
],
|
|
125
126
|
"rules": {
|
|
126
|
-
|
|
127
|
-
"error",
|
|
128
|
-
"never"
|
|
129
|
-
],
|
|
130
|
-
"quotes": [
|
|
131
|
-
"error",
|
|
132
|
-
"single"
|
|
133
|
-
],
|
|
134
|
-
"vue/no-deprecated-dollar-listeners-api": "off",
|
|
135
|
-
"vue/multi-word-component-names": "off",
|
|
136
|
-
"vue/no-v-html": "off",
|
|
137
|
-
"vue/require-default-prop": "off",
|
|
138
|
-
"vue/no-deprecated-destroyed-lifecycle": "off",
|
|
139
|
-
"vue/html-closing-bracket-newline": [
|
|
140
|
-
"error",
|
|
141
|
-
{
|
|
142
|
-
"singleline": "never",
|
|
143
|
-
"multiline": "never"
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"vue/max-attributes-per-line": [
|
|
147
|
-
"error",
|
|
148
|
-
{
|
|
149
|
-
"singleline": 1000,
|
|
150
|
-
"multiline": 1
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
"vue/first-attribute-linebreak": [
|
|
154
|
-
"error",
|
|
155
|
-
{
|
|
156
|
-
"singleline": "ignore",
|
|
157
|
-
"multiline": "beside"
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"vue/html-closing-bracket-spacing": [
|
|
161
|
-
"error",
|
|
162
|
-
{
|
|
163
|
-
"startTag": "never",
|
|
164
|
-
"endTag": "never",
|
|
165
|
-
"selfClosingTag": "never"
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"vue/component-name-in-template-casing": [
|
|
169
|
-
"error",
|
|
170
|
-
"PascalCase",
|
|
171
|
-
{
|
|
172
|
-
"registeredComponentsOnly": false,
|
|
173
|
-
"ignores": [
|
|
174
|
-
"uploader",
|
|
175
|
-
"/^uploader-/"
|
|
176
|
-
]
|
|
177
|
-
}
|
|
178
|
-
]
|
|
127
|
+
|
|
179
128
|
}
|
|
180
129
|
},
|
|
181
130
|
"resolutions": {
|
package/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@web-utils/component",
|
|
5
|
-
"version": "2.7.
|
|
5
|
+
"version": "2.7.14",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"description-markup": "markdown",
|
|
@@ -775,10 +775,10 @@
|
|
|
775
775
|
],
|
|
776
776
|
"slots": [
|
|
777
777
|
{
|
|
778
|
-
"name": "crud.getSlotName(column,'H')"
|
|
778
|
+
"name": "crud.getSlotName(column, 'H')"
|
|
779
779
|
},
|
|
780
780
|
{
|
|
781
|
-
"name": "crud.getSlotName(column,'F')"
|
|
781
|
+
"name": "crud.getSlotName(column, 'F')"
|
|
782
782
|
},
|
|
783
783
|
{
|
|
784
784
|
"name": "item"
|
|
@@ -7628,7 +7628,7 @@
|
|
|
7628
7628
|
],
|
|
7629
7629
|
"slots": [
|
|
7630
7630
|
{
|
|
7631
|
-
"name": "getSlotName(item,'T')"
|
|
7631
|
+
"name": "getSlotName(item, 'T')"
|
|
7632
7632
|
},
|
|
7633
7633
|
{
|
|
7634
7634
|
"name": "item"
|
|
@@ -10535,22 +10535,22 @@
|
|
|
10535
10535
|
],
|
|
10536
10536
|
"slots": [
|
|
10537
10537
|
{
|
|
10538
|
-
"name": "getSlotName(tabs,'H')"
|
|
10538
|
+
"name": "getSlotName(tabs, 'H')"
|
|
10539
10539
|
},
|
|
10540
10540
|
{
|
|
10541
|
-
"name": "getSlotName(item,'H')"
|
|
10541
|
+
"name": "getSlotName(item, 'H')"
|
|
10542
10542
|
},
|
|
10543
10543
|
{
|
|
10544
|
-
"name": "getSlotName(column,'L')"
|
|
10544
|
+
"name": "getSlotName(column, 'L')"
|
|
10545
10545
|
},
|
|
10546
10546
|
{
|
|
10547
|
-
"name": "getSlotName(column,'E')"
|
|
10547
|
+
"name": "getSlotName(column, 'E')"
|
|
10548
10548
|
},
|
|
10549
10549
|
{
|
|
10550
10550
|
"name": "column.prop"
|
|
10551
10551
|
},
|
|
10552
10552
|
{
|
|
10553
|
-
"name": "getSlotName(sItem,'T')"
|
|
10553
|
+
"name": "getSlotName(sItem, 'T')"
|
|
10554
10554
|
},
|
|
10555
10555
|
{
|
|
10556
10556
|
"name": "ssItem"
|
|
@@ -16877,6 +16877,14 @@
|
|
|
16877
16877
|
}
|
|
16878
16878
|
]
|
|
16879
16879
|
},
|
|
16880
|
+
{
|
|
16881
|
+
"name": "ImageCropper",
|
|
16882
|
+
"description": ""
|
|
16883
|
+
},
|
|
16884
|
+
{
|
|
16885
|
+
"name": "ImagePreview",
|
|
16886
|
+
"description": ""
|
|
16887
|
+
},
|
|
16880
16888
|
{
|
|
16881
16889
|
"name": "ImageViewer",
|
|
16882
16890
|
"description": "",
|
|
@@ -18126,7 +18134,17 @@
|
|
|
18126
18134
|
},
|
|
18127
18135
|
{
|
|
18128
18136
|
"name": "PhotoSwipe",
|
|
18129
|
-
"description": ""
|
|
18137
|
+
"description": "",
|
|
18138
|
+
"attributes": [
|
|
18139
|
+
{
|
|
18140
|
+
"name": "urls",
|
|
18141
|
+
"value": {
|
|
18142
|
+
"kind": "expression",
|
|
18143
|
+
"type": "array"
|
|
18144
|
+
},
|
|
18145
|
+
"default": ""
|
|
18146
|
+
}
|
|
18147
|
+
]
|
|
18130
18148
|
},
|
|
18131
18149
|
{
|
|
18132
18150
|
"name": "Queue",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { isBlank as T, formatDate as f } from "@web-utils/core";
|
|
2
|
-
import { i as Y, M as I, A as L, D as y, m as _, b as S, n as A, p as $, e as b, q as h } from "./util.80e28481.js";
|
|
3
|
-
const P = (r = {}, t = {}, g = {}, n = []) => {
|
|
4
|
-
let e = r[t.prop], a = t.type, s = t.separator;
|
|
5
|
-
if (t.bind && (e = Y(r, t.bind)), T(e))
|
|
6
|
-
e = "";
|
|
7
|
-
else {
|
|
8
|
-
let o = I.includes(t.type) && t.multiple, D = L.includes(t.type);
|
|
9
|
-
if ((["string", "number"].includes(t.dataType) || o || D) && !Array.isArray(e) && (e = (e + "").split(s || y), t.dataType === "number" && (e = _(e))), S.includes(a))
|
|
10
|
-
Array.isArray(e) ? e = e.join(s || A) : e = e.split(s || y).join(s || A);
|
|
11
|
-
else if (a === "password")
|
|
12
|
-
e = $(e, "*");
|
|
13
|
-
else if (b.includes(a) && t.format) {
|
|
14
|
-
const d = t.format.replace("dd", "DD").replace("yyyy", "YYYY");
|
|
15
|
-
let l = f(Date.now(), "YYYY-MM-DD");
|
|
16
|
-
if (a.indexOf("range") !== -1) {
|
|
17
|
-
let i = e[0] || "", p = e[1] || "";
|
|
18
|
-
a === "timerange" && i.length <= 8 && p.length < 8 && (i = `${l} ${i}`, p = `${l} ${p}`), e = [f(i, d), f(p, d)].join(t.separator || "~");
|
|
19
|
-
} else
|
|
20
|
-
a === "time" && e.length <= 8 && (e = `${l} ${e}`), e = f(e, d);
|
|
21
|
-
}
|
|
22
|
-
e = h(n, e, t.props || g.props);
|
|
23
|
-
}
|
|
24
|
-
return t.formatter && typeof t.formatter == "function" && (e = t.formatter(r, r[t.prop], e, t)), e;
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
P as d
|
|
28
|
-
};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { isBlank as w } from "@web-utils/core";
|
|
2
|
-
import { t as D, v as x } from "./util.80e28481.js";
|
|
3
|
-
const F = (p, t = []) => new Promise((o, i) => {
|
|
4
|
-
let e = [], a = [], c = {};
|
|
5
|
-
p.forEach((d) => {
|
|
6
|
-
d.parentProp && e.push(d);
|
|
7
|
-
}), t.forEach((d, s) => {
|
|
8
|
-
e.forEach((r) => {
|
|
9
|
-
r.hide !== !0 && r.dicFlag !== !1 && a.push(
|
|
10
|
-
new Promise((h) => {
|
|
11
|
-
w(d[r.parentProp]) ? h({
|
|
12
|
-
prop: r.prop,
|
|
13
|
-
data: [],
|
|
14
|
-
index: s
|
|
15
|
-
}) : r.dicUrl && g({
|
|
16
|
-
url: `${r.dicUrl.replace("{{key}}", d[r.parentProp])}`,
|
|
17
|
-
props: r.props,
|
|
18
|
-
method: r.dicMethod,
|
|
19
|
-
headers: r.dicHeaders,
|
|
20
|
-
formatter: r.dicFormatter,
|
|
21
|
-
query: r.dicQuery,
|
|
22
|
-
form: d
|
|
23
|
-
}).then((m) => {
|
|
24
|
-
h({
|
|
25
|
-
prop: r.prop,
|
|
26
|
-
data: m,
|
|
27
|
-
index: s
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
})
|
|
31
|
-
);
|
|
32
|
-
});
|
|
33
|
-
}), Promise.all(a).then((d) => {
|
|
34
|
-
d.forEach((s) => {
|
|
35
|
-
w(c[s.index]) && (c[s.index] = {}), c[s.index][s.prop] = s.data;
|
|
36
|
-
}), o(c);
|
|
37
|
-
});
|
|
38
|
-
}), U = (p) => {
|
|
39
|
-
let t = [];
|
|
40
|
-
return new Promise((o, i) => {
|
|
41
|
-
t = E(p).ajaxdic, k(t).then((a) => {
|
|
42
|
-
o(a);
|
|
43
|
-
}).catch((a) => {
|
|
44
|
-
i(a);
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
}, K = (p) => {
|
|
48
|
-
let t = {}, o = p.dicData || {};
|
|
49
|
-
return p.column.forEach((i) => {
|
|
50
|
-
i.dicData && (t[i.prop] = D(i.dicData, i.props, i.dataType));
|
|
51
|
-
}), Object.assign(o, t);
|
|
52
|
-
};
|
|
53
|
-
function E(p) {
|
|
54
|
-
let t = p.column || [], o = [], i = {}, e = [];
|
|
55
|
-
return t.forEach((a) => {
|
|
56
|
-
let c = a.dicData, d = a.dicUrl, s = a.prop, r = a.parentProp;
|
|
57
|
-
e = e.concat(a.cascader || []), Array.isArray(c) && (i[s] = c), !(a.dicFlag === !1 || a.lazy === !0 || e.includes(s)) && d && !r && o.push({
|
|
58
|
-
url: d,
|
|
59
|
-
name: s,
|
|
60
|
-
method: a.dicMethod,
|
|
61
|
-
headers: t.dicHeaders,
|
|
62
|
-
formatter: a.dicFormatter,
|
|
63
|
-
props: a.props,
|
|
64
|
-
dataType: a.dataType,
|
|
65
|
-
resKey: (a.props || {}).res,
|
|
66
|
-
query: a.dicQuery || {}
|
|
67
|
-
});
|
|
68
|
-
}), {
|
|
69
|
-
ajaxdic: o,
|
|
70
|
-
locationdic: i
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function k(p) {
|
|
74
|
-
let t = {}, o = [];
|
|
75
|
-
return new Promise((i) => {
|
|
76
|
-
p.forEach((e) => {
|
|
77
|
-
o.push(
|
|
78
|
-
new Promise((a) => {
|
|
79
|
-
g(Object.assign(e, {
|
|
80
|
-
url: `${e.url.replace("{{key}}", "")}`
|
|
81
|
-
})).then((c) => {
|
|
82
|
-
c = D(c, e.props, e.dataType), a(c);
|
|
83
|
-
}).catch(() => {
|
|
84
|
-
a([]);
|
|
85
|
-
});
|
|
86
|
-
})
|
|
87
|
-
);
|
|
88
|
-
}), Promise.all(o).then((e) => {
|
|
89
|
-
p.forEach((a, c) => {
|
|
90
|
-
t[a.name] = e[c];
|
|
91
|
-
}), i(t);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
const g = (p) => {
|
|
96
|
-
let { url: t, query: o, method: i, resKey: e, props: a, formatter: c, headers: d = {}, value: s = "", column: r, form: h = {} } = p;
|
|
97
|
-
r && (t = r.dicUrl, i = r.dicMethod, d = r.headers || {}, o = r.dicQuery || {}, c = r.dicFormatter, a = r.props);
|
|
98
|
-
let m = "key";
|
|
99
|
-
t = t || "";
|
|
100
|
-
let u = [], y = {};
|
|
101
|
-
return u = t.match(/[^\{\}]+(?=\})/g) || [], u.forEach((n) => {
|
|
102
|
-
let f = `{{${n}}}`, l = h[n];
|
|
103
|
-
n === m ? t = t.replace(f, s) : t = t.replace(f, l);
|
|
104
|
-
}), i === "post" && (u = Object.keys(o), u.forEach((n) => {
|
|
105
|
-
let f = o[n];
|
|
106
|
-
typeof f == "string" && f.match(/\{{|}}/g) ? y[n] = h[f.replace(/\{{|}}/g, "")] : y[n] = f;
|
|
107
|
-
})), a && (e = (a || {}).res || e), new Promise((n) => {
|
|
108
|
-
const f = (l) => {
|
|
109
|
-
let P = [];
|
|
110
|
-
typeof c == "function" ? P = c(l.data) : P = x(l.data, e), n(P);
|
|
111
|
-
};
|
|
112
|
-
i === "post" ? window.axios.post(t, y, {
|
|
113
|
-
headers: d
|
|
114
|
-
}).then(function(l) {
|
|
115
|
-
f(l);
|
|
116
|
-
}).catch(() => [
|
|
117
|
-
n([])
|
|
118
|
-
]) : window.axios.get(t, {
|
|
119
|
-
params: o,
|
|
120
|
-
headers: d
|
|
121
|
-
}).then(function(l) {
|
|
122
|
-
f(l);
|
|
123
|
-
}).catch(() => [
|
|
124
|
-
n([])
|
|
125
|
-
]);
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
export {
|
|
129
|
-
U as a,
|
|
130
|
-
F as b,
|
|
131
|
-
K as l,
|
|
132
|
-
g as s
|
|
133
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const u = {
|
|
2
|
-
methods: {
|
|
3
|
-
getSlotName(l = {}, a = "D", e) {
|
|
4
|
-
let r = {
|
|
5
|
-
F: "Form",
|
|
6
|
-
H: "Header",
|
|
7
|
-
E: "Error",
|
|
8
|
-
L: "Label",
|
|
9
|
-
S: "Search",
|
|
10
|
-
T: "Type",
|
|
11
|
-
D: ""
|
|
12
|
-
}, t = l.prop + r[a];
|
|
13
|
-
return e ? e[t] : t;
|
|
14
|
-
},
|
|
15
|
-
getSlotList(l = [], a, e) {
|
|
16
|
-
return e = e.map((r) => r.prop), Object.keys(a).filter((r) => {
|
|
17
|
-
let t = !1;
|
|
18
|
-
return e.includes(r) || l.forEach((s) => {
|
|
19
|
-
r.includes(s) && (t = !0);
|
|
20
|
-
}), t;
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
u as s
|
|
27
|
-
};
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { isBlank, getObjType } from "@web-utils/core";
|
|
2
|
-
const KEY_COMPONENT_NAME = "fy-", DIC_PROPS = {
|
|
3
|
-
rowKey: "id",
|
|
4
|
-
rowParentKey: "parentId",
|
|
5
|
-
nodeKey: "id",
|
|
6
|
-
label: "label",
|
|
7
|
-
value: "value",
|
|
8
|
-
desc: "desc",
|
|
9
|
-
groups: "groups",
|
|
10
|
-
title: "title",
|
|
11
|
-
leaf: "leaf",
|
|
12
|
-
children: "children",
|
|
13
|
-
hasChildren: "hasChildren",
|
|
14
|
-
labelText: "名称",
|
|
15
|
-
disabled: "disabled"
|
|
16
|
-
}, DIC_HTTP_PROPS = {
|
|
17
|
-
name: "name",
|
|
18
|
-
url: "url",
|
|
19
|
-
fileName: "file",
|
|
20
|
-
res: ""
|
|
21
|
-
}, DATE_LIST = [
|
|
22
|
-
"dates",
|
|
23
|
-
"date",
|
|
24
|
-
"datetime",
|
|
25
|
-
"datetimerange",
|
|
26
|
-
"daterange",
|
|
27
|
-
"time",
|
|
28
|
-
"timerange",
|
|
29
|
-
"week",
|
|
30
|
-
"month",
|
|
31
|
-
"monthrange",
|
|
32
|
-
"year"
|
|
33
|
-
], INPUT_LIST = ["tree", "number", "icon", "color", "table", "map"], ARRAY_LIST = ["img", "array", "url"], MULTIPLE_LIST = ["cascader", "tree", "select"], RANGE_LIST = ["slider"], ARRAY_VALUE_LIST = ARRAY_LIST.concat(["upload", "dynamic", "map", "checkbox", "cascader", "dynamic", "timerange", "monthrange", "daterange", "datetimerange", "dates"]), SELECT_LIST = DATE_LIST.concat(["select", "checkbox", "radio", "cascader", "tree", "color", "icon", "table", "map"]), DIC_SHOW_SPLIT = " | ", DIC_SPLIT = ",", typeList = {
|
|
34
|
-
img: /\.(gif|jpg|jpeg|png|webp|svg|GIF|JPG|JPEG|PNG|WEBP|SVG)/,
|
|
35
|
-
video: /\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|ogg|mp4)/,
|
|
36
|
-
audio: /\.(mp3|wav|MP3|WAV)/
|
|
37
|
-
}, isMediaType = (e, r) => {
|
|
38
|
-
if (!isBlank(e))
|
|
39
|
-
return typeList.audio.test(e) || r === "audio" ? "audio" : typeList.video.test(e) || r === "video" ? "video" : typeList.img.test(e) || r === "img" ? "img" : !1;
|
|
40
|
-
};
|
|
41
|
-
function getFixed(e = 0, r = 2) {
|
|
42
|
-
return Number(e.toFixed(r));
|
|
43
|
-
}
|
|
44
|
-
function getAsVal(e, r = "") {
|
|
45
|
-
let n = deepClone(e);
|
|
46
|
-
return isBlank(r) || r.split(".").forEach((t) => {
|
|
47
|
-
n = isBlank(n[t]) ? "" : n[t];
|
|
48
|
-
}), n;
|
|
49
|
-
}
|
|
50
|
-
function setAsVal(obj, bind = "", value) {
|
|
51
|
-
let result, type = getObjType(value);
|
|
52
|
-
return isBlank(value) ? type === "array" ? result = `obj.${bind}=[]` : type === "object" ? result = `obj.${bind}={}` : ["number", "boolean"].includes(type) ? result = `obj.${bind}=undefined` : result = `obj.${bind}=''` : type === "string" ? result = `obj.${bind}='${value}'` : result = `obj.${bind}=${value}`, eval(result), obj;
|
|
53
|
-
}
|
|
54
|
-
function downFile(e, r) {
|
|
55
|
-
typeof e == "object" && e instanceof Blob && (e = URL.createObjectURL(e));
|
|
56
|
-
var n = document.createElement("a");
|
|
57
|
-
n.href = e, n.download = r || "";
|
|
58
|
-
var t;
|
|
59
|
-
window.MouseEvent ? t = new MouseEvent("click") : (t = document.createEvent("MouseEvents"), t.initMouseEvent(
|
|
60
|
-
"click",
|
|
61
|
-
!0,
|
|
62
|
-
!1,
|
|
63
|
-
window,
|
|
64
|
-
0,
|
|
65
|
-
0,
|
|
66
|
-
0,
|
|
67
|
-
0,
|
|
68
|
-
0,
|
|
69
|
-
!1,
|
|
70
|
-
!1,
|
|
71
|
-
!1,
|
|
72
|
-
!1,
|
|
73
|
-
0,
|
|
74
|
-
null
|
|
75
|
-
)), n.dispatchEvent(t);
|
|
76
|
-
}
|
|
77
|
-
function strCorNum(e) {
|
|
78
|
-
return e.forEach((r, n) => {
|
|
79
|
-
e[n] = Number(r);
|
|
80
|
-
}), e;
|
|
81
|
-
}
|
|
82
|
-
function extend() {
|
|
83
|
-
var e = arguments[0] || {}, r = !1, n = Array.prototype.slice.call(arguments), t = 1, a, i, l, s, o = !1;
|
|
84
|
-
for (typeof e == "boolean" && (r = e, t++, e = arguments[1]); t < n.length; t++)
|
|
85
|
-
if ((a = n[t]) != null)
|
|
86
|
-
for (l in a)
|
|
87
|
-
s = a[l], i = e[l], r && (toString.call(s) === "[object Object]" || (o = toString.call(s) === "[object Array]")) ? (o ? i = toString.call(i) === "[object Array]" ? i : [] : i = toString.call(i) === "[object Object]" ? i : {}, e[l] = extend(r, i, s)) : s !== void 0 && s !== i && (e[l] = s);
|
|
88
|
-
return e;
|
|
89
|
-
}
|
|
90
|
-
function createObj(e, r) {
|
|
91
|
-
let n = r.split("."), t = n.splice(0, 1)[0], a = {};
|
|
92
|
-
if (a[t] = {}, n.length >= 2) {
|
|
93
|
-
let i = "{", l = "}", s = "";
|
|
94
|
-
n.forEach((o) => {
|
|
95
|
-
s = `${s}${i}"${o}":`;
|
|
96
|
-
}), s = `${s}""`;
|
|
97
|
-
for (let o = 0; o < n.length; o++)
|
|
98
|
-
s = `${s}${l}`;
|
|
99
|
-
s = JSON.parse(s), a[t] = s;
|
|
100
|
-
}
|
|
101
|
-
return e = extend(!0, e, a), e;
|
|
102
|
-
}
|
|
103
|
-
function dataURLtoFile(e, r) {
|
|
104
|
-
let n = e.split(","), t = n[0].match(/:(.*?);/)[1], a = atob(n[1]), i = a.length, l = new Uint8Array(i);
|
|
105
|
-
for (; i--; )
|
|
106
|
-
l[i] = a.charCodeAt(i);
|
|
107
|
-
return new File([l], r, {
|
|
108
|
-
type: t
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
function findObject(e, r, n = "prop") {
|
|
112
|
-
let t = -1, a = (() => {
|
|
113
|
-
let i;
|
|
114
|
-
return e.forEach((l) => {
|
|
115
|
-
l.column ? i = "group" : l.children && (i = "tree");
|
|
116
|
-
}), i;
|
|
117
|
-
})();
|
|
118
|
-
return a === "group" ? e.forEach((i) => {
|
|
119
|
-
const l = findArray(i.column, r, n, !0);
|
|
120
|
-
l !== -1 && (t = l);
|
|
121
|
-
}) : a === "tree" ? t = findLabelNode(e, r, { value: n }, !0) : t = findArray(e, r, n, !0), t;
|
|
122
|
-
}
|
|
123
|
-
function randomId() {
|
|
124
|
-
let e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", r = e.length, n = "";
|
|
125
|
-
for (let t = 0; t < 16; t++)
|
|
126
|
-
n += e.charAt(Math.floor(Math.random() * r));
|
|
127
|
-
return n;
|
|
128
|
-
}
|
|
129
|
-
const deepClone = (e) => {
|
|
130
|
-
var r = getObjType(e), n;
|
|
131
|
-
if (r === "array")
|
|
132
|
-
n = [];
|
|
133
|
-
else if (r === "object")
|
|
134
|
-
n = {};
|
|
135
|
-
else
|
|
136
|
-
return e;
|
|
137
|
-
if (r === "array")
|
|
138
|
-
for (var t = 0, a = e.length; t < a; t++)
|
|
139
|
-
e[t] = (() => (e[t] === 0, e[t]))(), e[t] && delete e[t].$parent, n.push(deepClone(e[t]));
|
|
140
|
-
else if (r === "object")
|
|
141
|
-
for (var i in e)
|
|
142
|
-
e && delete e.$parent, n[i] = deepClone(e[i]);
|
|
143
|
-
return n;
|
|
144
|
-
}, setPx = (e, r = "") => (e || (e = r), e ? (e = e + "", e.indexOf("%") === -1 && e.indexOf("px") === -1 && (e = e + "px"), e) : ""), detailDataType = (e, r) => isBlank(e) ? e : r === "number" ? Number(e) : r === "string" ? e + "" : e, detailDic = (e = [], r = {}, n) => {
|
|
145
|
-
let t = r.value || DIC_PROPS.value, a = r.children || DIC_PROPS.children;
|
|
146
|
-
return e.forEach((i) => {
|
|
147
|
-
i[t] = detailDataType(i[t], n), i[a] && detailDic(i[a], r, n);
|
|
148
|
-
}), e;
|
|
149
|
-
}, findByValue = (e, r, n) => {
|
|
150
|
-
if (isBlank(e))
|
|
151
|
-
return r;
|
|
152
|
-
let t, a = r instanceof Array, i = a ? r : [r];
|
|
153
|
-
n = n || DIC_PROPS, t = [];
|
|
154
|
-
for (let l = 0; l < i.length; l++)
|
|
155
|
-
t.push(findLabelNode(e, i[l], n) || i[l]);
|
|
156
|
-
return a ? t.join(DIC_SHOW_SPLIT) : t.join();
|
|
157
|
-
}, filterParams = (e, r = ["", "$"], n = !0) => {
|
|
158
|
-
let t = n ? deepClone(e) : e;
|
|
159
|
-
for (let a in t)
|
|
160
|
-
r.includes("") && isBlank(t[a]) && delete t[a], r.includes("$") && a.indexOf("$") !== -1 && delete t[a];
|
|
161
|
-
return t;
|
|
162
|
-
}, detailDicGroup = (e = [], r = {}) => {
|
|
163
|
-
let n = deepClone(e), t = r[DIC_PROPS.groups] || DIC_PROPS.groups;
|
|
164
|
-
return e.forEach((a) => {
|
|
165
|
-
a[t] && (n = n.concat(a[t]));
|
|
166
|
-
}), n;
|
|
167
|
-
}, findLabelNode = (e, r, n, t) => {
|
|
168
|
-
let a;
|
|
169
|
-
t || (e = detailDicGroup(e, n));
|
|
170
|
-
let i = (l) => {
|
|
171
|
-
const s = n.label || DIC_PROPS.label, o = n.value || DIC_PROPS.value, f = n.children || DIC_PROPS.children;
|
|
172
|
-
for (let u = 0; u < l.length; u++) {
|
|
173
|
-
const c = l[u], d = c[f] || [];
|
|
174
|
-
c[o] === r ? a = t ? c : c[s] : i(d);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
return i(e), a;
|
|
178
|
-
}, getDeepData = (e) => (Array.isArray(e) ? e : e.data) || [], getObjValue = (e, r = "", n) => {
|
|
179
|
-
const t = r.split(".");
|
|
180
|
-
let a = e;
|
|
181
|
-
return t[0] === "" && n !== "object" ? getDeepData(e) : (t[0] !== "" && t.forEach((i) => {
|
|
182
|
-
a = a[i];
|
|
183
|
-
}), a);
|
|
184
|
-
}, findArray = (e, r, n, t) => {
|
|
185
|
-
n = n || DIC_PROPS.value;
|
|
186
|
-
for (let a = 0; a < e.length; a++)
|
|
187
|
-
if (e[a][n] === r)
|
|
188
|
-
return t ? e[a] : a;
|
|
189
|
-
return -1;
|
|
190
|
-
}, getPasswordChar = (e = "", r) => {
|
|
191
|
-
let n = e.toString().length;
|
|
192
|
-
e = "";
|
|
193
|
-
for (let t = 0; t < n; t++)
|
|
194
|
-
e = e + r;
|
|
195
|
-
return e;
|
|
196
|
-
}, arraySort = (e = [], r, n) => e.filter((t) => !isBlank(t[r])).sort((t, a) => n(t, a)).concat(e.filter((t) => isBlank(t[r]))), clearVal = (e, r, n = []) => e ? (r.forEach((t) => {
|
|
197
|
-
if (!n.includes(t)) {
|
|
198
|
-
if (t.includes("$"))
|
|
199
|
-
delete e[t];
|
|
200
|
-
else if (!isBlank(e[t])) {
|
|
201
|
-
let a = getObjType(e[t]);
|
|
202
|
-
a === "array" ? e[t] = [] : a === "object" ? e[t] = {} : ["number", "boolean"].includes(a) ? e[t] = void 0 : e[t] = "";
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}), e) : {}, optVal = (e, r) => typeof e == "boolean" ? e : isBlank(e) ? r : e;
|
|
206
|
-
function uploadFun(e = {}, r) {
|
|
207
|
-
r = r || this;
|
|
208
|
-
let n = ["uploadPreview", "uploadBefore", "uploadAfter", "uploadDelete", "uploadError", "uploadExceed"], t = {};
|
|
209
|
-
return e.type === "upload" ? n.forEach((a) => {
|
|
210
|
-
e[a] || (t[a] = r[a]);
|
|
211
|
-
}) : n.forEach((a) => {
|
|
212
|
-
t[a] = r[a];
|
|
213
|
-
}), t;
|
|
214
|
-
}
|
|
215
|
-
export {
|
|
216
|
-
ARRAY_VALUE_LIST as A,
|
|
217
|
-
dataURLtoFile as B,
|
|
218
|
-
DIC_SPLIT as D,
|
|
219
|
-
INPUT_LIST as I,
|
|
220
|
-
KEY_COMPONENT_NAME as K,
|
|
221
|
-
MULTIPLE_LIST as M,
|
|
222
|
-
RANGE_LIST as R,
|
|
223
|
-
SELECT_LIST as S,
|
|
224
|
-
detailDataType as a,
|
|
225
|
-
ARRAY_LIST as b,
|
|
226
|
-
createObj as c,
|
|
227
|
-
deepClone as d,
|
|
228
|
-
DATE_LIST as e,
|
|
229
|
-
findObject as f,
|
|
230
|
-
getFixed as g,
|
|
231
|
-
setAsVal as h,
|
|
232
|
-
getAsVal as i,
|
|
233
|
-
filterParams as j,
|
|
234
|
-
DIC_PROPS as k,
|
|
235
|
-
clearVal as l,
|
|
236
|
-
strCorNum as m,
|
|
237
|
-
DIC_SHOW_SPLIT as n,
|
|
238
|
-
optVal as o,
|
|
239
|
-
getPasswordChar as p,
|
|
240
|
-
findByValue as q,
|
|
241
|
-
randomId as r,
|
|
242
|
-
setPx as s,
|
|
243
|
-
detailDic as t,
|
|
244
|
-
uploadFun as u,
|
|
245
|
-
getObjValue as v,
|
|
246
|
-
downFile as w,
|
|
247
|
-
isMediaType as x,
|
|
248
|
-
DIC_HTTP_PROPS as y,
|
|
249
|
-
arraySort as z
|
|
250
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.pswp{z-index:2147483647}.pswp .pswp__error-msg{display:flex;flex-direction:column;align-items:center;justify-content:center;transform:translateY(-50%)}.pswp .error-img{width:200px;margin-bottom:10px}
|