@web-utils/component 1.2.4 → 1.2.6
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/README.md +27 -27
- package/dist/chunks/163eed3b.js +16 -1
- package/dist/chunks/2bd4e340.js +184 -0
- package/dist/chunks/6499de3a.js +30 -1
- package/dist/chunks/7af3ceb1.js +75 -0
- package/dist/chunks/86bcadec.js +24 -0
- package/dist/chunks/8bbde9bf.js +81 -1
- package/dist/chunks/90bd3d52.js +26 -1
- package/dist/chunks/92404ceb.js +126 -0
- package/dist/chunks/a73fe8ee.js +11 -0
- package/dist/chunks/df803484.js +60 -0
- package/dist/components/address-input/index.js +113 -1
- package/dist/components/aside-menu/index.js +58 -1
- package/dist/components/awesome-button/index.js +82 -1
- package/dist/components/capsule-tab/index.js +52 -1
- package/dist/components/chunk-file-uploader/index.js +119 -1
- package/dist/components/chunk-file-uploader-button/index.js +60 -1
- package/dist/components/chunk-file-uploader-drop/index.js +65 -1
- package/dist/components/chunk-file-uploader-file/index.js +311 -1
- package/dist/components/chunk-file-uploader-files/index.js +49 -1
- package/dist/components/chunk-file-uploader-list/index.js +50 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
- package/dist/components/code-mirror-editor/index.js +310 -6
- package/dist/components/color-picker/index.js +110 -1
- package/dist/components/confirm-button/index.js +57 -1
- package/dist/components/confirmable/index.js +28 -1
- package/dist/components/context-menu/index.js +236 -1
- package/dist/components/custom-scrollbar/index.js +150 -1
- package/dist/components/data-table-picker/index.js +137 -1
- package/dist/components/dynamic-table/index.js +195 -1
- package/dist/components/e-charts/index.js +229 -1
- package/dist/components/editable-progress/index.js +141 -1
- package/dist/components/editable-tree/index.js +789 -1
- package/dist/components/egd-collapse/index.js +79 -1
- package/dist/components/egd-collapse-item/index.js +132 -1
- package/dist/components/el-color-picker-dropdown/index.js +170 -1
- package/dist/components/element-dialog/index.js +242 -1
- package/dist/components/empty-view/index.js +69 -1
- package/dist/components/error-view/index.js +61 -1
- package/dist/components/flex-column/index.js +50 -1
- package/dist/components/flex-item/index.js +66 -1
- package/dist/components/flex-row/index.js +50 -1
- package/dist/components/flex-scroller/index.js +47 -1
- package/dist/components/form-button/index.js +80 -1
- package/dist/components/form-cascader/index.js +151 -1
- package/dist/components/form-checkbox-group/index.js +192 -1
- package/dist/components/form-date-picker/index.js +182 -1
- package/dist/components/form-holder/index.js +90 -1
- package/dist/components/form-input/index.js +106 -1
- package/dist/components/form-input-email/index.js +97 -1
- package/dist/components/form-input-id-card/index.js +104 -1
- package/dist/components/form-input-number/index.js +123 -1
- package/dist/components/form-input-phone-number/index.js +98 -1
- package/dist/components/form-input-time/index.js +124 -1
- package/dist/components/form-item/index.js +120 -1
- package/dist/components/form-item-config-provider/index.js +63 -1
- package/dist/components/form-item-group/index.js +169 -1
- package/dist/components/form-radio-group/index.js +170 -1
- package/dist/components/form-select/index.js +154 -1
- package/dist/components/form-switch/index.js +97 -1
- package/dist/components/form-textarea/index.js +102 -1
- package/dist/components/form-view/index.js +343 -1
- package/dist/components/guide-steps/index.js +94 -1
- package/dist/components/icon-card/index.js +62 -1
- package/dist/components/iframe-window/index.js +99 -1
- package/dist/components/input-number/index.js +274 -1
- package/dist/components/input-number-range/index.js +110 -1
- package/dist/components/j-s-x-component/index.js +16 -1
- package/dist/components/keep-view-alive/index.js +119 -1
- package/dist/components/loading-view/index.js +61 -1
- package/dist/components/nav-bar/index.js +52 -1
- package/dist/components/not-implement/index.js +35 -1
- package/dist/components/page/index.js +40 -1
- package/dist/components/page-header/index.js +56 -1
- package/dist/components/page-index/index.js +151 -1
- package/dist/components/page-index-top/index.js +119 -1
- package/dist/components/page-skeleton/index.js +56 -1
- package/dist/components/page-skeleton-new/index.js +98 -1
- package/dist/components/pageable-table/index.js +429 -1
- package/dist/components/pageable-view/index.js +328 -2
- package/dist/components/photo-swipe/index.js +187 -1
- package/dist/components/resize-observer/index.js +62 -1
- package/dist/components/search-popover/index.js +391 -2
- package/dist/components/sign-panel/index.js +242 -1
- package/dist/components/split-pane/index.js +209 -1
- package/dist/components/stateful/index.js +84 -1
- package/dist/components/static-pageable-table/index.js +92 -1
- package/dist/components/swiper/index.js +158 -1
- package/dist/components/tab/index.js +145 -1
- package/dist/components/tab-item/index.js +73 -1
- package/dist/components/table-column/index.js +89 -1
- package/dist/components/table-view/index.js +363 -1
- package/dist/components/tag-render/index.js +97 -1
- package/dist/components/tinymce-editor/index.js +173 -1
- package/dist/components/tinymce-wrapper/index.js +618 -1
- package/dist/components/toolbar/index.js +217 -1
- package/dist/components/toolbar-button/index.js +90 -1
- package/dist/components/trigger/index.js +71 -1
- package/dist/components/vue-tags-input/index.js +439 -1
- package/dist/components/watermark/index.js +63 -1
- package/dist/components/x-dialog/index.js +173 -1
- package/dist/index.css +2102 -1
- package/dist/index.es.js +2995 -2078
- package/package.json +29 -29
- package/web-types.json +22 -16
- package/dist/chunks/23bd3525.js +0 -1
- package/dist/chunks/65f4f4f2.js +0 -1
- package/dist/chunks/8473fc69.js +0 -1
- package/dist/chunks/addb6ed5.js +0 -1
- package/dist/chunks/b8305633.js +0 -1
- package/dist/chunks/e8547f66.js +0 -1
|
@@ -1 +1,195 @@
|
|
|
1
|
-
import{fastClone as
|
|
1
|
+
import { fastClone as u, validateNumber as d, validateIdCard as c, validatePhoneNum as m } from "@web-utils/core";
|
|
2
|
+
import { n as f } from "../../chunks/6499de3a.js";
|
|
3
|
+
var h = function() {
|
|
4
|
+
var e = this, i = e.$createElement, t = e._self._c || i;
|
|
5
|
+
return t("div", {
|
|
6
|
+
staticClass: "dynamic-table"
|
|
7
|
+
}, [t("ElTable", {
|
|
8
|
+
key: e.key,
|
|
9
|
+
staticStyle: {
|
|
10
|
+
width: "100%"
|
|
11
|
+
},
|
|
12
|
+
attrs: {
|
|
13
|
+
data: e.value
|
|
14
|
+
}
|
|
15
|
+
}, [e._l(e.columns, function(a) {
|
|
16
|
+
return t("ElTableColumn", {
|
|
17
|
+
key: a.prop,
|
|
18
|
+
attrs: {
|
|
19
|
+
prop: a.prop,
|
|
20
|
+
label: a.label,
|
|
21
|
+
"min-width": "150"
|
|
22
|
+
},
|
|
23
|
+
scopedSlots: e._u([{
|
|
24
|
+
key: "default",
|
|
25
|
+
fn: function(l) {
|
|
26
|
+
var n = l.row, r = l.$index;
|
|
27
|
+
return [t("ElFormItem", {
|
|
28
|
+
style: {
|
|
29
|
+
marginBottom: e.inputDisabled ? "0px" : "16px"
|
|
30
|
+
},
|
|
31
|
+
attrs: {
|
|
32
|
+
prop: `${e.prop}.${r}.${a.prop}`,
|
|
33
|
+
size: "mini",
|
|
34
|
+
rules: e.getRules(a)
|
|
35
|
+
}
|
|
36
|
+
}, [t("ElInput", {
|
|
37
|
+
attrs: {
|
|
38
|
+
"prefix-icon": e.getIcon(a),
|
|
39
|
+
disabled: e.inputDisabled,
|
|
40
|
+
placeholder: e.inputDisabled ? "" : `\u8BF7\u8F93\u5165${a.label}\uFF01`
|
|
41
|
+
},
|
|
42
|
+
model: {
|
|
43
|
+
value: n[a.prop],
|
|
44
|
+
callback: function(s) {
|
|
45
|
+
e.$set(n, a.prop, s);
|
|
46
|
+
},
|
|
47
|
+
expression: "row[column.prop]"
|
|
48
|
+
}
|
|
49
|
+
})], 1)];
|
|
50
|
+
}
|
|
51
|
+
}], null, !0)
|
|
52
|
+
});
|
|
53
|
+
}), e.inputDisabled ? e._e() : t("ElTableColumn", {
|
|
54
|
+
attrs: {
|
|
55
|
+
label: "\u64CD\u4F5C",
|
|
56
|
+
width: "60",
|
|
57
|
+
fixed: "right"
|
|
58
|
+
},
|
|
59
|
+
scopedSlots: e._u([{
|
|
60
|
+
key: "default",
|
|
61
|
+
fn: function(a) {
|
|
62
|
+
var l = a.row, n = a.column, r = a.$index;
|
|
63
|
+
return [t("i", {
|
|
64
|
+
staticClass: "el-icon-minus dynamic-table-action-icon",
|
|
65
|
+
staticStyle: {
|
|
66
|
+
position: "relative",
|
|
67
|
+
top: "-8px",
|
|
68
|
+
color: "#f00"
|
|
69
|
+
},
|
|
70
|
+
attrs: {
|
|
71
|
+
title: "\u5220\u9664"
|
|
72
|
+
},
|
|
73
|
+
on: {
|
|
74
|
+
click: function(s) {
|
|
75
|
+
return s.stopPropagation(), e.removeRow(l, r, n);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
})];
|
|
79
|
+
}
|
|
80
|
+
}], null, !1, 410881950)
|
|
81
|
+
})], 2), e.inputDisabled ? e._e() : t("ElButton", {
|
|
82
|
+
staticStyle: {
|
|
83
|
+
color: "#08c108"
|
|
84
|
+
},
|
|
85
|
+
attrs: {
|
|
86
|
+
type: "text",
|
|
87
|
+
icon: "el-icon-plus"
|
|
88
|
+
},
|
|
89
|
+
on: {
|
|
90
|
+
click: e.addRow
|
|
91
|
+
}
|
|
92
|
+
}, [e._v(" \u6DFB\u52A0 ")])], 1);
|
|
93
|
+
}, y = [];
|
|
94
|
+
const o = {
|
|
95
|
+
number: "fa fa-superscript",
|
|
96
|
+
email: "el-icon-lx-mail",
|
|
97
|
+
phone: "fa fa-phone",
|
|
98
|
+
idCard: "el-icon-lx-news"
|
|
99
|
+
}, v = {
|
|
100
|
+
name: "DynamicTable",
|
|
101
|
+
inject: {
|
|
102
|
+
elForm: {
|
|
103
|
+
default: ""
|
|
104
|
+
},
|
|
105
|
+
elFormItem: {
|
|
106
|
+
default: ""
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
props: {
|
|
110
|
+
prop: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "rows"
|
|
113
|
+
},
|
|
114
|
+
value: {
|
|
115
|
+
type: Array,
|
|
116
|
+
default: () => []
|
|
117
|
+
},
|
|
118
|
+
columns: {
|
|
119
|
+
type: Array,
|
|
120
|
+
default: () => []
|
|
121
|
+
},
|
|
122
|
+
disabled: Boolean
|
|
123
|
+
},
|
|
124
|
+
data() {
|
|
125
|
+
return {
|
|
126
|
+
key: 1
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
computed: {
|
|
130
|
+
inputDisabled() {
|
|
131
|
+
return this.disabled || (this.elForm || {}).disabled;
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
watch: {
|
|
135
|
+
value: {
|
|
136
|
+
deep: !0,
|
|
137
|
+
handler(e) {
|
|
138
|
+
this.$emit("input", e);
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
columns: {
|
|
142
|
+
deep: !0,
|
|
143
|
+
handler() {
|
|
144
|
+
this.key++;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
methods: {
|
|
149
|
+
getIcon(e) {
|
|
150
|
+
return o[e.type] ? o[e.type] : "";
|
|
151
|
+
},
|
|
152
|
+
addRow() {
|
|
153
|
+
const e = this.value;
|
|
154
|
+
e.push(this.newRow()), this.$emit("input", e);
|
|
155
|
+
},
|
|
156
|
+
removeRow(e, i) {
|
|
157
|
+
const t = this.value;
|
|
158
|
+
t.splice(i, 1), this.$emit("input", t);
|
|
159
|
+
},
|
|
160
|
+
newRow() {
|
|
161
|
+
const e = {};
|
|
162
|
+
return this.columns.forEach((i) => {
|
|
163
|
+
e[i.prop] = void 0;
|
|
164
|
+
}), e;
|
|
165
|
+
},
|
|
166
|
+
getRules(e) {
|
|
167
|
+
const i = e.rules;
|
|
168
|
+
if (["email", "idCard", "phone", "number"].includes(e.type)) {
|
|
169
|
+
const t = u(i || []);
|
|
170
|
+
return e.type === "number" && t.push({ validator: d, message: "\u8BF7\u8F93\u5165\u6570\u5B57\uFF01" }), e.type === "email" && t.push({ type: "email", message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\u5730\u5740\uFF01" }), e.type === "idCard" && t.push({ validator: c, message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u8EAB\u4EFD\u8BC1\u53F7\u7801\uFF01" }), e.type === "phone" && t.push({ validator: m, message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801\uFF01" }), t;
|
|
171
|
+
} else
|
|
172
|
+
return i;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}, p = {};
|
|
176
|
+
var b = /* @__PURE__ */ f(
|
|
177
|
+
v,
|
|
178
|
+
h,
|
|
179
|
+
y,
|
|
180
|
+
!1,
|
|
181
|
+
_,
|
|
182
|
+
null,
|
|
183
|
+
null,
|
|
184
|
+
null
|
|
185
|
+
);
|
|
186
|
+
function _(e) {
|
|
187
|
+
for (let i in p)
|
|
188
|
+
this[i] = p[i];
|
|
189
|
+
}
|
|
190
|
+
const g = /* @__PURE__ */ function() {
|
|
191
|
+
return b.exports;
|
|
192
|
+
}();
|
|
193
|
+
export {
|
|
194
|
+
g as default
|
|
195
|
+
};
|
|
@@ -1 +1,229 @@
|
|
|
1
|
-
import*as s from
|
|
1
|
+
import * as s from "echarts/core";
|
|
2
|
+
import { BarChart as a, LineChart as n, PieChart as o, RadarChart as c, MapChart as d, ScatterChart as l, EffectScatterChart as p, PictorialBarChart as g } from "echarts/charts";
|
|
3
|
+
import { TitleComponent as u, TooltipComponent as f, GridComponent as m, LegendComponent as _, DatasetComponent as O, PolarComponent as C } from "echarts/components";
|
|
4
|
+
import { CanvasRenderer as w } from "echarts/renderers";
|
|
5
|
+
import { debounce as M, isString as R } from "@web-utils/core";
|
|
6
|
+
import { addListener as y, removeListener as z } from "resize-detector";
|
|
7
|
+
import { n as v } from "../../chunks/6499de3a.js";
|
|
8
|
+
var S = function() {
|
|
9
|
+
var t = this, e = t.$createElement, i = t._self._c || e;
|
|
10
|
+
return i("div", {
|
|
11
|
+
staticClass: "echarts",
|
|
12
|
+
style: {
|
|
13
|
+
width: t.width,
|
|
14
|
+
height: t.height
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}, L = [];
|
|
18
|
+
s.use([
|
|
19
|
+
u,
|
|
20
|
+
f,
|
|
21
|
+
m,
|
|
22
|
+
_,
|
|
23
|
+
O,
|
|
24
|
+
C,
|
|
25
|
+
w,
|
|
26
|
+
a,
|
|
27
|
+
n,
|
|
28
|
+
o,
|
|
29
|
+
c,
|
|
30
|
+
d,
|
|
31
|
+
l,
|
|
32
|
+
p,
|
|
33
|
+
g
|
|
34
|
+
]);
|
|
35
|
+
const x = ["theme", "initOptions", "autoResize"], E = ["manualUpdate", "watchShallow"], $ = {
|
|
36
|
+
name: "ECharts",
|
|
37
|
+
props: {
|
|
38
|
+
options: {
|
|
39
|
+
type: Object
|
|
40
|
+
},
|
|
41
|
+
theme: {
|
|
42
|
+
type: [String, Object]
|
|
43
|
+
},
|
|
44
|
+
initOptions: {
|
|
45
|
+
type: Object
|
|
46
|
+
},
|
|
47
|
+
group: {
|
|
48
|
+
type: String
|
|
49
|
+
},
|
|
50
|
+
width: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "100%"
|
|
53
|
+
},
|
|
54
|
+
height: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "100%"
|
|
57
|
+
},
|
|
58
|
+
autoResize: Boolean,
|
|
59
|
+
watchShallow: Boolean,
|
|
60
|
+
manualUpdate: Boolean
|
|
61
|
+
},
|
|
62
|
+
data() {
|
|
63
|
+
return {
|
|
64
|
+
lastArea: 0
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
watch: {
|
|
68
|
+
group(t) {
|
|
69
|
+
this.chart.group = t;
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
created() {
|
|
73
|
+
this.initOptionsWatcher(), x.forEach((t) => {
|
|
74
|
+
this.$watch(
|
|
75
|
+
t,
|
|
76
|
+
() => {
|
|
77
|
+
this.refresh();
|
|
78
|
+
},
|
|
79
|
+
{ deep: !0 }
|
|
80
|
+
);
|
|
81
|
+
}), E.forEach((t) => {
|
|
82
|
+
this.$watch(t, () => {
|
|
83
|
+
this.initOptionsWatcher(), this.refresh();
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
mounted() {
|
|
88
|
+
this.options && this.init();
|
|
89
|
+
},
|
|
90
|
+
activated() {
|
|
91
|
+
this.autoResize && this.chart && this.chart.resize();
|
|
92
|
+
},
|
|
93
|
+
destroyed() {
|
|
94
|
+
this.chart && this.destroy();
|
|
95
|
+
},
|
|
96
|
+
methods: {
|
|
97
|
+
mergeOptions(t, e, i) {
|
|
98
|
+
this.manualUpdate && (this.manualOptions = t), this.chart ? this.delegateMethod("setOption", t, e, i) : this.init(t);
|
|
99
|
+
},
|
|
100
|
+
appendData(t) {
|
|
101
|
+
this.delegateMethod("appendData", t);
|
|
102
|
+
},
|
|
103
|
+
resize(t) {
|
|
104
|
+
this.delegateMethod("resize", t);
|
|
105
|
+
},
|
|
106
|
+
dispatchAction(t) {
|
|
107
|
+
this.delegateMethod("dispatchAction", t);
|
|
108
|
+
},
|
|
109
|
+
convertToPixel(t, e) {
|
|
110
|
+
return this.delegateMethod("convertToPixel", t, e);
|
|
111
|
+
},
|
|
112
|
+
convertFromPixel(t, e) {
|
|
113
|
+
return this.delegateMethod("convertFromPixel", t, e);
|
|
114
|
+
},
|
|
115
|
+
containPixel(t, e) {
|
|
116
|
+
return this.delegateMethod("containPixel", t, e);
|
|
117
|
+
},
|
|
118
|
+
showLoading(t, e) {
|
|
119
|
+
this.delegateMethod("showLoading", t, e);
|
|
120
|
+
},
|
|
121
|
+
hideLoading() {
|
|
122
|
+
this.delegateMethod("hideLoading");
|
|
123
|
+
},
|
|
124
|
+
getDataURL(t) {
|
|
125
|
+
return this.delegateMethod("getDataURL", t);
|
|
126
|
+
},
|
|
127
|
+
getConnectedDataURL(t) {
|
|
128
|
+
return this.delegateMethod("getConnectedDataURL", t);
|
|
129
|
+
},
|
|
130
|
+
clear() {
|
|
131
|
+
this.delegateMethod("clear");
|
|
132
|
+
},
|
|
133
|
+
dispose() {
|
|
134
|
+
this.delegateMethod("dispose");
|
|
135
|
+
},
|
|
136
|
+
delegateMethod(t, ...e) {
|
|
137
|
+
return this.chart || this.init(), this.chart[t](...e);
|
|
138
|
+
},
|
|
139
|
+
delegateGet(t) {
|
|
140
|
+
return this.chart || this.init(), this.chart[t]();
|
|
141
|
+
},
|
|
142
|
+
getArea() {
|
|
143
|
+
return this.$el.offsetWidth * this.$el.offsetHeight;
|
|
144
|
+
},
|
|
145
|
+
init(t) {
|
|
146
|
+
if (this.chart)
|
|
147
|
+
return;
|
|
148
|
+
const e = s.init(this.$el, this.theme, this.initOptions);
|
|
149
|
+
this.group && (e.group = this.group), e.setOption(t || this.manualOptions || this.options || {}, !0), Object.keys(this.$listeners).forEach((i) => {
|
|
150
|
+
const r = this.$listeners[i];
|
|
151
|
+
i.indexOf("zr:") === 0 ? e.getZr().on(i.slice(3), r) : e.on(i, r);
|
|
152
|
+
}), this.autoResize && (this.lastArea = this.getArea(), this.__resizeHandler = M(
|
|
153
|
+
() => {
|
|
154
|
+
this.lastArea === 0 ? (this.mergeOptions({}, !0), this.resize(), this.mergeOptions(this.options || this.manualOptions || {}, !0)) : this.resize(), this.lastArea = this.getArea();
|
|
155
|
+
},
|
|
156
|
+
100,
|
|
157
|
+
{ leading: !0 }
|
|
158
|
+
), y(this.$el, this.__resizeHandler)), Object.defineProperties(this, {
|
|
159
|
+
width: {
|
|
160
|
+
configurable: !0,
|
|
161
|
+
get: () => this.delegateGet("getWidth")
|
|
162
|
+
},
|
|
163
|
+
height: {
|
|
164
|
+
configurable: !0,
|
|
165
|
+
get: () => this.delegateGet("getHeight")
|
|
166
|
+
},
|
|
167
|
+
isDisposed: {
|
|
168
|
+
configurable: !0,
|
|
169
|
+
get: () => !!this.delegateGet("isDisposed")
|
|
170
|
+
},
|
|
171
|
+
computedOptions: {
|
|
172
|
+
configurable: !0,
|
|
173
|
+
get: () => this.delegateGet("getOption")
|
|
174
|
+
}
|
|
175
|
+
}), this.chart = e;
|
|
176
|
+
},
|
|
177
|
+
initOptionsWatcher() {
|
|
178
|
+
this.__unwatchOptions && (this.__unwatchOptions(), this.__unwatchOptions = null), this.manualUpdate || (this.__unwatchOptions = this.$watch(
|
|
179
|
+
"options",
|
|
180
|
+
(t, e) => {
|
|
181
|
+
!this.chart && t ? this.init() : this.chart.setOption(t, t !== e);
|
|
182
|
+
},
|
|
183
|
+
{ deep: !this.watchShallow }
|
|
184
|
+
));
|
|
185
|
+
},
|
|
186
|
+
destroy() {
|
|
187
|
+
this.autoResize && z(this.$el, this.__resizeHandler), this.dispose(), this.chart = null;
|
|
188
|
+
},
|
|
189
|
+
refresh() {
|
|
190
|
+
this.chart && (this.destroy(), this.init());
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
connect(t) {
|
|
194
|
+
R(t) || (t = t.map((e) => e.chart)), s.connect(t);
|
|
195
|
+
},
|
|
196
|
+
disconnect(t) {
|
|
197
|
+
s.disConnect(t);
|
|
198
|
+
},
|
|
199
|
+
getMap(t) {
|
|
200
|
+
return s.getMap(t);
|
|
201
|
+
},
|
|
202
|
+
registerMap(t, e, i) {
|
|
203
|
+
s.registerMap(t, e, i);
|
|
204
|
+
},
|
|
205
|
+
registerTheme(t, e) {
|
|
206
|
+
s.registerTheme(t, e);
|
|
207
|
+
},
|
|
208
|
+
graphic: s.graphic
|
|
209
|
+
}, h = {};
|
|
210
|
+
var b = /* @__PURE__ */ v(
|
|
211
|
+
$,
|
|
212
|
+
S,
|
|
213
|
+
L,
|
|
214
|
+
!1,
|
|
215
|
+
A,
|
|
216
|
+
null,
|
|
217
|
+
null,
|
|
218
|
+
null
|
|
219
|
+
);
|
|
220
|
+
function A(t) {
|
|
221
|
+
for (let e in h)
|
|
222
|
+
this[e] = h[e];
|
|
223
|
+
}
|
|
224
|
+
const H = /* @__PURE__ */ function() {
|
|
225
|
+
return b.exports;
|
|
226
|
+
}();
|
|
227
|
+
export {
|
|
228
|
+
H as default
|
|
229
|
+
};
|
|
@@ -1 +1,141 @@
|
|
|
1
|
-
import{n as
|
|
1
|
+
import { n as r } from "../../chunks/6499de3a.js";
|
|
2
|
+
var l = function() {
|
|
3
|
+
var e = this, t = e.$createElement, s = e._self._c || t;
|
|
4
|
+
return s("div", {
|
|
5
|
+
staticClass: "editable-progress",
|
|
6
|
+
on: {
|
|
7
|
+
mouseover: e.onMouseOver,
|
|
8
|
+
mousedown: e.onMouseDown,
|
|
9
|
+
mouseleave: e.onMouseLeave,
|
|
10
|
+
click: e.wrapperClick
|
|
11
|
+
}
|
|
12
|
+
}, [s("ElProgress", {
|
|
13
|
+
directives: [{
|
|
14
|
+
name: "show",
|
|
15
|
+
rawName: "v-show",
|
|
16
|
+
value: !e.slider,
|
|
17
|
+
expression: "!slider"
|
|
18
|
+
}],
|
|
19
|
+
class: e.percent === 100 ? "progress__success" : "",
|
|
20
|
+
attrs: {
|
|
21
|
+
"stroke-width": e.strokeWidth,
|
|
22
|
+
"text-inside": "",
|
|
23
|
+
percentage: e.percent
|
|
24
|
+
}
|
|
25
|
+
}), e.disabled ? e._e() : s("ElSlider", {
|
|
26
|
+
directives: [{
|
|
27
|
+
name: "show",
|
|
28
|
+
rawName: "v-show",
|
|
29
|
+
value: e.slider,
|
|
30
|
+
expression: "slider"
|
|
31
|
+
}],
|
|
32
|
+
ref: "slider",
|
|
33
|
+
style: {
|
|
34
|
+
width: `${e.max === 100 ? 100 : e.max - 1}%`
|
|
35
|
+
},
|
|
36
|
+
attrs: {
|
|
37
|
+
"tooltip-class": e.tooltipClass,
|
|
38
|
+
max: e.max,
|
|
39
|
+
"format-tooltip": e.formatTooltip,
|
|
40
|
+
disabled: e.disabled,
|
|
41
|
+
step: e.step
|
|
42
|
+
},
|
|
43
|
+
on: {
|
|
44
|
+
input: e.onInput,
|
|
45
|
+
change: e.onChange
|
|
46
|
+
},
|
|
47
|
+
model: {
|
|
48
|
+
value: e.percent,
|
|
49
|
+
callback: function(i) {
|
|
50
|
+
e.percent = i;
|
|
51
|
+
},
|
|
52
|
+
expression: "percent"
|
|
53
|
+
}
|
|
54
|
+
})], 1);
|
|
55
|
+
}, n = [];
|
|
56
|
+
const a = {
|
|
57
|
+
name: "EditableProgress",
|
|
58
|
+
props: {
|
|
59
|
+
disabled: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: !1
|
|
62
|
+
},
|
|
63
|
+
strokeWidth: {
|
|
64
|
+
type: Number,
|
|
65
|
+
default: 22
|
|
66
|
+
},
|
|
67
|
+
step: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 10
|
|
70
|
+
},
|
|
71
|
+
max: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 100
|
|
74
|
+
},
|
|
75
|
+
value: {
|
|
76
|
+
type: Number,
|
|
77
|
+
default: 0
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
data() {
|
|
81
|
+
return {
|
|
82
|
+
slider: !1,
|
|
83
|
+
mouseDown: !1,
|
|
84
|
+
tooltipClass: "hide-tooltip",
|
|
85
|
+
percent: this.value
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
watch: {
|
|
89
|
+
value(e) {
|
|
90
|
+
this.percent !== e && (this.percent = e);
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
formatTooltip(e) {
|
|
95
|
+
return `${e}%`;
|
|
96
|
+
},
|
|
97
|
+
onInput(e) {
|
|
98
|
+
this.value !== e && this.$emit("input", e);
|
|
99
|
+
},
|
|
100
|
+
onChange(e) {
|
|
101
|
+
this.slider = !1, this.tooltipClass = "hide-tooltip", this.$emit("change", e);
|
|
102
|
+
},
|
|
103
|
+
onMouseOver() {
|
|
104
|
+
this.disabled || this.slider || (this.slider = !0, this.$nextTick(() => {
|
|
105
|
+
this.$refs.slider.$refs.button1.$refs.tooltip.updatePopper(), this.tooltipClass = "";
|
|
106
|
+
}));
|
|
107
|
+
},
|
|
108
|
+
onMouseDown() {
|
|
109
|
+
this.disabled || (this.mouseDown = !0, window.addEventListener("mouseup", this.onMouseUp));
|
|
110
|
+
},
|
|
111
|
+
onMouseUp() {
|
|
112
|
+
this.disabled || (this.mouseDown = !1, this.tooltipClass = "hide-tooltip", window.removeEventListener("mouseup", this.onMouseUp));
|
|
113
|
+
},
|
|
114
|
+
onMouseLeave() {
|
|
115
|
+
this.disabled || this.mouseDown || (this.tooltipClass = "hide-tooltip", this.slider = !1);
|
|
116
|
+
},
|
|
117
|
+
wrapperClick() {
|
|
118
|
+
this.disabled || (this.slider = !0);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}, o = {};
|
|
122
|
+
var u = /* @__PURE__ */ r(
|
|
123
|
+
a,
|
|
124
|
+
l,
|
|
125
|
+
n,
|
|
126
|
+
!1,
|
|
127
|
+
d,
|
|
128
|
+
null,
|
|
129
|
+
null,
|
|
130
|
+
null
|
|
131
|
+
);
|
|
132
|
+
function d(e) {
|
|
133
|
+
for (let t in o)
|
|
134
|
+
this[t] = o[t];
|
|
135
|
+
}
|
|
136
|
+
const h = /* @__PURE__ */ function() {
|
|
137
|
+
return u.exports;
|
|
138
|
+
}();
|
|
139
|
+
export {
|
|
140
|
+
h as default
|
|
141
|
+
};
|