@web-utils/component 3.8.3 → 4.0.1
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/index.mjs +13 -13
- package/card/style.css +1 -1
- package/carousel/style.css +1 -1
- package/chat/index.mjs +2 -2
- 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/{FormTemp.BSpnNput.mjs → FormTemp.Bu2VCxUh.mjs} +2 -2
- 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/{dataformat.B9UvztrQ.mjs → dataformat.CpqOeGBl.mjs} +2 -2
- package/chunks/{dic.CET0XdKP.mjs → dic.Dkl-leRW.mjs} +43 -43
- package/chunks/dictionary.DqiP9x2m.mjs +25 -0
- package/chunks/{event.BT1F_1vF.mjs → event.9aDS6jcw.mjs} +2 -2
- 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/{init.ofpxEyAI.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/{packages.CWPkeLu9.mjs → packages.ByyangTp.mjs} +3 -3
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
- package/chunks/{util.CoahLDYn.mjs → util.DqFv_pWg.mjs} +54 -55
- 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/index.mjs +30 -32
- package/flow-designer/index.mjs +344 -375
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +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 +60 -64
- 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 +43 -77
- package/form-view/style.css +1 -1
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +1 -1
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +12 -17
- package/fy-curd/style.css +1 -1
- package/fy-date/index.mjs +1 -1
- package/fy-draggable/index.mjs +5 -7
- package/fy-draggable/style.css +1 -1
- package/fy-dynamic/index.mjs +14 -16
- package/fy-empty/index.mjs +1 -1
- package/fy-empty/style.css +1 -1
- package/fy-form/index.mjs +117 -136
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +319 -345
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +2 -2
- package/fy-input-color/index.mjs +1 -1
- package/fy-input-icon/index.mjs +1 -1
- package/fy-input-map/index.mjs +21 -26
- package/fy-input-map/style.css +1 -1
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +10 -12
- package/fy-input-tree/index.mjs +1 -1
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +1 -1
- package/fy-select/index.mjs +4 -4
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +0 -1
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +1 -1
- package/fy-u-editor/index.mjs +77 -103
- package/fy-upload/index.mjs +3 -3
- package/fy-upload/style.css +1 -1
- package/highlight-j-s/index.mjs +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/license/index.mjs +1 -1
- package/login/index.mjs +1 -1
- package/monaco-editor/index.mjs +44 -74
- package/name-avatar/style.css +1 -1
- package/package.json +18 -17
- package/page-index/index.mjs +30 -54
- package/page-index-top/index.mjs +25 -47
- package/pageable-table/index.mjs +354 -226
- package/pageable-table/style.css +1 -1
- package/pageable-view/index.mjs +63 -106
- 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/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/resize-observer/style.css +1 -1
- package/search/index.mjs +2 -2
- package/search/style.css +1 -1
- package/search-popover/index.mjs +28 -48
- package/search-popover/style.css +1 -1
- package/sign/index.mjs +2 -2
- 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 +112 -37
- package/table-column/style.css +1 -0
- package/table-view/index.mjs +178 -135
- 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/text-ellipsis/index.mjs +1 -1
- package/toolbar/index.mjs +115 -58
- package/toolbar/style.css +1 -1
- package/toolbar-button/index.mjs +92 -48
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +48 -66
- package/vue-qr-code/index.mjs +14 -32
- package/vue-quill-editor/index.mjs +3 -3
- package/vue-tags-input/index.mjs +1 -1
- package/vue-tree-select/index.mjs +352 -393
- package/vue-tree-select/style.css +1 -1
- package/vue-video-player/index.mjs +36 -67
- package/watermark/index.mjs +21 -31
- package/web-types.json +9240 -3843
- 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,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
m.call(e, t) && l(r, t, e[t]);
|
|
7
|
-
if (i)
|
|
8
|
-
for (var t of i(e))
|
|
9
|
-
p.call(e, t) && l(r, t, e[t]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
import { f as u } from "../chunks/form-input-mixin.BkKiqJhi.mjs";
|
|
13
|
-
import o from "element-ui/lib/time-picker";
|
|
14
|
-
import { d as f, n as d } from "../chunks/index.MAFc4eFi.mjs";
|
|
15
|
-
import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
16
|
-
const _ = Object.keys(o.props || o.default.props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), g = {
|
|
1
|
+
import { f as a } from "../chunks/form-input.B8z37eqj.mjs";
|
|
2
|
+
import i from "element-ui/lib/time-picker";
|
|
3
|
+
import { c as l, n as o } from "../chunks/index.d3MV3Wq2.mjs";
|
|
4
|
+
import { n as s } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
const m = Object.keys(i.props).filter((r) => !["value", "placeholder", "disabled"].includes(r)), p = {
|
|
17
6
|
name: "FormInputTime",
|
|
18
|
-
mixins: [
|
|
7
|
+
mixins: [a],
|
|
19
8
|
props: {
|
|
20
9
|
range: Boolean,
|
|
21
10
|
format: {
|
|
22
11
|
type: String,
|
|
23
12
|
default: "HH:mm:ss"
|
|
24
13
|
},
|
|
25
|
-
valueFormat:
|
|
26
|
-
type: String
|
|
27
|
-
},
|
|
14
|
+
valueFormat: String,
|
|
28
15
|
start: {
|
|
29
16
|
type: String,
|
|
30
17
|
default: "09:00"
|
|
@@ -45,44 +32,42 @@ const _ = Object.keys(o.props || o.default.props).filter((r) => !["value", "plac
|
|
|
45
32
|
type: String,
|
|
46
33
|
default: ""
|
|
47
34
|
},
|
|
48
|
-
selectableRange:
|
|
49
|
-
type: String
|
|
50
|
-
}
|
|
35
|
+
selectableRange: String
|
|
51
36
|
},
|
|
52
37
|
computed: {
|
|
53
38
|
prefix() {
|
|
54
39
|
return "请选择";
|
|
55
40
|
},
|
|
56
41
|
inputProps() {
|
|
57
|
-
return
|
|
42
|
+
return l({ ...o(this.$attrs), ...this.$props }, m);
|
|
58
43
|
}
|
|
59
44
|
}
|
|
60
45
|
};
|
|
61
|
-
var
|
|
62
|
-
var e = this,
|
|
63
|
-
return
|
|
64
|
-
return [
|
|
46
|
+
var u = function() {
|
|
47
|
+
var e = this, n = e._self._c;
|
|
48
|
+
return n("FormItem", e._b({ attrs: { rules: e.computeRules, disabled: e.inputDisabled }, scopedSlots: e._u([{ key: "default", fn: function() {
|
|
49
|
+
return [n("ElTimePicker", e._g(e._b({ staticStyle: { width: "100%" }, attrs: { "is-range": e.range, value: e.value, disabled: e.inputDisabled, format: e.format, "value-format": e.valueFormat || e.format, clearable: "", "picker-options": {
|
|
65
50
|
start: e.start,
|
|
66
51
|
end: e.end,
|
|
67
52
|
step: e.step,
|
|
68
53
|
minTime: e.minTime,
|
|
69
54
|
maxTime: e.maxTime,
|
|
70
55
|
selectableRange: e.selectableRange
|
|
71
|
-
}, "start-placeholder": "开始时间", "end-placeholder": "结束时间", placeholder: e.computePlaceholder }, on: { input: (
|
|
72
|
-
}, proxy: !0 }, { key: "error", fn: function({ error:
|
|
73
|
-
return [e._t("error", null, { error:
|
|
56
|
+
}, "start-placeholder": "开始时间", "end-placeholder": "结束时间", placeholder: e.computePlaceholder }, on: { input: (t) => e.$emit("input", t) } }, "ElTimePicker", e.inputProps, !1), e.listeners))];
|
|
57
|
+
}, proxy: !0 }, { key: "error", fn: function({ error: t }) {
|
|
58
|
+
return [e._t("error", null, { error: t })];
|
|
74
59
|
} }, { key: "label", fn: function() {
|
|
75
60
|
return [e._t("label")];
|
|
76
61
|
}, proxy: !0 }], null, !0) }, "FormItem", e.formItemProps, !1));
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
62
|
+
}, f = [], c = /* @__PURE__ */ s(
|
|
63
|
+
p,
|
|
64
|
+
u,
|
|
65
|
+
f,
|
|
81
66
|
!1,
|
|
82
67
|
null,
|
|
83
68
|
null
|
|
84
69
|
);
|
|
85
|
-
const
|
|
70
|
+
const y = c.exports;
|
|
86
71
|
export {
|
|
87
|
-
|
|
72
|
+
y as default
|
|
88
73
|
};
|
package/form-item/index.mjs
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
V.call(r, t) && x(e, t, r[t]);
|
|
7
|
-
if (k)
|
|
8
|
-
for (var t of k(r))
|
|
9
|
-
j.call(r, t) && x(e, t, r[t]);
|
|
10
|
-
return e;
|
|
11
|
-
};
|
|
12
|
-
var w = (e, r, t) => new Promise((d, a) => {
|
|
13
|
-
var o = (i) => {
|
|
14
|
-
try {
|
|
15
|
-
l(t.next(i));
|
|
16
|
-
} catch (m) {
|
|
17
|
-
a(m);
|
|
18
|
-
}
|
|
19
|
-
}, s = (i) => {
|
|
20
|
-
try {
|
|
21
|
-
l(t.throw(i));
|
|
22
|
-
} catch (m) {
|
|
23
|
-
a(m);
|
|
24
|
-
}
|
|
25
|
-
}, l = (i) => i.done ? d(i.value) : Promise.resolve(i.value).then(o, s);
|
|
26
|
-
l((t = t.apply(e, r)).next());
|
|
27
|
-
});
|
|
28
|
-
import { h as p } from "vue";
|
|
29
|
-
import { f as B } from "../chunks/form-item-mixin.CG4ZwzMC.mjs";
|
|
30
|
-
import { hasOwn as I } from "@web-utils/core";
|
|
31
|
-
const A = {
|
|
1
|
+
import { h as m } from "vue";
|
|
2
|
+
import { f as B } from "../chunks/form-item.D-H-wCPE.mjs";
|
|
3
|
+
import { hasOwn as I, isDef as D } from "@web-utils/core";
|
|
4
|
+
import { n as L } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
const N = {
|
|
32
6
|
name: "FormItem",
|
|
33
7
|
mixins: [B],
|
|
34
8
|
inject: {
|
|
35
9
|
formHolder: {
|
|
36
|
-
default:
|
|
10
|
+
default: {}
|
|
37
11
|
},
|
|
38
12
|
formItemConfig: {
|
|
39
13
|
default: null
|
|
@@ -41,94 +15,128 @@ const A = {
|
|
|
41
15
|
},
|
|
42
16
|
computed: {
|
|
43
17
|
gutter() {
|
|
44
|
-
var r;
|
|
45
18
|
let e = this.$parent;
|
|
46
19
|
for (; e && e.$options.componentName !== "ElRow"; )
|
|
47
20
|
e = e.$parent;
|
|
48
|
-
return (
|
|
21
|
+
return (e == null ? void 0 : e.gutter) ?? 0;
|
|
49
22
|
}
|
|
50
23
|
},
|
|
51
24
|
methods: {
|
|
52
25
|
renderFormItem() {
|
|
53
|
-
var
|
|
26
|
+
var x, k, R, y, E, T, H;
|
|
54
27
|
const {
|
|
55
|
-
|
|
56
|
-
|
|
28
|
+
hideLabel: e,
|
|
29
|
+
label: l,
|
|
30
|
+
labelWidth: u,
|
|
57
31
|
prop: t,
|
|
58
|
-
rules:
|
|
59
|
-
$scopedSlots:
|
|
60
|
-
elFormItemProps:
|
|
61
|
-
elForm:
|
|
62
|
-
formHolder:
|
|
63
|
-
formItemClass:
|
|
64
|
-
required:
|
|
65
|
-
block:
|
|
66
|
-
half:
|
|
67
|
-
wrapCol:
|
|
68
|
-
wrapFormItem:
|
|
69
|
-
disabled:
|
|
70
|
-
formItemConfig:
|
|
71
|
-
getRequireRule:
|
|
32
|
+
rules: p,
|
|
33
|
+
$scopedSlots: r,
|
|
34
|
+
elFormItemProps: i,
|
|
35
|
+
elForm: n,
|
|
36
|
+
formHolder: a,
|
|
37
|
+
formItemClass: c,
|
|
38
|
+
required: f,
|
|
39
|
+
block: h,
|
|
40
|
+
half: w,
|
|
41
|
+
wrapCol: W,
|
|
42
|
+
wrapFormItem: P,
|
|
43
|
+
disabled: V,
|
|
44
|
+
formItemConfig: s,
|
|
45
|
+
getRequireRule: j
|
|
72
46
|
} = this;
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
47
|
+
let o = p, d = f, b = f, v = h, g = W;
|
|
48
|
+
s && (I(s, "block") && (v = s.block), I(s, "wrapCol") && (g = s.wrapCol));
|
|
49
|
+
const z = a.tableForm ? "" : v && w && g ? `calc( 50% - ${this.gutter / 2}px)` : "";
|
|
50
|
+
(x = a.requiredFields) != null && x.includes(t) && (d = !0), (V || n != null && n.disabled) && !((k = a.requiredFields) != null && k.includes(t)) ? (o = [], !a.required && !((R = a.requiredFields) != null && R.includes(t)) && (b = !1)) : (!a.required && !((y = a.requiredFields) != null && y.includes(t)) && (d = !1), d && !(o != null && o.length) && t ? o = [j()] : d || (b = !1, o && (o = o.filter((C) => !C.required))));
|
|
51
|
+
const F = (E = r.tips) == null ? void 0 : E.call(r), q = F || this.tips, _ = q ? m("ElTooltip", {
|
|
52
|
+
attrs: {
|
|
53
|
+
effect: "light",
|
|
54
|
+
content: this.tips
|
|
55
|
+
}
|
|
56
|
+
}, [F ? m("div", {
|
|
57
|
+
slot: "content"
|
|
58
|
+
}, [F]) : null, m("i", {
|
|
59
|
+
class: "el-icon-info form-item-input-info"
|
|
60
|
+
})]) : null;
|
|
61
|
+
return P ? m("ElFormItem", {
|
|
62
|
+
style: {
|
|
63
|
+
width: z
|
|
64
|
+
},
|
|
65
|
+
key: `${t}-${d}`,
|
|
66
|
+
class: ["form-item", c, {
|
|
67
|
+
required: b,
|
|
68
|
+
"form-item-hide-label": e
|
|
69
|
+
}],
|
|
70
|
+
scopedSlots: {
|
|
71
|
+
...r,
|
|
72
|
+
default: q ? () => {
|
|
73
|
+
var C;
|
|
74
|
+
return m("div", {
|
|
75
|
+
class: "form-item-input-wrapper"
|
|
76
|
+
}, [(C = r.default) == null ? void 0 : C.call(r), _]);
|
|
77
|
+
} : r.default
|
|
78
|
+
},
|
|
79
|
+
props: {
|
|
80
|
+
...i
|
|
81
|
+
},
|
|
82
|
+
attrs: {
|
|
83
|
+
label: l,
|
|
84
|
+
"label-width": e ? "0" : u,
|
|
85
|
+
prop: t,
|
|
86
|
+
rules: o
|
|
87
|
+
},
|
|
88
|
+
ref: "formItem"
|
|
89
|
+
}) : q ? m("div", {
|
|
90
|
+
class: "form-item-input-wrapper"
|
|
91
|
+
}, [(T = r.default) == null ? void 0 : T.call(r), _]) : m("div", [(H = r.default) == null ? void 0 : H.call(r)]);
|
|
95
92
|
},
|
|
96
|
-
clearValidate() {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
yield this.$nextTick(), (r = (e = this.$refs.formItem).clearValidate) == null || r.call(e);
|
|
100
|
-
});
|
|
93
|
+
async clearValidate() {
|
|
94
|
+
var e, l;
|
|
95
|
+
await this.$nextTick(), (l = (e = this.$refs.formItem).clearValidate) == null || l.call(e);
|
|
101
96
|
},
|
|
102
|
-
validate() {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
yield this.$nextTick(), (r = (e = this.$refs.formItem).validate) == null || r.call(e);
|
|
106
|
-
});
|
|
97
|
+
async validate() {
|
|
98
|
+
var e, l;
|
|
99
|
+
await this.$nextTick(), (l = (e = this.$refs.formItem).validate) == null || l.call(e);
|
|
107
100
|
}
|
|
108
101
|
},
|
|
109
102
|
render() {
|
|
110
|
-
var
|
|
103
|
+
var h, w;
|
|
111
104
|
const {
|
|
112
105
|
computeSpan: e,
|
|
113
|
-
wrapCol:
|
|
106
|
+
wrapCol: l,
|
|
107
|
+
fixedSpan: u,
|
|
114
108
|
formItemConfig: t,
|
|
115
|
-
renderFormItem:
|
|
116
|
-
elColProps:
|
|
117
|
-
$scopedSlots:
|
|
118
|
-
unwrap:
|
|
109
|
+
renderFormItem: p,
|
|
110
|
+
elColProps: r,
|
|
111
|
+
$scopedSlots: i,
|
|
112
|
+
unwrap: n,
|
|
113
|
+
formHolder: a
|
|
119
114
|
} = this;
|
|
120
|
-
let l =
|
|
121
|
-
return t && I(t, "wrapCol") && (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
115
|
+
let c = !a.tableForm && l, f = !1;
|
|
116
|
+
return t && (I(t, "wrapCol") && (c = t.wrapCol), I(t, "reactive") && (f = t.reactive)), n ? m("div", [(h = i.default) == null ? void 0 : h.call(i)]) : c ? m("ElCol", {
|
|
117
|
+
props: {
|
|
118
|
+
...r,
|
|
119
|
+
span: u || e,
|
|
120
|
+
...!D(u) && f ? {
|
|
121
|
+
xs: 24,
|
|
122
|
+
sm: 12,
|
|
123
|
+
md: 12,
|
|
124
|
+
lg: 8,
|
|
125
|
+
xl: 6
|
|
126
|
+
} : {}
|
|
127
|
+
}
|
|
128
|
+
}, [p(), (w = i == null ? void 0 : i.below) == null ? void 0 : w.call(i)]) : p();
|
|
130
129
|
}
|
|
131
|
-
};
|
|
130
|
+
}, O = null, A = null;
|
|
131
|
+
var G = /* @__PURE__ */ L(
|
|
132
|
+
N,
|
|
133
|
+
O,
|
|
134
|
+
A,
|
|
135
|
+
!1,
|
|
136
|
+
null,
|
|
137
|
+
null
|
|
138
|
+
);
|
|
139
|
+
const U = G.exports;
|
|
132
140
|
export {
|
|
133
|
-
|
|
141
|
+
U as default
|
|
134
142
|
};
|
package/form-item/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item.el-form-item.required:not(.is-no-asterisk) .el-form-item__label:before{color:#f56c6c;content:"*";margin-right:4px}
|
|
1
|
+
.form-item.el-form-item.is-required:not(.is-no-asterisk) .el-form-item__label:before{color:#f56c6c;content:"*";margin-right:4px;display:inline}.form-item.el-form-item .el-form-item__content{min-height:29px}.form-item.el-form-item.el-form-item--mini .el-form-item__content{line-height:27px}.form-item.el-form-item.form-item-hide-label .el-form-item__label{display:none}.form-item-input-wrapper{flex-direction:row;align-items:center;display:flex}.form-item-input-wrapper>div,.form-item-input-wrapper>form{width:100%}.form-item-input-wrapper .el-input{flex:auto}.form-item-input-wrapper .form-item-input-info{color:gray;cursor:help;margin-left:4px;font-size:16px}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as
|
|
1
|
+
import { n as o } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
2
2
|
const r = {
|
|
3
3
|
name: "FormItemConfigProvider",
|
|
4
4
|
provide() {
|
|
@@ -7,6 +7,7 @@ const r = {
|
|
|
7
7
|
};
|
|
8
8
|
},
|
|
9
9
|
props: {
|
|
10
|
+
reactive: Boolean,
|
|
10
11
|
block: Boolean,
|
|
11
12
|
wrapCol: {
|
|
12
13
|
type: Boolean,
|
|
@@ -17,6 +18,7 @@ const r = {
|
|
|
17
18
|
return {
|
|
18
19
|
config: {
|
|
19
20
|
block: !1,
|
|
21
|
+
reactive: !1,
|
|
20
22
|
wrapCol: !0
|
|
21
23
|
}
|
|
22
24
|
};
|
|
@@ -24,30 +26,36 @@ const r = {
|
|
|
24
26
|
watch: {
|
|
25
27
|
block: {
|
|
26
28
|
immediate: !0,
|
|
27
|
-
handler(
|
|
28
|
-
this.config.block =
|
|
29
|
+
handler(e) {
|
|
30
|
+
this.config.block = e;
|
|
29
31
|
}
|
|
30
32
|
},
|
|
31
33
|
wrapCol: {
|
|
32
34
|
immediate: !0,
|
|
33
|
-
handler(
|
|
34
|
-
this.config.wrapCol =
|
|
35
|
+
handler(e) {
|
|
36
|
+
this.config.wrapCol = e;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
reactive: {
|
|
40
|
+
immediate: !0,
|
|
41
|
+
handler(e) {
|
|
42
|
+
this.config.reactive = e;
|
|
35
43
|
}
|
|
36
44
|
}
|
|
37
45
|
},
|
|
38
46
|
render() {
|
|
39
47
|
return this.$scopedSlots.default();
|
|
40
48
|
}
|
|
41
|
-
},
|
|
42
|
-
var
|
|
49
|
+
}, t = null, n = null;
|
|
50
|
+
var a = /* @__PURE__ */ o(
|
|
43
51
|
r,
|
|
44
|
-
n,
|
|
45
52
|
t,
|
|
53
|
+
n,
|
|
46
54
|
!1,
|
|
47
55
|
null,
|
|
48
56
|
null
|
|
49
57
|
);
|
|
50
|
-
const
|
|
58
|
+
const l = a.exports;
|
|
51
59
|
export {
|
|
52
|
-
|
|
60
|
+
l as default
|
|
53
61
|
};
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { h as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { h as s } from "vue";
|
|
2
|
+
import { n as a } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
3
|
+
const r = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth", "hideRequiredAsterisk", "$emit", "validate", "clearValidate"], d = ["$emit", "validate", "clearValidate"], n = {
|
|
4
4
|
name: "FormItemGroup",
|
|
5
5
|
inject: {
|
|
6
6
|
elForm: {
|
|
7
7
|
default: {}
|
|
8
|
+
},
|
|
9
|
+
formHolder: {
|
|
10
|
+
default: {}
|
|
8
11
|
}
|
|
9
12
|
},
|
|
10
13
|
provide() {
|
|
11
14
|
return {
|
|
12
|
-
elForm: this.
|
|
15
|
+
elForm: this.proxyForm,
|
|
13
16
|
formItemGroup: this
|
|
14
17
|
};
|
|
15
18
|
},
|
|
16
19
|
props: {
|
|
17
|
-
blockTitle:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
blockTitle: String,
|
|
21
|
+
size: String,
|
|
22
|
+
tips: String,
|
|
20
23
|
active: Boolean,
|
|
21
24
|
enabled: Boolean,
|
|
22
25
|
disabled: Boolean,
|
|
@@ -28,15 +31,20 @@ const a = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth",
|
|
|
28
31
|
type: Number,
|
|
29
32
|
default: 20
|
|
30
33
|
},
|
|
31
|
-
collapse: Boolean
|
|
34
|
+
collapse: Boolean,
|
|
35
|
+
showTitle: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
notDispatch: Boolean
|
|
32
40
|
},
|
|
33
41
|
data() {
|
|
34
42
|
const e = {};
|
|
35
|
-
return
|
|
36
|
-
e[
|
|
43
|
+
return r.forEach((t) => {
|
|
44
|
+
e[t] = null;
|
|
37
45
|
}), {
|
|
38
46
|
expand: !0,
|
|
39
|
-
|
|
47
|
+
proxyForm: e
|
|
40
48
|
};
|
|
41
49
|
},
|
|
42
50
|
computed: {
|
|
@@ -45,9 +53,12 @@ const a = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth",
|
|
|
45
53
|
enabled: this.enabled,
|
|
46
54
|
forbidden: this.disabled
|
|
47
55
|
};
|
|
48
|
-
return
|
|
49
|
-
e[
|
|
56
|
+
return r.forEach((t) => {
|
|
57
|
+
e[t] = this.elForm[t];
|
|
50
58
|
}), e;
|
|
59
|
+
},
|
|
60
|
+
isDisabled() {
|
|
61
|
+
return this.disabled ? this.disabled : this.enabled ? !this.enabled : this.elForm.disabled;
|
|
51
62
|
}
|
|
52
63
|
},
|
|
53
64
|
watch: {
|
|
@@ -60,49 +71,36 @@ const a = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth",
|
|
|
60
71
|
formCfg: {
|
|
61
72
|
immediate: !0,
|
|
62
73
|
handler() {
|
|
63
|
-
this.
|
|
64
|
-
var
|
|
65
|
-
e !== "disabled" && (
|
|
66
|
-
});
|
|
74
|
+
this.proxyForm.disabled = this.isDisabled, r.forEach((e) => {
|
|
75
|
+
var t;
|
|
76
|
+
e !== "disabled" && (d.includes(e) ? this.proxyForm[e] = (t = this.elForm[e]) == null ? void 0 : t.bind(this.elForm) : this.proxyForm[e] = this.elForm[e]);
|
|
77
|
+
}), this.size && (this.proxyForm.size = this.size);
|
|
67
78
|
}
|
|
68
79
|
}
|
|
69
80
|
},
|
|
70
81
|
mounted() {
|
|
71
|
-
this.dispatch("FormView", "FormView.addGroup", [this]);
|
|
82
|
+
this.notDispatch || this.dispatch("FormView", "FormView.addGroup", [this]);
|
|
72
83
|
},
|
|
73
84
|
beforeDestroy() {
|
|
74
|
-
this.dispatch("FormView", "FormView.removeGroup", [this]);
|
|
85
|
+
this.notDispatch || this.dispatch("FormView", "FormView.removeGroup", [this]);
|
|
75
86
|
},
|
|
76
87
|
methods: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
for (; t && (!s || s !== e); )
|
|
83
|
-
t = t.$parent, t && (s = t.$options.name);
|
|
84
|
-
t && t.$emit.apply(t, [i].concat(r));
|
|
88
|
+
dispatch(e, t, l) {
|
|
89
|
+
let i = this.$parent || this.$root, o = i.$options.name;
|
|
90
|
+
for (; i && (!o || o !== e); )
|
|
91
|
+
i = i.$parent, i && (o = i.$options.name);
|
|
92
|
+
i && i.$emit.apply(i, [t].concat(l));
|
|
85
93
|
},
|
|
86
94
|
renderDefault() {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
attrs: {
|
|
97
|
-
gutter: i
|
|
98
|
-
},
|
|
99
|
-
class: "form-item-group-row"
|
|
100
|
-
}, [t.default({
|
|
101
|
-
disabled: r.disabled
|
|
102
|
-
})])
|
|
103
|
-
) : t.default({
|
|
104
|
-
disabled: r.disabled
|
|
105
|
-
}) : o("EmptyView", {
|
|
95
|
+
return this.$scopedSlots.default ? !this.formHolder.tableForm && this.wrapRow ? s("ElRow", {
|
|
96
|
+
attrs: {
|
|
97
|
+
gutter: this.gutter
|
|
98
|
+
}
|
|
99
|
+
}, [this.$scopedSlots.default({
|
|
100
|
+
disabled: this.proxyForm.disabled
|
|
101
|
+
})]) : this.$scopedSlots.default({
|
|
102
|
+
disabled: this.proxyForm.disabled
|
|
103
|
+
}) : s("EmptyView", {
|
|
106
104
|
attrs: {
|
|
107
105
|
"font-size": "14px",
|
|
108
106
|
"empty-tips": "暂无信息"
|
|
@@ -117,37 +115,43 @@ const a = ["disabled", "size", "statusIcon", "inlineMessage", "autoLabelWidth",
|
|
|
117
115
|
}
|
|
118
116
|
},
|
|
119
117
|
render() {
|
|
120
|
-
|
|
121
|
-
renderDefault: e,
|
|
122
|
-
blockTitle: i,
|
|
123
|
-
active: r,
|
|
124
|
-
expand: t,
|
|
125
|
-
toggle: s,
|
|
126
|
-
$scopedSlots: l,
|
|
127
|
-
isDisabled: d
|
|
128
|
-
} = this;
|
|
129
|
-
return o("div", {
|
|
118
|
+
return s("div", {
|
|
130
119
|
class: ["form-item-group", {
|
|
131
|
-
"default-active":
|
|
132
|
-
"is-disabled":
|
|
120
|
+
"default-active": this.active,
|
|
121
|
+
"is-disabled": this.isDisabled
|
|
133
122
|
}]
|
|
134
|
-
}, [
|
|
123
|
+
}, [s("div", {
|
|
135
124
|
class: "form-item-group-title",
|
|
136
125
|
on: {
|
|
137
|
-
click:
|
|
138
|
-
}
|
|
139
|
-
|
|
126
|
+
click: this.toggle
|
|
127
|
+
},
|
|
128
|
+
directives: [{
|
|
129
|
+
name: "show",
|
|
130
|
+
value: this.showTitle
|
|
131
|
+
}]
|
|
132
|
+
}, [s("span", {
|
|
140
133
|
class: "flex-item"
|
|
141
|
-
}, [
|
|
142
|
-
|
|
143
|
-
})]),
|
|
134
|
+
}, [this.$scopedSlots.title ? this.$scopedSlots.title() : this.blockTitle, this.tips ? s("span", {
|
|
135
|
+
style: "color:#ff0000;font-size:14px;"
|
|
136
|
+
}, [" (", this.tips, ")"]) : null, this.$scopedSlots["title-right"] ? this.$scopedSlots["title-right"]() : null]), " ", s("i", {
|
|
137
|
+
class: this.expand ? "el-icon-arrow-down" : "el-icon-arrow-right"
|
|
138
|
+
})]), s("ElCollapseTransition", [s("div", {
|
|
144
139
|
directives: [{
|
|
145
140
|
name: "show",
|
|
146
|
-
value:
|
|
141
|
+
value: this.expand
|
|
147
142
|
}]
|
|
148
|
-
}, [
|
|
143
|
+
}, [this.renderDefault()])])]);
|
|
149
144
|
}
|
|
150
|
-
};
|
|
145
|
+
}, h = null, p = null;
|
|
146
|
+
var m = /* @__PURE__ */ a(
|
|
147
|
+
n,
|
|
148
|
+
h,
|
|
149
|
+
p,
|
|
150
|
+
!1,
|
|
151
|
+
null,
|
|
152
|
+
null
|
|
153
|
+
);
|
|
154
|
+
const f = m.exports;
|
|
151
155
|
export {
|
|
152
|
-
|
|
156
|
+
f as default
|
|
153
157
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item-group{background-color:#fff;margin-bottom:10px}.form-item-group.is-disabled .is-required .el-form-item__label:before,.form-item-group.is-disabled .required .el-form-item__label:before{display:none}.form-item-group .form-item-group-
|
|
1
|
+
.form-item-group{background-color:#fff;margin-bottom:10px}.form-item-group.is-disabled .is-required .el-form-item__label:before,.form-item-group.is-disabled .required .el-form-item__label:before{display:none}.form-item-group .form-item-group-title{color:#333;height:30px;font-weight:700;font-size:var(--gloal-font-size);cursor:pointer;background-color:#f3f5fb;flex-direction:row;align-items:center;margin:0 0 10px;padding:0 10px;line-height:30px;display:flex}
|