@web-utils/component 4.0.15 → 4.0.16
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 +13 -15
- package/card/index.mjs +18 -20
- package/carousel/index.mjs +10 -12
- package/chat/index.mjs +45 -56
- package/chunk-file-uploader/index.mjs +36 -378
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/ElementBaseInfo.ZADwixb5.mjs +125 -0
- package/chunks/ElementForm.CQ3PN5qj.mjs +223 -0
- package/chunks/ElementListeners.De_PRuIm.mjs +215 -0
- package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +181 -0
- package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
- package/chunks/ElementProperties.CosfDrlW.mjs +112 -0
- package/chunks/{ElementTaskConfig.AvBOzAni.mjs → ElementTaskConfig.Bko0kgTp.mjs} +55 -63
- package/chunks/FlowCondition.Y6qEYi1T.mjs +102 -0
- package/chunks/FormTemp.BQxO5IQq.mjs +123 -0
- package/chunks/SignalAndMessage.Bb5PFX0N.mjs +85 -0
- package/chunks/UserTaskListeners.Bv3BDfEI.mjs +169 -0
- package/chunks/{confirmable-mixin.BFZb6pcK.mjs → confirmable-mixin.B2TtLAdk.mjs} +1 -1
- package/chunks/core.0Exl13Mz.mjs +54 -0
- package/chunks/{dataformat.DJoNBlmI.mjs → dataformat.CpqOeGBl.mjs} +6 -6
- package/chunks/{dic.BinnDitI.mjs → dic.Dkl-leRW.mjs} +9 -9
- package/chunks/dictionary.DGt59Ir7.mjs +68 -0
- package/chunks/{event.DSlcqYHL.mjs → event.9aDS6jcw.mjs} +2 -2
- package/chunks/{form-input.BtS_J5a2.mjs → form-input.CvFdwlEV.mjs} +2 -2
- package/chunks/form-item.LWjePsPa.mjs +233 -0
- package/chunks/{index.CIfe3UB3.mjs → index.9OxHjTIE.mjs} +2 -2
- package/chunks/{index.Cn7aq-Et.mjs → index.B2TRddqf.mjs} +8 -8
- package/chunks/{init.xOlFpTyZ.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{util.DI42t5GU.mjs → util.DqFv_pWg.mjs} +22 -22
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/chunks/utils.DRcxC1Fb.mjs +60 -0
- package/color-picker/index.mjs +22 -101
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/data-box/index.mjs +12 -15
- package/data-card/index.mjs +10 -12
- package/data-card-text/index.mjs +10 -12
- package/data-display/index.mjs +15 -17
- package/data-icons/index.mjs +13 -16
- package/data-imgtext/index.mjs +15 -18
- package/data-operatext/index.mjs +14 -16
- package/data-panel/index.mjs +13 -16
- package/data-pay/index.mjs +16 -20
- package/data-price/index.mjs +14 -16
- package/data-progress/index.mjs +13 -17
- package/data-rotate/index.mjs +12 -15
- package/data-table-picker/index.mjs +15 -18
- package/data-tabs/index.mjs +12 -15
- package/dialog-form/index.mjs +16 -18
- package/dynamic-table/index.mjs +25 -30
- package/editable-progress/index.mjs +9 -11
- package/editable-tree/index.mjs +52 -56
- package/egd-collapse-item/index.mjs +9 -9
- package/element-dialog/index.mjs +22 -23
- package/element-listeners/style.css +1 -0
- package/element-multi-instance/style.css +1 -0
- 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 +10 -11
- package/flow-designer/index.mjs +699 -1973
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +9 -9
- package/form-block/index.mjs +32 -34
- package/form-cascader/index.mjs +23 -24
- package/form-checkbox/index.mjs +16 -17
- package/form-checkbox-group/index.mjs +20 -23
- package/form-date-picker/index.mjs +18 -20
- package/form-holder/index.mjs +13 -14
- package/form-input/index.mjs +14 -15
- package/form-input-cron-expression/index.mjs +19 -22
- package/form-input-email/index.mjs +15 -16
- package/form-input-id-card/index.mjs +12 -13
- package/form-input-number/index.mjs +16 -17
- package/form-input-phone-number/index.mjs +21 -22
- package/form-input-tag/index.mjs +14 -15
- package/form-input-time/index.mjs +14 -15
- package/form-item/index.mjs +140 -3
- package/form-item-group/index.mjs +28 -31
- package/form-radio-group/index.mjs +27 -28
- package/form-select/index.mjs +21 -23
- package/form-switch/index.mjs +16 -17
- package/form-table/index.mjs +16 -17
- package/form-table-plus/index.mjs +21 -22
- package/form-textarea/index.mjs +15 -16
- package/form-tree-select/index.mjs +14 -15
- package/form-tree-select-multiple/index.mjs +14 -15
- package/form-view/index.mjs +35 -39
- package/fy-array/index.mjs +33 -37
- package/fy-cascader/index.mjs +16 -17
- package/fy-checkbox/index.mjs +11 -13
- package/fy-code/index.mjs +10 -10
- package/fy-curd/index.mjs +1128 -1152
- package/fy-date/index.mjs +10 -11
- package/fy-draggable/index.mjs +9 -10
- package/fy-dynamic/index.mjs +22 -25
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +638 -15
- package/fy-form-design/index.mjs +1307 -1345
- package/fy-from/crud/zh.d.ts +6 -6
- package/fy-input/index.mjs +12 -14
- package/fy-input-color/index.mjs +13 -15
- package/fy-input-icon/index.mjs +20 -23
- package/fy-input-map/index.mjs +28 -31
- package/fy-input-number/index.mjs +9 -10
- package/fy-input-table/index.mjs +18 -22
- package/fy-input-tree/index.mjs +33 -37
- package/fy-progress/index.mjs +9 -10
- package/fy-radio/index.mjs +15 -16
- package/fy-rate/index.mjs +10 -11
- package/fy-select/index.mjs +25 -29
- package/fy-slider/index.mjs +11 -12
- package/fy-switch/index.mjs +9 -10
- package/fy-tabs/index.mjs +15 -17
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +18 -24
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +74 -76
- package/guide-steps/index.mjs +11 -13
- package/iframe-window/index.mjs +9 -10
- package/image-cropper/index.mjs +28 -30
- package/image-preview/index.mjs +12 -14
- package/index.mjs +72 -72
- package/input-number/index.mjs +13 -14
- package/input-number-range/index.mjs +11 -12
- package/license/index.mjs +1 -1
- package/login/index.mjs +21 -26
- package/nav-bar/index.mjs +9 -10
- package/notice/index.mjs +9 -10
- package/package.json +1 -1
- package/page-index/index.mjs +12 -13
- package/page-index-top/index.mjs +23 -28
- package/page-skeleton/index.mjs +14 -14
- package/page-skeleton-new/index.mjs +8 -9
- package/pageable-table/index.mjs +172 -182
- package/pageable-view/index.mjs +15 -16
- package/picker-table-view/index.mjs +49 -58
- package/present-view/index.mjs +35 -39
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +20 -22
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/skeleton-panel/index.mjs +9 -10
- package/split-pane/index.mjs +36 -37
- package/static-pageable-table/index.mjs +11 -13
- package/sub-table/index.mjs +36 -49
- package/sub-table-plus/index.mjs +229 -18
- package/swiper/index.mjs +11 -12
- package/table-column/index.mjs +223 -3
- package/table-view/index.mjs +52 -60
- package/tabs-view/index.mjs +17 -19
- package/tag-render/index.mjs +16 -18
- package/text-ellipsis/index.mjs +9 -10
- package/toolbar/index.mjs +13 -14
- package/toolbar-button/index.mjs +13 -14
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +259 -267
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +21 -24
- package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
- package/chunks/FyForm.DriwCJ7b.mjs +0 -765
- package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
- package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
- package/chunks/TableColumn.BzivvXMF.mjs +0 -337
package/watermark/index.mjs
CHANGED
package/web-types.json
CHANGED
package/x-input-tag/index.mjs
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import u from "element-ui/lib/tag";
|
|
4
|
-
import { n as l } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
-
const o = {
|
|
1
|
+
import { n } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
2
|
+
const l = {
|
|
6
3
|
name: "XInputTag",
|
|
7
4
|
inject: {
|
|
8
5
|
elForm: {
|
|
@@ -48,9 +45,9 @@ const o = {
|
|
|
48
45
|
},
|
|
49
46
|
tags: {
|
|
50
47
|
get() {
|
|
51
|
-
var
|
|
48
|
+
var a, t;
|
|
52
49
|
if (this.arrayMode)
|
|
53
|
-
return (
|
|
50
|
+
return (a = this.value) != null && a.length ? this.objectMode ? this.value.map((e) => e.id > 0 ? e : { ...e, id: Math.random() }) : this.value : [];
|
|
54
51
|
{
|
|
55
52
|
const e = ((t = this.value) == null ? void 0 : t.split(this.separator)) || [];
|
|
56
53
|
return e.length && e[0] ? e.map((s) => this.objectMode ? { name: s, id: Math.random() } : s) : [];
|
|
@@ -62,8 +59,8 @@ const o = {
|
|
|
62
59
|
async showInput() {
|
|
63
60
|
this.inputVisible = !0, await this.$nextTick(), this.$refs.saveTagInput.$refs.input.focus();
|
|
64
61
|
},
|
|
65
|
-
handleClose(
|
|
66
|
-
const t = this.tags.filter((e) => e !==
|
|
62
|
+
handleClose(a) {
|
|
63
|
+
const t = this.tags.filter((e) => e !== a);
|
|
67
64
|
this.$emit("input", this.arrayMode ? t : t.map((e) => e.name || e).join(this.separator));
|
|
68
65
|
},
|
|
69
66
|
async handleInputConfirm() {
|
|
@@ -72,9 +69,9 @@ const o = {
|
|
|
72
69
|
this.$message.warning({ message: "标签已达上限,请删除一些标签再添加!", showClose: !0 }), this.inputVisible = !1, this.inputValue = "";
|
|
73
70
|
return;
|
|
74
71
|
}
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
if (this.tags.some((s) => (s.name || s) ===
|
|
72
|
+
const a = this.inputValue;
|
|
73
|
+
if (a) {
|
|
74
|
+
if (this.tags.some((s) => (s.name || s) === a)) {
|
|
78
75
|
this.inputVisible = !1, this.inputValue = "", this.$message.warning({ message: "标签已存在!", showClose: !0 });
|
|
79
76
|
return;
|
|
80
77
|
}
|
|
@@ -85,26 +82,26 @@ const o = {
|
|
|
85
82
|
}
|
|
86
83
|
}
|
|
87
84
|
};
|
|
88
|
-
var
|
|
85
|
+
var r = function() {
|
|
89
86
|
var t = this, e = t._self._c;
|
|
90
|
-
return e("div", { staticClass: "x-input-tag" }, [t.tags && t.tags.length && t.tags[0] ? t._l(t.tags, function(s,
|
|
91
|
-
return e(
|
|
92
|
-
return t.handleClose(s,
|
|
87
|
+
return e("div", { staticClass: "x-input-tag" }, [t.tags && t.tags.length && t.tags[0] ? t._l(t.tags, function(s, i) {
|
|
88
|
+
return e("ElTag", { key: s.id || s, attrs: { size: "medium", "disable-transitions": "", closable: !t.inputDisabled }, on: { close: function(p) {
|
|
89
|
+
return t.handleClose(s, i);
|
|
93
90
|
} } }, [t._v(" " + t._s(s.name || s) + " ")]);
|
|
94
|
-
}) : t.inputDisabled ? [e("span", { staticStyle: { color: "#b5b5b5" } }, [t._v("无")])] : t._e(), t.inputDisabled ? t._e() : e(
|
|
91
|
+
}) : t.inputDisabled ? [e("span", { staticStyle: { color: "#b5b5b5" } }, [t._v("无")])] : t._e(), t.inputDisabled ? t._e() : e("ElInput", { directives: [{ name: "show", rawName: "v-show", value: t.inputVisible, expression: "inputVisible" }], ref: "saveTagInput", staticClass: "input-new-tag", attrs: { size: "mini" }, on: { blur: t.handleInputConfirm }, nativeOn: { keyup: function(s) {
|
|
95
92
|
return !s.type.indexOf("key") && t._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : t.handleInputConfirm.apply(null, arguments);
|
|
96
93
|
} }, model: { value: t.inputValue, callback: function(s) {
|
|
97
94
|
t.inputValue = s;
|
|
98
|
-
}, expression: "inputValue" } }), !t.inputDisabled && !t.inputVisible ? e(
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
}, expression: "inputValue" } }), !t.inputDisabled && !t.inputVisible ? e("ElButton", { directives: [{ name: "show", rawName: "v-show", value: t.tags.length < t.maxTag, expression: "tags.length < maxTag" }], staticClass: "button-new-tag", attrs: { size: "mini" }, on: { click: t.showInput } }, [t._v(" + 添加 ")]) : t._e(), t.count ? e("span", { staticClass: "tags-count" }, [t._v(t._s(t.tags.length && t.tags[0] ? t.tags.length : ""))]) : t._e()], 2);
|
|
96
|
+
}, u = [], o = /* @__PURE__ */ n(
|
|
97
|
+
l,
|
|
98
|
+
r,
|
|
99
|
+
u,
|
|
103
100
|
!1,
|
|
104
101
|
null,
|
|
105
102
|
null
|
|
106
103
|
);
|
|
107
|
-
const
|
|
104
|
+
const d = o.exports;
|
|
108
105
|
export {
|
|
109
|
-
|
|
106
|
+
d as default
|
|
110
107
|
};
|
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
import K from "element-ui/lib/col";
|
|
2
|
-
import $ from "element-ui/lib/form-item";
|
|
3
|
-
import z from "element-ui/lib/tooltip";
|
|
4
|
-
import { h as n } from "vue";
|
|
5
|
-
import { e as A, h as I } from "./index.Cn7aq-Et.mjs";
|
|
6
|
-
import { hasOwn as F, isDef as T } from "@web-utils/core";
|
|
7
|
-
import { n as G } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
8
|
-
const D = ["span"], O = A(K), J = O.filter((e) => !D.includes(e)), Q = ["label", "prop", "rules", "labelWidth", "required"], H = A($), U = H.filter((e) => !Q.includes(e)), X = [
|
|
9
|
-
"wrapCol",
|
|
10
|
-
"wrapFormItem",
|
|
11
|
-
"unwrap",
|
|
12
|
-
"prefixConfig",
|
|
13
|
-
"block",
|
|
14
|
-
"prefixPick",
|
|
15
|
-
"picker",
|
|
16
|
-
"half",
|
|
17
|
-
"tips",
|
|
18
|
-
"hideLabel",
|
|
19
|
-
"fixedSpan",
|
|
20
|
-
...O,
|
|
21
|
-
...H
|
|
22
|
-
], q = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth", "hideRequiredAsterisk", "$emit", "validate", "clearValidate"], Y = ["$emit", "validate", "clearValidate"], Z = {
|
|
23
|
-
name: "FormInput",
|
|
24
|
-
inject: {
|
|
25
|
-
elForm: {
|
|
26
|
-
default: {}
|
|
27
|
-
},
|
|
28
|
-
formItemGroup: {
|
|
29
|
-
default: {}
|
|
30
|
-
},
|
|
31
|
-
formHolder: {
|
|
32
|
-
default: {}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
provide() {
|
|
36
|
-
return {
|
|
37
|
-
elForm: this.proxyForm,
|
|
38
|
-
formItemGroup: this
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
props: {
|
|
42
|
-
/**
|
|
43
|
-
* 是否作为内嵌使用
|
|
44
|
-
*/
|
|
45
|
-
embed: Boolean,
|
|
46
|
-
/**
|
|
47
|
-
* 是否禁用
|
|
48
|
-
*/
|
|
49
|
-
disabled: Boolean,
|
|
50
|
-
/**
|
|
51
|
-
* 是否固定栏数
|
|
52
|
-
*/
|
|
53
|
-
fixedSpan: Number,
|
|
54
|
-
/**
|
|
55
|
-
* 是否被列组件包裹
|
|
56
|
-
*/
|
|
57
|
-
wrapCol: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: !0
|
|
60
|
-
},
|
|
61
|
-
/**
|
|
62
|
-
* 是否被表单项组件包裹
|
|
63
|
-
*/
|
|
64
|
-
wrapFormItem: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: !0
|
|
67
|
-
},
|
|
68
|
-
/**
|
|
69
|
-
* 是否不用列组件包裹
|
|
70
|
-
*/
|
|
71
|
-
unwrap: Boolean,
|
|
72
|
-
/**
|
|
73
|
-
* 是否占一半宽度
|
|
74
|
-
*/
|
|
75
|
-
half: Boolean,
|
|
76
|
-
/**
|
|
77
|
-
* placeholder 添加"配置"前缀
|
|
78
|
-
*/
|
|
79
|
-
prefixConfig: Boolean,
|
|
80
|
-
/**
|
|
81
|
-
* placeholder 添加"添加"前缀
|
|
82
|
-
*/
|
|
83
|
-
prefixAdd: Boolean,
|
|
84
|
-
/**
|
|
85
|
-
* placeholder 添加"选择"前缀
|
|
86
|
-
*/
|
|
87
|
-
prefixPick: Boolean,
|
|
88
|
-
/**
|
|
89
|
-
* 是否占满一行
|
|
90
|
-
*/
|
|
91
|
-
block: Boolean,
|
|
92
|
-
/**
|
|
93
|
-
* 表单项组件样式
|
|
94
|
-
*/
|
|
95
|
-
formItemClass: String,
|
|
96
|
-
/**
|
|
97
|
-
* 提示信息
|
|
98
|
-
*/
|
|
99
|
-
tips: String,
|
|
100
|
-
/**
|
|
101
|
-
* 校验规则触发方式
|
|
102
|
-
*/
|
|
103
|
-
trigger: {
|
|
104
|
-
type: String,
|
|
105
|
-
default: "blur"
|
|
106
|
-
},
|
|
107
|
-
/**
|
|
108
|
-
* 是否隐藏 label
|
|
109
|
-
*/
|
|
110
|
-
hideLabel: Boolean,
|
|
111
|
-
/**
|
|
112
|
-
* label 占列数
|
|
113
|
-
*/
|
|
114
|
-
labelColspan: [Number, String],
|
|
115
|
-
/**
|
|
116
|
-
* input 占列数
|
|
117
|
-
*/
|
|
118
|
-
inputColspan: [Number, String],
|
|
119
|
-
/**
|
|
120
|
-
* label 占行数
|
|
121
|
-
*/
|
|
122
|
-
labelRowspan: [Number, String],
|
|
123
|
-
/**
|
|
124
|
-
* input 占行数
|
|
125
|
-
*/
|
|
126
|
-
inputRowspan: [Number, String],
|
|
127
|
-
// el-form-item
|
|
128
|
-
prop: String,
|
|
129
|
-
label: String,
|
|
130
|
-
labelWidth: String,
|
|
131
|
-
required: Boolean,
|
|
132
|
-
rules: [Object, Array],
|
|
133
|
-
error: String,
|
|
134
|
-
showMessage: {
|
|
135
|
-
type: Boolean,
|
|
136
|
-
default: !0
|
|
137
|
-
},
|
|
138
|
-
inlineMessage: {
|
|
139
|
-
type: [String, Boolean],
|
|
140
|
-
default: ""
|
|
141
|
-
},
|
|
142
|
-
size: String,
|
|
143
|
-
validateStatus: String,
|
|
144
|
-
for: String,
|
|
145
|
-
// el-col
|
|
146
|
-
span: {
|
|
147
|
-
type: Number,
|
|
148
|
-
default: 12
|
|
149
|
-
},
|
|
150
|
-
offset: Number,
|
|
151
|
-
push: Number,
|
|
152
|
-
pull: Number,
|
|
153
|
-
xs: [Number, Object],
|
|
154
|
-
sm: [Number, Object],
|
|
155
|
-
md: [Number, Object],
|
|
156
|
-
lg: [Number, Object],
|
|
157
|
-
xl: [Number, Object],
|
|
158
|
-
tag: String
|
|
159
|
-
},
|
|
160
|
-
data() {
|
|
161
|
-
const e = {};
|
|
162
|
-
return q.forEach((r) => {
|
|
163
|
-
e[r] = null;
|
|
164
|
-
}), {
|
|
165
|
-
proxyForm: e
|
|
166
|
-
};
|
|
167
|
-
},
|
|
168
|
-
computed: {
|
|
169
|
-
prefix() {
|
|
170
|
-
return this.prefixConfig ? "请配置" : this.prefixPick || this.picker ? "请选择" : this.prefixAdd ? "请添加" : "请输入";
|
|
171
|
-
},
|
|
172
|
-
message() {
|
|
173
|
-
var e;
|
|
174
|
-
return `${this.prefix}${((e = this.label) == null ? void 0 : e.replace(":", "")) || ""}`;
|
|
175
|
-
},
|
|
176
|
-
computeRules() {
|
|
177
|
-
var l;
|
|
178
|
-
const e = [...this.rules || []], r = e.find((t) => t.required);
|
|
179
|
-
if (this.required || r || (l = this.formHolder.requiredFields) != null && l.includes(this.prop)) {
|
|
180
|
-
const t = e.find((m) => m.required);
|
|
181
|
-
t ? t.ref ? t.label = t.label || this.label : t.message = t.message || this.message : e.unshift(this.getRequireRule());
|
|
182
|
-
}
|
|
183
|
-
return e.concat(this.getRules());
|
|
184
|
-
},
|
|
185
|
-
computeSpan() {
|
|
186
|
-
return this.block ? 24 : this.span;
|
|
187
|
-
},
|
|
188
|
-
formItemProps() {
|
|
189
|
-
return I({ ...this.$props, ...this.$attrs }, X);
|
|
190
|
-
},
|
|
191
|
-
elFormItemProps() {
|
|
192
|
-
return I({ ...this.$props, ...this.$attrs }, U);
|
|
193
|
-
},
|
|
194
|
-
elColProps() {
|
|
195
|
-
return I({ ...this.$props, ...this.$attrs }, J);
|
|
196
|
-
},
|
|
197
|
-
formCfg() {
|
|
198
|
-
const e = {
|
|
199
|
-
disabled: this.disabled
|
|
200
|
-
};
|
|
201
|
-
return q.forEach((r) => {
|
|
202
|
-
e[r] = this.elForm[r];
|
|
203
|
-
}), e;
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
watch: {
|
|
207
|
-
computeRules() {
|
|
208
|
-
var e, r;
|
|
209
|
-
(r = (e = this.elForm) == null ? void 0 : e.clearValidate) == null || r.call(e, this.prop);
|
|
210
|
-
},
|
|
211
|
-
formCfg: {
|
|
212
|
-
immediate: !0,
|
|
213
|
-
handler() {
|
|
214
|
-
var e;
|
|
215
|
-
this.proxyForm.disabled = (e = this.formHolder.enabledFields) != null && e.includes(this.prop) ? !1 : (this.elForm || {}).disabled, q.forEach((r) => {
|
|
216
|
-
var l;
|
|
217
|
-
r !== "disabled" && (Y.includes(r) ? this.proxyForm[r] = (l = this.elForm[r]) == null ? void 0 : l.bind(this.elForm) : this.proxyForm[r] = this.elForm[r]);
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
methods: {
|
|
223
|
-
getRules() {
|
|
224
|
-
return [];
|
|
225
|
-
},
|
|
226
|
-
getRequireRule() {
|
|
227
|
-
return {
|
|
228
|
-
required: !0,
|
|
229
|
-
trigger: this.trigger,
|
|
230
|
-
message: this.message
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}, ee = {
|
|
235
|
-
name: "FormItem",
|
|
236
|
-
mixins: [Z],
|
|
237
|
-
inject: {
|
|
238
|
-
formHolder: {
|
|
239
|
-
default: {}
|
|
240
|
-
},
|
|
241
|
-
formItemConfig: {
|
|
242
|
-
default: null
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
computed: {
|
|
246
|
-
gutter() {
|
|
247
|
-
let e = this.$parent;
|
|
248
|
-
for (; e && e.$options.componentName !== "ElRow"; )
|
|
249
|
-
e = e.$parent;
|
|
250
|
-
return (e == null ? void 0 : e.gutter) ?? 0;
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
methods: {
|
|
254
|
-
renderFormItem() {
|
|
255
|
-
var R, v, N, P, S, k, j;
|
|
256
|
-
const {
|
|
257
|
-
hideLabel: e,
|
|
258
|
-
label: r,
|
|
259
|
-
labelWidth: l,
|
|
260
|
-
prop: t,
|
|
261
|
-
rules: m,
|
|
262
|
-
$scopedSlots: i,
|
|
263
|
-
elFormItemProps: o,
|
|
264
|
-
elForm: u,
|
|
265
|
-
formHolder: s,
|
|
266
|
-
formItemClass: c,
|
|
267
|
-
required: f,
|
|
268
|
-
block: h,
|
|
269
|
-
half: b,
|
|
270
|
-
wrapCol: M,
|
|
271
|
-
wrapFormItem: W,
|
|
272
|
-
disabled: V,
|
|
273
|
-
formItemConfig: p,
|
|
274
|
-
getRequireRule: E
|
|
275
|
-
} = this;
|
|
276
|
-
let a = m, d = f, C = f, _ = h, B = M;
|
|
277
|
-
p && (F(p, "block") && (_ = p.block), F(p, "wrapCol") && (B = p.wrapCol));
|
|
278
|
-
const L = s.tableForm ? "" : _ && b && B ? `calc( 50% - ${this.gutter / 2}px)` : "";
|
|
279
|
-
(R = s.requiredFields) != null && R.includes(t) && (d = !0), (V || u != null && u.disabled) && !((v = s.requiredFields) != null && v.includes(t)) ? (a = [], !s.required && !((N = s.requiredFields) != null && N.includes(t)) && (C = !1)) : (!s.required && !((P = s.requiredFields) != null && P.includes(t)) && (d = !1), d && !(a != null && a.length) && t ? a = [E()] : d || (C = !1, a && (a = a.filter((g) => !g.required))));
|
|
280
|
-
const w = (S = i.tips) == null ? void 0 : S.call(i), x = w || this.tips, y = x ? n(z, {
|
|
281
|
-
attrs: {
|
|
282
|
-
effect: "light",
|
|
283
|
-
content: this.tips
|
|
284
|
-
}
|
|
285
|
-
}, [w ? n("div", {
|
|
286
|
-
slot: "content"
|
|
287
|
-
}, [w]) : null, n("i", {
|
|
288
|
-
class: "el-icon-info form-item-input-info"
|
|
289
|
-
})]) : null;
|
|
290
|
-
return W ? n($, {
|
|
291
|
-
style: {
|
|
292
|
-
width: L
|
|
293
|
-
},
|
|
294
|
-
key: `${t}-${d}`,
|
|
295
|
-
class: ["form-item", c, {
|
|
296
|
-
required: C,
|
|
297
|
-
"form-item-hide-label": e
|
|
298
|
-
}],
|
|
299
|
-
scopedSlots: {
|
|
300
|
-
...i,
|
|
301
|
-
default: x ? () => {
|
|
302
|
-
var g;
|
|
303
|
-
return n("div", {
|
|
304
|
-
class: "form-item-input-wrapper"
|
|
305
|
-
}, [(g = i.default) == null ? void 0 : g.call(i), y]);
|
|
306
|
-
} : i.default
|
|
307
|
-
},
|
|
308
|
-
props: {
|
|
309
|
-
...o
|
|
310
|
-
},
|
|
311
|
-
attrs: {
|
|
312
|
-
label: r,
|
|
313
|
-
"label-width": e ? "0" : l,
|
|
314
|
-
prop: t,
|
|
315
|
-
rules: a
|
|
316
|
-
},
|
|
317
|
-
ref: "formItem"
|
|
318
|
-
}) : x ? n("div", {
|
|
319
|
-
class: "form-item-input-wrapper"
|
|
320
|
-
}, [(k = i.default) == null ? void 0 : k.call(i), y]) : n("div", [(j = i.default) == null ? void 0 : j.call(i)]);
|
|
321
|
-
},
|
|
322
|
-
async clearValidate() {
|
|
323
|
-
var e, r;
|
|
324
|
-
await this.$nextTick(), (r = (e = this.$refs.formItem).clearValidate) == null || r.call(e);
|
|
325
|
-
},
|
|
326
|
-
async validate() {
|
|
327
|
-
var e, r;
|
|
328
|
-
await this.$nextTick(), (r = (e = this.$refs.formItem).validate) == null || r.call(e);
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
render() {
|
|
332
|
-
var h, b;
|
|
333
|
-
const {
|
|
334
|
-
computeSpan: e,
|
|
335
|
-
wrapCol: r,
|
|
336
|
-
fixedSpan: l,
|
|
337
|
-
formItemConfig: t,
|
|
338
|
-
renderFormItem: m,
|
|
339
|
-
elColProps: i,
|
|
340
|
-
$scopedSlots: o,
|
|
341
|
-
unwrap: u,
|
|
342
|
-
formHolder: s
|
|
343
|
-
} = this;
|
|
344
|
-
let c = !s.tableForm && r, f = !1;
|
|
345
|
-
return t && (F(t, "wrapCol") && (c = t.wrapCol), F(t, "reactive") && (f = t.reactive)), u ? n("div", [(h = o.default) == null ? void 0 : h.call(o)]) : c ? n(K, {
|
|
346
|
-
props: {
|
|
347
|
-
...i,
|
|
348
|
-
span: l || e,
|
|
349
|
-
...!T(l) && f ? {
|
|
350
|
-
xs: 24,
|
|
351
|
-
sm: 12,
|
|
352
|
-
md: 12,
|
|
353
|
-
lg: 8,
|
|
354
|
-
xl: 6
|
|
355
|
-
} : {}
|
|
356
|
-
}
|
|
357
|
-
}, [m(), (b = o == null ? void 0 : o.below) == null ? void 0 : b.call(o)]) : m();
|
|
358
|
-
}
|
|
359
|
-
}, re = null, te = null;
|
|
360
|
-
var ie = /* @__PURE__ */ G(
|
|
361
|
-
ee,
|
|
362
|
-
re,
|
|
363
|
-
te,
|
|
364
|
-
!1,
|
|
365
|
-
null,
|
|
366
|
-
null
|
|
367
|
-
);
|
|
368
|
-
const fe = ie.exports;
|
|
369
|
-
export {
|
|
370
|
-
fe as F,
|
|
371
|
-
Z as f
|
|
372
|
-
};
|