@web-utils/component 1.2.5 → 1.2.7
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/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 +3097 -2347
- package/package.json +29 -29
- package/web-types.json +22 -55
- 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
- package/dist/components/el-color-picker-dropdown/index.js +0 -1
|
@@ -1 +1,169 @@
|
|
|
1
|
-
import{isFunction as m}from"@web-utils/core";
|
|
1
|
+
import { isFunction as m } from "@web-utils/core";
|
|
2
|
+
import { n as u } from "../../chunks/6499de3a.js";
|
|
3
|
+
const r = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth", "hideRequiredAsterisk", "$emit", "validate", "clearValidate"], c = ["$emit", "validate", "clearValidate"], p = {
|
|
4
|
+
name: "FormItemGroup",
|
|
5
|
+
inject: {
|
|
6
|
+
elForm: {
|
|
7
|
+
default: {}
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
provide() {
|
|
11
|
+
return {
|
|
12
|
+
elForm: this.formConfig,
|
|
13
|
+
formItemGroup: this
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
blockTitle: {
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
active: Boolean,
|
|
21
|
+
enabled: Boolean,
|
|
22
|
+
disabled: Boolean,
|
|
23
|
+
wrapRow: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !0
|
|
26
|
+
},
|
|
27
|
+
gutter: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 20
|
|
30
|
+
},
|
|
31
|
+
collapse: Boolean
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
const e = {};
|
|
35
|
+
return r.forEach((t) => {
|
|
36
|
+
e[t] = null;
|
|
37
|
+
}), {
|
|
38
|
+
expand: !0,
|
|
39
|
+
formConfig: e
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
computed: {
|
|
43
|
+
formCfg() {
|
|
44
|
+
const e = {
|
|
45
|
+
enabled: this.enabled,
|
|
46
|
+
forbidden: this.disabled
|
|
47
|
+
};
|
|
48
|
+
return r.forEach((t) => {
|
|
49
|
+
e[t] = this.elForm[t];
|
|
50
|
+
}), e;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
watch: {
|
|
54
|
+
collapse: {
|
|
55
|
+
immediate: !0,
|
|
56
|
+
handler(e) {
|
|
57
|
+
this.expand = !e;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
formCfg: {
|
|
61
|
+
immediate: !0,
|
|
62
|
+
handler() {
|
|
63
|
+
this.formConfig.disabled = this.isDisabled(), r.forEach((e) => {
|
|
64
|
+
var t;
|
|
65
|
+
e !== "disabled" && (c.includes(e) ? this.formConfig[e] = (t = this.elForm[e]) == null ? void 0 : t.bind(this.elForm) : this.formConfig[e] = this.elForm[e]);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
mounted() {
|
|
71
|
+
this.dispatch("FormView", "FormView.addGroup", [this]);
|
|
72
|
+
},
|
|
73
|
+
beforeDestroy() {
|
|
74
|
+
this.dispatch("FormView", "FormView.removeGroup", [this]);
|
|
75
|
+
},
|
|
76
|
+
methods: {
|
|
77
|
+
isDisabled() {
|
|
78
|
+
return this.disabled ? this.disabled : this.enabled ? !this.enabled : this.elForm.disabled;
|
|
79
|
+
},
|
|
80
|
+
dispatch(e, t, s) {
|
|
81
|
+
let i = this.$parent || this.$root, o = i.$options.name;
|
|
82
|
+
for (; i && (!o || o !== e); )
|
|
83
|
+
i = i.$parent, i && (o = i.$options.name);
|
|
84
|
+
i && i.$emit.apply(i, [t].concat(s));
|
|
85
|
+
},
|
|
86
|
+
renderDefault() {
|
|
87
|
+
const e = this.$createElement, {
|
|
88
|
+
wrapRow: t,
|
|
89
|
+
gutter: s,
|
|
90
|
+
formConfig: i,
|
|
91
|
+
$scopedSlots: o
|
|
92
|
+
} = this;
|
|
93
|
+
return m(o.default) ? t ? e("ElRow", {
|
|
94
|
+
attrs: {
|
|
95
|
+
gutter: s
|
|
96
|
+
},
|
|
97
|
+
class: "form-item-group-row"
|
|
98
|
+
}, [o.default({
|
|
99
|
+
disabled: i.disabled
|
|
100
|
+
})]) : o.default({
|
|
101
|
+
disabled: i.disabled
|
|
102
|
+
}) : e("EmptyView", {
|
|
103
|
+
attrs: {
|
|
104
|
+
"font-size": "14px",
|
|
105
|
+
"empty-tips": "\u6682\u65E0\u4FE1\u606F"
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
toggle() {
|
|
110
|
+
this.expand = !this.expand;
|
|
111
|
+
},
|
|
112
|
+
open() {
|
|
113
|
+
this.expand = !0;
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
render() {
|
|
117
|
+
const e = arguments[0], {
|
|
118
|
+
renderDefault: t,
|
|
119
|
+
blockTitle: s,
|
|
120
|
+
active: i,
|
|
121
|
+
expand: o,
|
|
122
|
+
toggle: n,
|
|
123
|
+
$scopedSlots: a,
|
|
124
|
+
isDisabled: d
|
|
125
|
+
} = this;
|
|
126
|
+
return e("div", {
|
|
127
|
+
class: ["form-item-group", {
|
|
128
|
+
"default-active": i,
|
|
129
|
+
"is-disabled": d()
|
|
130
|
+
}]
|
|
131
|
+
}, [e("div", {
|
|
132
|
+
class: "form-item-group-title",
|
|
133
|
+
on: {
|
|
134
|
+
click: n
|
|
135
|
+
}
|
|
136
|
+
}, [e("span", {
|
|
137
|
+
class: "flex-item"
|
|
138
|
+
}, [s, a["title-right"] ? a["title-right"]() : null]), " ", e("i", {
|
|
139
|
+
class: o ? "el-icon-arrow-down" : "el-icon-arrow-right"
|
|
140
|
+
})]), e("ElCollapseTransition", [e("div", {
|
|
141
|
+
directives: [{
|
|
142
|
+
name: "show",
|
|
143
|
+
value: o
|
|
144
|
+
}]
|
|
145
|
+
}, [t()])])]);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
let f, h;
|
|
149
|
+
const l = {};
|
|
150
|
+
var b = /* @__PURE__ */ u(
|
|
151
|
+
p,
|
|
152
|
+
f,
|
|
153
|
+
h,
|
|
154
|
+
!1,
|
|
155
|
+
g,
|
|
156
|
+
null,
|
|
157
|
+
null,
|
|
158
|
+
null
|
|
159
|
+
);
|
|
160
|
+
function g(e) {
|
|
161
|
+
for (let t in l)
|
|
162
|
+
this[t] = l[t];
|
|
163
|
+
}
|
|
164
|
+
const w = /* @__PURE__ */ function() {
|
|
165
|
+
return b.exports;
|
|
166
|
+
}();
|
|
167
|
+
export {
|
|
168
|
+
w as default
|
|
169
|
+
};
|
|
@@ -1 +1,170 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as n } from "../../chunks/86bcadec.js";
|
|
2
|
+
import { f as s } from "../../chunks/a73fe8ee.js";
|
|
3
|
+
import { RadioGroup as a } from "element-ui";
|
|
4
|
+
import { i as u, n as p } from "../../chunks/2bd4e340.js";
|
|
5
|
+
import { n as c } from "../../chunks/6499de3a.js";
|
|
6
|
+
var f = function() {
|
|
7
|
+
var e = this, o = e.$createElement, r = e._self._c || o;
|
|
8
|
+
return r("FormItem", e._b({
|
|
9
|
+
class: ["form-radio-group", {
|
|
10
|
+
"form-radio-group-row": e.fillRow,
|
|
11
|
+
inline: e.inline
|
|
12
|
+
}, e.ellipsis ? "form-radio-group-row-ellipsis" : "form-radio-group-row-break-word"],
|
|
13
|
+
attrs: {
|
|
14
|
+
rules: e.computeRules,
|
|
15
|
+
disabled: e.inputDisabled
|
|
16
|
+
},
|
|
17
|
+
scopedSlots: e._u([{
|
|
18
|
+
key: "default",
|
|
19
|
+
fn: function() {
|
|
20
|
+
return [r("ElRadioGroup", e._g(e._b({
|
|
21
|
+
class: {
|
|
22
|
+
"over-flow": e.overFlow
|
|
23
|
+
},
|
|
24
|
+
attrs: {
|
|
25
|
+
value: e.value,
|
|
26
|
+
disabled: e.inputDisabled,
|
|
27
|
+
placeholder: e.computePlaceholder
|
|
28
|
+
},
|
|
29
|
+
on: {
|
|
30
|
+
input: function(t) {
|
|
31
|
+
return e.$emit("input", t);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, "ElRadioGroup", e.inputProps, !1), e.listeners), [e.allowCancel ? e._l(e.innerOptions, function(t) {
|
|
35
|
+
return r("ElRadio", {
|
|
36
|
+
key: t[e.valueKey],
|
|
37
|
+
attrs: {
|
|
38
|
+
label: t[e.valueKey]
|
|
39
|
+
},
|
|
40
|
+
nativeOn: {
|
|
41
|
+
click: function(l) {
|
|
42
|
+
return l.preventDefault(), l.stopPropagation(), e.toggle(t);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}, [e._v(" " + e._s(t[e.labelKey]) + " ")]);
|
|
46
|
+
}) : e._l(e.innerOptions, function(t) {
|
|
47
|
+
return r("ElRadio", {
|
|
48
|
+
key: t[e.valueKey],
|
|
49
|
+
attrs: {
|
|
50
|
+
label: t[e.valueKey]
|
|
51
|
+
}
|
|
52
|
+
}, [e._v(" " + e._s(t[e.labelKey]) + " ")]);
|
|
53
|
+
})], 2), e._t("append")];
|
|
54
|
+
},
|
|
55
|
+
proxy: !0
|
|
56
|
+
}, {
|
|
57
|
+
key: "error",
|
|
58
|
+
fn: function(t) {
|
|
59
|
+
var l = t.error;
|
|
60
|
+
return [e._t("error", null, {
|
|
61
|
+
error: l
|
|
62
|
+
})];
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
key: "label",
|
|
66
|
+
fn: function() {
|
|
67
|
+
return [e._t("label")];
|
|
68
|
+
},
|
|
69
|
+
proxy: !0
|
|
70
|
+
}, {
|
|
71
|
+
key: "below",
|
|
72
|
+
fn: function() {
|
|
73
|
+
return [e._t("below")];
|
|
74
|
+
},
|
|
75
|
+
proxy: !0
|
|
76
|
+
}], null, !0)
|
|
77
|
+
}, "FormItem", e.formItemProps, !1));
|
|
78
|
+
}, h = [];
|
|
79
|
+
const d = Object.keys(a.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), y = {
|
|
80
|
+
name: "FormRadioGroup",
|
|
81
|
+
mixins: [n, s],
|
|
82
|
+
props: {
|
|
83
|
+
options: {
|
|
84
|
+
type: Array,
|
|
85
|
+
default: () => []
|
|
86
|
+
},
|
|
87
|
+
gender: Boolean,
|
|
88
|
+
overFlow: Boolean,
|
|
89
|
+
confirm: Boolean,
|
|
90
|
+
labelProp: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: "name"
|
|
93
|
+
},
|
|
94
|
+
valueProp: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: "code"
|
|
97
|
+
},
|
|
98
|
+
english: Boolean,
|
|
99
|
+
chinese: Boolean,
|
|
100
|
+
typing: Boolean,
|
|
101
|
+
classic: Boolean,
|
|
102
|
+
fillRow: Boolean,
|
|
103
|
+
ellipsis: Boolean,
|
|
104
|
+
inline: Boolean,
|
|
105
|
+
allowCancel: Boolean
|
|
106
|
+
},
|
|
107
|
+
computed: {
|
|
108
|
+
prefix() {
|
|
109
|
+
return "\u8BF7\u9009\u62E9";
|
|
110
|
+
},
|
|
111
|
+
inputProps() {
|
|
112
|
+
return u({ ...p(this.$attrs), ...this.$props }, d);
|
|
113
|
+
},
|
|
114
|
+
labelKey() {
|
|
115
|
+
return this.classic ? "label" : this.labelProp;
|
|
116
|
+
},
|
|
117
|
+
valueKey() {
|
|
118
|
+
return this.classic ? "value" : this.valueProp;
|
|
119
|
+
},
|
|
120
|
+
innerOptions() {
|
|
121
|
+
return this.gender ? [
|
|
122
|
+
{
|
|
123
|
+
[this.labelKey]: "\u7537",
|
|
124
|
+
[this.valueKey]: this.chinese ? "\u7537" : this.typing ? 1 : "1"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
[this.labelKey]: "\u5973",
|
|
128
|
+
[this.valueKey]: this.chinese ? "\u5973" : this.typing ? 2 : "2"
|
|
129
|
+
}
|
|
130
|
+
] : this.confirm ? [
|
|
131
|
+
{
|
|
132
|
+
[this.labelKey]: "\u662F",
|
|
133
|
+
[this.valueKey]: this.chinese ? "\u662F" : this.english ? "Y" : this.typing ? 1 : "1"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
[this.labelKey]: "\u5426",
|
|
137
|
+
[this.valueKey]: this.chinese ? "\u5426" : this.english ? "N" : this.typing ? 0 : "0"
|
|
138
|
+
}
|
|
139
|
+
] : this.options;
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
methods: {
|
|
143
|
+
emitInput(e) {
|
|
144
|
+
this.$emit("input", e);
|
|
145
|
+
},
|
|
146
|
+
toggle(e) {
|
|
147
|
+
this.value === e[this.valueKey] ? this.emitInput(null) : this.emitInput(e[this.valueKey]);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}, i = {};
|
|
151
|
+
var m = /* @__PURE__ */ c(
|
|
152
|
+
y,
|
|
153
|
+
f,
|
|
154
|
+
h,
|
|
155
|
+
!1,
|
|
156
|
+
_,
|
|
157
|
+
null,
|
|
158
|
+
null,
|
|
159
|
+
null
|
|
160
|
+
);
|
|
161
|
+
function _(e) {
|
|
162
|
+
for (let o in i)
|
|
163
|
+
this[o] = i[o];
|
|
164
|
+
}
|
|
165
|
+
const B = /* @__PURE__ */ function() {
|
|
166
|
+
return m.exports;
|
|
167
|
+
}();
|
|
168
|
+
export {
|
|
169
|
+
B as default
|
|
170
|
+
};
|
|
@@ -1 +1,154 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as s } from "../../chunks/86bcadec.js";
|
|
2
|
+
import { f as o } from "../../chunks/a73fe8ee.js";
|
|
3
|
+
import { Select as a } from "element-ui";
|
|
4
|
+
import { i as u, n as p } from "../../chunks/2bd4e340.js";
|
|
5
|
+
import { n as c } from "../../chunks/6499de3a.js";
|
|
6
|
+
var h = function() {
|
|
7
|
+
var e = this, l = e.$createElement, t = e._self._c || l;
|
|
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("ElSelect", e._g(e._b({
|
|
17
|
+
attrs: {
|
|
18
|
+
value: e.value,
|
|
19
|
+
filterable: e.filterable,
|
|
20
|
+
placeholder: e.inputDisabled ? "--" : e.computePlaceholder,
|
|
21
|
+
disabled: e.inputDisabled
|
|
22
|
+
},
|
|
23
|
+
on: {
|
|
24
|
+
input: e.emitInput
|
|
25
|
+
}
|
|
26
|
+
}, "ElSelect", e.inputProps, !1), e.listeners), e._l(e.innerOptions, function(r) {
|
|
27
|
+
return t("ElOption", {
|
|
28
|
+
key: r[e.valueKey],
|
|
29
|
+
attrs: {
|
|
30
|
+
value: r[e.valueKey],
|
|
31
|
+
label: r[e.labelKey]
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}), 1), e.$slots.warn ? t("div", {
|
|
35
|
+
staticClass: "el-form-item__warn"
|
|
36
|
+
}, [e._t("warn")], 2) : e._e()];
|
|
37
|
+
},
|
|
38
|
+
proxy: !0
|
|
39
|
+
}, {
|
|
40
|
+
key: "error",
|
|
41
|
+
fn: function(r) {
|
|
42
|
+
var i = r.error;
|
|
43
|
+
return [e.$scopedSlots.error && e.$scopedSlots.error(i) ? t("div", {
|
|
44
|
+
staticClass: "el-form-item__error"
|
|
45
|
+
}, [e._t("error", function() {
|
|
46
|
+
return [e._v(" " + e._s(i) + " ")];
|
|
47
|
+
}, {
|
|
48
|
+
error: i
|
|
49
|
+
})], 2) : e._e()];
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "label",
|
|
53
|
+
fn: function() {
|
|
54
|
+
return [e._t("label")];
|
|
55
|
+
},
|
|
56
|
+
proxy: !0
|
|
57
|
+
}, {
|
|
58
|
+
key: "below",
|
|
59
|
+
fn: function() {
|
|
60
|
+
return [e._t("below")];
|
|
61
|
+
},
|
|
62
|
+
proxy: !0
|
|
63
|
+
}], null, !0)
|
|
64
|
+
}, "FormItem", e.formItemProps, !1));
|
|
65
|
+
}, f = [];
|
|
66
|
+
const m = Object.keys(a.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), y = {
|
|
67
|
+
name: "FormSelect",
|
|
68
|
+
mixins: [s, o],
|
|
69
|
+
props: {
|
|
70
|
+
options: {
|
|
71
|
+
type: Array,
|
|
72
|
+
default: () => []
|
|
73
|
+
},
|
|
74
|
+
gender: Boolean,
|
|
75
|
+
all: Boolean,
|
|
76
|
+
filterable: Boolean,
|
|
77
|
+
confirm: Boolean,
|
|
78
|
+
value: {
|
|
79
|
+
type: [String, Number]
|
|
80
|
+
},
|
|
81
|
+
labelProp: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: "name"
|
|
84
|
+
},
|
|
85
|
+
valueProp: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: "code"
|
|
88
|
+
},
|
|
89
|
+
english: Boolean,
|
|
90
|
+
chinese: Boolean,
|
|
91
|
+
typing: Boolean,
|
|
92
|
+
classic: Boolean
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
prefix() {
|
|
96
|
+
return "\u8BF7\u9009\u62E9";
|
|
97
|
+
},
|
|
98
|
+
labelKey() {
|
|
99
|
+
return this.classic ? "label" : this.labelProp;
|
|
100
|
+
},
|
|
101
|
+
valueKey() {
|
|
102
|
+
return this.classic ? "value" : this.valueProp;
|
|
103
|
+
},
|
|
104
|
+
inputProps() {
|
|
105
|
+
return u({ ...p(this.$attrs), ...this.$props }, m);
|
|
106
|
+
},
|
|
107
|
+
innerOptions() {
|
|
108
|
+
return this.gender ? [
|
|
109
|
+
{
|
|
110
|
+
[this.labelKey]: "\u7537",
|
|
111
|
+
[this.valueKey]: this.chinese ? "\u7537" : this.typing ? 1 : "1"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
[this.labelKey]: "\u5973",
|
|
115
|
+
[this.valueKey]: this.chinese ? "\u5973" : this.typing ? 2 : "2"
|
|
116
|
+
}
|
|
117
|
+
] : this.confirm ? [
|
|
118
|
+
{
|
|
119
|
+
[this.labelKey]: "\u662F",
|
|
120
|
+
[this.valueKey]: this.chinese ? "\u662F" : this.english ? "Y" : this.typing ? 1 : "1"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
[this.labelKey]: "\u5426",
|
|
124
|
+
[this.valueKey]: this.chinese ? "\u5426" : this.english ? "N" : this.typing ? 0 : "0"
|
|
125
|
+
}
|
|
126
|
+
] : this.all ? [{ [this.valueKey]: "", [this.labelKey]: "\u5168\u90E8" }, ...this.options] : this.options;
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
methods: {
|
|
130
|
+
emitInput(e) {
|
|
131
|
+
this.$emit("input", e);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, n = {};
|
|
135
|
+
var _ = /* @__PURE__ */ c(
|
|
136
|
+
y,
|
|
137
|
+
h,
|
|
138
|
+
f,
|
|
139
|
+
!1,
|
|
140
|
+
d,
|
|
141
|
+
null,
|
|
142
|
+
null,
|
|
143
|
+
null
|
|
144
|
+
);
|
|
145
|
+
function d(e) {
|
|
146
|
+
for (let l in n)
|
|
147
|
+
this[l] = n[l];
|
|
148
|
+
}
|
|
149
|
+
const P = /* @__PURE__ */ function() {
|
|
150
|
+
return _.exports;
|
|
151
|
+
}();
|
|
152
|
+
export {
|
|
153
|
+
P as default
|
|
154
|
+
};
|
|
@@ -1 +1,97 @@
|
|
|
1
|
-
|
|
1
|
+
import { f as i } from "../../chunks/86bcadec.js";
|
|
2
|
+
import { Switch as s } from "element-ui";
|
|
3
|
+
import { i as u, n as a } from "../../chunks/2bd4e340.js";
|
|
4
|
+
import { n as p } from "../../chunks/6499de3a.js";
|
|
5
|
+
var c = 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("ElSwitch", e._g(e._b({
|
|
17
|
+
class: {
|
|
18
|
+
"is-readonly": e.readonly
|
|
19
|
+
},
|
|
20
|
+
attrs: {
|
|
21
|
+
"active-value": "Y",
|
|
22
|
+
"inactive-value": "N",
|
|
23
|
+
value: e.value,
|
|
24
|
+
readonly: e.readonly,
|
|
25
|
+
disabled: e.inputDisabled,
|
|
26
|
+
placeholder: e.computePlaceholder
|
|
27
|
+
},
|
|
28
|
+
on: {
|
|
29
|
+
input: e.emitInput
|
|
30
|
+
},
|
|
31
|
+
scopedSlots: e._u([{
|
|
32
|
+
key: "append",
|
|
33
|
+
fn: function() {
|
|
34
|
+
return [e._t("append")];
|
|
35
|
+
},
|
|
36
|
+
proxy: !0
|
|
37
|
+
}], null, !0)
|
|
38
|
+
}, "ElSwitch", e.inputProps, !1), e.listeners))];
|
|
39
|
+
})];
|
|
40
|
+
},
|
|
41
|
+
proxy: !0
|
|
42
|
+
}, {
|
|
43
|
+
key: "error",
|
|
44
|
+
fn: function(o) {
|
|
45
|
+
var l = o.error;
|
|
46
|
+
return [e._t("error", null, {
|
|
47
|
+
error: l
|
|
48
|
+
})];
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
key: "label",
|
|
52
|
+
fn: function() {
|
|
53
|
+
return [e._t("label")];
|
|
54
|
+
},
|
|
55
|
+
proxy: !0
|
|
56
|
+
}], null, !0)
|
|
57
|
+
}, "FormItem", e.formItemProps, !1));
|
|
58
|
+
}, m = [];
|
|
59
|
+
const d = Object.keys(s.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), f = {
|
|
60
|
+
name: "FormSwitch",
|
|
61
|
+
mixins: [i],
|
|
62
|
+
props: {
|
|
63
|
+
value: {
|
|
64
|
+
type: [String, Number, Boolean]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
computed: {
|
|
68
|
+
inputProps() {
|
|
69
|
+
return u({ ...a(this.$attrs), ...this.$props }, d);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
emitInput(e) {
|
|
74
|
+
this.$emit("input", e);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, n = {};
|
|
78
|
+
var _ = /* @__PURE__ */ p(
|
|
79
|
+
f,
|
|
80
|
+
c,
|
|
81
|
+
m,
|
|
82
|
+
!1,
|
|
83
|
+
v,
|
|
84
|
+
null,
|
|
85
|
+
null,
|
|
86
|
+
null
|
|
87
|
+
);
|
|
88
|
+
function v(e) {
|
|
89
|
+
for (let t in n)
|
|
90
|
+
this[t] = n[t];
|
|
91
|
+
}
|
|
92
|
+
const x = /* @__PURE__ */ function() {
|
|
93
|
+
return _.exports;
|
|
94
|
+
}();
|
|
95
|
+
export {
|
|
96
|
+
x as default
|
|
97
|
+
};
|