@web-utils/component 4.0.0 → 4.0.2
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/awesome-button/index.mjs +25 -55
- package/base.css +1 -1
- package/card/style.css +1 -1
- package/carousel/style.css +1 -1
- package/chat/style.css +1 -1
- package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
- package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
- package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
- package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
- package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
- package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
- package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
- package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
- package/chunks/configComponents.BDhlZU8F.mjs +23 -0
- package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
- package/chunks/core.DJEgjQW6.mjs +54 -0
- package/chunks/dictionary.DqiP9x2m.mjs +25 -0
- package/chunks/dictionary.DsN-2ukC.mjs +70 -0
- package/chunks/form-input.B8z37eqj.mjs +31 -0
- package/chunks/form-item.D-H-wCPE.mjs +233 -0
- package/chunks/form-validate.CVarNHKX.mjs +12 -0
- package/chunks/helper.BiMLcEEk.mjs +41 -0
- package/chunks/index.9OxHjTIE.mjs +16 -0
- package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/color-picker/index.mjs +19 -37
- package/comment/style.css +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/style.css +1 -1
- package/count-up/index.mjs +13 -24
- package/custom-scrollbar/index.mjs +1 -2
- package/data-operatext/style.css +1 -1
- package/data-panel/style.css +1 -1
- package/data-pay/style.css +1 -1
- package/data-price/style.css +1 -1
- package/data-rotate/style.css +1 -1
- package/data-table-picker/index.mjs +1 -1
- package/data-tabs/style.css +1 -1
- package/dialog-form/index.mjs +16 -28
- package/dynamic-table/style.css +1 -1
- package/easy-popup/index.mjs +22 -40
- package/easy-popup/style.css +1 -1
- package/editable-tree/index.mjs +203 -250
- package/editable-tree/style.css +1 -1
- package/element-dialog/index.mjs +30 -52
- package/element-dialog/style.css +1 -1
- package/flex-column/index.mjs +13 -25
- package/flex-item/index.mjs +15 -27
- package/flex-row/index.mjs +13 -25
- package/flow-designer/index.mjs +343 -374
- package/flow-designer/style.css +1 -1
- package/flow-viewer/index.mjs +64 -91
- package/form-block/index.mjs +33 -26
- package/form-card/index.mjs +25 -0
- package/form-cascader/index.mjs +70 -67
- package/form-checkbox/index.mjs +71 -0
- package/form-checkbox-group/index.mjs +33 -53
- package/form-date-picker/index.mjs +44 -73
- package/form-holder/index.mjs +54 -40
- package/form-holder/style.css +1 -0
- package/form-input/index.mjs +62 -40
- package/form-input-cron-expression/index.mjs +77 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.mjs +21 -33
- package/form-input-id-card/index.mjs +25 -38
- package/form-input-number/index.mjs +39 -42
- package/form-input-number/style.css +1 -1
- package/form-input-phone-number/index.mjs +26 -37
- package/form-input-tag/index.mjs +32 -34
- package/form-input-time/index.mjs +22 -37
- package/form-item/index.mjs +109 -101
- package/form-item/style.css +1 -1
- package/form-item-config-provider/index.mjs +18 -10
- package/form-item-group/index.mjs +73 -69
- package/form-item-group/style.css +1 -1
- package/form-radio-group/index.mjs +41 -36
- package/form-radio-group/style.css +1 -1
- package/form-select/index.mjs +142 -75
- package/form-select/style.css +1 -0
- package/form-switch/index.mjs +29 -34
- package/form-table/index.mjs +85 -0
- package/form-table-plus/index.mjs +109 -0
- package/form-textarea/index.mjs +23 -35
- package/form-tree-select/index.mjs +72 -0
- package/form-tree-select/style.css +1 -0
- package/form-tree-select-multiple/index.mjs +78 -0
- package/form-view/index.mjs +37 -69
- package/form-view/style.css +1 -1
- package/fy-curd/index.mjs +131 -140
- package/fy-curd/style.css +1 -1
- package/fy-draggable/index.mjs +16 -26
- package/fy-draggable/style.css +1 -1
- package/fy-dynamic/index.mjs +48 -57
- package/fy-empty/style.css +1 -1
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +314 -339
- package/fy-form-design/style.css +1 -1
- package/fy-input-map/index.mjs +40 -50
- package/fy-input-map/style.css +1 -1
- package/fy-input-table/index.mjs +31 -41
- package/fy-u-editor/index.mjs +77 -103
- package/fy-upload/style.css +1 -1
- package/highlight-j-s/style.css +1 -1
- package/image-cropper/index.mjs +14 -65
- package/image-preview/index.mjs +17 -45
- package/image-preview/style.css +1 -1
- package/image-viewer/style.css +1 -1
- package/index.mjs +666 -496
- package/input-number/index.mjs +64 -9
- package/keyboard/style.css +1 -1
- package/monaco-editor/index.mjs +43 -71
- package/name-avatar/style.css +1 -1
- package/package.json +5 -4
- package/page-index/index.mjs +30 -54
- package/page-index-top/index.mjs +25 -47
- package/pageable-table/index.mjs +385 -218
- package/pageable-table/style.css +1 -1
- package/pageable-view/index.mjs +56 -95
- package/photo-swipe/index.mjs +51 -74
- package/picker-table-view/index.mjs +117 -0
- package/present-view/index.mjs +43 -77
- package/present-view/style.css +1 -1
- package/resize-observer/index.mjs +1 -1
- package/resize-observer/style.css +1 -1
- package/search/style.css +1 -1
- package/search-popover/index.mjs +28 -48
- package/search-popover/style.css +1 -1
- package/sign/index.mjs +1 -1
- package/sign-panel/style.css +1 -1
- package/skeleton-panel/index.mjs +38 -0
- package/skeleton-panel/style.css +1 -0
- package/split-pane/index.mjs +31 -49
- package/split-pane/style.css +1 -1
- package/sub-table/index.mjs +206 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.mjs +231 -0
- package/sub-table-plus/style.css +1 -0
- package/swiper/index.mjs +18 -38
- package/swiper/style.css +1 -1
- package/tab/index.mjs +1 -1
- package/tab/style.css +1 -1
- package/tab-item/index.mjs +2 -2
- package/table-column/index.mjs +166 -37
- package/table-column/style.css +1 -0
- package/table-view/index.mjs +177 -132
- package/table-view/style.css +1 -1
- package/tabs-view/index.mjs +104 -0
- package/tabs-view/style.css +1 -0
- package/tag-render/index.mjs +13 -24
- package/toolbar/index.mjs +115 -58
- package/toolbar/style.css +1 -1
- package/toolbar-button/index.mjs +92 -48
- package/vue-cron/index.mjs +47 -65
- package/vue-qr-code/index.mjs +14 -32
- package/vue-quill-editor/index.mjs +13 -24
- package/vue-tags-input/index.mjs +10 -21
- package/vue-tree-select/index.mjs +352 -393
- package/vue-tree-select/style.css +1 -1
- package/vue-video-player/index.mjs +34 -63
- package/watermark/index.mjs +21 -31
- package/web-types.json +9240 -3840
- package/x-input-tag/index.mjs +29 -61
- package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
- package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
- package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
- package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
- package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
- package/toolbar-button/style.css +0 -1
- /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
|
@@ -1,30 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var p = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var s = (o, e, r) => e in o ? u(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r, t = (o, e) => {
|
|
5
|
-
for (var r in e || (e = {}))
|
|
6
|
-
p.call(e, r) && s(o, r, e[r]);
|
|
7
|
-
if (n)
|
|
8
|
-
for (var r of n(e))
|
|
9
|
-
f.call(e, r) && s(o, r, e[r]);
|
|
10
|
-
return o;
|
|
11
|
-
};
|
|
12
|
-
import { f as c } from "../chunks/form-input-mixin.BkKiqJhi.mjs";
|
|
13
|
-
import { f as h } from "../chunks/form-pick-mixin.BFTIVn_i.mjs";
|
|
1
|
+
import { f as n } from "../chunks/form-input.B8z37eqj.mjs";
|
|
2
|
+
import { f as l } from "../chunks/form-pick.BFTIVn_i.mjs";
|
|
14
3
|
import a from "element-ui/lib/radio-group";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
4
|
+
import { c as s, n as u } from "../chunks/index.d3MV3Wq2.mjs";
|
|
5
|
+
import { d as p } from "../chunks/dictionary.DqiP9x2m.mjs";
|
|
6
|
+
import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
7
|
+
const d = Object.keys(a.props).filter((o) => !["value", "placeholder", "disabled"].includes(o)), f = {
|
|
18
8
|
name: "FormRadioGroup",
|
|
19
|
-
mixins: [
|
|
9
|
+
mixins: [n, l, p],
|
|
20
10
|
props: {
|
|
21
11
|
options: {
|
|
22
12
|
type: Array,
|
|
23
13
|
default: () => []
|
|
24
14
|
},
|
|
15
|
+
border: Boolean,
|
|
25
16
|
gender: Boolean,
|
|
26
17
|
overFlow: Boolean,
|
|
27
18
|
confirm: Boolean,
|
|
19
|
+
trigger: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "change"
|
|
22
|
+
},
|
|
28
23
|
labelProp: {
|
|
29
24
|
type: String,
|
|
30
25
|
default: "name"
|
|
@@ -36,18 +31,28 @@ const v = Object.keys(a.props || a.default.props).filter((o) => !["value", "plac
|
|
|
36
31
|
english: Boolean,
|
|
37
32
|
chinese: Boolean,
|
|
38
33
|
typing: Boolean,
|
|
39
|
-
classic:
|
|
34
|
+
classic: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !0
|
|
37
|
+
},
|
|
40
38
|
fillRow: Boolean,
|
|
41
39
|
ellipsis: Boolean,
|
|
42
40
|
inline: Boolean,
|
|
43
|
-
allowCancel: Boolean
|
|
41
|
+
allowCancel: Boolean,
|
|
42
|
+
radioType: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "radio"
|
|
45
|
+
}
|
|
44
46
|
},
|
|
45
47
|
computed: {
|
|
48
|
+
component() {
|
|
49
|
+
return this.radioType === "radio" ? "ElRadio" : "ElRadioButton";
|
|
50
|
+
},
|
|
46
51
|
prefix() {
|
|
47
52
|
return "请选择";
|
|
48
53
|
},
|
|
49
54
|
inputProps() {
|
|
50
|
-
return
|
|
55
|
+
return s({ ...u(this.$attrs), ...this.$props }, d);
|
|
51
56
|
},
|
|
52
57
|
labelKey() {
|
|
53
58
|
return this.classic ? "label" : this.labelProp;
|
|
@@ -56,7 +61,7 @@ const v = Object.keys(a.props || a.default.props).filter((o) => !["value", "plac
|
|
|
56
61
|
return this.classic ? "value" : this.valueProp;
|
|
57
62
|
},
|
|
58
63
|
innerOptions() {
|
|
59
|
-
return this.gender ? [
|
|
64
|
+
return this.dictType ? this.dictItems : this.gender ? [
|
|
60
65
|
{
|
|
61
66
|
[this.labelKey]: "男",
|
|
62
67
|
[this.valueKey]: this.chinese ? "男" : this.typing ? 1 : "1"
|
|
@@ -86,32 +91,32 @@ const v = Object.keys(a.props || a.default.props).filter((o) => !["value", "plac
|
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
93
|
};
|
|
89
|
-
var
|
|
94
|
+
var h = function() {
|
|
90
95
|
var e = this, r = e._self._c;
|
|
91
96
|
return r("FormItem", e._b({ class: ["form-radio-group", { "form-radio-group-row": e.fillRow, inline: e.inline }, e.ellipsis ? "form-radio-group-row-ellipsis" : "form-radio-group-row-break-word"], attrs: { rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
|
|
92
|
-
return [r("ElRadioGroup", e._g(e._b({ class: { "over-flow": e.overFlow }, attrs: { value: e.value, disabled: e.inputDisabled, placeholder: e.computePlaceholder }, on: { input: (
|
|
93
|
-
return r(
|
|
94
|
-
return i.preventDefault(), i.stopPropagation(), e.toggle(
|
|
95
|
-
} } }, [e._v(" " + e._s(
|
|
96
|
-
}) : e._l(e.innerOptions, function(
|
|
97
|
-
return r(
|
|
97
|
+
return [r("ElRadioGroup", e._g(e._b({ class: { "over-flow": e.overFlow }, attrs: { value: e.value, disabled: e.inputDisabled, placeholder: e.computePlaceholder }, on: { input: (t) => e.$emit("input", t) } }, "ElRadioGroup", e.inputProps, !1), e.listeners), [e.allowCancel ? e._l(e.innerOptions, function(t) {
|
|
98
|
+
return r(e.component, { key: t[e.valueKey], tag: "Component", attrs: { border: e.border, label: t[e.valueKey] }, nativeOn: { click: function(i) {
|
|
99
|
+
return i.preventDefault(), i.stopPropagation(), e.toggle(t);
|
|
100
|
+
} } }, [e._v(" " + e._s(t[e.labelKey]) + " ")]);
|
|
101
|
+
}) : e._l(e.innerOptions, function(t) {
|
|
102
|
+
return r(e.component, { key: t[e.valueKey], tag: "Component", attrs: { border: e.border, label: t[e.valueKey] } }, [e._v(" " + e._s(t[e.labelKey]) + " ")]);
|
|
98
103
|
})], 2), e._t("append")];
|
|
99
|
-
}, proxy: !0 }, { key: "error", fn: function({ error:
|
|
100
|
-
return [e._t("error", null, { error:
|
|
104
|
+
}, proxy: !0 }, { key: "error", fn: function({ error: t }) {
|
|
105
|
+
return [e._t("error", null, { error: t })];
|
|
101
106
|
} }, { key: "label", fn: function() {
|
|
102
107
|
return [e._t("label")];
|
|
103
108
|
}, proxy: !0 }, { key: "below", fn: function() {
|
|
104
109
|
return [e._t("below")];
|
|
105
110
|
}, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
}, m = [], y = /* @__PURE__ */ c(
|
|
112
|
+
f,
|
|
113
|
+
h,
|
|
114
|
+
m,
|
|
110
115
|
!1,
|
|
111
116
|
null,
|
|
112
117
|
null
|
|
113
118
|
);
|
|
114
|
-
const
|
|
119
|
+
const w = y.exports;
|
|
115
120
|
export {
|
|
116
|
-
|
|
121
|
+
w as default
|
|
117
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-radio-group.inline{display:inline}.form-radio-group.inline .el-radio{float:left;margin-right:10px}.form-radio-group.form-radio-group-row.form-radio-group-row-ellipsis .el-radio__label{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.form-radio-group.form-radio-group-row.form-radio-group-row-break-word .el-radio__label{word-wrap:break-word;word-break:break-all}.form-radio-group.form-radio-group-row .el-radio-group{display:block}.form-radio-group.form-radio-group-row .el-radio{flex-flow:row;width:100%;display:flex}.form-radio-group.form-radio-group-row .el-radio__input{flex-shrink:0;top:3px}.form-radio-group.form-radio-group-row .el-radio__label{vertical-align:sub;flex:auto;margin-bottom:6px;padding-left:4px;display:block}.form-radio-group .el-radio-group{line-height:1}.form-radio-group .el-radio{vertical-align:middle;margin-right:10px}.form-radio-group .el-radio__label{padding-left:0;line-height:19px}
|
|
1
|
+
.form-radio-group.inline{display:inline}.form-radio-group.inline .el-radio{float:left;margin-right:10px}.form-radio-group .el-form-item__content{flex-direction:row;align-items:end;line-height:normal;display:flex}.form-radio-group.form-radio-group-row.form-radio-group-row-ellipsis .el-radio-group{overflow:hidden}.form-radio-group.form-radio-group-row.form-radio-group-row-ellipsis .el-radio__label{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.form-radio-group.form-radio-group-row.form-radio-group-row-break-word .el-radio__label{word-wrap:break-word;word-break:break-all}.form-radio-group.form-radio-group-row .el-radio-group{display:block}.form-radio-group.form-radio-group-row .el-radio{flex-flow:row;width:100%;display:flex}.form-radio-group.form-radio-group-row .el-radio__input{flex-shrink:0;top:3px}.form-radio-group.form-radio-group-row .el-radio__label{vertical-align:sub;flex:auto;margin-bottom:6px;padding-left:4px;display:block}.form-radio-group .el-radio-group{line-height:1}.form-radio-group .el-radio{vertical-align:middle;margin-right:10px}.form-radio-group .el-radio__label{padding-left:0;line-height:19px}
|
package/form-select/index.mjs
CHANGED
|
@@ -1,112 +1,179 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
p.call(e, t) && n(r, t, e[t]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
import { f as c } from "../chunks/form-input-mixin.BkKiqJhi.mjs";
|
|
13
|
-
import { f } from "../chunks/form-pick-mixin.BFTIVn_i.mjs";
|
|
14
|
-
import o from "element-ui/lib/select";
|
|
15
|
-
import { d as h, n as m } from "../chunks/index.MAFc4eFi.mjs";
|
|
16
|
-
import { n as y } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
17
|
-
const d = Object.keys(o.props || o.default.props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), _ = {
|
|
1
|
+
import { f as o } from "../chunks/form-input.B8z37eqj.mjs";
|
|
2
|
+
import { f as l } from "../chunks/form-pick.BFTIVn_i.mjs";
|
|
3
|
+
import { d as n } from "../chunks/dictionary.DqiP9x2m.mjs";
|
|
4
|
+
import a from "element-ui/lib/select";
|
|
5
|
+
import { c as p, n as u } from "../chunks/index.d3MV3Wq2.mjs";
|
|
6
|
+
import { isString as h, isPlainObject as m, isNumber as f } from "@web-utils/core";
|
|
7
|
+
import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
8
|
+
const d = Object.keys(a.props).filter((e) => !["value", "placeholder", "disabled"].includes(e)), b = {
|
|
18
9
|
name: "FormSelect",
|
|
19
|
-
mixins: [
|
|
10
|
+
mixins: [o, l, n],
|
|
20
11
|
props: {
|
|
21
12
|
options: {
|
|
22
13
|
type: Array,
|
|
23
14
|
default: () => []
|
|
24
15
|
},
|
|
25
16
|
gender: Boolean,
|
|
17
|
+
year: [Boolean, Number],
|
|
26
18
|
all: Boolean,
|
|
27
19
|
filterable: Boolean,
|
|
28
20
|
confirm: Boolean,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
default: "name"
|
|
35
|
-
},
|
|
36
|
-
valueProp: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: "code"
|
|
39
|
-
},
|
|
21
|
+
start: Number,
|
|
22
|
+
end: Number,
|
|
23
|
+
value: [String, Number, Array],
|
|
24
|
+
optionLabel: [String, Number],
|
|
25
|
+
emitLabel: Boolean,
|
|
40
26
|
english: Boolean,
|
|
41
27
|
chinese: Boolean,
|
|
42
28
|
typing: Boolean,
|
|
43
|
-
|
|
29
|
+
remote: Boolean,
|
|
30
|
+
allowCreate: Boolean,
|
|
31
|
+
remoteMethod: Function,
|
|
32
|
+
props: {
|
|
33
|
+
type: Object,
|
|
34
|
+
default: () => ({
|
|
35
|
+
label: "label",
|
|
36
|
+
value: "value"
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
multiple: Boolean,
|
|
40
|
+
multipleLimit: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 0
|
|
43
|
+
},
|
|
44
|
+
multipleStringMode: Boolean,
|
|
45
|
+
multipleStringSeparator: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ","
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
loading: !1,
|
|
53
|
+
remoteOptions: [],
|
|
54
|
+
innerValue: null
|
|
55
|
+
};
|
|
44
56
|
},
|
|
45
57
|
computed: {
|
|
46
58
|
prefix() {
|
|
47
59
|
return "请选择";
|
|
48
60
|
},
|
|
49
|
-
labelKey() {
|
|
50
|
-
return this.classic ? "label" : this.labelProp;
|
|
51
|
-
},
|
|
52
|
-
valueKey() {
|
|
53
|
-
return this.classic ? "value" : this.valueProp;
|
|
54
|
-
},
|
|
55
61
|
inputProps() {
|
|
56
|
-
return
|
|
62
|
+
return p({ ...u(this.$attrs), ...this.$props }, d);
|
|
57
63
|
},
|
|
58
64
|
innerOptions() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
if (this.dictType)
|
|
66
|
+
return this.dictItems;
|
|
67
|
+
if (this.remote)
|
|
68
|
+
return this.remoteOptions;
|
|
69
|
+
if (this.gender)
|
|
70
|
+
return [
|
|
71
|
+
{
|
|
72
|
+
[this.props.label]: "男",
|
|
73
|
+
[this.props.value]: this.chinese ? "男" : this.typing ? 1 : "1"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
[this.props.label]: "女",
|
|
77
|
+
[this.props.value]: this.chinese ? "女" : this.typing ? 2 : "2"
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
if (this.confirm)
|
|
81
|
+
return [
|
|
82
|
+
{
|
|
83
|
+
[this.props.label]: "是",
|
|
84
|
+
[this.props.value]: this.chinese ? "是" : this.english ? "Y" : this.typing ? 1 : "1"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
[this.props.label]: "否",
|
|
88
|
+
[this.props.value]: this.chinese ? "否" : this.english ? "N" : this.typing ? 0 : "0"
|
|
89
|
+
}
|
|
90
|
+
];
|
|
91
|
+
if (this.all)
|
|
92
|
+
return [{ [this.props.value]: "", [this.props.label]: "全部" }, ...this.options];
|
|
93
|
+
if (this.start && this.end)
|
|
94
|
+
return Array(this.end - this.start + 1).fill(1).map((e, t) => ({
|
|
95
|
+
[this.props.label]: this.start + t,
|
|
96
|
+
[this.props.value]: this.start + t
|
|
97
|
+
}));
|
|
98
|
+
if (this.year) {
|
|
99
|
+
const e = (/* @__PURE__ */ new Date()).getFullYear(), t = [];
|
|
100
|
+
let i = 10;
|
|
101
|
+
f(this.year) && (i = this.year);
|
|
102
|
+
for (let r = -i; r <= i; r++) {
|
|
103
|
+
const s = e + r;
|
|
104
|
+
t.push({
|
|
105
|
+
[this.props.label]: s,
|
|
106
|
+
[this.props.value]: s
|
|
107
|
+
});
|
|
76
108
|
}
|
|
77
|
-
|
|
109
|
+
return t;
|
|
110
|
+
}
|
|
111
|
+
return this.options ? this.options.map((e) => (e[this.props.value] = e[this.props.value] ?? e[this.props.label], e)) : [];
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
watch: {
|
|
115
|
+
value: {
|
|
116
|
+
immediate: !0,
|
|
117
|
+
handler(e) {
|
|
118
|
+
this.multiple && this.multipleStringMode ? this.innerValue = e == null ? void 0 : e.split(",").filter((t) => t) : this.innerValue = e;
|
|
119
|
+
}
|
|
78
120
|
}
|
|
79
121
|
},
|
|
122
|
+
created() {
|
|
123
|
+
this.reloadOptions();
|
|
124
|
+
},
|
|
80
125
|
methods: {
|
|
81
|
-
|
|
82
|
-
this
|
|
126
|
+
reloadOptions() {
|
|
127
|
+
this.remote && this.fetchOptions();
|
|
128
|
+
},
|
|
129
|
+
async fetchOptions(e) {
|
|
130
|
+
var t;
|
|
131
|
+
try {
|
|
132
|
+
this.loading = !0;
|
|
133
|
+
const i = await this.remoteMethod(e, this.prop);
|
|
134
|
+
((t = i.data.data) == null ? void 0 : t.length) >= 0 ? h(i.data.data[0]) ? this.remoteOptions = i.data.data.map((r) => ({ [this.props.value]: r, [this.props.label]: r })) : m(i.data.data[0]) && (this.remoteOptions = i.data.data) : this.remoteOptions = [];
|
|
135
|
+
} catch {
|
|
136
|
+
}
|
|
137
|
+
this.loading = !1;
|
|
138
|
+
},
|
|
139
|
+
emitInput(e) {
|
|
140
|
+
if (this.multiple && this.multipleStringMode ? this.$emit("input", e.join(this.multipleStringSeparator)) : this.$emit("input", e), this.emitLabel) {
|
|
141
|
+
const t = this.innerOptions.find((r) => r[this.props.value] === e), i = t == null ? void 0 : t[this.props.label];
|
|
142
|
+
i !== this.optionLabel && this.$emit("update:optionLabel", i);
|
|
143
|
+
}
|
|
83
144
|
}
|
|
84
145
|
}
|
|
85
146
|
};
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
return
|
|
89
|
-
return [
|
|
90
|
-
return t(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}, {
|
|
147
|
+
var y = function() {
|
|
148
|
+
var t = this, i = t._self._c;
|
|
149
|
+
return i("FormItem", t._b({ attrs: { rules: t.computeRules, disabled: t.inputDisabled }, scopedSlots: t._u([{ key: "default", fn: function() {
|
|
150
|
+
return [i("ElSelect", t._g(t._b({ attrs: { value: t.innerValue, filterable: t.filterable || !!t.year, placeholder: t.inputDisabled ? "--" : t.computePlaceholder, "allow-create": t.allowCreate || !!t.year, disabled: t.inputDisabled, multiple: t.multiple, "multiple-limit": t.multipleLimit, loading: t.loading, remote: t.remote, "remote-method": t.fetchOptions, clearable: "" }, on: { clear: t.reloadOptions, input: t.emitInput } }, "ElSelect", t.inputProps, !1), t.listeners), [t._t("default", function() {
|
|
151
|
+
return [t._l(t.innerOptions, function(r) {
|
|
152
|
+
return [t._t("option", function() {
|
|
153
|
+
return [i("ElOption", { key: r[t.props.value], attrs: { value: r[t.props.value], label: r[t.props.label] } })];
|
|
154
|
+
}, { value: r[t.props.value], label: r[t.props.label] })];
|
|
155
|
+
})];
|
|
156
|
+
})], 2), t.$slots.warn ? i("div", { staticClass: "el-form-item__warn" }, [t._t("warn")], 2) : t._e()];
|
|
157
|
+
}, proxy: !0 }, { key: "error", fn: function({ error: r }) {
|
|
158
|
+
return [t.$scopedSlots.error && t.$scopedSlots.error(r) ? i("div", { staticClass: "el-form-item__error" }, [t._t("error", function() {
|
|
159
|
+
return [t._v(t._s(r))];
|
|
160
|
+
}, { error: r })], 2) : t._e()];
|
|
96
161
|
} }, { key: "label", fn: function() {
|
|
97
|
-
return [
|
|
162
|
+
return [t._t("label")];
|
|
98
163
|
}, proxy: !0 }, { key: "below", fn: function() {
|
|
99
|
-
return [
|
|
100
|
-
}, proxy: !0 }
|
|
101
|
-
|
|
102
|
-
|
|
164
|
+
return [t._t("below")];
|
|
165
|
+
}, proxy: !0 }, { key: "tips", fn: function() {
|
|
166
|
+
return [t._t("tips")];
|
|
167
|
+
}, proxy: !0 }], null, !0) }, "FormItem", t.formItemProps, !1));
|
|
168
|
+
}, _ = [], g = /* @__PURE__ */ c(
|
|
103
169
|
b,
|
|
104
|
-
|
|
170
|
+
y,
|
|
171
|
+
_,
|
|
105
172
|
!1,
|
|
106
173
|
null,
|
|
107
174
|
null
|
|
108
175
|
);
|
|
109
|
-
const
|
|
176
|
+
const P = g.exports;
|
|
110
177
|
export {
|
|
111
|
-
|
|
178
|
+
P as default
|
|
112
179
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.el-select{width:100%}
|
package/form-switch/index.mjs
CHANGED
|
@@ -1,59 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
a.call(e, t) && l(r, t, e[t]);
|
|
7
|
-
if (o)
|
|
8
|
-
for (var t of o(e))
|
|
9
|
-
p.call(e, t) && l(r, t, e[t]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
import { f as c } from "../chunks/form-input-mixin.BkKiqJhi.mjs";
|
|
13
|
-
import s from "element-ui/lib/switch";
|
|
14
|
-
import { d as m, n as d } from "../chunks/index.MAFc4eFi.mjs";
|
|
15
|
-
import { n as f } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
16
|
-
const _ = Object.keys(s.props || s.default.props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), y = {
|
|
1
|
+
import { f as o } from "../chunks/form-input.B8z37eqj.mjs";
|
|
2
|
+
import l from "element-ui/lib/switch";
|
|
3
|
+
import { c as a, n as u } from "../chunks/index.d3MV3Wq2.mjs";
|
|
4
|
+
import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
const s = Object.keys(l.props).filter((t) => !["value", "placeholder", "disabled"].includes(t)), p = {
|
|
17
6
|
name: "FormSwitch",
|
|
18
|
-
mixins: [
|
|
7
|
+
mixins: [o],
|
|
19
8
|
props: {
|
|
20
|
-
value:
|
|
21
|
-
|
|
9
|
+
value: [String, Number, Boolean],
|
|
10
|
+
activeValue: {
|
|
11
|
+
type: [Boolean, String, Number],
|
|
12
|
+
default: "Y"
|
|
13
|
+
},
|
|
14
|
+
inactiveValue: {
|
|
15
|
+
type: [Boolean, String, Number],
|
|
16
|
+
default: "N"
|
|
22
17
|
}
|
|
23
18
|
},
|
|
24
19
|
computed: {
|
|
25
20
|
inputProps() {
|
|
26
|
-
return
|
|
21
|
+
return a({ ...u(this.$attrs), ...this.$props }, s);
|
|
27
22
|
}
|
|
28
23
|
},
|
|
29
24
|
methods: {
|
|
30
|
-
emitInput(
|
|
31
|
-
this.$emit("input",
|
|
25
|
+
emitInput(t) {
|
|
26
|
+
this.$emit("input", t);
|
|
32
27
|
}
|
|
33
28
|
}
|
|
34
29
|
};
|
|
35
|
-
var
|
|
36
|
-
var e = this,
|
|
37
|
-
return
|
|
30
|
+
var c = function() {
|
|
31
|
+
var e = this, r = e._self._c;
|
|
32
|
+
return r("FormItem", e._b({ attrs: { rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
|
|
38
33
|
return [e._t("default", function() {
|
|
39
|
-
return [
|
|
34
|
+
return [r("ElSwitch", e._g(e._b({ class: { "is-readonly": e.readonly }, attrs: { "active-value": e.activeValue, "inactive-value": e.inactiveValue, value: e.value, readonly: e.readonly, disabled: e.inputDisabled, placeholder: e.computePlaceholder }, on: { input: e.emitInput }, scopedSlots: e._u([{ key: "append", fn: function() {
|
|
40
35
|
return [e._t("append")];
|
|
41
36
|
}, proxy: !0 }], null, !0) }, "ElSwitch", e.inputProps, !1), e.listeners))];
|
|
42
37
|
})];
|
|
43
|
-
}, proxy: !0 }, { key: "error", fn: function({ error:
|
|
44
|
-
return [e._t("error", null, { error:
|
|
38
|
+
}, proxy: !0 }, { key: "error", fn: function({ error: n }) {
|
|
39
|
+
return [e._t("error", null, { error: n })];
|
|
45
40
|
} }, { key: "label", fn: function() {
|
|
46
41
|
return [e._t("label")];
|
|
47
42
|
}, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
}, m = [], d = /* @__PURE__ */ i(
|
|
44
|
+
p,
|
|
45
|
+
c,
|
|
46
|
+
m,
|
|
52
47
|
!1,
|
|
53
48
|
null,
|
|
54
49
|
null
|
|
55
50
|
);
|
|
56
|
-
const
|
|
51
|
+
const b = d.exports;
|
|
57
52
|
export {
|
|
58
|
-
|
|
53
|
+
b as default
|
|
59
54
|
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { f as a } from "../chunks/form-input.B8z37eqj.mjs";
|
|
2
|
+
import { c as s, n as d } from "../chunks/index.d3MV3Wq2.mjs";
|
|
3
|
+
import c from "../sub-table/index.mjs";
|
|
4
|
+
import { n as m } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
const i = Object.keys(c.props).filter((l) => !["value", "placeholder", "disabled"].includes(l)), p = {
|
|
6
|
+
name: "FormTable",
|
|
7
|
+
mixins: [a],
|
|
8
|
+
emits: ["add-row"],
|
|
9
|
+
props: {
|
|
10
|
+
value: Array,
|
|
11
|
+
columns: Array,
|
|
12
|
+
allowEmpty: Boolean,
|
|
13
|
+
handleColumn: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !0
|
|
16
|
+
},
|
|
17
|
+
block: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !0
|
|
20
|
+
},
|
|
21
|
+
editable: Boolean,
|
|
22
|
+
showHandleColumnAddButton: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
showEmptyAddButton: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
},
|
|
30
|
+
status: {
|
|
31
|
+
type: [Number, String],
|
|
32
|
+
default: ""
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
selectedRows: []
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
inputProps() {
|
|
42
|
+
return s({ ...d(this.$attrs), ...this.$props }, i);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
onSelectionChange(l) {
|
|
47
|
+
this.selectedRows = l;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var f = function() {
|
|
52
|
+
var e = this, r = e._self._c;
|
|
53
|
+
return r("FormItem", e._b({ attrs: { block: e.block, rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
|
|
54
|
+
return [r("SubTable", e._g(e._b({ class: { "is-readonly": e.readonly }, attrs: { status: e.status, value: e.value, prop: e.prop, editable: e.editable, columns: e.columns, readonly: e.readonly, "allow-empty": e.allowEmpty, disabled: e.inputDisabled, "handle-column": e.handleColumn, "show-handle-column-add-button": e.showHandleColumnAddButton, "show-empty-add-button": e.showEmptyAddButton, placeholder: e.computePlaceholder }, on: { "selection-change": e.onSelectionChange, input: (n) => e.$emit("input", n) }, scopedSlots: e._u([e._l(e.columns, function(n) {
|
|
55
|
+
return { key: n.prop, fn: function({ row: o, column: t, index: u }) {
|
|
56
|
+
return [e._t(n.prop, null, { row: o, column: t, index: u })];
|
|
57
|
+
} };
|
|
58
|
+
}), { key: "columns", fn: function({ columns: n }) {
|
|
59
|
+
return [e._t("columns", null, { columns: n })];
|
|
60
|
+
} }, { key: "handle", fn: function({ add: n, remove: o }) {
|
|
61
|
+
return [e._t("handle", null, { add: n, remove: o })];
|
|
62
|
+
} }, { key: "tag", fn: function({ column: n, row: o, $index: t }) {
|
|
63
|
+
return [e._t("tag", null, { row: o, column: n, index: t })];
|
|
64
|
+
} }, { key: "handle-column-header", fn: function({ column: n, $index: o }) {
|
|
65
|
+
return [e._t("handle-column-header", null, { column: n, index: o })];
|
|
66
|
+
} }, { key: "toolbar", fn: function({ addRow: n, delRow: o, refresh: t }) {
|
|
67
|
+
return [e._t("toolbar", null, { addRow: n, delRow: o, refresh: t })];
|
|
68
|
+
} }], null, !0) }, "SubTable", e.inputProps, !1), e.listeners))];
|
|
69
|
+
}, proxy: !0 }, { key: "error", fn: function({ error: n }) {
|
|
70
|
+
return [e._t("error", null, { error: n })];
|
|
71
|
+
} }, { key: "label", fn: function() {
|
|
72
|
+
return [e._t("label")];
|
|
73
|
+
}, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
|
|
74
|
+
}, y = [], b = /* @__PURE__ */ m(
|
|
75
|
+
p,
|
|
76
|
+
f,
|
|
77
|
+
y,
|
|
78
|
+
!1,
|
|
79
|
+
null,
|
|
80
|
+
null
|
|
81
|
+
);
|
|
82
|
+
const B = b.exports;
|
|
83
|
+
export {
|
|
84
|
+
B as default
|
|
85
|
+
};
|