@web-utils/component 1.2.5 → 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 +2992 -2075
- 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/a125d16c.js +0 -1
- package/dist/chunks/addb6ed5.js +0 -1
- package/dist/chunks/f15477c7.js +0 -1
|
@@ -1 +1,192 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as n } from "../../chunks/86bcadec.js";
|
|
2
|
+
import { f as s } from "../../chunks/a73fe8ee.js";
|
|
3
|
+
import { i as a, n as u } from "../../chunks/2bd4e340.js";
|
|
4
|
+
import { CheckboxGroup as p } from "element-ui";
|
|
5
|
+
import { n as h } from "../../chunks/6499de3a.js";
|
|
6
|
+
var c = function() {
|
|
7
|
+
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
8
|
+
return o("FormItem", e._b({
|
|
9
|
+
class: ["form-checkbox-group", {
|
|
10
|
+
"form-checkbox-group-row": e.fillRow
|
|
11
|
+
}, e.ellipsis ? "form-checkbox-group-row-ellipsis" : e.fillRow ? "form-checkbox-group-row-break-word" : ""],
|
|
12
|
+
attrs: {
|
|
13
|
+
rules: e.computeRules,
|
|
14
|
+
disabled: e.inputDisabled
|
|
15
|
+
},
|
|
16
|
+
scopedSlots: e._u([{
|
|
17
|
+
key: "default",
|
|
18
|
+
fn: function() {
|
|
19
|
+
return [o("ElCheckboxGroup", e._g(e._b({
|
|
20
|
+
attrs: {
|
|
21
|
+
disabled: e.inputDisabled,
|
|
22
|
+
value: e.computeVal,
|
|
23
|
+
placeholder: e.computePlaceholder
|
|
24
|
+
},
|
|
25
|
+
on: {
|
|
26
|
+
input: e.emitInput
|
|
27
|
+
}
|
|
28
|
+
}, "ElCheckboxGroup", e.inputProps, !1), e.listeners), e._l(e.innerOptions, function(t) {
|
|
29
|
+
return o("ElCheckbox", {
|
|
30
|
+
key: t[e.valueKey],
|
|
31
|
+
attrs: {
|
|
32
|
+
label: t[e.valueKey]
|
|
33
|
+
}
|
|
34
|
+
}, [e._v(" " + e._s(t[e.labelKey]) + " ")]);
|
|
35
|
+
}), 1), e.computeVal.includes(e.otherVal) ? o("FormInput", {
|
|
36
|
+
staticClass: "form-checkbox-group-other",
|
|
37
|
+
style: e.otherLabel ? {
|
|
38
|
+
width: e.otherWidth
|
|
39
|
+
} : {
|
|
40
|
+
marginBottom: 0,
|
|
41
|
+
width: e.otherWidth
|
|
42
|
+
},
|
|
43
|
+
attrs: {
|
|
44
|
+
"wrap-col": !1,
|
|
45
|
+
"label-width": "0",
|
|
46
|
+
prop: e.otherProp,
|
|
47
|
+
required: !!e.otherProp,
|
|
48
|
+
placeholder: e.otherPlaceholder,
|
|
49
|
+
label: e.otherLabel,
|
|
50
|
+
"show-message": !!e.otherLabel,
|
|
51
|
+
value: e.other
|
|
52
|
+
},
|
|
53
|
+
on: {
|
|
54
|
+
input: function(t) {
|
|
55
|
+
return e.$emit("update:other", t);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}) : e._e()];
|
|
59
|
+
},
|
|
60
|
+
proxy: !0
|
|
61
|
+
}, {
|
|
62
|
+
key: "error",
|
|
63
|
+
fn: function(t) {
|
|
64
|
+
var i = t.error;
|
|
65
|
+
return [e._t("error", null, {
|
|
66
|
+
error: i
|
|
67
|
+
})];
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
key: "label",
|
|
71
|
+
fn: function() {
|
|
72
|
+
return [e._t("label")];
|
|
73
|
+
},
|
|
74
|
+
proxy: !0
|
|
75
|
+
}, {
|
|
76
|
+
key: "below",
|
|
77
|
+
fn: function() {
|
|
78
|
+
return [e._t("below")];
|
|
79
|
+
},
|
|
80
|
+
proxy: !0
|
|
81
|
+
}], null, !0)
|
|
82
|
+
}, "FormItem", e.formItemProps, !1));
|
|
83
|
+
}, f = [];
|
|
84
|
+
const m = Object.keys(p.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), d = {
|
|
85
|
+
name: "FormCheckboxGroup",
|
|
86
|
+
mixins: [n, s],
|
|
87
|
+
props: {
|
|
88
|
+
options: {
|
|
89
|
+
type: Array,
|
|
90
|
+
default: () => []
|
|
91
|
+
},
|
|
92
|
+
value: {
|
|
93
|
+
type: [String, Array]
|
|
94
|
+
},
|
|
95
|
+
other: {
|
|
96
|
+
type: String
|
|
97
|
+
},
|
|
98
|
+
otherVal: {
|
|
99
|
+
type: String
|
|
100
|
+
},
|
|
101
|
+
otherProp: {
|
|
102
|
+
type: String
|
|
103
|
+
},
|
|
104
|
+
otherPlaceholder: {
|
|
105
|
+
type: String
|
|
106
|
+
},
|
|
107
|
+
otherLabel: {
|
|
108
|
+
type: String
|
|
109
|
+
},
|
|
110
|
+
otherWidth: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "200px"
|
|
113
|
+
},
|
|
114
|
+
gender: Boolean,
|
|
115
|
+
confirm: Boolean,
|
|
116
|
+
labelProp: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: "name"
|
|
119
|
+
},
|
|
120
|
+
valueProp: {
|
|
121
|
+
type: String,
|
|
122
|
+
default: "code"
|
|
123
|
+
},
|
|
124
|
+
split: Boolean,
|
|
125
|
+
classic: Boolean,
|
|
126
|
+
fillRow: Boolean,
|
|
127
|
+
ellipsis: Boolean
|
|
128
|
+
},
|
|
129
|
+
computed: {
|
|
130
|
+
prefix() {
|
|
131
|
+
return "\u8BF7\u9009\u62E9";
|
|
132
|
+
},
|
|
133
|
+
labelKey() {
|
|
134
|
+
return this.classic ? "label" : this.labelProp;
|
|
135
|
+
},
|
|
136
|
+
valueKey() {
|
|
137
|
+
return this.classic ? "value" : this.valueProp;
|
|
138
|
+
},
|
|
139
|
+
inputProps() {
|
|
140
|
+
return a({ ...u(this.$attrs), ...this.$props }, m);
|
|
141
|
+
},
|
|
142
|
+
innerOptions() {
|
|
143
|
+
return this.gender ? [
|
|
144
|
+
{
|
|
145
|
+
[this.labelKey]: "\u7537",
|
|
146
|
+
[this.valueKey]: "\u7537"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
[this.labelKey]: "\u5973",
|
|
150
|
+
[this.valueKey]: "\u5973"
|
|
151
|
+
}
|
|
152
|
+
] : this.confirm ? [
|
|
153
|
+
{
|
|
154
|
+
[this.labelKey]: "\u662F",
|
|
155
|
+
[this.valueKey]: "\u662F"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
[this.labelKey]: "\u5426",
|
|
159
|
+
[this.valueKey]: "\u5426"
|
|
160
|
+
}
|
|
161
|
+
] : this.options;
|
|
162
|
+
},
|
|
163
|
+
computeVal() {
|
|
164
|
+
return this.split ? this.value ? this.value.split(",") : [] : this.value || [];
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
methods: {
|
|
168
|
+
emitInput(e) {
|
|
169
|
+
this.split ? this.$emit("input", e.join(",")) : this.$emit("input", e);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}, l = {};
|
|
173
|
+
var b = /* @__PURE__ */ h(
|
|
174
|
+
d,
|
|
175
|
+
c,
|
|
176
|
+
f,
|
|
177
|
+
!1,
|
|
178
|
+
y,
|
|
179
|
+
null,
|
|
180
|
+
null,
|
|
181
|
+
null
|
|
182
|
+
);
|
|
183
|
+
function y(e) {
|
|
184
|
+
for (let r in l)
|
|
185
|
+
this[r] = l[r];
|
|
186
|
+
}
|
|
187
|
+
const P = /* @__PURE__ */ function() {
|
|
188
|
+
return b.exports;
|
|
189
|
+
}();
|
|
190
|
+
export {
|
|
191
|
+
P as default
|
|
192
|
+
};
|
|
@@ -1 +1,182 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as o } from "../../chunks/86bcadec.js";
|
|
2
|
+
import { f as l } from "../../chunks/a73fe8ee.js";
|
|
3
|
+
import { toDate as n } from "@web-utils/core";
|
|
4
|
+
import { i as m, n as u } from "../../chunks/2bd4e340.js";
|
|
5
|
+
import { n as p } from "../../chunks/6499de3a.js";
|
|
6
|
+
var h = function() {
|
|
7
|
+
var e = this, t = e.$createElement, r = e._self._c || t;
|
|
8
|
+
return r("FormItem", e._b({
|
|
9
|
+
attrs: {
|
|
10
|
+
rules: e.computeRules,
|
|
11
|
+
disabled: e.inputDisabled
|
|
12
|
+
},
|
|
13
|
+
scopedSlots: e._u([{
|
|
14
|
+
key: "default",
|
|
15
|
+
fn: function() {
|
|
16
|
+
return [r("ElDatePicker", e._g(e._b({
|
|
17
|
+
staticStyle: {
|
|
18
|
+
width: "100%"
|
|
19
|
+
},
|
|
20
|
+
attrs: {
|
|
21
|
+
"picker-options": e.pickerOption,
|
|
22
|
+
value: e.innerVal,
|
|
23
|
+
size: "mini",
|
|
24
|
+
placeholder: e.computePlaceholder,
|
|
25
|
+
type: e.type,
|
|
26
|
+
disabled: e.inputDisabled
|
|
27
|
+
},
|
|
28
|
+
on: {
|
|
29
|
+
input: e.emitInput
|
|
30
|
+
}
|
|
31
|
+
}, "ElDatePicker", e.inputProps, !1), e.listeners)), e.$slots.warn ? r("div", {
|
|
32
|
+
staticClass: "el-form-item__warn"
|
|
33
|
+
}, [e._t("warn")], 2) : e._e()];
|
|
34
|
+
},
|
|
35
|
+
proxy: !0
|
|
36
|
+
}, {
|
|
37
|
+
key: "error",
|
|
38
|
+
fn: function(s) {
|
|
39
|
+
var i = s.error;
|
|
40
|
+
return [e.$scopedSlots.error && e.$scopedSlots.error(i) ? r("div", {
|
|
41
|
+
staticClass: "el-form-item__error"
|
|
42
|
+
}, [e._t("error", function() {
|
|
43
|
+
return [e._v(" " + e._s(i) + " ")];
|
|
44
|
+
}, {
|
|
45
|
+
error: i
|
|
46
|
+
})], 2) : e._e()];
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
key: "label",
|
|
50
|
+
fn: function() {
|
|
51
|
+
return [e._t("label")];
|
|
52
|
+
},
|
|
53
|
+
proxy: !0
|
|
54
|
+
}], null, !0)
|
|
55
|
+
}, "FormItem", e.formItemProps, !1));
|
|
56
|
+
}, d = [];
|
|
57
|
+
const f = ["type", "timeArrowControl", "size", "format", "valueFormat", "readonly", "placeholder", "startPlaceholder", "endPlaceholder", "prefixIcon", "clearIcon", "name", "disabled", "clearable", "id", "popperClass", "editable", "align", "value", "defaultValue", "defaultTime", "rangeSeparator", "pickerOptions", "unlinkPanels", "validateEvent"].filter((e) => !["value", "placeholder", "disabled", "type", "pickerOptions"].includes(e)), c = {
|
|
58
|
+
name: "FormDatePicker",
|
|
59
|
+
mixins: [o, l],
|
|
60
|
+
props: {
|
|
61
|
+
format: {
|
|
62
|
+
type: String
|
|
63
|
+
},
|
|
64
|
+
valueFormat: {
|
|
65
|
+
type: String
|
|
66
|
+
},
|
|
67
|
+
rangeSeparator: {
|
|
68
|
+
type: String
|
|
69
|
+
},
|
|
70
|
+
startPlaceholder: {
|
|
71
|
+
type: String
|
|
72
|
+
},
|
|
73
|
+
endPlaceholder: {
|
|
74
|
+
type: String
|
|
75
|
+
},
|
|
76
|
+
start: {
|
|
77
|
+
type: String
|
|
78
|
+
},
|
|
79
|
+
end: {
|
|
80
|
+
type: String
|
|
81
|
+
},
|
|
82
|
+
year: Boolean,
|
|
83
|
+
month: Boolean,
|
|
84
|
+
dates: Boolean,
|
|
85
|
+
week: Boolean,
|
|
86
|
+
dateTime: Boolean,
|
|
87
|
+
dateTimeRange: Boolean,
|
|
88
|
+
dateRange: Boolean,
|
|
89
|
+
monthRange: Boolean,
|
|
90
|
+
miniDate: {
|
|
91
|
+
type: String
|
|
92
|
+
},
|
|
93
|
+
maxDate: {
|
|
94
|
+
type: String
|
|
95
|
+
},
|
|
96
|
+
pickerOptions: {
|
|
97
|
+
type: Object
|
|
98
|
+
},
|
|
99
|
+
split: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: !0
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
computed: {
|
|
105
|
+
prefix() {
|
|
106
|
+
return "\u8BF7\u9009\u62E9";
|
|
107
|
+
},
|
|
108
|
+
mini() {
|
|
109
|
+
if (this.miniDate) {
|
|
110
|
+
const e = n(this.miniDate);
|
|
111
|
+
return e.setDate(e.getDate() - 1), e;
|
|
112
|
+
} else
|
|
113
|
+
return null;
|
|
114
|
+
},
|
|
115
|
+
max() {
|
|
116
|
+
return this.maxDate ? n(this.maxDate) : null;
|
|
117
|
+
},
|
|
118
|
+
pickerOption() {
|
|
119
|
+
return {
|
|
120
|
+
disabledDate: (e) => {
|
|
121
|
+
if (!this.mini && !this.max)
|
|
122
|
+
return !1;
|
|
123
|
+
const t = e.getTime();
|
|
124
|
+
return this.mini && !this.max ? t <= this.mini.getTime() : !this.mini && this.max ? t >= this.max.getTime() : this.mini && this.max ? t <= this.mini.getTime() && t >= this.max.getTime() : !1;
|
|
125
|
+
},
|
|
126
|
+
...this.pickerOptions
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
innerVal() {
|
|
130
|
+
if (this.range && this.split) {
|
|
131
|
+
const e = [];
|
|
132
|
+
return e.push(this.start || ""), e.push(this.end || ""), e;
|
|
133
|
+
} else
|
|
134
|
+
return this.value;
|
|
135
|
+
},
|
|
136
|
+
fat() {
|
|
137
|
+
return this.year ? "yyyy" : this.month || this.monthRange ? "yyyy-MM" : this.week ? "yyyy \u7B2C WW \u5468" : this.dateTime || this.dateTimeRange ? "yyyy-MM-dd HH:mm" : "yyyy-MM-dd";
|
|
138
|
+
},
|
|
139
|
+
inputProps() {
|
|
140
|
+
return m({
|
|
141
|
+
...u(this.$attrs),
|
|
142
|
+
...this.$props,
|
|
143
|
+
valueFormat: this.week ? "yyyy-MM-dd" : this.valueFormat || this.fat,
|
|
144
|
+
format: this.format || this.fat,
|
|
145
|
+
rangeSeparator: this.rangeSeparator || "\u81F3",
|
|
146
|
+
startPlaceholder: this.startPlaceholder || "\u5F00\u59CB\u65E5\u671F",
|
|
147
|
+
endPlaceholder: this.endPlaceholder || "\u7ED3\u675F\u65E5\u671F"
|
|
148
|
+
}, f);
|
|
149
|
+
},
|
|
150
|
+
range() {
|
|
151
|
+
return this.dateTimeRange || this.dateRange || this.monthRange;
|
|
152
|
+
},
|
|
153
|
+
type() {
|
|
154
|
+
return this.year ? "year" : this.month ? "month" : this.dates ? "dates" : this.week ? "week" : this.dateTime ? "datetime" : this.dateTimeRange ? "datetimerange" : this.dateRange ? "daterange" : this.monthRange ? "monthrange" : "date";
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
methods: {
|
|
158
|
+
emitInput(e) {
|
|
159
|
+
this.range && this.split ? e ? (this.$emit("update:start", e[0]), this.$emit("update:end", e[1])) : (this.$emit("update:start", null), this.$emit("update:end", null)) : this.$emit("input", e);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}, a = {};
|
|
163
|
+
var y = /* @__PURE__ */ p(
|
|
164
|
+
c,
|
|
165
|
+
h,
|
|
166
|
+
d,
|
|
167
|
+
!1,
|
|
168
|
+
g,
|
|
169
|
+
null,
|
|
170
|
+
null,
|
|
171
|
+
null
|
|
172
|
+
);
|
|
173
|
+
function g(e) {
|
|
174
|
+
for (let t in a)
|
|
175
|
+
this[t] = a[t];
|
|
176
|
+
}
|
|
177
|
+
const S = /* @__PURE__ */ function() {
|
|
178
|
+
return y.exports;
|
|
179
|
+
}();
|
|
180
|
+
export {
|
|
181
|
+
S as default
|
|
182
|
+
};
|
|
@@ -1 +1,90 @@
|
|
|
1
|
-
import{warning as l}from"@web-utils/core";
|
|
1
|
+
import { warning as l } from "@web-utils/core";
|
|
2
|
+
import { j as a } from "../../chunks/2bd4e340.js";
|
|
3
|
+
import { n as s } from "../../chunks/6499de3a.js";
|
|
4
|
+
var o = function() {
|
|
5
|
+
var e = this, r = e.$createElement, i = e._self._c || r;
|
|
6
|
+
return i("ElForm", e._g(e._b({
|
|
7
|
+
ref: "form",
|
|
8
|
+
staticClass: "clear-fix",
|
|
9
|
+
attrs: {
|
|
10
|
+
model: e.model,
|
|
11
|
+
size: e.size,
|
|
12
|
+
disabled: e.disabled,
|
|
13
|
+
"label-width": e.labelWidth,
|
|
14
|
+
"label-position": e.labelPosition
|
|
15
|
+
}
|
|
16
|
+
}, "ElForm", e.$attrs, !1), e.$listeners), [e._t("default")], 2);
|
|
17
|
+
}, n = [];
|
|
18
|
+
const d = {
|
|
19
|
+
name: "FormHolder",
|
|
20
|
+
provide() {
|
|
21
|
+
return {
|
|
22
|
+
formHolder: this
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
model: {
|
|
27
|
+
type: Object
|
|
28
|
+
},
|
|
29
|
+
size: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "mini"
|
|
32
|
+
},
|
|
33
|
+
disabled: Boolean,
|
|
34
|
+
labelPosition: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "right"
|
|
37
|
+
},
|
|
38
|
+
labelWidth: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "160px"
|
|
41
|
+
},
|
|
42
|
+
required: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !0
|
|
45
|
+
},
|
|
46
|
+
requiredFields: {
|
|
47
|
+
type: Array
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
watch: {
|
|
51
|
+
required() {
|
|
52
|
+
this.clearValidate();
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
created() {
|
|
56
|
+
this.required || l.call(a(this, (e) => ["FormView", "FormHolder"].includes(e.$options.name)), "\u4E00\u822C\u60C5\u51B5\u4E0B\u4E0D\u5EFA\u8BAE\u8BBE\u7F6E required=false,\u56E0\u4E3A required \u8BBE\u7F6E\u4E3A false \u540E\u5FC5\u586B\u5B57\u6BB5\u8981\u81EA\u884C\u7EF4\u62A4,\u5728\u5904\u7406\u8868\u683C\u65F6\u4F1A\u6BD4\u8F83\u590D\u6742,\u8BF7\u81EA\u884C\u6743\u8861\u5229\u5F0A");
|
|
57
|
+
},
|
|
58
|
+
methods: {
|
|
59
|
+
clearValidate(e) {
|
|
60
|
+
var r;
|
|
61
|
+
(r = this.$refs.form) == null || r.clearValidate(e);
|
|
62
|
+
},
|
|
63
|
+
async validate() {
|
|
64
|
+
return this.$refs.form.validate();
|
|
65
|
+
},
|
|
66
|
+
resetFields() {
|
|
67
|
+
return this.$refs.form.resetFields();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}, t = {};
|
|
71
|
+
var f = /* @__PURE__ */ s(
|
|
72
|
+
d,
|
|
73
|
+
o,
|
|
74
|
+
n,
|
|
75
|
+
!1,
|
|
76
|
+
m,
|
|
77
|
+
null,
|
|
78
|
+
null,
|
|
79
|
+
null
|
|
80
|
+
);
|
|
81
|
+
function m(e) {
|
|
82
|
+
for (let r in t)
|
|
83
|
+
this[r] = t[r];
|
|
84
|
+
}
|
|
85
|
+
const _ = /* @__PURE__ */ function() {
|
|
86
|
+
return f.exports;
|
|
87
|
+
}();
|
|
88
|
+
export {
|
|
89
|
+
_ as default
|
|
90
|
+
};
|
|
@@ -1 +1,106 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as l } from "../../chunks/86bcadec.js";
|
|
2
|
+
import { Input as u } from "element-ui";
|
|
3
|
+
import { i as a, n as i } from "../../chunks/2bd4e340.js";
|
|
4
|
+
import { n as p } from "../../chunks/6499de3a.js";
|
|
5
|
+
var m = function() {
|
|
6
|
+
var e = this, t = e.$createElement, r = e._self._c || t;
|
|
7
|
+
return r("FormItem", e._b({
|
|
8
|
+
attrs: {
|
|
9
|
+
rules: e.computeRules,
|
|
10
|
+
disabled: e.inputDisabled
|
|
11
|
+
},
|
|
12
|
+
scopedSlots: e._u([{
|
|
13
|
+
key: "default",
|
|
14
|
+
fn: function() {
|
|
15
|
+
return [e._t("default", function() {
|
|
16
|
+
return [r("ElInput", e._g(e._b({
|
|
17
|
+
class: {
|
|
18
|
+
"is-readonly": e.readonly
|
|
19
|
+
},
|
|
20
|
+
attrs: {
|
|
21
|
+
value: e.value,
|
|
22
|
+
readonly: e.readonly,
|
|
23
|
+
maxlength: e.maxLength,
|
|
24
|
+
disabled: e.inputDisabled,
|
|
25
|
+
placeholder: e.computePlaceholder
|
|
26
|
+
},
|
|
27
|
+
on: {
|
|
28
|
+
input: e.emitInput
|
|
29
|
+
},
|
|
30
|
+
scopedSlots: e._u([{
|
|
31
|
+
key: "append",
|
|
32
|
+
fn: function() {
|
|
33
|
+
return [e._t("append")];
|
|
34
|
+
},
|
|
35
|
+
proxy: !0
|
|
36
|
+
}], null, !0)
|
|
37
|
+
}, "ElInput", e.inputProps, !1), e.listeners)), e.$slots.warn ? r("div", {
|
|
38
|
+
staticClass: "el-form-item__warn"
|
|
39
|
+
}, [e._t("warn")], 2) : e._e()];
|
|
40
|
+
})];
|
|
41
|
+
},
|
|
42
|
+
proxy: !0
|
|
43
|
+
}, {
|
|
44
|
+
key: "error",
|
|
45
|
+
fn: function(s) {
|
|
46
|
+
var n = s.error;
|
|
47
|
+
return [e.$scopedSlots.error && e.$scopedSlots.error(n) ? r("div", {
|
|
48
|
+
staticClass: "el-form-item__error"
|
|
49
|
+
}, [e._t("error", function() {
|
|
50
|
+
return [e._v(" " + e._s(n) + " ")];
|
|
51
|
+
}, {
|
|
52
|
+
error: n
|
|
53
|
+
})], 2) : e._e()];
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
key: "label",
|
|
57
|
+
fn: function() {
|
|
58
|
+
return [e._t("label")];
|
|
59
|
+
},
|
|
60
|
+
proxy: !0
|
|
61
|
+
}], null, !0)
|
|
62
|
+
}, "FormItem", e.formItemProps, !1));
|
|
63
|
+
}, c = [];
|
|
64
|
+
const _ = Object.keys(u.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), d = {
|
|
65
|
+
name: "FormInput",
|
|
66
|
+
mixins: [l],
|
|
67
|
+
props: {
|
|
68
|
+
value: {
|
|
69
|
+
type: [String, Number]
|
|
70
|
+
},
|
|
71
|
+
maxLength: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "200"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
inputProps() {
|
|
78
|
+
return a({ ...i(this.$attrs), ...this.$props }, _);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
methods: {
|
|
82
|
+
emitInput(e) {
|
|
83
|
+
this.$emit("input", e);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}, o = {};
|
|
87
|
+
var f = /* @__PURE__ */ p(
|
|
88
|
+
d,
|
|
89
|
+
m,
|
|
90
|
+
c,
|
|
91
|
+
!1,
|
|
92
|
+
v,
|
|
93
|
+
null,
|
|
94
|
+
null,
|
|
95
|
+
null
|
|
96
|
+
);
|
|
97
|
+
function v(e) {
|
|
98
|
+
for (let t in o)
|
|
99
|
+
this[t] = o[t];
|
|
100
|
+
}
|
|
101
|
+
const I = /* @__PURE__ */ function() {
|
|
102
|
+
return f.exports;
|
|
103
|
+
}();
|
|
104
|
+
export {
|
|
105
|
+
I as default
|
|
106
|
+
};
|
|
@@ -1 +1,97 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as s } from "../../chunks/86bcadec.js";
|
|
2
|
+
import { Input as a } from "element-ui";
|
|
3
|
+
import { i as u, n as i } from "../../chunks/2bd4e340.js";
|
|
4
|
+
import { n as p } from "../../chunks/6499de3a.js";
|
|
5
|
+
const m = (e, r, t) => r && !/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(r) ? t(new Error("invalid")) : t();
|
|
6
|
+
var c = function() {
|
|
7
|
+
var e = this, r = e.$createElement, t = e._self._c || r;
|
|
8
|
+
return t("FormItem", e._b({
|
|
9
|
+
attrs: {
|
|
10
|
+
rules: e.computeRules,
|
|
11
|
+
disabled: e.inputDisabled
|
|
12
|
+
},
|
|
13
|
+
scopedSlots: e._u([{
|
|
14
|
+
key: "default",
|
|
15
|
+
fn: function() {
|
|
16
|
+
return [t("ElInput", e._g(e._b({
|
|
17
|
+
class: {
|
|
18
|
+
"is-readonly": e.readonly
|
|
19
|
+
},
|
|
20
|
+
attrs: {
|
|
21
|
+
value: e.value,
|
|
22
|
+
readonly: e.readonly,
|
|
23
|
+
maxlength: e.maxLength,
|
|
24
|
+
disabled: e.inputDisabled,
|
|
25
|
+
placeholder: e.computePlaceholder
|
|
26
|
+
},
|
|
27
|
+
on: {
|
|
28
|
+
input: function(n) {
|
|
29
|
+
return e.$emit("input", n);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, "ElInput", e.inputProps, !1), e.listeners))];
|
|
33
|
+
},
|
|
34
|
+
proxy: !0
|
|
35
|
+
}, {
|
|
36
|
+
key: "error",
|
|
37
|
+
fn: function(n) {
|
|
38
|
+
var l = n.error;
|
|
39
|
+
return [e._t("error", null, {
|
|
40
|
+
error: l
|
|
41
|
+
})];
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
key: "label",
|
|
45
|
+
fn: function() {
|
|
46
|
+
return [e._t("label")];
|
|
47
|
+
},
|
|
48
|
+
proxy: !0
|
|
49
|
+
}], null, !0)
|
|
50
|
+
}, "FormItem", e.formItemProps, !1));
|
|
51
|
+
}, d = [];
|
|
52
|
+
const f = Object.keys(a.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), _ = {
|
|
53
|
+
name: "FormInputEmail",
|
|
54
|
+
mixins: [s],
|
|
55
|
+
props: {
|
|
56
|
+
value: {
|
|
57
|
+
type: String
|
|
58
|
+
},
|
|
59
|
+
maxLength: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "200"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
inputProps() {
|
|
66
|
+
return u({ ...i(this.$attrs), ...this.$props }, f);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
methods: {
|
|
70
|
+
getRules() {
|
|
71
|
+
return [{
|
|
72
|
+
validator: m,
|
|
73
|
+
message: "\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u90AE\u7BB1\uFF01"
|
|
74
|
+
}];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, o = {};
|
|
78
|
+
var v = /* @__PURE__ */ p(
|
|
79
|
+
_,
|
|
80
|
+
c,
|
|
81
|
+
d,
|
|
82
|
+
!1,
|
|
83
|
+
y,
|
|
84
|
+
null,
|
|
85
|
+
null,
|
|
86
|
+
null
|
|
87
|
+
);
|
|
88
|
+
function y(e) {
|
|
89
|
+
for (let r in o)
|
|
90
|
+
this[r] = o[r];
|
|
91
|
+
}
|
|
92
|
+
const g = /* @__PURE__ */ function() {
|
|
93
|
+
return v.exports;
|
|
94
|
+
}();
|
|
95
|
+
export {
|
|
96
|
+
g as default
|
|
97
|
+
};
|