@web-utils/component 2.0.14 → 2.7.0
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/config.46422d7f.js +73 -0
- package/dist/chunks/{3a79781b.js → confirmable-mixin.3a79781b.js} +0 -0
- package/dist/chunks/dataformat.fb35ee10.js +61 -0
- package/dist/chunks/detail.a3249549.js +28 -0
- package/dist/chunks/dic.5f7e3523.js +132 -0
- package/dist/chunks/event.50c365eb.js +235 -0
- package/dist/chunks/{76680a03.js → form-input-mixin.ff5b58f7.js} +2 -2
- package/dist/chunks/{b4acd3a6.js → form-item-mixin.79f6eaff.js} +3 -1
- package/dist/chunks/{61ad06b2.js → form-pick-mixin.61ad06b2.js} +0 -0
- package/dist/chunks/init.352281f5.js +121 -0
- package/dist/chunks/{41a066be.js → input-number-mixin.41a066be.js} +0 -0
- package/dist/chunks/{5a78e0db.js → mixins.5a78e0db.js} +0 -0
- package/dist/chunks/packages.5d7a86c4.js +114 -0
- package/dist/chunks/permission.ce5d2121.js +16 -0
- package/dist/chunks/slot.1b8d2b1b.js +27 -0
- package/dist/chunks/{8c0142e0.js → tab-mixin.8c0142e0.js} +0 -0
- package/dist/chunks/util.5053d54e.js +264 -0
- package/dist/chunks/{97652d86.js → utils.97652d86.js} +0 -0
- package/dist/chunks/{f71045fc.js → utils.fa73de78.js} +1 -0
- package/dist/chunks/{5d4282fb.js → vueComponentNormalizer.71e2aa87.js} +3 -1
- package/dist/components/address-input/index.js +1 -1
- package/dist/components/affix/index.js +102 -0
- package/dist/components/affix/style.css +1 -0
- package/dist/components/array/index.js +156 -0
- package/dist/components/array/style.css +1 -0
- package/dist/components/article/index.js +93 -0
- package/dist/components/article/style.css +1 -0
- package/dist/components/aside-menu/index.js +1 -1
- package/dist/components/avatar/index.js +106 -0
- package/dist/components/avatar/style.css +1 -0
- package/dist/components/awesome-button/index.js +1 -1
- package/dist/components/base.css +1 -1
- package/dist/components/capsule-tab/index.js +1 -1
- package/dist/components/card/index.js +130 -0
- package/dist/components/card/style.css +1 -0
- package/dist/components/carousel/index.js +70 -0
- package/dist/components/carousel/style.css +1 -0
- package/dist/components/chat/index.js +567 -0
- package/dist/components/chat/style.css +1 -0
- package/dist/components/chunk-file-uploader/index.js +2 -2
- package/dist/components/chunk-file-uploader-button/index.js +2 -2
- package/dist/components/chunk-file-uploader-drop/index.js +2 -2
- package/dist/components/chunk-file-uploader-file/index.js +2 -2
- package/dist/components/chunk-file-uploader-files/index.js +2 -2
- package/dist/components/chunk-file-uploader-list/index.js +2 -2
- package/dist/components/chunk-file-uploader-un-support/index.js +2 -2
- package/dist/components/code/index.js +66 -0
- package/dist/components/code-mirror-editor/index.js +4 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/column/index.js +114 -0
- package/dist/components/column-default/index.js +105 -0
- package/dist/components/column-dynamic/index.js +93 -0
- package/dist/components/column-menu/index.js +286 -0
- package/dist/components/column-slot/index.js +265 -0
- package/dist/components/comment/index.js +94 -0
- package/dist/components/comment/style.css +1 -0
- package/dist/components/confirm-button/index.js +2 -2
- package/dist/components/confirmable/index.js +2 -2
- package/dist/components/context-menu/index.js +11 -1
- package/dist/components/count-up/index.js +120 -0
- package/dist/components/custom-scrollbar/index.js +2 -2
- package/dist/components/data-box/index.js +97 -0
- package/dist/components/data-box/style.css +1 -0
- package/dist/components/data-card/index.js +98 -0
- package/dist/components/data-card/style.css +1 -0
- package/dist/components/data-cardtext/index.js +82 -0
- package/dist/components/data-cardtext/style.css +1 -0
- package/dist/components/data-display/index.js +93 -0
- package/dist/components/data-display/style.css +1 -0
- package/dist/components/data-icons/index.js +104 -0
- package/dist/components/data-icons/style.css +1 -0
- package/dist/components/data-imgtext/index.js +106 -0
- package/dist/components/data-imgtext/style.css +1 -0
- package/dist/components/data-operatext/index.js +99 -0
- package/dist/components/data-operatext/style.css +1 -0
- package/dist/components/data-panel/index.js +93 -0
- package/dist/components/data-panel/style.css +1 -0
- package/dist/components/data-pay/index.js +149 -0
- package/dist/components/data-pay/style.css +1 -0
- package/dist/components/data-price/index.js +84 -0
- package/dist/components/data-price/style.css +1 -0
- package/dist/components/data-progress/index.js +97 -0
- package/dist/components/data-progress/style.css +1 -0
- package/dist/components/data-rotate/index.js +96 -0
- package/dist/components/data-rotate/style.css +1 -0
- package/dist/components/data-table-picker/index.js +2 -2
- package/dist/components/data-tabs/index.js +94 -0
- package/dist/components/data-tabs/style.css +1 -0
- package/dist/components/dialog-column/index.js +138 -0
- package/dist/components/dialog-excel/index.js +214 -0
- package/dist/components/dialog-filter/index.js +245 -0
- package/dist/components/dialog-form/index.js +275 -0
- package/dist/components/draggable/index.js +384 -0
- package/dist/components/draggable/style.css +1 -0
- package/dist/components/dynamic-table/index.js +1 -1
- package/dist/components/e-charts/index.js +7 -1
- package/dist/components/editable-progress/index.js +1 -1
- package/dist/components/editable-tree/index.js +2 -2
- package/dist/components/egd-collapse/index.js +1 -1
- package/dist/components/egd-collapse-item/index.js +1 -1
- package/dist/components/element-dialog/index.js +1 -1
- package/dist/components/empty/index.js +59 -0
- package/dist/components/empty/style.css +1 -0
- package/dist/components/empty-view/index.js +1 -1
- package/dist/components/error-view/index.js +1 -1
- package/dist/components/flex-column/index.js +2 -2
- package/dist/components/flex-item/index.js +2 -2
- package/dist/components/flex-row/index.js +2 -2
- package/dist/components/flex-scroller/index.js +1 -1
- package/dist/components/flow/index.js +278 -0
- package/dist/components/flow/style.css +1 -0
- package/dist/components/flow-node/index.js +102 -0
- package/dist/components/form-button/index.js +2 -2
- package/dist/components/form-cascader/index.js +4 -4
- package/dist/components/form-checkbox-group/index.js +4 -4
- package/dist/components/form-date-picker/index.js +4 -4
- package/dist/components/form-group/index.js +122 -0
- package/dist/components/form-group/style.css +1 -0
- package/dist/components/form-holder/index.js +23 -2
- package/dist/components/form-input/index.js +3 -3
- package/dist/components/form-input-email/index.js +3 -3
- package/dist/components/form-input-id-card/index.js +3 -3
- package/dist/components/form-input-number/index.js +4 -4
- package/dist/components/form-input-phone-number/index.js +3 -3
- package/dist/components/form-input-time/index.js +3 -3
- package/dist/components/form-item/index.js +2 -2
- package/dist/components/form-item-config-provider/index.js +1 -1
- package/dist/components/form-item-group/index.js +1 -1
- package/dist/components/form-radio-group/index.js +4 -4
- package/dist/components/form-select/index.js +4 -4
- package/dist/components/form-switch/index.js +3 -3
- package/dist/components/form-temp/index.js +149 -0
- package/dist/components/form-textarea/index.js +3 -3
- package/dist/components/form-view/index.js +1 -1
- package/dist/components/fy-cascader/index.js +132 -0
- package/dist/components/fy-checkbox/index.js +116 -0
- package/dist/components/fy-checkbox/style.css +1 -0
- package/dist/components/fy-curd/index.js +846 -0
- package/dist/components/fy-curd/style.css +1 -0
- package/dist/components/fy-date/index.js +84 -0
- package/dist/components/fy-date/style.css +1 -0
- package/dist/components/fy-dialog-form/index.js +278 -0
- package/dist/components/fy-dialog-form/style.css +1 -0
- package/dist/components/fy-dynamic/index.js +335 -0
- package/dist/components/fy-dynamic/style.css +1 -0
- package/dist/components/fy-form/index.js +754 -0
- package/dist/components/fy-form/style.css +1 -0
- package/dist/components/fy-form-menu/index.js +95 -0
- package/dist/components/fy-input/index.js +162 -0
- package/dist/components/fy-input-color/index.js +96 -0
- package/dist/components/fy-input-icon/index.js +161 -0
- package/dist/components/fy-input-icon/style.css +1 -0
- package/dist/components/fy-input-map/index.js +275 -0
- package/dist/components/fy-input-map/style.css +1 -0
- package/dist/components/fy-input-number/index.js +87 -0
- package/dist/components/fy-input-table/index.js +172 -0
- package/dist/components/fy-input-table/style.css +1 -0
- package/dist/components/fy-input-tree/index.js +265 -0
- package/dist/components/fy-input-tree/style.css +1 -0
- package/dist/components/fy-radio/index.js +68 -0
- package/dist/components/fy-radio/style.css +1 -0
- package/dist/components/fy-rate/index.js +105 -0
- package/dist/components/fy-rate/style.css +1 -0
- package/dist/components/fy-select/index.js +223 -0
- package/dist/components/fy-select/style.css +1 -0
- package/dist/components/fy-slider/index.js +79 -0
- package/dist/components/fy-switch/index.js +73 -0
- package/dist/components/fy-time/index.js +95 -0
- package/dist/components/fy-title/index.js +40 -0
- package/dist/components/fy-title/style.css +1 -0
- package/dist/components/fy-upload/index.js +704 -0
- package/dist/components/fy-upload/style.css +1 -0
- package/dist/components/guide-steps/index.js +1 -1
- package/dist/components/header-menu/index.js +238 -0
- package/dist/components/header-search/index.js +246 -0
- package/dist/components/icon-card/index.js +1 -1
- package/dist/components/icon-temp/index.js +50 -0
- package/dist/components/icon-temp/style.css +1 -0
- package/dist/components/iframe-window/index.js +1 -1
- package/dist/components/image-viewer/index.js +1 -1
- package/dist/components/input-number/index.js +2 -2
- package/dist/components/input-number-range/index.js +1 -1
- package/dist/components/keep-view-alive/index.js +6 -2
- package/dist/components/keyboard/index.js +389 -0
- package/dist/components/keyboard/style.css +1 -0
- package/dist/components/license/index.js +134 -0
- package/dist/components/loading-view/index.js +1 -1
- package/dist/components/login/index.js +244 -0
- package/dist/components/login/style.css +1 -0
- package/dist/components/name-avatar/index.js +66 -0
- package/dist/components/name-avatar/style.css +1 -0
- package/dist/components/nav-bar/index.js +1 -1
- package/dist/components/not-implement/index.js +1 -1
- package/dist/components/notice/index.js +143 -0
- package/dist/components/notice/style.css +1 -0
- package/dist/components/page/index.js +1 -1
- package/dist/components/page-header/index.js +1 -1
- package/dist/components/page-index/index.js +1 -1
- package/dist/components/page-index-top/index.js +1 -1
- package/dist/components/page-skeleton/index.js +1 -1
- package/dist/components/page-skeleton-new/index.js +1 -1
- package/dist/components/pageable-table/index.js +6 -2
- package/dist/components/pageable-view/index.js +7 -2
- package/dist/components/photo-swipe/index.js +7 -1
- package/dist/components/progress/index.js +60 -0
- package/dist/components/queue/index.js +76 -0
- package/dist/components/record-video/index.js +173 -0
- package/dist/components/record-video/style.css +1 -0
- package/dist/components/resize-observer/index.js +2 -2
- package/dist/components/search/index.js +142 -0
- package/dist/components/search/style.css +1 -0
- package/dist/components/search-popover/index.js +1 -1
- package/dist/components/sign/index.js +128 -0
- package/dist/components/sign/style.css +1 -0
- package/dist/components/sign-panel/index.js +14 -1
- package/dist/components/skeleton/index.js +82 -0
- package/dist/components/skeleton/style.css +1 -0
- package/dist/components/split-pane/index.js +7 -1
- package/dist/components/stateful/index.js +1 -1
- package/dist/components/static-pageable-table/index.js +1 -1
- package/dist/components/swiper/index.js +1 -1
- package/dist/components/tab/index.js +4 -2
- package/dist/components/tab-item/index.js +2 -2
- package/dist/components/table-column/index.js +1 -1
- package/dist/components/table-page/index.js +129 -0
- package/dist/components/table-view/index.js +2 -2
- package/dist/components/tabs/index.js +90 -0
- package/dist/components/tabs/style.css +0 -0
- package/dist/components/tag-render/index.js +1 -1
- package/dist/components/text-ellipsis/index.js +107 -0
- package/dist/components/text-ellipsis/style.css +1 -0
- package/dist/components/tinymce-editor/index.js +1 -1
- package/dist/components/tinymce-wrapper/index.js +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/components/toolbar-button/index.js +1 -1
- package/dist/components/tree/index.js +427 -0
- package/dist/components/tree/style.css +1 -0
- package/dist/components/trigger/index.js +1 -1
- package/dist/components/verify/index.js +80 -0
- package/dist/components/verify/style.css +1 -0
- package/dist/components/vue-tags-input/index.js +115 -1
- package/dist/components/watermark/index.js +20 -2
- package/dist/index.css +4128 -745
- package/dist/index.es.js +21634 -7064
- package/package.json +20 -4
- package/web-types.json +12777 -2788
- package/dist/components/x-dialog/index.js +0 -173
- package/dist/components/x-dialog/style.css +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
menuWidth: 220,
|
|
3
|
+
menuFixed: "right",
|
|
4
|
+
menuXsWidth: 100,
|
|
5
|
+
menuAlign: "center",
|
|
6
|
+
menuHeaderAlign: "center",
|
|
7
|
+
headerAlign: "left",
|
|
8
|
+
// 图标
|
|
9
|
+
cancelBtnIcon: "el-icon-circle-close",
|
|
10
|
+
viewBtnIcon: "el-icon-view",
|
|
11
|
+
editBtnIcon: "el-icon-edit",
|
|
12
|
+
copyBtnIcon: "el-icon-document-add",
|
|
13
|
+
addBtnIcon: "el-icon-plus",
|
|
14
|
+
printBtnIcon: "el-icon-printer",
|
|
15
|
+
excelBtnIcon: "el-icon-download",
|
|
16
|
+
delBtnIcon: "el-icon-delete",
|
|
17
|
+
searchBtnIcon: "el-icon-search",
|
|
18
|
+
emptyBtnIcon: "el-icon-delete",
|
|
19
|
+
saveBtnIcon: "el-icon-circle-plus-outline",
|
|
20
|
+
updateBtnIcon: "el-icon-circle-check",
|
|
21
|
+
columnBtnIcon: "el-icon-s-operation",
|
|
22
|
+
filterBtnIcon: "el-icon-tickets",
|
|
23
|
+
refreshBtnIcon: "el-icon-refresh",
|
|
24
|
+
// 显隐
|
|
25
|
+
viewBtn: !1,
|
|
26
|
+
editBtn: !0,
|
|
27
|
+
copyBtn: !1,
|
|
28
|
+
cancelBtn: !0,
|
|
29
|
+
addBtn: !0,
|
|
30
|
+
addRowBtn: !1,
|
|
31
|
+
printBtn: !1,
|
|
32
|
+
excelBtn: !1,
|
|
33
|
+
delBtn: !0,
|
|
34
|
+
cellBtn: !1,
|
|
35
|
+
dateBtn: !1,
|
|
36
|
+
updateBtn: !0,
|
|
37
|
+
saveBtn: !0,
|
|
38
|
+
refreshBtn: !0,
|
|
39
|
+
columnBtn: !0,
|
|
40
|
+
filterBtn: !1,
|
|
41
|
+
queryBtn: !0,
|
|
42
|
+
menuBtn: !1,
|
|
43
|
+
searchBtn: !0,
|
|
44
|
+
clearBtn: !0,
|
|
45
|
+
selectClearBtn: !0,
|
|
46
|
+
searchShow: !0,
|
|
47
|
+
tip: !0,
|
|
48
|
+
dialogWidth: "60%",
|
|
49
|
+
dialogDrag: !1,
|
|
50
|
+
formFullscreen: !1,
|
|
51
|
+
pageBackground: !0,
|
|
52
|
+
page: !0,
|
|
53
|
+
menu: !0,
|
|
54
|
+
indexLabel: "#",
|
|
55
|
+
indexWidth: 50,
|
|
56
|
+
indexFixed: "left",
|
|
57
|
+
selectionWidth: 50,
|
|
58
|
+
selectionFixed: "left",
|
|
59
|
+
expandWidth: 60,
|
|
60
|
+
expandFixed: "left",
|
|
61
|
+
filterMultiple: !0,
|
|
62
|
+
calcHeight: 300,
|
|
63
|
+
width: "100%",
|
|
64
|
+
searchGutter: 20,
|
|
65
|
+
searchLabelWidth: 80,
|
|
66
|
+
searchSpan: 6,
|
|
67
|
+
dropRowClass: ".el-table__body-wrapper > table > tbody",
|
|
68
|
+
dropColClass: ".el-table__header-wrapper tr",
|
|
69
|
+
ghostClass: "avue-crud__ghost"
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
e as c
|
|
73
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { c, f as g, M as u, A as p, R as o, d as f, e as d, K as A, g as L, S, b as _, h as T, I as m } from "./util.5053d54e.js";
|
|
2
|
+
const R = (a = []) => (a.forEach((s) => {
|
|
3
|
+
let e = s.cascader;
|
|
4
|
+
if (!c(e)) {
|
|
5
|
+
let r = s.prop;
|
|
6
|
+
e.forEach((n) => {
|
|
7
|
+
let l = g(a, n);
|
|
8
|
+
l !== -1 && (l.parentProp = r);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}), a);
|
|
12
|
+
let i = 0;
|
|
13
|
+
const C = (a, s = 12, e = !1) => {
|
|
14
|
+
e && (i = 0);
|
|
15
|
+
const r = 24;
|
|
16
|
+
return i = i + (a.span || s) + (a.offset || 0), i === r ? i = 0 : i > r ? i = (a.span || s) + (a.offset || 0) : a.row && i !== r && (a.count = r - i, i = 0), a;
|
|
17
|
+
}, N = (a, s) => {
|
|
18
|
+
let { type: e, multiple: r, dataType: n, separator: l = _, alone: h, emitPath: y, range: E } = s, t = a;
|
|
19
|
+
return u.includes(e) && r === !0 || p.includes(e) && y !== !1 || o.includes(e) && E === !0 ? (Array.isArray(t) || (c(t) ? t = [] : t = (t + "").split(l) || []), t.forEach((I, b) => {
|
|
20
|
+
t[b] = f(I, n);
|
|
21
|
+
}), d.includes(e) && c(t) && h && (t = [""])) : t = f(t, n), t;
|
|
22
|
+
}, x = (a) => {
|
|
23
|
+
const s = a.type, e = a.searchRange;
|
|
24
|
+
let r = s;
|
|
25
|
+
if (a.searchType)
|
|
26
|
+
return a.searchType;
|
|
27
|
+
if (["radio", "checkbox", "switch"].includes(s))
|
|
28
|
+
r = "select";
|
|
29
|
+
else if (T.includes(s)) {
|
|
30
|
+
let n = "range";
|
|
31
|
+
e ? s.includes(n) ? r = s : r = s + n : r = s.replace(n, "");
|
|
32
|
+
} else
|
|
33
|
+
["textarea"].includes(s) && (r = "input");
|
|
34
|
+
return r;
|
|
35
|
+
}, M = (a, s) => {
|
|
36
|
+
let e = a || "input";
|
|
37
|
+
if (c(s))
|
|
38
|
+
d.includes(a) ? e = "array" : ["time", "timerange"].includes(a) ? e = "time" : T.includes(a) ? e = "date" : ["password", "textarea", "search"].includes(a) ? e = "input" : m.includes(a) && (e = "input-" + a);
|
|
39
|
+
else
|
|
40
|
+
return s;
|
|
41
|
+
return A + e;
|
|
42
|
+
}, O = (a = []) => {
|
|
43
|
+
let s = {};
|
|
44
|
+
return a.forEach((e) => {
|
|
45
|
+
p.includes(e.type) && e.emitPath !== !1 || u.includes(e.type) && e.multiple || e.dataType === "array" ? s[e.prop] = [] : o.includes(e.type) && e.range === !0 ? s[e.prop] = [0, 0] : ["rate", "slider", "number"].includes(e.type) || e.dataType === "number" ? s[e.prop] = void 0 : s[e.prop] = "", e.bind && (s = L(s, e.bind)), c(e.value) || (s[e.prop] = e.value);
|
|
46
|
+
}), {
|
|
47
|
+
tableForm: s
|
|
48
|
+
};
|
|
49
|
+
}, w = function(a) {
|
|
50
|
+
const s = a.placeholder, e = a.label;
|
|
51
|
+
return c(s) ? S.includes(a.type) ? `选择 ${e}` : `输入 ${e}` : s;
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
w as a,
|
|
55
|
+
R as b,
|
|
56
|
+
C as c,
|
|
57
|
+
x as d,
|
|
58
|
+
O as f,
|
|
59
|
+
M as g,
|
|
60
|
+
N as i
|
|
61
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { m as n, c as D, M as I, A as L, b as y, q as _, e as S, t as A, v as $, h as b, w as h } from "./util.5053d54e.js";
|
|
2
|
+
import { formatDate as f } from "@web-utils/core";
|
|
3
|
+
const P = (r = {}, t = {}, g = {}, o = []) => {
|
|
4
|
+
let e = r[t.prop], a = t.type, s = t.separator;
|
|
5
|
+
if (t.bind && (e = n(r, t.bind)), D(e))
|
|
6
|
+
e = "";
|
|
7
|
+
else {
|
|
8
|
+
let T = I.includes(t.type) && t.multiple, Y = L.includes(t.type);
|
|
9
|
+
if ((["string", "number"].includes(t.dataType) || T || Y) && !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(o, 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
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { c as w, x as D, y as x } from "./util.5053d54e.js";
|
|
2
|
+
const b = (p, t = []) => new Promise((o, i) => {
|
|
3
|
+
let e = [], a = [], c = {};
|
|
4
|
+
p.forEach((s) => {
|
|
5
|
+
s.parentProp && e.push(s);
|
|
6
|
+
}), t.forEach((s, d) => {
|
|
7
|
+
e.forEach((r) => {
|
|
8
|
+
r.hide !== !0 && r.dicFlag !== !1 && a.push(
|
|
9
|
+
new Promise((h) => {
|
|
10
|
+
w(s[r.parentProp]) ? h({
|
|
11
|
+
prop: r.prop,
|
|
12
|
+
data: [],
|
|
13
|
+
index: d
|
|
14
|
+
}) : r.dicUrl && g({
|
|
15
|
+
url: `${r.dicUrl.replace("{{key}}", s[r.parentProp])}`,
|
|
16
|
+
props: r.props,
|
|
17
|
+
method: r.dicMethod,
|
|
18
|
+
headers: r.dicHeaders,
|
|
19
|
+
formatter: r.dicFormatter,
|
|
20
|
+
query: r.dicQuery,
|
|
21
|
+
form: s
|
|
22
|
+
}).then((m) => {
|
|
23
|
+
h({
|
|
24
|
+
prop: r.prop,
|
|
25
|
+
data: m,
|
|
26
|
+
index: d
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
}), Promise.all(a).then((s) => {
|
|
33
|
+
s.forEach((d) => {
|
|
34
|
+
w(c[d.index]) && (c[d.index] = {}), c[d.index][d.prop] = d.data;
|
|
35
|
+
}), o(c);
|
|
36
|
+
});
|
|
37
|
+
}), F = (p) => {
|
|
38
|
+
let t = [];
|
|
39
|
+
return new Promise((o, i) => {
|
|
40
|
+
t = E(p).ajaxdic, k(t).then((a) => {
|
|
41
|
+
o(a);
|
|
42
|
+
}).catch((a) => {
|
|
43
|
+
i(a);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}, U = (p) => {
|
|
47
|
+
let t = {}, o = p.dicData || {};
|
|
48
|
+
return p.column.forEach((i) => {
|
|
49
|
+
i.dicData && (t[i.prop] = D(i.dicData, i.props, i.dataType));
|
|
50
|
+
}), Object.assign(o, t);
|
|
51
|
+
};
|
|
52
|
+
function E(p) {
|
|
53
|
+
let t = p.column || [], o = [], i = {}, e = [];
|
|
54
|
+
return t.forEach((a) => {
|
|
55
|
+
let c = a.dicData, s = a.dicUrl, d = a.prop, r = a.parentProp;
|
|
56
|
+
e = e.concat(a.cascader || []), Array.isArray(c) && (i[d] = c), !(a.dicFlag === !1 || a.lazy === !0 || e.includes(d)) && s && !r && o.push({
|
|
57
|
+
url: s,
|
|
58
|
+
name: d,
|
|
59
|
+
method: a.dicMethod,
|
|
60
|
+
headers: t.dicHeaders,
|
|
61
|
+
formatter: a.dicFormatter,
|
|
62
|
+
props: a.props,
|
|
63
|
+
dataType: a.dataType,
|
|
64
|
+
resKey: (a.props || {}).res,
|
|
65
|
+
query: a.dicQuery || {}
|
|
66
|
+
});
|
|
67
|
+
}), {
|
|
68
|
+
ajaxdic: o,
|
|
69
|
+
locationdic: i
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function k(p) {
|
|
73
|
+
let t = {}, o = [];
|
|
74
|
+
return new Promise((i) => {
|
|
75
|
+
p.forEach((e) => {
|
|
76
|
+
o.push(
|
|
77
|
+
new Promise((a) => {
|
|
78
|
+
g(Object.assign(e, {
|
|
79
|
+
url: `${e.url.replace("{{key}}", "")}`
|
|
80
|
+
})).then((c) => {
|
|
81
|
+
c = D(c, e.props, e.dataType), a(c);
|
|
82
|
+
}).catch(() => {
|
|
83
|
+
a([]);
|
|
84
|
+
});
|
|
85
|
+
})
|
|
86
|
+
);
|
|
87
|
+
}), Promise.all(o).then((e) => {
|
|
88
|
+
p.forEach((a, c) => {
|
|
89
|
+
t[a.name] = e[c];
|
|
90
|
+
}), i(t);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
const g = (p) => {
|
|
95
|
+
let { url: t, query: o, method: i, resKey: e, props: a, formatter: c, headers: s = {}, value: d = "", column: r, form: h = {} } = p;
|
|
96
|
+
r && (t = r.dicUrl, i = r.dicMethod, s = r.headers || {}, o = r.dicQuery || {}, c = r.dicFormatter, a = r.props);
|
|
97
|
+
let m = "key";
|
|
98
|
+
t = t || "";
|
|
99
|
+
let u = [], y = {};
|
|
100
|
+
return u = t.match(/[^\{\}]+(?=\})/g) || [], u.forEach((n) => {
|
|
101
|
+
let f = `{{${n}}}`, l = h[n];
|
|
102
|
+
n === m ? t = t.replace(f, d) : t = t.replace(f, l);
|
|
103
|
+
}), i === "post" && (u = Object.keys(o), u.forEach((n) => {
|
|
104
|
+
let f = o[n];
|
|
105
|
+
typeof f == "string" && f.match(/\{{|}}/g) ? y[n] = h[f.replace(/\{{|}}/g, "")] : y[n] = f;
|
|
106
|
+
})), a && (e = (a || {}).res || e), new Promise((n) => {
|
|
107
|
+
const f = (l) => {
|
|
108
|
+
let P = [];
|
|
109
|
+
typeof c == "function" ? P = c(l.data) : P = x(l.data, e), n(P);
|
|
110
|
+
};
|
|
111
|
+
i === "post" ? window.axios.post(t, y, {
|
|
112
|
+
headers: s
|
|
113
|
+
}).then(function(l) {
|
|
114
|
+
f(l);
|
|
115
|
+
}).catch(() => [
|
|
116
|
+
n([])
|
|
117
|
+
]) : window.axios.get(t, {
|
|
118
|
+
params: o,
|
|
119
|
+
headers: s
|
|
120
|
+
}).then(function(l) {
|
|
121
|
+
f(l);
|
|
122
|
+
}).catch(() => [
|
|
123
|
+
n([])
|
|
124
|
+
]);
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
export {
|
|
128
|
+
F as a,
|
|
129
|
+
b,
|
|
130
|
+
U as l,
|
|
131
|
+
g as s
|
|
132
|
+
};
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { D as r, a as i, b as a, c as s } from "./util.5053d54e.js";
|
|
2
|
+
import { s as l } from "./slot.1b8d2b1b.js";
|
|
3
|
+
import { i as p } from "./dataformat.fb35ee10.js";
|
|
4
|
+
const d = {
|
|
5
|
+
mixins: [l],
|
|
6
|
+
data() {
|
|
7
|
+
return {
|
|
8
|
+
stringMode: !1,
|
|
9
|
+
name: "",
|
|
10
|
+
text: void 0,
|
|
11
|
+
propsHttpDefault: r,
|
|
12
|
+
propsDefault: i
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
blur: Function,
|
|
17
|
+
focus: Function,
|
|
18
|
+
change: Function,
|
|
19
|
+
click: Function,
|
|
20
|
+
typeformat: Function,
|
|
21
|
+
control: Function,
|
|
22
|
+
separator: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: a
|
|
25
|
+
},
|
|
26
|
+
params: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => ({})
|
|
29
|
+
},
|
|
30
|
+
listType: {
|
|
31
|
+
type: String
|
|
32
|
+
},
|
|
33
|
+
tableData: {
|
|
34
|
+
type: Object
|
|
35
|
+
},
|
|
36
|
+
value: {},
|
|
37
|
+
column: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => ({})
|
|
40
|
+
},
|
|
41
|
+
label: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: ""
|
|
44
|
+
},
|
|
45
|
+
readonly: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !1
|
|
48
|
+
},
|
|
49
|
+
size: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: ""
|
|
52
|
+
},
|
|
53
|
+
tip: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: ""
|
|
56
|
+
},
|
|
57
|
+
disabled: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
dataType: {
|
|
62
|
+
type: String
|
|
63
|
+
},
|
|
64
|
+
clearable: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !0
|
|
67
|
+
},
|
|
68
|
+
type: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: ""
|
|
71
|
+
},
|
|
72
|
+
dicUrl: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: ""
|
|
75
|
+
},
|
|
76
|
+
dicMethod: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: ""
|
|
79
|
+
},
|
|
80
|
+
dicFormatter: Function,
|
|
81
|
+
dicQuery: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: () => ({})
|
|
84
|
+
},
|
|
85
|
+
dic: {
|
|
86
|
+
type: Array,
|
|
87
|
+
default: () => []
|
|
88
|
+
},
|
|
89
|
+
placeholder: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: ""
|
|
92
|
+
},
|
|
93
|
+
rules: {
|
|
94
|
+
type: Array
|
|
95
|
+
},
|
|
96
|
+
min: {
|
|
97
|
+
type: Number
|
|
98
|
+
},
|
|
99
|
+
max: {
|
|
100
|
+
type: Number
|
|
101
|
+
},
|
|
102
|
+
multiple: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: !1
|
|
105
|
+
},
|
|
106
|
+
button: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: !1
|
|
109
|
+
},
|
|
110
|
+
group: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: !1
|
|
113
|
+
},
|
|
114
|
+
row: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: !1
|
|
117
|
+
},
|
|
118
|
+
prop: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: ""
|
|
121
|
+
},
|
|
122
|
+
border: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: !1
|
|
125
|
+
},
|
|
126
|
+
popperClass: {
|
|
127
|
+
type: String
|
|
128
|
+
},
|
|
129
|
+
propsHttp: {
|
|
130
|
+
type: Object,
|
|
131
|
+
default: () => r
|
|
132
|
+
},
|
|
133
|
+
props: {
|
|
134
|
+
type: Object,
|
|
135
|
+
default: () => i
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
watch: {
|
|
139
|
+
text: {
|
|
140
|
+
handler(t) {
|
|
141
|
+
this.handleChange(t);
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
value: {
|
|
145
|
+
handler() {
|
|
146
|
+
this.initVal();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
computed: {
|
|
151
|
+
clearableVal() {
|
|
152
|
+
return this.disabled ? !1 : this.clearable;
|
|
153
|
+
},
|
|
154
|
+
componentName() {
|
|
155
|
+
return `el-${this.name}${this.button ? "-button" : ""}`;
|
|
156
|
+
},
|
|
157
|
+
required() {
|
|
158
|
+
return !s(this.rules);
|
|
159
|
+
},
|
|
160
|
+
isArray() {
|
|
161
|
+
return this.dataType === "array";
|
|
162
|
+
},
|
|
163
|
+
isString() {
|
|
164
|
+
return this.dataType === "string";
|
|
165
|
+
},
|
|
166
|
+
isNumber() {
|
|
167
|
+
return this.dataType === "number";
|
|
168
|
+
},
|
|
169
|
+
nameKey() {
|
|
170
|
+
return this.propsHttp.name || this.propsHttpDefault.name;
|
|
171
|
+
},
|
|
172
|
+
urlKey() {
|
|
173
|
+
return this.propsHttp.url || this.propsHttpDefault.url;
|
|
174
|
+
},
|
|
175
|
+
resKey() {
|
|
176
|
+
return this.propsHttp.res || this.propsHttpDefault.res;
|
|
177
|
+
},
|
|
178
|
+
groupsKey() {
|
|
179
|
+
return this.props.groups || this.propsDefault.groups;
|
|
180
|
+
},
|
|
181
|
+
valueKey() {
|
|
182
|
+
return this.props.value || this.propsDefault.value;
|
|
183
|
+
},
|
|
184
|
+
descKey() {
|
|
185
|
+
return this.props.desc || this.propsDefault.desc;
|
|
186
|
+
},
|
|
187
|
+
leafKey() {
|
|
188
|
+
return this.props.leaf || this.propsDefault.leaf;
|
|
189
|
+
},
|
|
190
|
+
labelKey() {
|
|
191
|
+
return this.props.label || this.propsDefault.label;
|
|
192
|
+
},
|
|
193
|
+
childrenKey() {
|
|
194
|
+
return this.props.children || this.propsDefault.children;
|
|
195
|
+
},
|
|
196
|
+
disabledKey() {
|
|
197
|
+
return this.props.disabled || this.propsDefault.disabled;
|
|
198
|
+
},
|
|
199
|
+
idKey() {
|
|
200
|
+
return this.props.id || this.propsDefault.id;
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
created() {
|
|
204
|
+
this.initVal();
|
|
205
|
+
}
|
|
206
|
+
}, f = {
|
|
207
|
+
methods: {
|
|
208
|
+
bindEvent(t, e) {
|
|
209
|
+
e = Object.assign(e, { column: this.column }, this.tableData), typeof this[t] == "function" && (t === "change" ? this.column.cell !== !0 && this[t](e) : this[t](e)), this.$emit(t, e);
|
|
210
|
+
},
|
|
211
|
+
initVal() {
|
|
212
|
+
this.stringMode = typeof this.value == "string", this.text = p(this.value, this);
|
|
213
|
+
},
|
|
214
|
+
getLabelText(t) {
|
|
215
|
+
return s(t) ? "" : typeof this.typeformat == "function" ? this.typeformat(t, this.labelKey, this.valueKey) : t[this.labelKey];
|
|
216
|
+
},
|
|
217
|
+
handleFocus(t) {
|
|
218
|
+
this.bindEvent("focus", { value: this.value, event: t });
|
|
219
|
+
},
|
|
220
|
+
handleBlur(t) {
|
|
221
|
+
this.bindEvent("blur", { value: this.value, event: t });
|
|
222
|
+
},
|
|
223
|
+
handleClick(t) {
|
|
224
|
+
this.bindEvent("click", { value: this.value, event: t });
|
|
225
|
+
},
|
|
226
|
+
handleChange(t) {
|
|
227
|
+
let e = t;
|
|
228
|
+
(this.isString || this.isNumber || this.stringMode || this.listType === "picture-img") && Array.isArray(t) && (e = t.join(this.separator)), this.bindEvent("change", { value: e }), this.$emit("input", e);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
export {
|
|
233
|
+
f as e,
|
|
234
|
+
d as p
|
|
235
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as r } from "./
|
|
1
|
+
import { i as r } from "./utils.fa73de78.js";
|
|
2
2
|
import { Col as i, FormItem as a } from "element-ui";
|
|
3
3
|
const u = ["span"], s = [...Object.keys(i.props)], n = s.filter((e) => !u.includes(e)), p = ["label", "prop", "rules", "labelWidth", "required"], l = [...Object.keys(a.props)], m = l.filter((e) => !p.includes(e)), f = [
|
|
4
4
|
"wrapCol",
|
|
@@ -40,6 +40,7 @@ const u = ["span"], s = [...Object.keys(i.props)], n = s.filter((e) => !u.includ
|
|
|
40
40
|
},
|
|
41
41
|
formItemClass: String,
|
|
42
42
|
prefixPick: Boolean,
|
|
43
|
+
// el-form-item
|
|
43
44
|
label: String,
|
|
44
45
|
labelWidth: String,
|
|
45
46
|
prop: String,
|
|
@@ -57,6 +58,7 @@ const u = ["span"], s = [...Object.keys(i.props)], n = s.filter((e) => !u.includ
|
|
|
57
58
|
default: !0
|
|
58
59
|
},
|
|
59
60
|
size: String,
|
|
61
|
+
// el-col
|
|
60
62
|
span: {
|
|
61
63
|
type: Number,
|
|
62
64
|
default: 12
|
|
File without changes
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { s as o, l as n, a as h, b as r } from "./dic.5f7e3523.js";
|
|
2
|
+
import { k as d, a as l, c as s } from "./util.5053d54e.js";
|
|
3
|
+
import { s as c } from "./slot.1b8d2b1b.js";
|
|
4
|
+
const O = {
|
|
5
|
+
mixins: [c],
|
|
6
|
+
props: {
|
|
7
|
+
defaults: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default() {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
option: {
|
|
14
|
+
type: Object,
|
|
15
|
+
required: !0,
|
|
16
|
+
default: () => ({})
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
watch: {
|
|
20
|
+
defaults: {
|
|
21
|
+
handler(t) {
|
|
22
|
+
this.objectOption = t;
|
|
23
|
+
},
|
|
24
|
+
deep: !0
|
|
25
|
+
},
|
|
26
|
+
objectOption: {
|
|
27
|
+
handler(t) {
|
|
28
|
+
this.$emit("update:defaults", t);
|
|
29
|
+
},
|
|
30
|
+
deep: !0
|
|
31
|
+
},
|
|
32
|
+
propOption: {
|
|
33
|
+
handler(t) {
|
|
34
|
+
let i = {};
|
|
35
|
+
t.forEach((e) => {
|
|
36
|
+
i[e.prop] = e;
|
|
37
|
+
}), this.$set(this, "objectOption", i);
|
|
38
|
+
},
|
|
39
|
+
deep: !0
|
|
40
|
+
},
|
|
41
|
+
option: {
|
|
42
|
+
handler() {
|
|
43
|
+
this.init(!1);
|
|
44
|
+
},
|
|
45
|
+
deep: !0
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
DIC: {},
|
|
51
|
+
cascaderDIC: {},
|
|
52
|
+
tableOption: {},
|
|
53
|
+
isMobile: "",
|
|
54
|
+
objectOption: {}
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
created() {
|
|
58
|
+
this.init();
|
|
59
|
+
},
|
|
60
|
+
computed: {
|
|
61
|
+
resultOption() {
|
|
62
|
+
return Object.assign(d(this.tableOption), {
|
|
63
|
+
column: this.propOption
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
rowKey() {
|
|
67
|
+
return this.tableOption.rowKey || l.rowKey;
|
|
68
|
+
},
|
|
69
|
+
formRules() {
|
|
70
|
+
let t = {};
|
|
71
|
+
return this.propOption.forEach((i) => {
|
|
72
|
+
i.rules && i.display !== !1 && (t[i.prop] = i.rules);
|
|
73
|
+
}), t;
|
|
74
|
+
},
|
|
75
|
+
isMediumSize() {
|
|
76
|
+
return this.controlSize;
|
|
77
|
+
},
|
|
78
|
+
controlSize() {
|
|
79
|
+
return this.tableOption.size || this.$AVUE.size;
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
methods: {
|
|
83
|
+
init(t) {
|
|
84
|
+
this.tableOption = this.option, this.getIsMobile(), this.handleLocalDic(), t !== !1 && this.handleLoadDic();
|
|
85
|
+
},
|
|
86
|
+
dicInit(t) {
|
|
87
|
+
t === "cascader" ? this.handleLoadCascaderDic() : this.handleLoadDic();
|
|
88
|
+
},
|
|
89
|
+
getIsMobile() {
|
|
90
|
+
this.isMobile = document.body.clientWidth <= 768;
|
|
91
|
+
},
|
|
92
|
+
updateDic(t, i) {
|
|
93
|
+
let e = this.findObject(this.propOption, t);
|
|
94
|
+
s(i) && s(t) ? this.handleLoadDic() : s(i) && !s(e.dicUrl) ? o({
|
|
95
|
+
column: e
|
|
96
|
+
}).then((a) => {
|
|
97
|
+
this.$set(this.DIC, t, a);
|
|
98
|
+
}) : this.$set(this.DIC, t, i);
|
|
99
|
+
},
|
|
100
|
+
handleSetDic(t, i = {}) {
|
|
101
|
+
Object.keys(i).forEach((e) => {
|
|
102
|
+
this.$set(t, e, i[e]);
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
//本地字典
|
|
106
|
+
handleLocalDic() {
|
|
107
|
+
this.handleSetDic(this.DIC, n(this.resultOption));
|
|
108
|
+
},
|
|
109
|
+
// 网络字典加载
|
|
110
|
+
handleLoadDic() {
|
|
111
|
+
h(this.resultOption).then((t) => this.handleSetDic(this.DIC, t));
|
|
112
|
+
},
|
|
113
|
+
//级联字典加载
|
|
114
|
+
handleLoadCascaderDic() {
|
|
115
|
+
r(this.propOption, this.data).then((t) => this.handleSetDic(this.cascaderDIC, t));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
export {
|
|
120
|
+
O as i
|
|
121
|
+
};
|
|
File without changes
|
|
File without changes
|