@web-utils/component 3.0.2 → 3.0.4
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 +14 -14
- package/chat/index.mjs +39 -40
- package/chunk-file-uploader/index.mjs +35 -594
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/FormTemp.d079292b.mjs +139 -0
- package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
- package/chunks/detail.d6f8e347.mjs +29 -0
- package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
- package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
- package/chunks/form-input-mixin.78a567bc.mjs +24 -0
- package/chunks/form-item-mixin.57cb2019.mjs +140 -0
- package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
- package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
- package/chunks/input-number-mixin.41a066be.mjs +60 -0
- package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
- package/count-up/index.mjs +17 -14
- package/data-box/index.mjs +18 -19
- package/data-display/index.mjs +17 -18
- package/data-icons/index.mjs +16 -17
- package/data-panel/index.mjs +20 -21
- package/data-pay/index.mjs +15 -16
- package/data-progress/index.mjs +19 -20
- package/data-rotate/index.mjs +35 -36
- package/data-table-picker/index.mjs +23 -25
- package/data-tabs/index.mjs +15 -16
- package/dialog-form/index.mjs +24 -28
- package/dynamic-table/index.mjs +34 -35
- package/easy-popup/index.mjs +56 -29
- package/editable-tree/index.mjs +485 -134
- package/element-dialog/index.mjs +127 -37
- package/empty-view/index.mjs +31 -13
- 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 +40 -105
- package/flow-designer/index.mjs +555 -615
- package/flow-node/index.mjs +47 -15
- package/flow-viewer/index.mjs +78 -167
- package/form-cascader/index.mjs +24 -24
- package/form-checkbox-group/index.mjs +35 -79
- package/form-date-picker/index.mjs +22 -22
- package/form-holder/index.mjs +1 -1
- package/form-input/index.mjs +86 -28
- package/form-input-email/index.mjs +18 -18
- package/form-input-id-card/index.mjs +27 -27
- package/form-input-number/index.mjs +59 -219
- package/form-input-phone-number/index.mjs +27 -27
- package/form-input-tag/index.mjs +38 -160
- package/form-input-time/index.mjs +16 -16
- package/form-item/index.mjs +146 -15
- package/form-item-group/index.mjs +164 -14
- package/form-radio-group/index.mjs +41 -41
- package/form-select/index.mjs +20 -20
- package/form-switch/index.mjs +19 -19
- package/form-textarea/index.mjs +29 -29
- package/form-view/index.mjs +42 -46
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +15 -15
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +2821 -210
- package/fy-date/index.mjs +59 -17
- package/fy-draggable/index.mjs +1 -1
- package/fy-dynamic/index.mjs +208 -64
- package/fy-empty/index.mjs +29 -12
- package/fy-form/index.mjs +743 -178
- package/fy-form-design/index.mjs +1013 -1540
- package/fy-input/index.mjs +105 -17
- package/fy-input-color/index.mjs +67 -16
- package/fy-input-icon/index.mjs +119 -23
- package/fy-input-map/index.mjs +14 -15
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +19 -21
- package/fy-input-tree/index.mjs +3 -3
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +50 -16
- package/fy-select/index.mjs +126 -29
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +51 -15
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +23 -25
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +2 -2
- package/highlight-j-s/index.mjs +29 -19
- package/icon-temp/index.mjs +30 -12
- package/iframe-window/index.mjs +18 -19
- package/image-cropper/index.mjs +22 -23
- package/image-preview/index.mjs +1 -1
- package/input-number/index.mjs +173 -63
- package/license/index.mjs +1 -1
- package/loading-view/index.mjs +33 -15
- package/login/index.mjs +1 -1
- package/nav-bar/index.mjs +31 -15
- package/package.json +1 -1
- package/page/index.mjs +20 -12
- package/page-header/index.mjs +34 -13
- package/page-index-top/index.mjs +53 -100
- package/page-skeleton/index.mjs +35 -18
- package/page-skeleton-new/index.mjs +15 -16
- package/pageable-table/index.mjs +228 -86
- package/pageable-view/index.mjs +1 -1
- package/present-view/index.mjs +71 -75
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +29 -21
- package/search/index.mjs +9 -9
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/split-pane/index.mjs +45 -40
- package/swiper/index.mjs +13 -14
- package/table-view/index.mjs +97 -631
- package/text-ellipsis/index.mjs +1 -1
- package/tinymce-editor/index.mjs +63 -63
- package/toolbar/index.mjs +208 -15
- package/toolbar-button/index.mjs +56 -30
- package/verify/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +118 -49
- package/chunks/CountUp.f1a19f35.mjs +0 -124
- package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
- package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
- package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
- package/chunks/ElementDialog.d8f3105c.mjs +0 -211
- package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
- package/chunks/EmptyView.e2430422.mjs +0 -51
- package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
- package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
- package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
- package/chunks/FormItem.2920ac0c.mjs +0 -45
- package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
- package/chunks/FormItemGroup.41daddb6.mjs +0 -64
- package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
- package/chunks/FyCurd.8acd2983.mjs +0 -548
- package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
- package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
- package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
- package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
- package/chunks/FyForm.0294e494.mjs +0 -439
- package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
- package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
- package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
- package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
- package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
- package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
- package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
- package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
- package/chunks/IconTemp.42c48e1f.mjs +0 -32
- package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
- package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
- package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
- package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
- package/chunks/Page.81f4b8d9.mjs +0 -32
- package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
- package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
- package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
- package/chunks/PageableTable.333cbdc1.mjs +0 -335
- package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
- package/chunks/ResizeObserver.60f728f0.mjs +0 -54
- package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
- package/chunks/TableColumn.8503272e.mjs +0 -106
- package/chunks/Toolbar.5c539dbb.mjs +0 -24
- package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
- package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
- package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import r from "element-ui/lib/date-picker";
|
|
2
|
-
var s = function() {
|
|
3
|
-
var e = this, t = e.$createElement, a = e._self._c || t;
|
|
4
|
-
return a("div", {
|
|
5
|
-
staticClass: "avue-date"
|
|
6
|
-
}, [a(r, {
|
|
7
|
-
attrs: {
|
|
8
|
-
type: e.type,
|
|
9
|
-
"popper-class": e.popperClass,
|
|
10
|
-
size: e.size,
|
|
11
|
-
editable: e.editable,
|
|
12
|
-
"unlink-panels": e.unlinkPanels,
|
|
13
|
-
readonly: e.readonly,
|
|
14
|
-
"default-value": e.defaultValue,
|
|
15
|
-
"default-time": e.defaultTime,
|
|
16
|
-
"range-separator": e.rangeSeparator,
|
|
17
|
-
"start-placeholder": e.startPlaceholder || "开始",
|
|
18
|
-
"end-placeholder": e.endPlaceholder || "结束",
|
|
19
|
-
format: e.format,
|
|
20
|
-
clearable: e.clearableVal,
|
|
21
|
-
"picker-options": e.pickerOptions,
|
|
22
|
-
"value-format": e.valueFormat,
|
|
23
|
-
placeholder: e.placeholder,
|
|
24
|
-
disabled: e.disabled
|
|
25
|
-
},
|
|
26
|
-
on: {
|
|
27
|
-
blur: e.handleBlur,
|
|
28
|
-
focus: e.handleFocus
|
|
29
|
-
},
|
|
30
|
-
nativeOn: {
|
|
31
|
-
click: function(l) {
|
|
32
|
-
return e.handleClick.apply(null, arguments);
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
model: {
|
|
36
|
-
value: e.text,
|
|
37
|
-
callback: function(l) {
|
|
38
|
-
e.text = l;
|
|
39
|
-
},
|
|
40
|
-
expression: "text"
|
|
41
|
-
}
|
|
42
|
-
})], 1);
|
|
43
|
-
}, o = [];
|
|
44
|
-
export {
|
|
45
|
-
s as r,
|
|
46
|
-
o as s
|
|
47
|
-
};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import l from "element-ui/lib/button";
|
|
2
|
-
import { _ as s } from "./FyCurd.8acd2983.mjs";
|
|
3
|
-
import { _ as c } from "./FyForm.0294e494.mjs";
|
|
4
|
-
function d(e) {
|
|
5
|
-
if (e == null)
|
|
6
|
-
throw new TypeError("Cannot destructure " + e);
|
|
7
|
-
}
|
|
8
|
-
var v = function() {
|
|
9
|
-
var e = this, o = e.$createElement, n = e._self._c || o;
|
|
10
|
-
return n("div", {
|
|
11
|
-
key: e.reload,
|
|
12
|
-
staticClass: "avue-dynamic"
|
|
13
|
-
}, [e.isForm ? [n("div", {
|
|
14
|
-
staticClass: "avue-dynamic__header"
|
|
15
|
-
}, [!e.readonly && !e.disabled && !e.addBtn ? n(l, {
|
|
16
|
-
attrs: {
|
|
17
|
-
size: "mini",
|
|
18
|
-
circle: "",
|
|
19
|
-
disabled: e.disabled,
|
|
20
|
-
type: "primary",
|
|
21
|
-
icon: "el-icon-plus"
|
|
22
|
-
},
|
|
23
|
-
on: {
|
|
24
|
-
click: e.addRow
|
|
25
|
-
}
|
|
26
|
-
}) : e._e()], 1), n("div", e._l(e.text, function(r, t) {
|
|
27
|
-
return n("div", {
|
|
28
|
-
key: t,
|
|
29
|
-
staticClass: "avue-dynamic__row",
|
|
30
|
-
on: {
|
|
31
|
-
mouseenter: function(i) {
|
|
32
|
-
return e.cellMouseenter({
|
|
33
|
-
$index: t
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
mouseleave: function(i) {
|
|
37
|
-
return e.cellMouseLeave({
|
|
38
|
-
$index: t
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}, [!e.readonly && !e.disabled && !e.delBtn && e.hoverList[t] ? n(l, {
|
|
43
|
-
staticClass: "avue-dynamic__menu",
|
|
44
|
-
attrs: {
|
|
45
|
-
type: "danger",
|
|
46
|
-
size: "mini",
|
|
47
|
-
disabled: e.disabled,
|
|
48
|
-
icon: "el-icon-delete",
|
|
49
|
-
circle: ""
|
|
50
|
-
},
|
|
51
|
-
on: {
|
|
52
|
-
click: function(i) {
|
|
53
|
-
return e.delRow(r.$index);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}) : e._e(), n(c, {
|
|
57
|
-
key: t,
|
|
58
|
-
ref: "main",
|
|
59
|
-
refInFor: !0,
|
|
60
|
-
attrs: {
|
|
61
|
-
option: e.deepClone(e.option)
|
|
62
|
-
},
|
|
63
|
-
scopedSlots: e._u([{
|
|
64
|
-
key: "_index",
|
|
65
|
-
fn: function(i) {
|
|
66
|
-
return d(i), [n("div", [n("span", [e._v(e._s(r.$index + 1))])])];
|
|
67
|
-
}
|
|
68
|
-
}, e._l(e.columnSlot, function(i) {
|
|
69
|
-
return {
|
|
70
|
-
key: i,
|
|
71
|
-
fn: function(a) {
|
|
72
|
-
return [e._t(i, null, null, Object.assign(a, {
|
|
73
|
-
row: e.text[t]
|
|
74
|
-
}))];
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
})], null, !0),
|
|
78
|
-
model: {
|
|
79
|
-
value: e.text[t],
|
|
80
|
-
callback: function(i) {
|
|
81
|
-
e.$set(e.text, t, i);
|
|
82
|
-
},
|
|
83
|
-
expression: "text[index]"
|
|
84
|
-
}
|
|
85
|
-
})], 1);
|
|
86
|
-
}), 0)] : e.isCrud ? n(s, {
|
|
87
|
-
ref: "main",
|
|
88
|
-
attrs: {
|
|
89
|
-
option: e.option,
|
|
90
|
-
disabled: e.disabled,
|
|
91
|
-
data: e.text
|
|
92
|
-
},
|
|
93
|
-
on: {
|
|
94
|
-
"cell-mouse-enter": e.cellMouseenter,
|
|
95
|
-
"cell-mouse-leave": e.cellMouseLeave,
|
|
96
|
-
"selection-change": e.handleSelectionChange,
|
|
97
|
-
"sortable-change": e.handleSortableChange
|
|
98
|
-
},
|
|
99
|
-
scopedSlots: e._u([{
|
|
100
|
-
key: "_indexHeader",
|
|
101
|
-
fn: function() {
|
|
102
|
-
return [!(e.addBtn || e.readonly) && e.maxFlag ? n(l, {
|
|
103
|
-
attrs: {
|
|
104
|
-
type: "primary",
|
|
105
|
-
size: "mini",
|
|
106
|
-
disabled: e.disabled,
|
|
107
|
-
icon: "el-icon-plus",
|
|
108
|
-
circle: ""
|
|
109
|
-
},
|
|
110
|
-
on: {
|
|
111
|
-
click: function(r) {
|
|
112
|
-
return e.addRow();
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}) : e._e()];
|
|
116
|
-
},
|
|
117
|
-
proxy: !0
|
|
118
|
-
}, {
|
|
119
|
-
key: "_index",
|
|
120
|
-
fn: function(r) {
|
|
121
|
-
return [!e.readonly && !e.disabled && !e.delBtn && e.hoverList[r.row.$index] ? n(l, {
|
|
122
|
-
attrs: {
|
|
123
|
-
type: "danger",
|
|
124
|
-
size: "mini",
|
|
125
|
-
disabled: e.disabled,
|
|
126
|
-
icon: "el-icon-delete",
|
|
127
|
-
circle: ""
|
|
128
|
-
},
|
|
129
|
-
on: {
|
|
130
|
-
click: function(t) {
|
|
131
|
-
return e.delRow(r.row.$index);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}) : n("div", [e._v(" " + e._s(r.row.$index + 1) + " ")])];
|
|
135
|
-
}
|
|
136
|
-
}, e._l(e.columnSlot, function(r) {
|
|
137
|
-
return {
|
|
138
|
-
key: e.getSlotName({
|
|
139
|
-
prop: r
|
|
140
|
-
}, "F"),
|
|
141
|
-
fn: function(t) {
|
|
142
|
-
return [e._t(r, null, null, t)];
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
})], null, !0)
|
|
146
|
-
}) : e._e()], 2);
|
|
147
|
-
}, p = [];
|
|
148
|
-
export {
|
|
149
|
-
v as r,
|
|
150
|
-
p as s
|
|
151
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var a = function() {
|
|
2
|
-
var e = this, s = e.$createElement, t = e._self._c || s;
|
|
3
|
-
return t("div", {
|
|
4
|
-
staticClass: "avue-empty"
|
|
5
|
-
}, [t("div", {
|
|
6
|
-
staticClass: "avue-empty__image",
|
|
7
|
-
style: {
|
|
8
|
-
height: e.setPx(e.size)
|
|
9
|
-
}
|
|
10
|
-
}, [t("img", {
|
|
11
|
-
attrs: {
|
|
12
|
-
src: e.image,
|
|
13
|
-
alt: ""
|
|
14
|
-
}
|
|
15
|
-
})]), t("p", {
|
|
16
|
-
staticClass: "avue-empty__desc"
|
|
17
|
-
}, [e._v(" " + e._s(e.desc) + " ")]), e._t("default")], 2);
|
|
18
|
-
}, _ = [];
|
|
19
|
-
export {
|
|
20
|
-
a as r,
|
|
21
|
-
_ as s
|
|
22
|
-
};
|
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
var c = (i, t, e) => new Promise((a, o) => {
|
|
2
|
-
var n = (s) => {
|
|
3
|
-
try {
|
|
4
|
-
r(e.next(s));
|
|
5
|
-
} catch (f) {
|
|
6
|
-
o(f);
|
|
7
|
-
}
|
|
8
|
-
}, h = (s) => {
|
|
9
|
-
try {
|
|
10
|
-
r(e.throw(s));
|
|
11
|
-
} catch (f) {
|
|
12
|
-
o(f);
|
|
13
|
-
}
|
|
14
|
-
}, r = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(n, h);
|
|
15
|
-
r((e = e.apply(i, t)).next());
|
|
16
|
-
});
|
|
17
|
-
import { s as b, r as O, F as $, a as y, b as D, d as v, m as C } from "./FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs";
|
|
18
|
-
import { i as F } from "./init.f0a03127.mjs";
|
|
19
|
-
import { s as p, d as u, u as g, a as E, g as k, f as d, D as x, o as P, c as V } from "./util.7844e2c2.mjs";
|
|
20
|
-
import { c as _, a as T, g as w, b as j, f as L } from "./dataformat.816df805.mjs";
|
|
21
|
-
import { s as B } from "./dic.3b4ba802.mjs";
|
|
22
|
-
import { isBlank as l } from "@web-utils/core";
|
|
23
|
-
import { n as I } from "./vueComponentNormalizer.446f5dc4.mjs";
|
|
24
|
-
const S = {
|
|
25
|
-
name: "FyForm",
|
|
26
|
-
components: { FormTemp: $, FyFormMenu: y, FormGroup: D },
|
|
27
|
-
mixins: [F],
|
|
28
|
-
provide() {
|
|
29
|
-
return {
|
|
30
|
-
formSafe: this
|
|
31
|
-
};
|
|
32
|
-
},
|
|
33
|
-
props: {
|
|
34
|
-
uploadBefore: Function,
|
|
35
|
-
uploadAfter: Function,
|
|
36
|
-
uploadDelete: Function,
|
|
37
|
-
uploadPreview: Function,
|
|
38
|
-
uploadError: Function,
|
|
39
|
-
uploadExceed: Function,
|
|
40
|
-
status: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: !1
|
|
43
|
-
},
|
|
44
|
-
isCrud: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: !1
|
|
47
|
-
},
|
|
48
|
-
value: {
|
|
49
|
-
type: Object,
|
|
50
|
-
required: !0,
|
|
51
|
-
default: () => ({})
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
activeName: "",
|
|
57
|
-
labelWidth: 90,
|
|
58
|
-
allDisabled: !1,
|
|
59
|
-
optionIndex: [],
|
|
60
|
-
optionBox: !1,
|
|
61
|
-
tableOption: {},
|
|
62
|
-
itemSpanDefault: 12,
|
|
63
|
-
form: {},
|
|
64
|
-
formCreate: !1,
|
|
65
|
-
formList: [],
|
|
66
|
-
formBind: {}
|
|
67
|
-
};
|
|
68
|
-
},
|
|
69
|
-
computed: {
|
|
70
|
-
columnSlot() {
|
|
71
|
-
return Object.keys(this.$scopedSlots).filter((i) => !this.propOption.map((t) => t.prop).includes(i));
|
|
72
|
-
},
|
|
73
|
-
labelSuffix() {
|
|
74
|
-
return this.parentOption.labelSuffix || ":";
|
|
75
|
-
},
|
|
76
|
-
isMenu() {
|
|
77
|
-
return this.columnOption.length !== 1;
|
|
78
|
-
},
|
|
79
|
-
isDetail() {
|
|
80
|
-
return this.detail === !0;
|
|
81
|
-
},
|
|
82
|
-
isTabs() {
|
|
83
|
-
return this.parentOption.tabs === !0;
|
|
84
|
-
},
|
|
85
|
-
isAdd() {
|
|
86
|
-
return this.boxType === "add";
|
|
87
|
-
},
|
|
88
|
-
isEdit() {
|
|
89
|
-
return this.boxType === "edit";
|
|
90
|
-
},
|
|
91
|
-
isView() {
|
|
92
|
-
return this.boxType === "view";
|
|
93
|
-
},
|
|
94
|
-
gutter() {
|
|
95
|
-
return p((this.parentOption.gutter || 10) / 2);
|
|
96
|
-
},
|
|
97
|
-
detail() {
|
|
98
|
-
return this.parentOption.detail;
|
|
99
|
-
},
|
|
100
|
-
disabled() {
|
|
101
|
-
return this.parentOption.disabled;
|
|
102
|
-
},
|
|
103
|
-
readonly() {
|
|
104
|
-
return this.parentOption.readonly;
|
|
105
|
-
},
|
|
106
|
-
tabsType() {
|
|
107
|
-
return this.parentOption.tabsType;
|
|
108
|
-
},
|
|
109
|
-
columnLen() {
|
|
110
|
-
return this.columnOption.length;
|
|
111
|
-
},
|
|
112
|
-
dynamicOption() {
|
|
113
|
-
const i = [];
|
|
114
|
-
return this.propOption.forEach((t) => {
|
|
115
|
-
t.type === "dynamic" && this.vaildDisplay(t) && i.push(t);
|
|
116
|
-
}), i;
|
|
117
|
-
},
|
|
118
|
-
propOption() {
|
|
119
|
-
const i = [];
|
|
120
|
-
return this.columnOption.forEach((t) => {
|
|
121
|
-
t.display !== !1 && t.column.forEach((e) => {
|
|
122
|
-
i.push(e);
|
|
123
|
-
});
|
|
124
|
-
}), i;
|
|
125
|
-
},
|
|
126
|
-
parentOption() {
|
|
127
|
-
return this.tableOption || {};
|
|
128
|
-
},
|
|
129
|
-
columnOption() {
|
|
130
|
-
const i = this.tableOption.column || [], t = u(this.tableOption.group) || [], e = this.tableOption.footer || [];
|
|
131
|
-
return t.unshift({
|
|
132
|
-
header: !1,
|
|
133
|
-
column: i
|
|
134
|
-
}), e.length !== 0 && t.push({
|
|
135
|
-
header: !1,
|
|
136
|
-
column: e
|
|
137
|
-
}), t.forEach((a) => {
|
|
138
|
-
a.column = a.column || [], a.column.forEach((o, n) => {
|
|
139
|
-
o.display !== !1 && !this.isMobile && (o = _(o, this.itemSpanDefault, n === 0));
|
|
140
|
-
}), a.column = T(a.column), a.column = a.column.sort((o, n) => (n.order || 0) - (o.order || 0));
|
|
141
|
-
}), t;
|
|
142
|
-
},
|
|
143
|
-
menuPosition: function() {
|
|
144
|
-
return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center";
|
|
145
|
-
},
|
|
146
|
-
boxType: function() {
|
|
147
|
-
return this.parentOption.boxType;
|
|
148
|
-
},
|
|
149
|
-
isPrint() {
|
|
150
|
-
return this.parentOption.printBtn === !0;
|
|
151
|
-
},
|
|
152
|
-
tabsActive() {
|
|
153
|
-
return this.tableOption.tabsActive || "1";
|
|
154
|
-
},
|
|
155
|
-
isMock() {
|
|
156
|
-
return this.parentOption.mockBtn === !0;
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
watch: {
|
|
160
|
-
value: {
|
|
161
|
-
handler() {
|
|
162
|
-
this.formCreate && this.setForm();
|
|
163
|
-
},
|
|
164
|
-
deep: !0
|
|
165
|
-
},
|
|
166
|
-
form: {
|
|
167
|
-
handler() {
|
|
168
|
-
this.formCreate && (this.setLabel(), this.setVal());
|
|
169
|
-
},
|
|
170
|
-
deep: !0
|
|
171
|
-
},
|
|
172
|
-
tabsActive: {
|
|
173
|
-
handler() {
|
|
174
|
-
this.activeName = this.tabsActive;
|
|
175
|
-
},
|
|
176
|
-
immediate: !0
|
|
177
|
-
},
|
|
178
|
-
DIC: {
|
|
179
|
-
handler() {
|
|
180
|
-
this.setLabel();
|
|
181
|
-
},
|
|
182
|
-
deep: !0,
|
|
183
|
-
immediate: !0
|
|
184
|
-
},
|
|
185
|
-
allDisabled: {
|
|
186
|
-
handler(i) {
|
|
187
|
-
this.$emit("update:status", i);
|
|
188
|
-
},
|
|
189
|
-
deep: !0,
|
|
190
|
-
immediate: !0
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
mounted() {
|
|
194
|
-
setTimeout(() => {
|
|
195
|
-
this.dataFormat();
|
|
196
|
-
});
|
|
197
|
-
},
|
|
198
|
-
beforeDestroy() {
|
|
199
|
-
Object.keys(this.formBind).forEach((i) => {
|
|
200
|
-
this.formBind[i].forEach((t) => {
|
|
201
|
-
t();
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
},
|
|
205
|
-
methods: {
|
|
206
|
-
setPx: p,
|
|
207
|
-
deepClone: u,
|
|
208
|
-
getComponent: w,
|
|
209
|
-
getPlaceholder: j,
|
|
210
|
-
uploadFun: g,
|
|
211
|
-
getDisabled(i) {
|
|
212
|
-
return this.vaildDetail(i) || this.isDetail || this.vaildDisabled(i) || this.allDisabled;
|
|
213
|
-
},
|
|
214
|
-
getSpan(i) {
|
|
215
|
-
return i.span || this.parentOption.span || this.itemSpanDefault;
|
|
216
|
-
},
|
|
217
|
-
isGroupShow(i, t) {
|
|
218
|
-
return this.isTabs ? `${t}` === this.activeName || t === 0 : !0;
|
|
219
|
-
},
|
|
220
|
-
// 初始化表单
|
|
221
|
-
dataFormat() {
|
|
222
|
-
const i = L(this.propOption).tableForm, t = this.value, e = {};
|
|
223
|
-
Object.entries(Object.assign(i, t)).forEach((a) => {
|
|
224
|
-
const o = a[0], n = a[1];
|
|
225
|
-
l(t[o]) ? e[o] = n : e[o] = t[o];
|
|
226
|
-
}), this.$set(this, "form", e), this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
|
|
227
|
-
this.formCreate = !0, this.clearValidate();
|
|
228
|
-
});
|
|
229
|
-
},
|
|
230
|
-
setControl() {
|
|
231
|
-
this.propOption.forEach((i) => {
|
|
232
|
-
const t = i.prop, e = i.bind, a = i.control;
|
|
233
|
-
if (!this.formBind[t]) {
|
|
234
|
-
const o = [];
|
|
235
|
-
if (e) {
|
|
236
|
-
const n = this.$watch(`form.${t}`, (r, s) => {
|
|
237
|
-
r !== s && E(this.form, e, r);
|
|
238
|
-
}), h = this.$watch(`form.${e}`, (r, s) => {
|
|
239
|
-
r !== s && this.$set(this.form, t, r);
|
|
240
|
-
});
|
|
241
|
-
o.push(n), o.push(h), this.$set(this.form, t, k(this.form, e));
|
|
242
|
-
}
|
|
243
|
-
if (a) {
|
|
244
|
-
const n = () => {
|
|
245
|
-
const r = a(this.form[i.prop], this.form) || {};
|
|
246
|
-
Object.keys(r).forEach((s) => {
|
|
247
|
-
const f = Object.assign(this.objectOption[s] || {}, r[s]);
|
|
248
|
-
this.$set(this.objectOption, s, f), r[s].dicData && (this.DIC[s] = r[s].dicData);
|
|
249
|
-
});
|
|
250
|
-
}, h = this.$watch(`form.${t}`, () => {
|
|
251
|
-
n();
|
|
252
|
-
});
|
|
253
|
-
o.push(h), n();
|
|
254
|
-
}
|
|
255
|
-
this.formBind[t] = o;
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
},
|
|
259
|
-
setForm() {
|
|
260
|
-
Object.keys(this.value).forEach((i) => {
|
|
261
|
-
this.$set(this.form, i, this.value[i]);
|
|
262
|
-
});
|
|
263
|
-
},
|
|
264
|
-
setVal() {
|
|
265
|
-
this.$emit("input", this.form), this.$emit("change", this.form);
|
|
266
|
-
},
|
|
267
|
-
setLabel() {
|
|
268
|
-
this.tableOption.filterNull === !0 && (this.form = d(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = d(this.form, ["$"], !1) : this.propOption.forEach((i) => {
|
|
269
|
-
const t = this.DIC[i.prop];
|
|
270
|
-
if (l(t))
|
|
271
|
-
return;
|
|
272
|
-
const e = v(this.form, i, this.tableOption, t);
|
|
273
|
-
e ? this.$set(this.form, `$${i.prop}`, e) : this.$delete(this.form, `$${i.prop}`);
|
|
274
|
-
});
|
|
275
|
-
},
|
|
276
|
-
handleGroupClick(i) {
|
|
277
|
-
this.$emit("tab-click", i);
|
|
278
|
-
},
|
|
279
|
-
handleTabClick(i, t) {
|
|
280
|
-
this.$emit("tab-click", i, t);
|
|
281
|
-
},
|
|
282
|
-
getLabelWidth(i, t) {
|
|
283
|
-
let e;
|
|
284
|
-
return l(i.labelWidth) ? l(t.labelWidth) ? e = this.parentOption.labelWidth : e = t.labelWidth : e = i.labelWidth, p(e, this.labelWidth);
|
|
285
|
-
},
|
|
286
|
-
// 对部分表单字段进行校验的方法
|
|
287
|
-
validateField(i) {
|
|
288
|
-
return this.$refs.form.validateField(i);
|
|
289
|
-
},
|
|
290
|
-
validTip(i) {
|
|
291
|
-
return !i.tip || i.type === "upload";
|
|
292
|
-
},
|
|
293
|
-
getPropRef(i) {
|
|
294
|
-
return this.$refs[i][0];
|
|
295
|
-
},
|
|
296
|
-
handleChange(i, t) {
|
|
297
|
-
this.$nextTick(() => {
|
|
298
|
-
const e = t.cascader, a = e.join(",");
|
|
299
|
-
e.forEach((o) => {
|
|
300
|
-
const n = o, h = this.form[t.prop], r = this.findObject(i, n);
|
|
301
|
-
l(r) || (this.formList.includes(a) && e.forEach((s) => {
|
|
302
|
-
this.form[s] = "", this.$set(this.DIC, s, []);
|
|
303
|
-
}), !(l(e) || l(h) || l(r)) && B({
|
|
304
|
-
column: r,
|
|
305
|
-
value: h,
|
|
306
|
-
form: this.form
|
|
307
|
-
}).then((s) => {
|
|
308
|
-
this.formList.includes(a) || this.formList.push(a);
|
|
309
|
-
const f = s || [];
|
|
310
|
-
this.$set(this.DIC, n, f), !l(f) && !l(f) && !l(r.cascaderIndex) && l(this.form[n]) && (this.form[n] = f[r.cascaderIndex][(r.props || {}).value || x.value]);
|
|
311
|
-
}));
|
|
312
|
-
});
|
|
313
|
-
});
|
|
314
|
-
},
|
|
315
|
-
handlePrint() {
|
|
316
|
-
this.$Print(this.$el);
|
|
317
|
-
},
|
|
318
|
-
propChange(i, t) {
|
|
319
|
-
t.cascader && this.handleChange(i, t);
|
|
320
|
-
},
|
|
321
|
-
handleMock() {
|
|
322
|
-
this.isMock && (this.columnOption.forEach((i) => {
|
|
323
|
-
const t = C(i.column, this.DIC, this.form, this.isMock);
|
|
324
|
-
l(t) || Object.keys(t).forEach((e) => {
|
|
325
|
-
this.form[e] = t[e];
|
|
326
|
-
});
|
|
327
|
-
}), this.$nextTick(() => {
|
|
328
|
-
this.clearValidate(), this.$emit("mock-change", this.form);
|
|
329
|
-
}));
|
|
330
|
-
},
|
|
331
|
-
vaildDetail(i) {
|
|
332
|
-
let t;
|
|
333
|
-
if (this.detail)
|
|
334
|
-
return !1;
|
|
335
|
-
if (!l(i.detail))
|
|
336
|
-
t = "detail";
|
|
337
|
-
else if (this.isAdd)
|
|
338
|
-
t = "addDetail";
|
|
339
|
-
else if (this.isEdit)
|
|
340
|
-
t = "editDetail";
|
|
341
|
-
else if (this.isView)
|
|
342
|
-
return !1;
|
|
343
|
-
return t ? i[t] === !0 : !1;
|
|
344
|
-
},
|
|
345
|
-
// 验证表单是否禁止
|
|
346
|
-
vaildDisabled(i) {
|
|
347
|
-
let t;
|
|
348
|
-
if (this.disabled)
|
|
349
|
-
return !0;
|
|
350
|
-
if (!l(i.disabled))
|
|
351
|
-
t = "disabled";
|
|
352
|
-
else if (this.isAdd)
|
|
353
|
-
t = "addDisabled";
|
|
354
|
-
else if (this.isEdit)
|
|
355
|
-
t = "editDisabled";
|
|
356
|
-
else if (this.isView)
|
|
357
|
-
return !0;
|
|
358
|
-
return t ? i[t] === !0 : !1;
|
|
359
|
-
},
|
|
360
|
-
// 验证表单是否显隐
|
|
361
|
-
vaildDisplay(i) {
|
|
362
|
-
let t;
|
|
363
|
-
return l(i.display) ? this.isAdd ? t = "addDisplay" : this.isEdit ? t = "editDisplay" : this.isView && (t = "viewDisplay") : t = "display", t ? P(i[t], !0) : !0;
|
|
364
|
-
},
|
|
365
|
-
clearValidate(i) {
|
|
366
|
-
return c(this, null, function* () {
|
|
367
|
-
var t;
|
|
368
|
-
(t = this.$refs.form) == null || t.clearValidate(i);
|
|
369
|
-
});
|
|
370
|
-
},
|
|
371
|
-
validateCellForm() {
|
|
372
|
-
return new Promise((i) => {
|
|
373
|
-
this.$refs.form.validate((t, e) => {
|
|
374
|
-
i(e);
|
|
375
|
-
});
|
|
376
|
-
});
|
|
377
|
-
},
|
|
378
|
-
validate(i) {
|
|
379
|
-
this.$refs.form.validate((t, e) => {
|
|
380
|
-
const a = [], o = [], n = {};
|
|
381
|
-
this.dynamicOption.forEach((h) => {
|
|
382
|
-
const r = h.children.type === "form";
|
|
383
|
-
o.push(h.prop), r ? l(this.$refs[h.prop][0].$refs.temp.$refs.main) || this.$refs[h.prop][0].$refs.temp.$refs.main.forEach((s) => {
|
|
384
|
-
a.push(s.validateCellForm());
|
|
385
|
-
}) : a.push(this.$refs[h.prop][0].$refs.temp.$refs.main.validateCellForm());
|
|
386
|
-
}), Promise.all(a).then((h) => {
|
|
387
|
-
h.forEach((s, f) => {
|
|
388
|
-
l(s) || (n[o[f]] = s);
|
|
389
|
-
});
|
|
390
|
-
const r = Object.assign(n, e);
|
|
391
|
-
l(r) ? (this.show(), i(!0, this.hide)) : i(!1, this.hide, r);
|
|
392
|
-
});
|
|
393
|
-
});
|
|
394
|
-
},
|
|
395
|
-
resetForm(i = !0) {
|
|
396
|
-
if (i) {
|
|
397
|
-
const t = this.propOption.map((e) => e.prop);
|
|
398
|
-
this.form = V(this.form, t, (this.tableOption.filterParams || []).concat([this.rowKey]));
|
|
399
|
-
}
|
|
400
|
-
this.$nextTick(() => {
|
|
401
|
-
this.clearValidate(), this.$emit("reset-change");
|
|
402
|
-
});
|
|
403
|
-
},
|
|
404
|
-
resetFields() {
|
|
405
|
-
this.$refs.form.resetFields();
|
|
406
|
-
},
|
|
407
|
-
show() {
|
|
408
|
-
this.allDisabled = !0;
|
|
409
|
-
},
|
|
410
|
-
hide() {
|
|
411
|
-
this.allDisabled = !1;
|
|
412
|
-
},
|
|
413
|
-
submit() {
|
|
414
|
-
this.validate((i, t) => {
|
|
415
|
-
i ? this.$emit("submit", d(this.form, ["$"]), this.hide) : this.$emit("error", t);
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}, m = {};
|
|
420
|
-
var A = /* @__PURE__ */ I(
|
|
421
|
-
S,
|
|
422
|
-
O,
|
|
423
|
-
b,
|
|
424
|
-
!1,
|
|
425
|
-
M,
|
|
426
|
-
null,
|
|
427
|
-
null,
|
|
428
|
-
null
|
|
429
|
-
);
|
|
430
|
-
function M(i) {
|
|
431
|
-
for (let t in m)
|
|
432
|
-
this[t] = m[t];
|
|
433
|
-
}
|
|
434
|
-
const J = /* @__PURE__ */ function() {
|
|
435
|
-
return A.exports;
|
|
436
|
-
}();
|
|
437
|
-
export {
|
|
438
|
-
J as _
|
|
439
|
-
};
|