@web-utils/component 2.70.0 → 3.0.1
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/address-input/index.mjs +16 -14
- package/awesome-button/index.mjs +30 -29
- package/card/index.mjs +42 -40
- package/carousel/index.mjs +27 -25
- package/chat/index.mjs +70 -59
- package/chunk-file-uploader/index.mjs +594 -35
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/CountUp.f1a19f35.mjs +124 -0
- package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +8 -0
- package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +32 -0
- package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +356 -0
- package/chunks/ElementDialog.d8f3105c.mjs +211 -0
- package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +95 -0
- package/chunks/EmptyView.e2430422.mjs +51 -0
- package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +23 -0
- package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +37 -0
- package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +65 -0
- package/chunks/FormItem.2920ac0c.mjs +45 -0
- package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +258 -0
- package/chunks/FormItemGroup.41daddb6.mjs +64 -0
- package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +155 -0
- package/chunks/FyCurd.8acd2983.mjs +548 -0
- package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +2945 -0
- package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +47 -0
- package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +151 -0
- package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +22 -0
- package/chunks/FyForm.0294e494.mjs +439 -0
- package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +737 -0
- package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +93 -0
- package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +56 -0
- package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +158 -0
- package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +39 -0
- package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +102 -0
- package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +41 -0
- package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +15 -0
- package/chunks/IconTemp.42c48e1f.mjs +32 -0
- package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +23 -0
- package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +172 -0
- package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +23 -0
- package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +21 -0
- package/chunks/Page.81f4b8d9.mjs +32 -0
- package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +13 -0
- package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +26 -0
- package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +88 -0
- package/chunks/PageableTable.333cbdc1.mjs +335 -0
- package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +148 -0
- package/chunks/ResizeObserver.60f728f0.mjs +54 -0
- package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +13 -0
- package/chunks/TableColumn.8503272e.mjs +106 -0
- package/chunks/Toolbar.5c539dbb.mjs +24 -0
- package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +275 -0
- package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +31 -0
- package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +74 -0
- package/chunks/confirmable-mixin.26e1d0e0.mjs +197 -0
- package/chunks/{dataformat.f995e2f9.mjs → dataformat.816df805.mjs} +5 -5
- package/chunks/{dic.eaac0823.mjs → dic.3b4ba802.mjs} +40 -40
- package/chunks/{event.b5d855dd.mjs → event.4377230d.mjs} +2 -2
- package/chunks/{index.57f871af.mjs → index.d91bd77a.mjs} +7 -7
- package/chunks/{init.47f219b4.mjs → init.f0a03127.mjs} +2 -2
- package/chunks/{util.ae730cde.mjs → util.7844e2c2.mjs} +21 -21
- package/color-picker/index.mjs +200 -32
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/count-up/index.mjs +14 -17
- package/data-box/index.mjs +36 -33
- package/data-card/index.mjs +35 -33
- package/data-cardtext/index.mjs +29 -27
- package/data-display/index.mjs +37 -34
- package/data-icons/index.mjs +32 -29
- package/data-imgtext/index.mjs +30 -27
- package/data-operatext/index.mjs +41 -39
- package/data-panel/index.mjs +39 -36
- package/data-pay/index.mjs +26 -22
- package/data-price/index.mjs +34 -32
- package/data-progress/index.mjs +32 -28
- package/data-rotate/index.mjs +38 -35
- package/data-table-picker/index.mjs +25 -22
- package/data-tabs/index.mjs +35 -32
- package/dialog-form/index.mjs +41 -32
- package/dynamic-table/index.mjs +47 -42
- package/easy-popup/index.mjs +29 -56
- package/editable-progress/index.mjs +16 -14
- package/editable-tree/index.mjs +129 -476
- package/egd-collapse-item/index.mjs +1 -2
- package/element-dialog/index.mjs +37 -126
- package/empty-view/index.mjs +13 -31
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +105 -40
- package/flow-designer/index.mjs +1190 -1114
- package/flow-node/index.mjs +15 -47
- package/flow-viewer/index.mjs +167 -78
- package/form-block/index.mjs +24 -22
- package/form-cascader/index.mjs +29 -29
- package/form-checkbox-group/index.mjs +76 -31
- package/form-date-picker/index.mjs +21 -20
- package/form-holder/index.mjs +16 -15
- package/form-input/index.mjs +30 -88
- package/form-input-email/index.mjs +28 -28
- package/form-input-id-card/index.mjs +37 -37
- package/form-input-number/index.mjs +219 -59
- package/form-input-phone-number/index.mjs +25 -25
- package/form-input-tag/index.mjs +160 -38
- package/form-input-time/index.mjs +23 -23
- package/form-item/index.mjs +15 -144
- package/form-item-group/index.mjs +15 -163
- package/form-radio-group/index.mjs +39 -38
- package/form-select/index.mjs +33 -32
- package/form-switch/index.mjs +26 -26
- package/form-textarea/index.mjs +26 -26
- package/form-view/index.mjs +46 -42
- package/fy-array/index.mjs +65 -61
- package/fy-cascader/index.mjs +14 -13
- package/fy-checkbox/index.mjs +37 -32
- package/fy-code/index.mjs +11 -14
- package/fy-curd/index.mjs +206 -2795
- package/fy-date/index.mjs +16 -57
- package/fy-draggable/index.mjs +21 -20
- package/fy-dynamic/index.mjs +64 -207
- package/fy-empty/index.mjs +12 -29
- package/fy-form/index.mjs +178 -732
- package/fy-form-design/index.mjs +1738 -1179
- package/fy-input/index.mjs +15 -101
- package/fy-input-color/index.mjs +17 -66
- package/fy-input-icon/index.mjs +21 -116
- package/fy-input-map/index.mjs +27 -24
- package/fy-input-number/index.mjs +23 -22
- package/fy-input-table/index.mjs +22 -18
- package/fy-input-tree/index.mjs +32 -28
- package/fy-progress/index.mjs +24 -23
- package/fy-radio/index.mjs +23 -18
- package/fy-rate/index.mjs +16 -49
- package/fy-select/index.mjs +29 -122
- package/fy-slider/index.mjs +18 -17
- package/fy-switch/index.mjs +21 -20
- package/fy-tabs/index.mjs +14 -48
- package/fy-time/index.mjs +20 -14
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +26 -20
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +76 -74
- package/guide-steps/index.mjs +24 -22
- package/highlight-j-s/index.mjs +19 -29
- package/icon-temp/index.mjs +12 -30
- package/iframe-window/index.mjs +19 -18
- package/image-cropper/index.mjs +53 -51
- package/image-preview/index.mjs +27 -25
- package/input-number/index.mjs +63 -172
- package/input-number-range/index.mjs +24 -23
- package/license/index.mjs +1 -1
- package/loading-view/index.mjs +15 -33
- package/login/index.mjs +40 -35
- package/nav-bar/index.mjs +15 -30
- package/notice/index.mjs +19 -18
- package/package.json +1 -1
- package/page/index.mjs +12 -20
- package/page-header/index.mjs +13 -34
- package/page-index/index.mjs +34 -33
- package/page-index-top/index.mjs +100 -51
- package/page-skeleton/index.mjs +18 -35
- package/page-skeleton-new/index.mjs +16 -15
- package/pageable-table/index.mjs +85 -223
- package/pageable-view/index.mjs +34 -33
- package/present-view/index.mjs +75 -71
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +21 -29
- package/search/index.mjs +29 -27
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/split-pane/index.mjs +40 -45
- package/static-pageable-table/index.mjs +20 -18
- package/swiper/index.mjs +27 -25
- package/table-view/index.mjs +627 -89
- package/tag-render/index.mjs +21 -19
- package/text-ellipsis/index.mjs +13 -12
- package/tinymce-editor/index.mjs +73 -72
- package/toolbar/index.mjs +15 -208
- package/toolbar-button/index.mjs +32 -57
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +112 -104
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +51 -117
- package/chunks/FormTemp.7f91629d.mjs +0 -165
- package/chunks/confirmable-mixin.817b542f.mjs +0 -116
- package/chunks/form-input-mixin.4632ad36.mjs +0 -24
- package/chunks/form-item-mixin.ad148e7b.mjs +0 -140
- package/chunks/input-number-mixin.41a066be.mjs +0 -60
package/fy-tabs/index.mjs
CHANGED
|
@@ -1,40 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return e("div", {
|
|
5
|
-
staticClass: "avue-tabs"
|
|
6
|
-
}, [e("ElTabs", {
|
|
7
|
-
attrs: {
|
|
8
|
-
"tab-position": t.parentOption.position,
|
|
9
|
-
type: t.parentOption.type
|
|
10
|
-
},
|
|
11
|
-
model: {
|
|
12
|
-
value: t.active,
|
|
13
|
-
callback: function(n) {
|
|
14
|
-
t.active = n;
|
|
15
|
-
},
|
|
16
|
-
expression: "active"
|
|
17
|
-
}
|
|
18
|
-
}, t._l(t.columnOption, function(n, s) {
|
|
19
|
-
return e("ElTabPane", {
|
|
20
|
-
key: s,
|
|
21
|
-
attrs: {
|
|
22
|
-
name: `${s}`,
|
|
23
|
-
disabled: n.disabled
|
|
24
|
-
},
|
|
25
|
-
scopedSlots: t._u([{
|
|
26
|
-
key: "label",
|
|
27
|
-
fn: function() {
|
|
28
|
-
return [e("span", [e("i", {
|
|
29
|
-
class: n.icon
|
|
30
|
-
}), t._v(" " + t._s(n.label) + " ")])];
|
|
31
|
-
},
|
|
32
|
-
proxy: !0
|
|
33
|
-
}], null, !0)
|
|
34
|
-
});
|
|
35
|
-
}), 1)], 1);
|
|
36
|
-
}, c = [];
|
|
37
|
-
const l = {
|
|
1
|
+
import { s as o, r } from "../chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs";
|
|
2
|
+
import { n as s } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
3
|
+
const i = {
|
|
38
4
|
name: "FyTabs",
|
|
39
5
|
props: {
|
|
40
6
|
option: {
|
|
@@ -69,24 +35,24 @@ const l = {
|
|
|
69
35
|
this.active = `${t}`;
|
|
70
36
|
}
|
|
71
37
|
}
|
|
72
|
-
},
|
|
73
|
-
var
|
|
74
|
-
|
|
38
|
+
}, n = {};
|
|
39
|
+
var a = /* @__PURE__ */ s(
|
|
40
|
+
i,
|
|
41
|
+
r,
|
|
75
42
|
o,
|
|
76
|
-
c,
|
|
77
43
|
!1,
|
|
78
|
-
|
|
44
|
+
c,
|
|
79
45
|
null,
|
|
80
46
|
null,
|
|
81
47
|
null
|
|
82
48
|
);
|
|
83
|
-
function
|
|
84
|
-
for (let
|
|
85
|
-
this[
|
|
49
|
+
function c(t) {
|
|
50
|
+
for (let e in n)
|
|
51
|
+
this[e] = n[e];
|
|
86
52
|
}
|
|
87
|
-
const
|
|
88
|
-
return
|
|
53
|
+
const l = /* @__PURE__ */ function() {
|
|
54
|
+
return a.exports;
|
|
89
55
|
}();
|
|
90
56
|
export {
|
|
91
|
-
|
|
57
|
+
l as default
|
|
92
58
|
};
|
package/fy-time/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { p as o, e as l } from "../chunks/event.
|
|
1
|
+
import { p as o, e as l } from "../chunks/event.4377230d.mjs";
|
|
2
2
|
import { isBlank as i } from "@web-utils/core";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import s from "element-ui/lib/time-select";
|
|
4
|
+
import c from "element-ui/lib/time-picker";
|
|
5
|
+
import { n as p } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
6
|
+
var m = function() {
|
|
5
7
|
var e = this, t = e.$createElement, r = e._self._c || t;
|
|
6
8
|
return r("div", {
|
|
7
9
|
staticClass: "avue-time"
|
|
@@ -41,9 +43,13 @@ var c = function() {
|
|
|
41
43
|
expression: "text"
|
|
42
44
|
}
|
|
43
45
|
})], 1);
|
|
44
|
-
},
|
|
45
|
-
const
|
|
46
|
+
}, d = [];
|
|
47
|
+
const u = {
|
|
46
48
|
name: "FyTime",
|
|
49
|
+
components: {
|
|
50
|
+
ElTimeSelect: s,
|
|
51
|
+
ElTimePicker: c
|
|
52
|
+
},
|
|
47
53
|
mixins: [o, l],
|
|
48
54
|
props: {
|
|
49
55
|
editable: Boolean,
|
|
@@ -60,7 +66,7 @@ const d = {
|
|
|
60
66
|
computed: {
|
|
61
67
|
componentName() {
|
|
62
68
|
const e = this.pickerOptions || {};
|
|
63
|
-
return e.start || e.end || e.step ? "
|
|
69
|
+
return e.start || e.end || e.step ? "ElTimeSelect" : "ElTimePicker";
|
|
64
70
|
},
|
|
65
71
|
isRange() {
|
|
66
72
|
return this.type === "timerange";
|
|
@@ -73,23 +79,23 @@ const d = {
|
|
|
73
79
|
},
|
|
74
80
|
methods: {}
|
|
75
81
|
}, n = {};
|
|
76
|
-
var
|
|
82
|
+
var f = /* @__PURE__ */ p(
|
|
83
|
+
u,
|
|
84
|
+
m,
|
|
77
85
|
d,
|
|
78
|
-
c,
|
|
79
|
-
p,
|
|
80
86
|
!1,
|
|
81
|
-
|
|
87
|
+
h,
|
|
82
88
|
null,
|
|
83
89
|
null,
|
|
84
90
|
null
|
|
85
91
|
);
|
|
86
|
-
function
|
|
92
|
+
function h(e) {
|
|
87
93
|
for (let t in n)
|
|
88
94
|
this[t] = n[t];
|
|
89
95
|
}
|
|
90
|
-
const
|
|
91
|
-
return
|
|
96
|
+
const S = /* @__PURE__ */ function() {
|
|
97
|
+
return f.exports;
|
|
92
98
|
}();
|
|
93
99
|
export {
|
|
94
|
-
|
|
100
|
+
S as default
|
|
95
101
|
};
|
package/fy-title/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as r, e as _ } from "../chunks/event.
|
|
1
|
+
import { p as r, e as _ } from "../chunks/event.4377230d.mjs";
|
|
2
2
|
import { n as l } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
3
3
|
var o = function() {
|
|
4
4
|
var e = this, t = e.$createElement, n = e._self._c || t;
|
package/fy-tree/index.mjs
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { s as d, o as l,
|
|
1
|
+
import { s as d, o as l, D as r } from "../chunks/util.7844e2c2.mjs";
|
|
2
2
|
import { p as u } from "../chunks/permission.ce5d2121.mjs";
|
|
3
3
|
import { isBlank as p } from "@web-utils/core";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { _ as f } from "../chunks/FyForm.0294e494.mjs";
|
|
5
|
+
import { _ as m } from "../chunks/ElementDialog.d8f3105c.mjs";
|
|
6
|
+
import _ from "element-ui/lib/tree";
|
|
7
|
+
import y from "element-ui/lib/scrollbar";
|
|
8
|
+
import v from "element-ui/lib/button";
|
|
9
|
+
import k from "element-ui/lib/input";
|
|
10
|
+
import { n as b } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
11
|
+
var g = function() {
|
|
6
12
|
var e = this, i = e.$createElement, t = e._self._c || i;
|
|
7
13
|
return t("div", {
|
|
8
14
|
staticClass: "avue-tree"
|
|
9
15
|
}, [e.optVal(e.option.filter, !0) ? t("div", {
|
|
10
16
|
staticClass: "avue-tree__filter"
|
|
11
|
-
}, [t(
|
|
17
|
+
}, [t(k, {
|
|
12
18
|
attrs: {
|
|
13
19
|
placeholder: e.optVal(e.option.filterText, "输入关键字进行过滤"),
|
|
14
20
|
size: e.size
|
|
@@ -20,7 +26,7 @@ var m = function() {
|
|
|
20
26
|
},
|
|
21
27
|
expression: "filterValue"
|
|
22
28
|
}
|
|
23
|
-
}), e.optVal(e.option.addBtn, !0) ? t(
|
|
29
|
+
}), e.optVal(e.option.addBtn, !0) ? t(v, {
|
|
24
30
|
directives: [{
|
|
25
31
|
name: "permission",
|
|
26
32
|
rawName: "v-permission",
|
|
@@ -34,9 +40,9 @@ var m = function() {
|
|
|
34
40
|
on: {
|
|
35
41
|
click: e.parentAdd
|
|
36
42
|
}
|
|
37
|
-
}) : e._t("addBtn")], 2) : e._e(), t(
|
|
43
|
+
}) : e._t("addBtn")], 2) : e._e(), t(y, {
|
|
38
44
|
staticClass: "avue-tree__content"
|
|
39
|
-
}, [t(
|
|
45
|
+
}, [t(_, {
|
|
40
46
|
directives: [{
|
|
41
47
|
name: "loading",
|
|
42
48
|
rawName: "v-loading",
|
|
@@ -124,7 +130,7 @@ var m = function() {
|
|
|
124
130
|
}
|
|
125
131
|
}, [e._v(" " + e._s(e.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menu", null, {
|
|
126
132
|
node: e.node
|
|
127
|
-
})], 2) : e._e(), e.box ? t("div", [t(
|
|
133
|
+
})], 2) : e._e(), e.box ? t("div", [t(m, {
|
|
128
134
|
attrs: {
|
|
129
135
|
title: e.node[e.labelKey] || e.title,
|
|
130
136
|
visible: e.box,
|
|
@@ -136,7 +142,7 @@ var m = function() {
|
|
|
136
142
|
e.box = n;
|
|
137
143
|
}
|
|
138
144
|
}
|
|
139
|
-
}, [t(
|
|
145
|
+
}, [t(f, {
|
|
140
146
|
ref: "form",
|
|
141
147
|
attrs: {
|
|
142
148
|
option: e.formOption
|
|
@@ -152,8 +158,8 @@ var m = function() {
|
|
|
152
158
|
expression: "form"
|
|
153
159
|
}
|
|
154
160
|
})], 1)], 1) : e._e()], 1);
|
|
155
|
-
},
|
|
156
|
-
const
|
|
161
|
+
}, x = [];
|
|
162
|
+
const C = {
|
|
157
163
|
name: "FyTree",
|
|
158
164
|
directives: {
|
|
159
165
|
permission: u
|
|
@@ -408,23 +414,23 @@ const v = {
|
|
|
408
414
|
}
|
|
409
415
|
}
|
|
410
416
|
}, c = {};
|
|
411
|
-
var
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
417
|
+
var K = /* @__PURE__ */ b(
|
|
418
|
+
C,
|
|
419
|
+
g,
|
|
420
|
+
x,
|
|
415
421
|
!1,
|
|
416
|
-
|
|
422
|
+
w,
|
|
417
423
|
null,
|
|
418
424
|
null,
|
|
419
425
|
null
|
|
420
426
|
);
|
|
421
|
-
function
|
|
427
|
+
function w(e) {
|
|
422
428
|
for (let i in c)
|
|
423
429
|
this[i] = c[i];
|
|
424
430
|
}
|
|
425
|
-
const
|
|
426
|
-
return
|
|
431
|
+
const S = /* @__PURE__ */ function() {
|
|
432
|
+
return K.exports;
|
|
427
433
|
}();
|
|
428
434
|
export {
|
|
429
|
-
|
|
435
|
+
S as default
|
|
430
436
|
};
|
package/fy-u-editor/index.mjs
CHANGED
|
@@ -28,7 +28,7 @@ var h = (e, t, r) => new Promise((o, i) => {
|
|
|
28
28
|
});
|
|
29
29
|
import "@wangeditor/editor/dist/css/style.css";
|
|
30
30
|
import { createEditor as x, createToolbar as A } from "@wangeditor/editor";
|
|
31
|
-
import {
|
|
31
|
+
import { g as O } from "../chunks/util.7844e2c2.mjs";
|
|
32
32
|
import { n as w } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
33
33
|
const K = (e) => {
|
|
34
34
|
const { region: t, endpoint: r, accessKeyId: o, accessKeySecret: i, bucket: a } = e;
|
package/fy-upload/index.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { p as I, e as
|
|
2
|
-
import { B
|
|
1
|
+
import { p as I, e as N } from "../chunks/event.4377230d.mjs";
|
|
2
|
+
import { B, v as F, g as K } from "../chunks/util.7844e2c2.mjs";
|
|
3
3
|
import { p as A } from "../chunks/packages.1fc9ccba.mjs";
|
|
4
4
|
import { isBlank as b } from "@web-utils/core";
|
|
5
|
-
import
|
|
5
|
+
import L from "element-ui/lib/button";
|
|
6
|
+
import D from "element-ui/lib/upload";
|
|
7
|
+
import { n as M } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
6
8
|
let d, g;
|
|
7
9
|
const w = {
|
|
8
10
|
width: 200,
|
|
9
11
|
height: 200
|
|
10
|
-
},
|
|
12
|
+
}, s = {
|
|
11
13
|
text: "avueJS",
|
|
12
14
|
// 文字
|
|
13
15
|
fontFamily: "microsoft yahei",
|
|
@@ -31,18 +33,18 @@ function P(t, e) {
|
|
|
31
33
|
e(o.target.result);
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
|
-
function
|
|
35
|
-
const { text: o, fontFamily:
|
|
36
|
+
function q(t, e = {}, i) {
|
|
37
|
+
const { text: o, fontFamily: n, color: a, fontSize: r, opacity: h, bottom: S, right: f, ratio: x } = e;
|
|
36
38
|
v(), P(t, C);
|
|
37
39
|
function v() {
|
|
38
|
-
|
|
40
|
+
s.text = o || s.text, s.fontFamily = n || s.fontFamily, s.color = a || s.color, s.fontSize = r || s.fontSize, s.opacity = h || s.opacity, s.bottom = S || s.bottom, s.right = f || s.right, s.ratio = x || s.ratio;
|
|
39
41
|
}
|
|
40
42
|
function C(y) {
|
|
41
43
|
const u = new Image();
|
|
42
44
|
u.src = y, u.onload = function() {
|
|
43
45
|
const m = u.width, l = u.height;
|
|
44
46
|
c(m, l), g.drawImage(u, 0, 0, m, l), E(m, l);
|
|
45
|
-
const _ = document.getElementById("canvas").toDataURL(t.type,
|
|
47
|
+
const _ = document.getElementById("canvas").toDataURL(t.type, s.ratio), k = B(_, t.name);
|
|
46
48
|
i && i(k);
|
|
47
49
|
};
|
|
48
50
|
}
|
|
@@ -50,13 +52,13 @@ function D(t, e = {}, i) {
|
|
|
50
52
|
d = document.getElementById("canvas"), d === null && (d = document.createElement("canvas"), d.id = "canvas", d.className = "avue-canvas", document.body.appendChild(d)), g = d.getContext("2d"), d.width = y, d.height = u;
|
|
51
53
|
}
|
|
52
54
|
function E(y, u) {
|
|
53
|
-
const m =
|
|
54
|
-
g.font = `${l.fontSize}px ${
|
|
55
|
+
const m = s.text, l = U(m, y, u);
|
|
56
|
+
g.font = `${l.fontSize}px ${s.fontFamily}`, g.fillStyle = s.color, g.globalAlpha = s.opacity / 100, g.fillText(m, l.x, l.y);
|
|
55
57
|
}
|
|
56
58
|
function U(y, u, m) {
|
|
57
59
|
let l, _;
|
|
58
|
-
const $ =
|
|
59
|
-
|
|
60
|
+
const $ = s.fontSize / w.width * u;
|
|
61
|
+
s.bottom ? _ = w.height - s.bottom : _ = s.top, s.right ? l = w.width - s.right : l = s.left, g.font = `${s.fontSize}px ${s.fontFamily}`;
|
|
60
62
|
const j = Number(g.measureText(y).width);
|
|
61
63
|
l = l - j;
|
|
62
64
|
const z = l / w.width, R = _ / w.height;
|
|
@@ -67,45 +69,45 @@ function D(t, e = {}, i) {
|
|
|
67
69
|
};
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
|
-
const
|
|
72
|
+
const V = (t, e, i) => {
|
|
71
73
|
const o = JSON.stringify(i);
|
|
72
74
|
window.__ENV__ === "development" && console && console.log("put_policy = ", o);
|
|
73
|
-
const
|
|
74
|
-
window.__ENV__ === "development" && console && console.log("encoded = ",
|
|
75
|
-
const r = window.CryptoJS.HmacSHA1(
|
|
75
|
+
const n = H(J(o));
|
|
76
|
+
window.__ENV__ === "development" && console && console.log("encoded = ", n);
|
|
77
|
+
const r = window.CryptoJS.HmacSHA1(n, e).toString(window.CryptoJS.enc.Base64);
|
|
76
78
|
window.__ENV__ === "development" && console && console.log("encoded_signed=", r);
|
|
77
|
-
const
|
|
78
|
-
return window.__ENV__ === "development" && console && console.log("upload_token=",
|
|
79
|
+
const h = `${t}:${Q(r)}:${n}`;
|
|
80
|
+
return window.__ENV__ === "development" && console && console.log("upload_token=", h), h;
|
|
79
81
|
};
|
|
80
|
-
function
|
|
82
|
+
function J(t) {
|
|
81
83
|
let e, i, o;
|
|
82
84
|
e = "";
|
|
83
|
-
const
|
|
84
|
-
for (i = 0; i <
|
|
85
|
+
const n = t.length;
|
|
86
|
+
for (i = 0; i < n; i++)
|
|
85
87
|
o = t.charCodeAt(i), o >= 1 && o <= 127 ? e += t.charAt(i) : o > 2047 ? (e += String.fromCharCode(224 | o >> 12 & 15), e += String.fromCharCode(128 | o >> 6 & 63), e += String.fromCharCode(128 | o >> 0 & 63)) : (e += String.fromCharCode(192 | o >> 6 & 31), e += String.fromCharCode(128 | o >> 0 & 63));
|
|
86
88
|
return e;
|
|
87
89
|
}
|
|
88
|
-
const
|
|
89
|
-
function
|
|
90
|
-
let e, i, o,
|
|
90
|
+
const p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
91
|
+
function H(t) {
|
|
92
|
+
let e, i, o, n, a;
|
|
91
93
|
const r = t.length;
|
|
92
94
|
for (i = 0, e = ""; i < r; ) {
|
|
93
95
|
if (o = t.charCodeAt(i++) & 255, i === r) {
|
|
94
|
-
e +=
|
|
96
|
+
e += p.charAt(o >> 2), e += p.charAt((o & 3) << 4), e += "==";
|
|
95
97
|
break;
|
|
96
98
|
}
|
|
97
|
-
if (
|
|
98
|
-
e +=
|
|
99
|
+
if (n = t.charCodeAt(i++), i === r) {
|
|
100
|
+
e += p.charAt(o >> 2), e += p.charAt((o & 3) << 4 | (n & 240) >> 4), e += p.charAt((n & 15) << 2), e += "=";
|
|
99
101
|
break;
|
|
100
102
|
}
|
|
101
|
-
a = t.charCodeAt(i++), e +=
|
|
103
|
+
a = t.charCodeAt(i++), e += p.charAt(o >> 2), e += p.charAt((o & 3) << 4 | (n & 240) >> 4), e += p.charAt((n & 15) << 2 | (a & 192) >> 6), e += p.charAt(a & 63);
|
|
102
104
|
}
|
|
103
105
|
return e;
|
|
104
106
|
}
|
|
105
|
-
const
|
|
107
|
+
const Q = function(t) {
|
|
106
108
|
return t = t.replace(/\+/g, "-"), t = t.replace(/\//g, "_"), t;
|
|
107
|
-
},
|
|
108
|
-
var
|
|
109
|
+
}, W = (t) => new window.OSS(t);
|
|
110
|
+
var X = function() {
|
|
109
111
|
var t = this, e = t.$createElement, i = t._self._c || e;
|
|
110
112
|
return i("div", {
|
|
111
113
|
directives: [{
|
|
@@ -121,7 +123,7 @@ var Q = function() {
|
|
|
121
123
|
attrs: {
|
|
122
124
|
"element-loading-text": t.loadText
|
|
123
125
|
}
|
|
124
|
-
}, [i(
|
|
126
|
+
}, [i(D, {
|
|
125
127
|
key: t.reload,
|
|
126
128
|
class: {
|
|
127
129
|
"avue-upload--list": t.listType === "picture-img",
|
|
@@ -164,14 +166,14 @@ var Q = function() {
|
|
|
164
166
|
}, {
|
|
165
167
|
key: "file",
|
|
166
168
|
fn: function(o) {
|
|
167
|
-
var
|
|
169
|
+
var n = o.file;
|
|
168
170
|
return [t.$scopedSlots.default ? t._t("default", null, {
|
|
169
|
-
file:
|
|
170
|
-
}) : t.listType === "picture-card" ? i("span", [t.isMediaType(
|
|
171
|
+
file: n
|
|
172
|
+
}) : t.listType === "picture-card" ? i("span", [t.isMediaType(n.url) ? i(n.type, {
|
|
171
173
|
tag: "Component",
|
|
172
174
|
staticClass: "el-upload-list__item-thumbnail",
|
|
173
175
|
attrs: {
|
|
174
|
-
src:
|
|
176
|
+
src: n.url
|
|
175
177
|
}
|
|
176
178
|
}) : i("i", {
|
|
177
179
|
staticClass: "avue-upload__avatar el-icon-document"
|
|
@@ -183,7 +185,7 @@ var Q = function() {
|
|
|
183
185
|
staticClass: "el-icon-zoom-in",
|
|
184
186
|
on: {
|
|
185
187
|
click: function(a) {
|
|
186
|
-
return a.stopPropagation(), t.handlePreview(
|
|
188
|
+
return a.stopPropagation(), t.handlePreview(n);
|
|
187
189
|
}
|
|
188
190
|
}
|
|
189
191
|
})]), i("span", {
|
|
@@ -192,47 +194,47 @@ var Q = function() {
|
|
|
192
194
|
staticClass: "el-icon-delete",
|
|
193
195
|
on: {
|
|
194
196
|
click: function(a) {
|
|
195
|
-
return a.stopPropagation(), t.handleRemove(
|
|
197
|
+
return a.stopPropagation(), t.handleRemove(n);
|
|
196
198
|
}
|
|
197
199
|
}
|
|
198
200
|
})])])], 1) : t.listType === "picture" ? i("span", {
|
|
199
201
|
on: {
|
|
200
202
|
click: function(a) {
|
|
201
|
-
return a.stopPropagation(), t.handlePreview(
|
|
203
|
+
return a.stopPropagation(), t.handlePreview(n);
|
|
202
204
|
}
|
|
203
205
|
}
|
|
204
|
-
}, [i(
|
|
206
|
+
}, [i(n.type, {
|
|
205
207
|
tag: "Component",
|
|
206
208
|
staticClass: "el-upload-list__item-thumbnail",
|
|
207
209
|
attrs: {
|
|
208
|
-
src:
|
|
210
|
+
src: n.url
|
|
209
211
|
}
|
|
210
212
|
}), i("a", {
|
|
211
213
|
staticClass: "el-upload-list__item-name"
|
|
212
214
|
}, [i("i", {
|
|
213
215
|
staticClass: "el-icon-document"
|
|
214
|
-
}), t._v(" " + t._s(
|
|
216
|
+
}), t._v(" " + t._s(n.name) + " ")]), i("i", {
|
|
215
217
|
staticClass: "el-icon-close",
|
|
216
218
|
on: {
|
|
217
219
|
click: function(a) {
|
|
218
|
-
return a.stopPropagation(), t.handleRemove(
|
|
220
|
+
return a.stopPropagation(), t.handleRemove(n);
|
|
219
221
|
}
|
|
220
222
|
}
|
|
221
223
|
})], 1) : i("span", {
|
|
222
224
|
on: {
|
|
223
225
|
click: function(a) {
|
|
224
|
-
return a.stopPropagation(), t.handlePreview(
|
|
226
|
+
return a.stopPropagation(), t.handlePreview(n);
|
|
225
227
|
}
|
|
226
228
|
}
|
|
227
229
|
}, [i("a", {
|
|
228
230
|
staticClass: "el-upload-list__item-name"
|
|
229
231
|
}, [i("i", {
|
|
230
232
|
staticClass: "el-icon-document"
|
|
231
|
-
}), t._v(" " + t._s(
|
|
233
|
+
}), t._v(" " + t._s(n.name) + " ")]), t.disabled ? t._e() : i("i", {
|
|
232
234
|
staticClass: "el-icon-close",
|
|
233
235
|
on: {
|
|
234
236
|
click: function(a) {
|
|
235
|
-
return a.stopPropagation(), t.handleRemove(
|
|
237
|
+
return a.stopPropagation(), t.handleRemove(n);
|
|
236
238
|
}
|
|
237
239
|
}
|
|
238
240
|
})])];
|
|
@@ -297,20 +299,20 @@ var Q = function() {
|
|
|
297
299
|
staticClass: "el-icon-upload"
|
|
298
300
|
}), i("div", {
|
|
299
301
|
staticClass: "el-upload__text"
|
|
300
|
-
}, [i("em", [t._v(t._s(t.fileText || "上传"))])])] : [i(
|
|
302
|
+
}, [i("em", [t._v(t._s(t.fileText || "上传"))])])] : [i(L, {
|
|
301
303
|
attrs: {
|
|
302
304
|
icon: "el-icon-upload",
|
|
303
305
|
size: t.size,
|
|
304
306
|
type: "primary"
|
|
305
307
|
}
|
|
306
308
|
}, [t._v(" " + t._s(t.fileText || "上传") + " ")])]], 2)], 1);
|
|
307
|
-
},
|
|
309
|
+
}, Y = [];
|
|
308
310
|
function O(t, e = "") {
|
|
309
311
|
return e.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? e : t + e;
|
|
310
312
|
}
|
|
311
|
-
const
|
|
313
|
+
const G = {
|
|
312
314
|
name: "FyUpload",
|
|
313
|
-
mixins: [I,
|
|
315
|
+
mixins: [I, N],
|
|
314
316
|
props: {
|
|
315
317
|
qiniu: Object,
|
|
316
318
|
ali: Object,
|
|
@@ -414,13 +416,13 @@ const X = {
|
|
|
414
416
|
return (this.text || []).forEach((e, i) => {
|
|
415
417
|
if (e) {
|
|
416
418
|
const o = this.isObject ? e[this.labelKey] : e.substring(e.lastIndexOf("/") + 1);
|
|
417
|
-
let
|
|
418
|
-
|
|
419
|
+
let n = this.isObject ? e[this.valueKey] : e;
|
|
420
|
+
n = O(this.homeUrl, n), t.push({
|
|
419
421
|
uid: `${i}`,
|
|
420
422
|
status: "done",
|
|
421
|
-
type: this.isMediaType(
|
|
423
|
+
type: this.isMediaType(n),
|
|
422
424
|
name: o,
|
|
423
|
-
url:
|
|
425
|
+
url: n
|
|
424
426
|
});
|
|
425
427
|
}
|
|
426
428
|
}), t;
|
|
@@ -492,8 +494,8 @@ const X = {
|
|
|
492
494
|
return;
|
|
493
495
|
}
|
|
494
496
|
const o = Object.assign(this.headers, { "Content-Type": "multipart/form-data" });
|
|
495
|
-
let
|
|
496
|
-
const r = new FormData(),
|
|
497
|
+
let n = {}, a = {};
|
|
498
|
+
const r = new FormData(), h = () => {
|
|
497
499
|
const f = (x) => {
|
|
498
500
|
let v = this.action;
|
|
499
501
|
for (const c in this.data)
|
|
@@ -504,23 +506,23 @@ const X = {
|
|
|
504
506
|
A.logs("CryptoJS"), this.hide();
|
|
505
507
|
return;
|
|
506
508
|
}
|
|
507
|
-
|
|
508
|
-
const c =
|
|
509
|
-
scope:
|
|
510
|
-
deadline: (/* @__PURE__ */ new Date()).getTime() +
|
|
509
|
+
n = this.qiniu || this.$AVUE.qiniu;
|
|
510
|
+
const c = V(n.AK, n.SK, {
|
|
511
|
+
scope: n.scope,
|
|
512
|
+
deadline: (/* @__PURE__ */ new Date()).getTime() + n.deadline * 3600
|
|
511
513
|
});
|
|
512
|
-
r.append("token", c), v =
|
|
514
|
+
r.append("token", c), v = n.bucket;
|
|
513
515
|
} else if (this.isAliOss) {
|
|
514
516
|
if (!window.OSS) {
|
|
515
517
|
A.logs("AliOSS"), this.hide();
|
|
516
518
|
return;
|
|
517
519
|
}
|
|
518
|
-
|
|
520
|
+
n = this.ali || this.$AVUE.ali, a = W(n);
|
|
519
521
|
}
|
|
520
522
|
(() => this.isAliOss ? a.put(C.name, C, {
|
|
521
523
|
headers: this.headers
|
|
522
524
|
}) : this.$axios.post(v, r, { headers: o }))().then((c) => {
|
|
523
|
-
this.res = {}, this.isQiniuOss && (c.data.key =
|
|
525
|
+
this.res = {}, this.isQiniuOss && (c.data.key = n.url + c.data.key), this.res = K(this.isAliOss ? c : c.data, this.resKey), typeof this.uploadAfter == "function" ? this.uploadAfter(this.res, this.show, this.hide, this.column) : this.show();
|
|
524
526
|
}).catch((c) => {
|
|
525
527
|
this.hide(c);
|
|
526
528
|
});
|
|
@@ -528,12 +530,12 @@ const X = {
|
|
|
528
530
|
typeof this.uploadBefore == "function" ? this.uploadBefore(e, f, this.hide, this.column) : f();
|
|
529
531
|
};
|
|
530
532
|
if (F(e.name) !== "img") {
|
|
531
|
-
|
|
533
|
+
h();
|
|
532
534
|
return;
|
|
533
535
|
}
|
|
534
536
|
const S = () => {
|
|
535
|
-
b(this.canvasOption) ?
|
|
536
|
-
e = f,
|
|
537
|
+
b(this.canvasOption) ? h() : q(e, this.canvasOption, (f) => {
|
|
538
|
+
e = f, h();
|
|
537
539
|
});
|
|
538
540
|
};
|
|
539
541
|
b(this.cropperOption) ? S() : P(e, (f) => {
|
|
@@ -570,23 +572,23 @@ const X = {
|
|
|
570
572
|
}
|
|
571
573
|
}
|
|
572
574
|
}, T = {};
|
|
573
|
-
var
|
|
575
|
+
var Z = /* @__PURE__ */ M(
|
|
576
|
+
G,
|
|
574
577
|
X,
|
|
575
|
-
|
|
576
|
-
W,
|
|
578
|
+
Y,
|
|
577
579
|
!1,
|
|
578
|
-
|
|
580
|
+
tt,
|
|
579
581
|
null,
|
|
580
582
|
null,
|
|
581
583
|
null
|
|
582
584
|
);
|
|
583
|
-
function
|
|
585
|
+
function tt(t) {
|
|
584
586
|
for (let e in T)
|
|
585
587
|
this[e] = T[e];
|
|
586
588
|
}
|
|
587
|
-
const
|
|
588
|
-
return
|
|
589
|
+
const rt = /* @__PURE__ */ function() {
|
|
590
|
+
return Z.exports;
|
|
589
591
|
}();
|
|
590
592
|
export {
|
|
591
|
-
|
|
593
|
+
rt as default
|
|
592
594
|
};
|