@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,114 @@
|
|
|
1
|
+
const s = {};
|
|
2
|
+
function l(t = "default") {
|
|
3
|
+
let i = "";
|
|
4
|
+
switch (t) {
|
|
5
|
+
case "default":
|
|
6
|
+
i = "#35495E";
|
|
7
|
+
break;
|
|
8
|
+
case "primary":
|
|
9
|
+
i = "#3488ff";
|
|
10
|
+
break;
|
|
11
|
+
case "success":
|
|
12
|
+
i = "#43B883";
|
|
13
|
+
break;
|
|
14
|
+
case "warning":
|
|
15
|
+
i = "#e6a23c";
|
|
16
|
+
break;
|
|
17
|
+
case "danger":
|
|
18
|
+
i = "#f56c6c";
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
return i;
|
|
22
|
+
}
|
|
23
|
+
s.capsule = function(t, i, a = "primary") {
|
|
24
|
+
console.log(
|
|
25
|
+
`%c ${t} %c ${i} %c`,
|
|
26
|
+
"background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;",
|
|
27
|
+
`background:${l(
|
|
28
|
+
a
|
|
29
|
+
)}; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;`,
|
|
30
|
+
"background:transparent"
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
s.colorful = function(t) {
|
|
34
|
+
console.log(
|
|
35
|
+
`%c${t.map((i) => i.text || "").join("%c")}`,
|
|
36
|
+
...t.map((i) => `color: ${l(i.type)};`)
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
s.default = function(t) {
|
|
40
|
+
s.colorful([{ text: t }]);
|
|
41
|
+
};
|
|
42
|
+
s.primary = function(t) {
|
|
43
|
+
s.colorful([{ text: t, type: "primary" }]);
|
|
44
|
+
};
|
|
45
|
+
s.success = function(t) {
|
|
46
|
+
s.colorful([{ text: t, type: "success" }]);
|
|
47
|
+
};
|
|
48
|
+
s.warning = function(t) {
|
|
49
|
+
s.colorful([{ text: t, type: "warning" }]);
|
|
50
|
+
};
|
|
51
|
+
s.danger = function(t) {
|
|
52
|
+
s.colorful([{ text: t, type: "danger" }]);
|
|
53
|
+
};
|
|
54
|
+
const c = {
|
|
55
|
+
AliOSS: {
|
|
56
|
+
url: "https://cdn.staticfile.org/ali-oss/6.17.1/aliyun-oss-sdk.min.js",
|
|
57
|
+
title: "阿里云云图片上传,需引入OSS的sdk",
|
|
58
|
+
github: "https://github.com/ali-sdk/ali-oss/"
|
|
59
|
+
},
|
|
60
|
+
Map: {
|
|
61
|
+
url: "https://webapi.amap.com/maps?v=1.4.11&key=xxxxx&plugin=AMap.PlaceSearch,https://webapi.amap.com/ui/1.0/main.js?v=1.0.11",
|
|
62
|
+
title: "地图组件,需引入高德SDK"
|
|
63
|
+
},
|
|
64
|
+
MapUi: {
|
|
65
|
+
url: "https://webapi.amap.com/ui/1.0/main.js?v=1.0.11",
|
|
66
|
+
title: "地图组件,需引入高德UISDK"
|
|
67
|
+
},
|
|
68
|
+
Sortable: {
|
|
69
|
+
url: "https://cdn.staticfile.org/Sortable/1.10.0-rc2/Sortable.min.js",
|
|
70
|
+
title: "拖拽,需引入sortableJs",
|
|
71
|
+
github: "https://github.com/SortableJS/Sortable"
|
|
72
|
+
},
|
|
73
|
+
Screenshot: {
|
|
74
|
+
url: "https://cdn.staticfile.org/html2canvas/0.5.0-beta4/html2canvas.min.js",
|
|
75
|
+
title: "需引入html2canvas依赖包",
|
|
76
|
+
github: "https://github.com/niklasvh/html2canvas/"
|
|
77
|
+
},
|
|
78
|
+
CryptoJS: {
|
|
79
|
+
url: "https://avuejs.com/cdn/CryptoJS.js",
|
|
80
|
+
title: "七牛云图片上传,需引入CryptoJS"
|
|
81
|
+
},
|
|
82
|
+
hljs: {
|
|
83
|
+
url: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js",
|
|
84
|
+
title: "需引入hljs框架包",
|
|
85
|
+
github: "https://github.com/highlightjs/highlight.js"
|
|
86
|
+
},
|
|
87
|
+
"file-saver": {
|
|
88
|
+
url: "https://cdn.staticfile.org/FileSaver.js/2014-11-29/FileSaver.min.js",
|
|
89
|
+
title: "需引入文件操作包",
|
|
90
|
+
github: "https://github.com/eligrey/FileSaver.js"
|
|
91
|
+
},
|
|
92
|
+
xlsx: {
|
|
93
|
+
url: "https://cdn.staticfile.org/xlsx/0.18.2/xlsx.full.min.js",
|
|
94
|
+
title: "需引入excel操作包",
|
|
95
|
+
github: "https://github.com/protobi/js-xlsx"
|
|
96
|
+
},
|
|
97
|
+
mock: {
|
|
98
|
+
url: "https://cdn.staticfile.org/Mock.js/1.0.1-beta3/mock-min.js",
|
|
99
|
+
title: "需要引入mock模拟数据包",
|
|
100
|
+
github: "https://github.com/Colingo/mock"
|
|
101
|
+
}
|
|
102
|
+
}, o = (() => ({
|
|
103
|
+
logs: function(t) {
|
|
104
|
+
const i = c[t];
|
|
105
|
+
s.capsule(
|
|
106
|
+
t,
|
|
107
|
+
i.title,
|
|
108
|
+
"warning"
|
|
109
|
+
), s.warning("CDN:" + (i.url || "-")), s.warning("GITHUB:" + (i.github || "-"));
|
|
110
|
+
}
|
|
111
|
+
}))();
|
|
112
|
+
export {
|
|
113
|
+
o as p
|
|
114
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
const KEY_COMPONENT_NAME = "fy-", DIC_PROPS = {
|
|
2
|
+
rowKey: "id",
|
|
3
|
+
rowParentKey: "parentId",
|
|
4
|
+
nodeKey: "id",
|
|
5
|
+
label: "label",
|
|
6
|
+
value: "value",
|
|
7
|
+
desc: "desc",
|
|
8
|
+
groups: "groups",
|
|
9
|
+
title: "title",
|
|
10
|
+
leaf: "leaf",
|
|
11
|
+
children: "children",
|
|
12
|
+
hasChildren: "hasChildren",
|
|
13
|
+
labelText: "名称",
|
|
14
|
+
disabled: "disabled"
|
|
15
|
+
}, DIC_HTTP_PROPS = {
|
|
16
|
+
name: "name",
|
|
17
|
+
url: "url",
|
|
18
|
+
fileName: "file",
|
|
19
|
+
res: ""
|
|
20
|
+
}, DATE_LIST = [
|
|
21
|
+
"dates",
|
|
22
|
+
"date",
|
|
23
|
+
"datetime",
|
|
24
|
+
"datetimerange",
|
|
25
|
+
"daterange",
|
|
26
|
+
"time",
|
|
27
|
+
"timerange",
|
|
28
|
+
"week",
|
|
29
|
+
"month",
|
|
30
|
+
"monthrange",
|
|
31
|
+
"year"
|
|
32
|
+
], 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 = {
|
|
33
|
+
img: /\.(gif|jpg|jpeg|png|webp|svg|GIF|JPG|JPEG|PNG|WEBP|SVG)/,
|
|
34
|
+
video: /\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|ogg|mp4)/,
|
|
35
|
+
audio: /\.(mp3|wav|MP3|WAV)/
|
|
36
|
+
}, isBlank = (e) => e instanceof Date || typeof e == "boolean" || typeof e == "number" ? !1 : e instanceof Array ? e.length === 0 : e instanceof Object ? Object.keys(e).length === 0 : e === "null" || e == null || e === "undefined" || e === void 0 || e === "", isMediaType = (e, r) => {
|
|
37
|
+
if (!isBlank(e))
|
|
38
|
+
return typeList.audio.test(e) || r === "audio" ? "audio" : typeList.video.test(e) || r === "video" ? "video" : typeList.img.test(e) || r === "img" ? "img" : !1;
|
|
39
|
+
};
|
|
40
|
+
function getFixed(e = 0, r = 2) {
|
|
41
|
+
return Number(e.toFixed(r));
|
|
42
|
+
}
|
|
43
|
+
function getAsVal(e, r = "") {
|
|
44
|
+
let n = deepClone(e);
|
|
45
|
+
return isBlank(r) || r.split(".").forEach((t) => {
|
|
46
|
+
n = isBlank(n[t]) ? "" : n[t];
|
|
47
|
+
}), n;
|
|
48
|
+
}
|
|
49
|
+
function setAsVal(obj, bind = "", value) {
|
|
50
|
+
let result, type = getObjType(value);
|
|
51
|
+
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;
|
|
52
|
+
}
|
|
53
|
+
function downFile(e, r) {
|
|
54
|
+
typeof e == "object" && e instanceof Blob && (e = URL.createObjectURL(e));
|
|
55
|
+
var n = document.createElement("a");
|
|
56
|
+
n.href = e, n.download = r || "";
|
|
57
|
+
var t;
|
|
58
|
+
window.MouseEvent ? t = new MouseEvent("click") : (t = document.createEvent("MouseEvents"), t.initMouseEvent(
|
|
59
|
+
"click",
|
|
60
|
+
!0,
|
|
61
|
+
!1,
|
|
62
|
+
window,
|
|
63
|
+
0,
|
|
64
|
+
0,
|
|
65
|
+
0,
|
|
66
|
+
0,
|
|
67
|
+
0,
|
|
68
|
+
!1,
|
|
69
|
+
!1,
|
|
70
|
+
!1,
|
|
71
|
+
!1,
|
|
72
|
+
0,
|
|
73
|
+
null
|
|
74
|
+
)), n.dispatchEvent(t);
|
|
75
|
+
}
|
|
76
|
+
function strCorNum(e) {
|
|
77
|
+
return e.forEach((r, n) => {
|
|
78
|
+
e[n] = Number(r);
|
|
79
|
+
}), e;
|
|
80
|
+
}
|
|
81
|
+
function extend() {
|
|
82
|
+
var e = arguments[0] || {}, r = !1, n = Array.prototype.slice.call(arguments), t = 1, a, i, l, o, s = !1;
|
|
83
|
+
for (typeof e == "boolean" && (r = e, t++, e = arguments[1]); t < n.length; t++)
|
|
84
|
+
if ((a = n[t]) != null)
|
|
85
|
+
for (l in a)
|
|
86
|
+
o = a[l], i = e[l], r && (toString.call(o) === "[object Object]" || (s = toString.call(o) === "[object Array]")) ? (s ? i = toString.call(i) === "[object Array]" ? i : [] : i = toString.call(i) === "[object Object]" ? i : {}, e[l] = extend(r, i, o)) : o !== void 0 && o !== i && (e[l] = o);
|
|
87
|
+
return e;
|
|
88
|
+
}
|
|
89
|
+
function createObj(e, r) {
|
|
90
|
+
let n = r.split("."), t = n.splice(0, 1)[0], a = {};
|
|
91
|
+
if (a[t] = {}, n.length >= 2) {
|
|
92
|
+
let i = "{", l = "}", o = "";
|
|
93
|
+
n.forEach((s) => {
|
|
94
|
+
o = `${o}${i}"${s}":`;
|
|
95
|
+
}), o = `${o}""`;
|
|
96
|
+
for (let s = 0; s < n.length; s++)
|
|
97
|
+
o = `${o}${l}`;
|
|
98
|
+
o = JSON.parse(o), a[t] = o;
|
|
99
|
+
}
|
|
100
|
+
return e = extend(!0, e, a), e;
|
|
101
|
+
}
|
|
102
|
+
function dataURLtoFile(e, r) {
|
|
103
|
+
let n = e.split(","), t = n[0].match(/:(.*?);/)[1], a = atob(n[1]), i = a.length, l = new Uint8Array(i);
|
|
104
|
+
for (; i--; )
|
|
105
|
+
l[i] = a.charCodeAt(i);
|
|
106
|
+
return new File([l], r, {
|
|
107
|
+
type: t
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function findObject(e, r, n = "prop") {
|
|
111
|
+
let t = -1, a = (() => {
|
|
112
|
+
let i;
|
|
113
|
+
return e.forEach((l) => {
|
|
114
|
+
l.column ? i = "group" : l.children && (i = "tree");
|
|
115
|
+
}), i;
|
|
116
|
+
})();
|
|
117
|
+
return a === "group" ? e.forEach((i) => {
|
|
118
|
+
const l = findArray(i.column, r, n, !0);
|
|
119
|
+
l !== -1 && (t = l);
|
|
120
|
+
}) : a === "tree" ? t = findLabelNode(e, r, { value: n }, !0) : t = findArray(e, r, n, !0), t;
|
|
121
|
+
}
|
|
122
|
+
function randomId() {
|
|
123
|
+
let e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", r = e.length, n = "";
|
|
124
|
+
for (let t = 0; t < 16; t++)
|
|
125
|
+
n += e.charAt(Math.floor(Math.random() * r));
|
|
126
|
+
return n;
|
|
127
|
+
}
|
|
128
|
+
const getObjType = (e) => {
|
|
129
|
+
var r = Object.prototype.toString, n = {
|
|
130
|
+
"[object Boolean]": "boolean",
|
|
131
|
+
"[object Number]": "number",
|
|
132
|
+
"[object String]": "string",
|
|
133
|
+
"[object Function]": "function",
|
|
134
|
+
"[object Array]": "array",
|
|
135
|
+
"[object Date]": "date",
|
|
136
|
+
"[object RegExp]": "regExp",
|
|
137
|
+
"[object Undefined]": "undefined",
|
|
138
|
+
"[object Null]": "null",
|
|
139
|
+
"[object Object]": "object"
|
|
140
|
+
};
|
|
141
|
+
return e instanceof Element ? "element" : n[r.call(e)];
|
|
142
|
+
}, deepClone = (e) => {
|
|
143
|
+
var r = getObjType(e), n;
|
|
144
|
+
if (r === "array")
|
|
145
|
+
n = [];
|
|
146
|
+
else if (r === "object")
|
|
147
|
+
n = {};
|
|
148
|
+
else
|
|
149
|
+
return e;
|
|
150
|
+
if (r === "array")
|
|
151
|
+
for (var t = 0, a = e.length; t < a; t++)
|
|
152
|
+
e[t] = (() => (e[t] === 0, e[t]))(), e[t] && delete e[t].$parent, n.push(deepClone(e[t]));
|
|
153
|
+
else if (r === "object")
|
|
154
|
+
for (var i in e)
|
|
155
|
+
e && delete e.$parent, n[i] = deepClone(e[i]);
|
|
156
|
+
return n;
|
|
157
|
+
}, 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) => {
|
|
158
|
+
let t = r.value || DIC_PROPS.value, a = r.children || DIC_PROPS.children;
|
|
159
|
+
return e.forEach((i) => {
|
|
160
|
+
i[t] = detailDataType(i[t], n), i[a] && detailDic(i[a], r, n);
|
|
161
|
+
}), e;
|
|
162
|
+
}, findByValue = (e, r, n) => {
|
|
163
|
+
if (isBlank(e))
|
|
164
|
+
return r;
|
|
165
|
+
let t, a = r instanceof Array, i = a ? r : [r];
|
|
166
|
+
n = n || DIC_PROPS, t = [];
|
|
167
|
+
for (let l = 0; l < i.length; l++)
|
|
168
|
+
t.push(findLabelNode(e, i[l], n) || i[l]);
|
|
169
|
+
return a ? t.join(DIC_SHOW_SPLIT) : t.join();
|
|
170
|
+
}, filterParams = (e, r = ["", "$"], n = !0) => {
|
|
171
|
+
let t = n ? deepClone(e) : e;
|
|
172
|
+
for (let a in t)
|
|
173
|
+
r.includes("") && isBlank(t[a]) && delete t[a], r.includes("$") && a.indexOf("$") !== -1 && delete t[a];
|
|
174
|
+
return t;
|
|
175
|
+
}, detailDicGroup = (e = [], r = {}) => {
|
|
176
|
+
let n = deepClone(e), t = r[DIC_PROPS.groups] || DIC_PROPS.groups;
|
|
177
|
+
return e.forEach((a) => {
|
|
178
|
+
a[t] && (n = n.concat(a[t]));
|
|
179
|
+
}), n;
|
|
180
|
+
}, findLabelNode = (e, r, n, t) => {
|
|
181
|
+
let a;
|
|
182
|
+
t || (e = detailDicGroup(e, n));
|
|
183
|
+
let i = (l) => {
|
|
184
|
+
const o = n.label || DIC_PROPS.label, s = n.value || DIC_PROPS.value, f = n.children || DIC_PROPS.children;
|
|
185
|
+
for (let u = 0; u < l.length; u++) {
|
|
186
|
+
const c = l[u], d = c[f] || [];
|
|
187
|
+
c[s] === r ? a = t ? c : c[o] : i(d);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
return i(e), a;
|
|
191
|
+
}, getDeepData = (e) => (Array.isArray(e) ? e : e.data) || [], getObjValue = (e, r = "", n) => {
|
|
192
|
+
const t = r.split(".");
|
|
193
|
+
let a = e;
|
|
194
|
+
return t[0] === "" && n !== "object" ? getDeepData(e) : (t[0] !== "" && t.forEach((i) => {
|
|
195
|
+
a = a[i];
|
|
196
|
+
}), a);
|
|
197
|
+
}, findArray = (e, r, n, t) => {
|
|
198
|
+
n = n || DIC_PROPS.value;
|
|
199
|
+
for (let a = 0; a < e.length; a++)
|
|
200
|
+
if (e[a][n] === r)
|
|
201
|
+
return t ? e[a] : a;
|
|
202
|
+
return -1;
|
|
203
|
+
}, getPasswordChar = (e = "", r) => {
|
|
204
|
+
let n = e.toString().length;
|
|
205
|
+
e = "";
|
|
206
|
+
for (let t = 0; t < n; t++)
|
|
207
|
+
e = e + r;
|
|
208
|
+
return e;
|
|
209
|
+
}, 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) => {
|
|
210
|
+
if (!n.includes(t)) {
|
|
211
|
+
if (t.includes("$"))
|
|
212
|
+
delete e[t];
|
|
213
|
+
else if (!isBlank(e[t])) {
|
|
214
|
+
let a = getObjType(e[t]);
|
|
215
|
+
a === "array" ? e[t] = [] : a === "object" ? e[t] = {} : ["number", "boolean"].includes(a) ? e[t] = void 0 : e[t] = "";
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}), e) : {}, optVal = (e, r) => typeof e == "boolean" ? e : isBlank(e) ? r : e;
|
|
219
|
+
function uploadFun(e = {}, r) {
|
|
220
|
+
r = r || this;
|
|
221
|
+
let n = ["uploadPreview", "uploadBefore", "uploadAfter", "uploadDelete", "uploadError", "uploadExceed"], t = {};
|
|
222
|
+
return e.type === "upload" ? n.forEach((a) => {
|
|
223
|
+
e[a] || (t[a] = r[a]);
|
|
224
|
+
}) : n.forEach((a) => {
|
|
225
|
+
t[a] = r[a];
|
|
226
|
+
}), t;
|
|
227
|
+
}
|
|
228
|
+
export {
|
|
229
|
+
ARRAY_VALUE_LIST as A,
|
|
230
|
+
arraySort as B,
|
|
231
|
+
dataURLtoFile as C,
|
|
232
|
+
DIC_HTTP_PROPS as D,
|
|
233
|
+
INPUT_LIST as I,
|
|
234
|
+
KEY_COMPONENT_NAME as K,
|
|
235
|
+
MULTIPLE_LIST as M,
|
|
236
|
+
RANGE_LIST as R,
|
|
237
|
+
SELECT_LIST as S,
|
|
238
|
+
DIC_PROPS as a,
|
|
239
|
+
DIC_SPLIT as b,
|
|
240
|
+
isBlank as c,
|
|
241
|
+
detailDataType as d,
|
|
242
|
+
ARRAY_LIST as e,
|
|
243
|
+
findObject as f,
|
|
244
|
+
createObj as g,
|
|
245
|
+
DATE_LIST as h,
|
|
246
|
+
isMediaType as i,
|
|
247
|
+
getFixed as j,
|
|
248
|
+
deepClone as k,
|
|
249
|
+
setAsVal as l,
|
|
250
|
+
getAsVal as m,
|
|
251
|
+
filterParams as n,
|
|
252
|
+
optVal as o,
|
|
253
|
+
clearVal as p,
|
|
254
|
+
strCorNum as q,
|
|
255
|
+
randomId as r,
|
|
256
|
+
setPx as s,
|
|
257
|
+
DIC_SHOW_SPLIT as t,
|
|
258
|
+
uploadFun as u,
|
|
259
|
+
getPasswordChar as v,
|
|
260
|
+
findByValue as w,
|
|
261
|
+
detailDic as x,
|
|
262
|
+
getObjValue as y,
|
|
263
|
+
downFile as z
|
|
264
|
+
};
|
|
File without changes
|
|
@@ -3,7 +3,9 @@ function v(r, a, d, h, i, t, f, u) {
|
|
|
3
3
|
a && (e.render = a, e.staticRenderFns = d, e._compiled = !0), h && (e.functional = !0), t && (e._scopeId = "data-v-" + t);
|
|
4
4
|
var o;
|
|
5
5
|
if (f ? (o = function(n) {
|
|
6
|
-
n = n ||
|
|
6
|
+
n = n || // cached call
|
|
7
|
+
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
8
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !n && typeof __VUE_SSR_CONTEXT__ < "u" && (n = __VUE_SSR_CONTEXT__), i && i.call(this, n), n && n._registeredComponents && n._registeredComponents.add(f);
|
|
7
9
|
}, e._ssrRegister = o) : i && (o = u ? function() {
|
|
8
10
|
i.call(
|
|
9
11
|
this,
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { n as r } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
|
|
2
|
+
var h = function() {
|
|
3
|
+
var t = this, e = t.$createElement, s = t._self._c || e;
|
|
4
|
+
return s("div", [s("div", {
|
|
5
|
+
ref: "point",
|
|
6
|
+
class: {
|
|
7
|
+
affix: t.affix
|
|
8
|
+
},
|
|
9
|
+
style: t.styles
|
|
10
|
+
}, [t._t("default")], 2), s("div", {
|
|
11
|
+
directives: [{
|
|
12
|
+
name: "show",
|
|
13
|
+
rawName: "v-show",
|
|
14
|
+
value: t.slot,
|
|
15
|
+
expression: "slot"
|
|
16
|
+
}],
|
|
17
|
+
style: t.slotStyle
|
|
18
|
+
})]);
|
|
19
|
+
}, c = [];
|
|
20
|
+
const a = {
|
|
21
|
+
name: "Affix",
|
|
22
|
+
props: {
|
|
23
|
+
target: String,
|
|
24
|
+
offsetTop: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0
|
|
27
|
+
},
|
|
28
|
+
offsetBottom: {
|
|
29
|
+
type: Number
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
container: null,
|
|
35
|
+
affix: !1,
|
|
36
|
+
styles: {},
|
|
37
|
+
slot: !1,
|
|
38
|
+
slotStyle: {}
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
offsetType() {
|
|
43
|
+
let t = "top";
|
|
44
|
+
return this.offsetBottom >= 0 && (t = "bottom"), t;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
mounted() {
|
|
48
|
+
this.target ? this.container = document.querySelector(this.target) : this.container = document, this.container.addEventListener("scroll", this.handleScroll, !1), this.container.addEventListener("resize", this.handleScroll, !1);
|
|
49
|
+
},
|
|
50
|
+
beforeDestroy() {
|
|
51
|
+
this.container.removeEventListener("scroll", this.handleScroll, !1), this.container.removeEventListener("resize", this.handleScroll, !1);
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
getScroll(t, e) {
|
|
55
|
+
const s = e ? "pageYOffset" : "pageXOffset", i = e ? "scrollTop" : "scrollLeft";
|
|
56
|
+
let o = t[s];
|
|
57
|
+
return typeof o != "number" && (o = document.documentElement[i]), o;
|
|
58
|
+
},
|
|
59
|
+
getOffset(t) {
|
|
60
|
+
const e = t.getBoundingClientRect(), s = this.getScroll(this.container, !0), i = this.getScroll(this.container), o = document.body, n = o.clientTop || 0, f = o.clientLeft || 0;
|
|
61
|
+
return {
|
|
62
|
+
top: e.top + s - n,
|
|
63
|
+
left: e.left + i - f
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
handleScroll() {
|
|
67
|
+
const t = this.affix, e = this.getScroll(this.container, !0), s = this.getOffset(this.$el), i = this.container.innerHeight, o = this.$el.getElementsByTagName("div")[0].offsetHeight;
|
|
68
|
+
s.top - this.offsetTop < e && this.offsetType === "top" && !t ? (this.affix = !0, this.slotStyle = {
|
|
69
|
+
width: this.$refs.point.clientWidth + "px",
|
|
70
|
+
height: this.$refs.point.clientHeight + "px"
|
|
71
|
+
}, this.slot = !0, this.styles = {
|
|
72
|
+
top: `${this.offsetTop}px`,
|
|
73
|
+
left: `${s.left}px`,
|
|
74
|
+
width: `${this.$el.offsetWidth}px`
|
|
75
|
+
}, this.$emit("on-change", !0)) : s.top - this.offsetTop > e && this.offsetType === "top" && t && (this.slot = !1, this.slotStyle = {}, this.affix = !1, this.styles = null, this.$emit("on-change", !1)), s.top + this.offsetBottom + o > e + i && this.offsetType === "bottom" && !t ? (this.affix = !0, this.styles = {
|
|
76
|
+
bottom: `${this.offsetBottom}px`,
|
|
77
|
+
left: `${s.left}px`,
|
|
78
|
+
width: `${this.$el.offsetWidth}px`
|
|
79
|
+
}, this.$emit("on-change", !0)) : s.top + this.offsetBottom + o < e + i && this.offsetType === "bottom" && t && (this.affix = !1, this.styles = null, this.$emit("on-change", !1));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, l = {};
|
|
83
|
+
var p = /* @__PURE__ */ r(
|
|
84
|
+
a,
|
|
85
|
+
h,
|
|
86
|
+
c,
|
|
87
|
+
!1,
|
|
88
|
+
u,
|
|
89
|
+
null,
|
|
90
|
+
null,
|
|
91
|
+
null
|
|
92
|
+
);
|
|
93
|
+
function u(t) {
|
|
94
|
+
for (let e in l)
|
|
95
|
+
this[e] = l[e];
|
|
96
|
+
}
|
|
97
|
+
const m = /* @__PURE__ */ function() {
|
|
98
|
+
return p.exports;
|
|
99
|
+
}();
|
|
100
|
+
export {
|
|
101
|
+
m as default
|
|
102
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.affix{position:fixed;z-index:10}
|