@element-plus/nightly 0.0.20221116 → 0.0.20221118
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/attributes.json +1 -1
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +316 -43
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +43 -316
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/index.mjs +3 -3
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +120 -31
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +31 -120
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/index.mjs +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +320 -44
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +44 -320
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/index.js +3 -3
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +120 -32
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +32 -120
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/index.js +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,125 +1,36 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, onMounted, watch, onBeforeUnmount, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createCommentVNode } from 'vue';
|
|
2
|
-
import { isNil } from 'lodash-unified';
|
|
3
|
-
import { unrefElement } from '@vueuse/core';
|
|
4
|
-
import '../../slot/index.mjs';
|
|
5
|
-
import '../../../hooks/index.mjs';
|
|
6
|
-
import '../../../tokens/index.mjs';
|
|
7
1
|
import '../../../utils/index.mjs';
|
|
8
|
-
import {
|
|
9
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
|
-
import { POPPER_INJECTION_KEY } from '../../../tokens/popper.mjs';
|
|
11
|
-
import { useForwardRef } from '../../../hooks/use-forward-ref/index.mjs';
|
|
12
|
-
import { isElement } from '../../../utils/types.mjs';
|
|
13
|
-
import { OnlyChild } from '../../slot/src/only-child.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
14
3
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
const popperTriggerProps = buildProps({
|
|
5
|
+
virtualRef: {
|
|
6
|
+
type: definePropType(Object)
|
|
7
|
+
},
|
|
8
|
+
virtualTriggering: Boolean,
|
|
9
|
+
onMouseenter: {
|
|
10
|
+
type: definePropType(Function)
|
|
11
|
+
},
|
|
12
|
+
onMouseleave: {
|
|
13
|
+
type: definePropType(Function)
|
|
14
|
+
},
|
|
15
|
+
onClick: {
|
|
16
|
+
type: definePropType(Function)
|
|
17
|
+
},
|
|
18
|
+
onKeydown: {
|
|
19
|
+
type: definePropType(Function)
|
|
20
|
+
},
|
|
21
|
+
onFocus: {
|
|
22
|
+
type: definePropType(Function)
|
|
23
|
+
},
|
|
24
|
+
onBlur: {
|
|
25
|
+
type: definePropType(Function)
|
|
26
|
+
},
|
|
27
|
+
onContextmenu: {
|
|
28
|
+
type: definePropType(Function)
|
|
29
|
+
},
|
|
30
|
+
id: String,
|
|
31
|
+
open: Boolean
|
|
18
32
|
});
|
|
19
|
-
const
|
|
20
|
-
...__default__,
|
|
21
|
-
props: popperTriggerProps,
|
|
22
|
-
setup(__props, { expose }) {
|
|
23
|
-
const props = __props;
|
|
24
|
-
const { role, triggerRef } = inject(POPPER_INJECTION_KEY, void 0);
|
|
25
|
-
useForwardRef(triggerRef);
|
|
26
|
-
const ariaControls = computed(() => {
|
|
27
|
-
return ariaHaspopup.value ? props.id : void 0;
|
|
28
|
-
});
|
|
29
|
-
const ariaDescribedby = computed(() => {
|
|
30
|
-
if (role && role.value === "tooltip") {
|
|
31
|
-
return props.open && props.id ? props.id : void 0;
|
|
32
|
-
}
|
|
33
|
-
return void 0;
|
|
34
|
-
});
|
|
35
|
-
const ariaHaspopup = computed(() => {
|
|
36
|
-
if (role && role.value !== "tooltip") {
|
|
37
|
-
return role.value;
|
|
38
|
-
}
|
|
39
|
-
return void 0;
|
|
40
|
-
});
|
|
41
|
-
const ariaExpanded = computed(() => {
|
|
42
|
-
return ariaHaspopup.value ? `${props.open}` : void 0;
|
|
43
|
-
});
|
|
44
|
-
let virtualTriggerAriaStopWatch = void 0;
|
|
45
|
-
onMounted(() => {
|
|
46
|
-
watch(() => props.virtualRef, (virtualEl) => {
|
|
47
|
-
if (virtualEl) {
|
|
48
|
-
triggerRef.value = unrefElement(virtualEl);
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
immediate: true
|
|
52
|
-
});
|
|
53
|
-
watch(triggerRef, (el, prevEl) => {
|
|
54
|
-
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
|
55
|
-
virtualTriggerAriaStopWatch = void 0;
|
|
56
|
-
if (isElement(el)) {
|
|
57
|
-
;
|
|
58
|
-
[
|
|
59
|
-
"onMouseenter",
|
|
60
|
-
"onMouseleave",
|
|
61
|
-
"onClick",
|
|
62
|
-
"onKeydown",
|
|
63
|
-
"onFocus",
|
|
64
|
-
"onBlur",
|
|
65
|
-
"onContextmenu"
|
|
66
|
-
].forEach((eventName) => {
|
|
67
|
-
var _a;
|
|
68
|
-
const handler = props[eventName];
|
|
69
|
-
if (handler) {
|
|
70
|
-
;
|
|
71
|
-
el.addEventListener(eventName.slice(2).toLowerCase(), handler);
|
|
72
|
-
(_a = prevEl == null ? void 0 : prevEl.removeEventListener) == null ? void 0 : _a.call(prevEl, eventName.slice(2).toLowerCase(), handler);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
virtualTriggerAriaStopWatch = watch([ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded], (watches) => {
|
|
76
|
-
;
|
|
77
|
-
[
|
|
78
|
-
"aria-controls",
|
|
79
|
-
"aria-describedby",
|
|
80
|
-
"aria-haspopup",
|
|
81
|
-
"aria-expanded"
|
|
82
|
-
].forEach((key, idx) => {
|
|
83
|
-
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
|
84
|
-
});
|
|
85
|
-
}, { immediate: true });
|
|
86
|
-
}
|
|
87
|
-
if (isElement(prevEl)) {
|
|
88
|
-
;
|
|
89
|
-
[
|
|
90
|
-
"aria-controls",
|
|
91
|
-
"aria-describedby",
|
|
92
|
-
"aria-haspopup",
|
|
93
|
-
"aria-expanded"
|
|
94
|
-
].forEach((key) => prevEl.removeAttribute(key));
|
|
95
|
-
}
|
|
96
|
-
}, {
|
|
97
|
-
immediate: true
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
onBeforeUnmount(() => {
|
|
101
|
-
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
|
102
|
-
virtualTriggerAriaStopWatch = void 0;
|
|
103
|
-
});
|
|
104
|
-
expose({
|
|
105
|
-
triggerRef
|
|
106
|
-
});
|
|
107
|
-
return (_ctx, _cache) => {
|
|
108
|
-
return !_ctx.virtualTriggering ? (openBlock(), createBlock(unref(OnlyChild), mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
109
|
-
"aria-controls": unref(ariaControls),
|
|
110
|
-
"aria-describedby": unref(ariaDescribedby),
|
|
111
|
-
"aria-expanded": unref(ariaExpanded),
|
|
112
|
-
"aria-haspopup": unref(ariaHaspopup)
|
|
113
|
-
}), {
|
|
114
|
-
default: withCtx(() => [
|
|
115
|
-
renderSlot(_ctx.$slots, "default")
|
|
116
|
-
]),
|
|
117
|
-
_: 3
|
|
118
|
-
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])) : createCommentVNode("v-if", true);
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
var ElPopperTrigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);
|
|
33
|
+
const usePopperTriggerProps = popperTriggerProps;
|
|
123
34
|
|
|
124
|
-
export {
|
|
35
|
+
export { popperTriggerProps, usePopperTriggerProps };
|
|
125
36
|
//# sourceMappingURL=trigger2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger2.mjs","sources":["../../../../../../packages/components/popper/src/trigger.
|
|
1
|
+
{"version":3,"file":"trigger2.mjs","sources":["../../../../../../packages/components/popper/src/trigger.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { Measurable } from '@element-plus/tokens'\nimport type Trigger from './trigger.vue'\n\nexport const popperTriggerProps = buildProps({\n virtualRef: {\n type: definePropType<Measurable>(Object),\n },\n virtualTriggering: Boolean,\n onMouseenter: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onMouseleave: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onClick: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onKeydown: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onFocus: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onBlur: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onContextmenu: {\n type: definePropType<(e: Event) => void>(Function),\n },\n id: String,\n open: Boolean,\n} as const)\n\nexport type PopperTriggerProps = typeof popperTriggerProps\n\nexport type PopperTriggerInstance = InstanceType<typeof Trigger>\n\n/** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */\nexport const usePopperTriggerProps = popperTriggerProps\n\n/** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowTrigger = PopperTriggerInstance\n"],"names":[],"mappings":";;;AACY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,iBAAiB,EAAE,OAAO;AAC5B,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,IAAI,EAAE,OAAO;AACf,CAAC,EAAE;AACS,MAAC,qBAAqB,GAAG;;;;"}
|
|
@@ -2,7 +2,7 @@ import '../../../utils/index.mjs';
|
|
|
2
2
|
import '../../popper/index.mjs';
|
|
3
3
|
import '../../../constants/index.mjs';
|
|
4
4
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
-
import { popperTriggerProps } from '../../popper/src/
|
|
5
|
+
import { popperTriggerProps } from '../../popper/src/trigger2.mjs';
|
|
6
6
|
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
7
7
|
|
|
8
8
|
const useTooltipTriggerProps = buildProps({
|
|
@@ -9,7 +9,7 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
|
9
9
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
10
|
import { TOOLTIP_INJECTION_KEY } from '../../../tokens/tooltip.mjs';
|
|
11
11
|
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
12
|
-
import ElPopperTrigger from '../../popper/src/
|
|
12
|
+
import ElPopperTrigger from '../../popper/src/trigger.mjs';
|
|
13
13
|
|
|
14
14
|
const __default__ = defineComponent({
|
|
15
15
|
name: "ElTooltipTrigger"
|
package/es/index.mjs
CHANGED
|
@@ -67,7 +67,7 @@ export { ElDropdown, ElDropdownItem, ElDropdownMenu } from './components/dropdow
|
|
|
67
67
|
export { emptyProps } from './components/empty/src/empty.mjs';
|
|
68
68
|
export { ElEmpty } from './components/empty/index.mjs';
|
|
69
69
|
export { formEmits, formProps } from './components/form/src/form.mjs';
|
|
70
|
-
export { formItemProps, formItemValidateStates } from './components/form/src/form-
|
|
70
|
+
export { formItemProps, formItemValidateStates } from './components/form/src/form-item2.mjs';
|
|
71
71
|
export { ElForm, ElFormItem } from './components/form/index.mjs';
|
|
72
72
|
export { iconProps } from './components/icon/src/icon.mjs';
|
|
73
73
|
export { ElIcon } from './components/icon/index.mjs';
|
|
@@ -95,11 +95,11 @@ export { ElPagination } from './components/pagination/index.mjs';
|
|
|
95
95
|
export { popconfirmProps } from './components/popconfirm/src/popconfirm.mjs';
|
|
96
96
|
export { ElPopconfirm } from './components/popconfirm/index.mjs';
|
|
97
97
|
export { Effect, popperProps, roleTypes, usePopperProps } from './components/popper/src/popper.mjs';
|
|
98
|
-
export { popperTriggerProps, usePopperTriggerProps } from './components/popper/src/
|
|
98
|
+
export { popperTriggerProps, usePopperTriggerProps } from './components/popper/src/trigger2.mjs';
|
|
99
99
|
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './components/popper/src/content.mjs';
|
|
100
100
|
export { popperArrowProps, usePopperArrowProps } from './components/popper/src/arrow.mjs';
|
|
101
101
|
export { default as ElPopperArrow } from './components/popper/src/arrow2.mjs';
|
|
102
|
-
export { default as ElPopperTrigger } from './components/popper/src/
|
|
102
|
+
export { default as ElPopperTrigger } from './components/popper/src/trigger.mjs';
|
|
103
103
|
export { default as ElPopperContent } from './components/popper/src/content2.mjs';
|
|
104
104
|
export { ElPopper } from './components/popper/index.mjs';
|
|
105
105
|
export { progressProps } from './components/progress/src/progress.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20221118";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20221118'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var form$1 = require('./src/form2.js');
|
|
7
|
-
var formItem$1 = require('./src/form-
|
|
7
|
+
var formItem$1 = require('./src/form-item.js');
|
|
8
8
|
var form = require('./src/form.js');
|
|
9
|
-
var formItem = require('./src/form-
|
|
9
|
+
var formItem = require('./src/form-item2.js');
|
|
10
10
|
require('./src/types.js');
|
|
11
11
|
var install = require('../../utils/vue/install.js');
|
|
12
12
|
|
|
@@ -2,53 +2,329 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var AsyncValidator = require('async-validator');
|
|
7
|
+
var lodashUnified = require('lodash-unified');
|
|
8
|
+
var core = require('@vueuse/core');
|
|
6
9
|
require('../../../utils/index.js');
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
require('../../../tokens/index.js');
|
|
11
|
+
require('../../../hooks/index.js');
|
|
12
|
+
var formItem = require('./form-item2.js');
|
|
13
|
+
var formLabelWrap = require('./form-label-wrap.js');
|
|
14
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
15
|
+
var form = require('../../../tokens/form.js');
|
|
16
|
+
var index = require('../../../hooks/use-common-props/index.js');
|
|
17
|
+
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
18
|
+
var index$2 = require('../../../hooks/use-id/index.js');
|
|
19
|
+
var style = require('../../../utils/dom/style.js');
|
|
20
|
+
var shared = require('@vue/shared');
|
|
21
|
+
var objects = require('../../../utils/objects.js');
|
|
9
22
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
23
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
|
+
|
|
25
|
+
var AsyncValidator__default = /*#__PURE__*/_interopDefaultLegacy(AsyncValidator);
|
|
26
|
+
|
|
27
|
+
const _hoisted_1 = ["role", "aria-labelledby"];
|
|
28
|
+
const __default__ = vue.defineComponent({
|
|
29
|
+
name: "ElFormItem"
|
|
30
|
+
});
|
|
31
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
32
|
+
...__default__,
|
|
33
|
+
props: formItem.formItemProps,
|
|
34
|
+
setup(__props, { expose }) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const slots = vue.useSlots();
|
|
37
|
+
const formContext = vue.inject(form.formContextKey, void 0);
|
|
38
|
+
const parentFormItemContext = vue.inject(form.formItemContextKey, void 0);
|
|
39
|
+
const _size = index.useSize(void 0, { formItem: false });
|
|
40
|
+
const ns = index$1.useNamespace("form-item");
|
|
41
|
+
const labelId = index$2.useId().value;
|
|
42
|
+
const inputIds = vue.ref([]);
|
|
43
|
+
const validateState = vue.ref("");
|
|
44
|
+
const validateStateDebounced = core.refDebounced(validateState, 100);
|
|
45
|
+
const validateMessage = vue.ref("");
|
|
46
|
+
const formItemRef = vue.ref();
|
|
47
|
+
let initialValue = void 0;
|
|
48
|
+
let isResettingField = false;
|
|
49
|
+
const labelStyle = vue.computed(() => {
|
|
50
|
+
if ((formContext == null ? void 0 : formContext.labelPosition) === "top") {
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
53
|
+
const labelWidth = style.addUnit(props.labelWidth || (formContext == null ? void 0 : formContext.labelWidth) || "");
|
|
54
|
+
if (labelWidth)
|
|
55
|
+
return { width: labelWidth };
|
|
56
|
+
return {};
|
|
57
|
+
});
|
|
58
|
+
const contentStyle = vue.computed(() => {
|
|
59
|
+
if ((formContext == null ? void 0 : formContext.labelPosition) === "top" || (formContext == null ? void 0 : formContext.inline)) {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
if (!props.label && !props.labelWidth && isNested) {
|
|
63
|
+
return {};
|
|
64
|
+
}
|
|
65
|
+
const labelWidth = style.addUnit(props.labelWidth || (formContext == null ? void 0 : formContext.labelWidth) || "");
|
|
66
|
+
if (!props.label && !slots.label) {
|
|
67
|
+
return { marginLeft: labelWidth };
|
|
68
|
+
}
|
|
69
|
+
return {};
|
|
70
|
+
});
|
|
71
|
+
const formItemClasses = vue.computed(() => [
|
|
72
|
+
ns.b(),
|
|
73
|
+
ns.m(_size.value),
|
|
74
|
+
ns.is("error", validateState.value === "error"),
|
|
75
|
+
ns.is("validating", validateState.value === "validating"),
|
|
76
|
+
ns.is("success", validateState.value === "success"),
|
|
77
|
+
ns.is("required", isRequired.value || props.required),
|
|
78
|
+
ns.is("no-asterisk", formContext == null ? void 0 : formContext.hideRequiredAsterisk),
|
|
79
|
+
(formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
|
80
|
+
{ [ns.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon }
|
|
81
|
+
]);
|
|
82
|
+
const _inlineMessage = vue.computed(() => core.isBoolean(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false);
|
|
83
|
+
const validateClasses = vue.computed(() => [
|
|
84
|
+
ns.e("error"),
|
|
85
|
+
{ [ns.em("error", "inline")]: _inlineMessage.value }
|
|
86
|
+
]);
|
|
87
|
+
const propString = vue.computed(() => {
|
|
88
|
+
if (!props.prop)
|
|
89
|
+
return "";
|
|
90
|
+
return shared.isString(props.prop) ? props.prop : props.prop.join(".");
|
|
91
|
+
});
|
|
92
|
+
const hasLabel = vue.computed(() => {
|
|
93
|
+
return !!(props.label || slots.label);
|
|
94
|
+
});
|
|
95
|
+
const labelFor = vue.computed(() => {
|
|
96
|
+
return props.for || inputIds.value.length === 1 ? inputIds.value[0] : void 0;
|
|
97
|
+
});
|
|
98
|
+
const isGroup = vue.computed(() => {
|
|
99
|
+
return !labelFor.value && hasLabel.value;
|
|
100
|
+
});
|
|
101
|
+
const isNested = !!parentFormItemContext;
|
|
102
|
+
const fieldValue = vue.computed(() => {
|
|
103
|
+
const model = formContext == null ? void 0 : formContext.model;
|
|
104
|
+
if (!model || !props.prop) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
return objects.getProp(model, props.prop).value;
|
|
108
|
+
});
|
|
109
|
+
const normalizedRules = vue.computed(() => {
|
|
110
|
+
const { required } = props;
|
|
111
|
+
const rules = [];
|
|
112
|
+
if (props.rules) {
|
|
113
|
+
rules.push(...lodashUnified.castArray(props.rules));
|
|
114
|
+
}
|
|
115
|
+
const formRules = formContext == null ? void 0 : formContext.rules;
|
|
116
|
+
if (formRules && props.prop) {
|
|
117
|
+
const _rules = objects.getProp(formRules, props.prop).value;
|
|
118
|
+
if (_rules) {
|
|
119
|
+
rules.push(...lodashUnified.castArray(_rules));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (required !== void 0) {
|
|
123
|
+
const requiredRules = rules.map((rule, i) => [rule, i]).filter(([rule]) => Object.keys(rule).includes("required"));
|
|
124
|
+
if (requiredRules.length > 0) {
|
|
125
|
+
for (const [rule, i] of requiredRules) {
|
|
126
|
+
if (rule.required === required)
|
|
127
|
+
continue;
|
|
128
|
+
rules[i] = { ...rule, required };
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
rules.push({ required });
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return rules;
|
|
135
|
+
});
|
|
136
|
+
const validateEnabled = vue.computed(() => normalizedRules.value.length > 0);
|
|
137
|
+
const getFilteredRule = (trigger) => {
|
|
138
|
+
const rules = normalizedRules.value;
|
|
139
|
+
return rules.filter((rule) => {
|
|
140
|
+
if (!rule.trigger || !trigger)
|
|
141
|
+
return true;
|
|
142
|
+
if (Array.isArray(rule.trigger)) {
|
|
143
|
+
return rule.trigger.includes(trigger);
|
|
144
|
+
} else {
|
|
145
|
+
return rule.trigger === trigger;
|
|
146
|
+
}
|
|
147
|
+
}).map(({ trigger: trigger2, ...rule }) => rule);
|
|
148
|
+
};
|
|
149
|
+
const isRequired = vue.computed(() => normalizedRules.value.some((rule) => rule.required));
|
|
150
|
+
const shouldShowError = vue.computed(() => {
|
|
151
|
+
var _a;
|
|
152
|
+
return validateStateDebounced.value === "error" && props.showMessage && ((_a = formContext == null ? void 0 : formContext.showMessage) != null ? _a : true);
|
|
153
|
+
});
|
|
154
|
+
const currentLabel = vue.computed(() => `${props.label || ""}${(formContext == null ? void 0 : formContext.labelSuffix) || ""}`);
|
|
155
|
+
const setValidationState = (state) => {
|
|
156
|
+
validateState.value = state;
|
|
157
|
+
};
|
|
158
|
+
const onValidationFailed = (error) => {
|
|
159
|
+
var _a, _b;
|
|
160
|
+
const { errors, fields } = error;
|
|
161
|
+
if (!errors || !fields) {
|
|
162
|
+
console.error(error);
|
|
163
|
+
}
|
|
164
|
+
setValidationState("error");
|
|
165
|
+
validateMessage.value = errors ? (_b = (_a = errors == null ? void 0 : errors[0]) == null ? void 0 : _a.message) != null ? _b : `${props.prop} is required` : "";
|
|
166
|
+
formContext == null ? void 0 : formContext.emit("validate", props.prop, false, validateMessage.value);
|
|
167
|
+
};
|
|
168
|
+
const onValidationSucceeded = () => {
|
|
169
|
+
setValidationState("success");
|
|
170
|
+
formContext == null ? void 0 : formContext.emit("validate", props.prop, true, "");
|
|
171
|
+
};
|
|
172
|
+
const doValidate = async (rules) => {
|
|
173
|
+
const modelName = propString.value;
|
|
174
|
+
const validator = new AsyncValidator__default["default"]({
|
|
175
|
+
[modelName]: rules
|
|
176
|
+
});
|
|
177
|
+
return validator.validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
|
|
178
|
+
onValidationSucceeded();
|
|
179
|
+
return true;
|
|
180
|
+
}).catch((err) => {
|
|
181
|
+
onValidationFailed(err);
|
|
182
|
+
return Promise.reject(err);
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
const validate = async (trigger, callback) => {
|
|
186
|
+
if (isResettingField || !props.prop) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
const hasCallback = shared.isFunction(callback);
|
|
190
|
+
if (!validateEnabled.value) {
|
|
191
|
+
callback == null ? void 0 : callback(false);
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
const rules = getFilteredRule(trigger);
|
|
195
|
+
if (rules.length === 0) {
|
|
196
|
+
callback == null ? void 0 : callback(true);
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
setValidationState("validating");
|
|
200
|
+
return doValidate(rules).then(() => {
|
|
201
|
+
callback == null ? void 0 : callback(true);
|
|
202
|
+
return true;
|
|
203
|
+
}).catch((err) => {
|
|
204
|
+
const { fields } = err;
|
|
205
|
+
callback == null ? void 0 : callback(false, fields);
|
|
206
|
+
return hasCallback ? false : Promise.reject(fields);
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const clearValidate = () => {
|
|
210
|
+
setValidationState("");
|
|
211
|
+
validateMessage.value = "";
|
|
212
|
+
isResettingField = false;
|
|
213
|
+
};
|
|
214
|
+
const resetField = async () => {
|
|
215
|
+
const model = formContext == null ? void 0 : formContext.model;
|
|
216
|
+
if (!model || !props.prop)
|
|
217
|
+
return;
|
|
218
|
+
const computedValue = objects.getProp(model, props.prop);
|
|
219
|
+
isResettingField = true;
|
|
220
|
+
computedValue.value = lodashUnified.clone(initialValue);
|
|
221
|
+
await vue.nextTick();
|
|
222
|
+
clearValidate();
|
|
223
|
+
isResettingField = false;
|
|
224
|
+
};
|
|
225
|
+
const addInputId = (id) => {
|
|
226
|
+
if (!inputIds.value.includes(id)) {
|
|
227
|
+
inputIds.value.push(id);
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
const removeInputId = (id) => {
|
|
231
|
+
inputIds.value = inputIds.value.filter((listId) => listId !== id);
|
|
232
|
+
};
|
|
233
|
+
vue.watch(() => props.error, (val) => {
|
|
234
|
+
validateMessage.value = val || "";
|
|
235
|
+
setValidationState(val ? "error" : "");
|
|
236
|
+
}, { immediate: true });
|
|
237
|
+
vue.watch(() => props.validateStatus, (val) => setValidationState(val || ""));
|
|
238
|
+
const context = vue.reactive({
|
|
239
|
+
...vue.toRefs(props),
|
|
240
|
+
$el: formItemRef,
|
|
241
|
+
size: _size,
|
|
242
|
+
validateState,
|
|
243
|
+
labelId,
|
|
244
|
+
inputIds,
|
|
245
|
+
isGroup,
|
|
246
|
+
hasLabel,
|
|
247
|
+
addInputId,
|
|
248
|
+
removeInputId,
|
|
249
|
+
resetField,
|
|
250
|
+
clearValidate,
|
|
251
|
+
validate
|
|
252
|
+
});
|
|
253
|
+
vue.provide(form.formItemContextKey, context);
|
|
254
|
+
vue.onMounted(() => {
|
|
255
|
+
if (props.prop) {
|
|
256
|
+
formContext == null ? void 0 : formContext.addField(context);
|
|
257
|
+
initialValue = lodashUnified.clone(fieldValue.value);
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
vue.onBeforeUnmount(() => {
|
|
261
|
+
formContext == null ? void 0 : formContext.removeField(context);
|
|
262
|
+
});
|
|
263
|
+
expose({
|
|
264
|
+
size: _size,
|
|
265
|
+
validateMessage,
|
|
266
|
+
validateState,
|
|
267
|
+
validate,
|
|
268
|
+
clearValidate,
|
|
269
|
+
resetField
|
|
270
|
+
});
|
|
271
|
+
return (_ctx, _cache) => {
|
|
272
|
+
var _a;
|
|
273
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
274
|
+
ref_key: "formItemRef",
|
|
275
|
+
ref: formItemRef,
|
|
276
|
+
class: vue.normalizeClass(vue.unref(formItemClasses)),
|
|
277
|
+
role: vue.unref(isGroup) ? "group" : void 0,
|
|
278
|
+
"aria-labelledby": vue.unref(isGroup) ? vue.unref(labelId) : void 0
|
|
279
|
+
}, [
|
|
280
|
+
vue.createVNode(vue.unref(formLabelWrap["default"]), {
|
|
281
|
+
"is-auto-width": vue.unref(labelStyle).width === "auto",
|
|
282
|
+
"update-all": ((_a = vue.unref(formContext)) == null ? void 0 : _a.labelWidth) === "auto"
|
|
283
|
+
}, {
|
|
284
|
+
default: vue.withCtx(() => [
|
|
285
|
+
vue.unref(hasLabel) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(labelFor) ? "label" : "div"), {
|
|
286
|
+
key: 0,
|
|
287
|
+
id: vue.unref(labelId),
|
|
288
|
+
for: vue.unref(labelFor),
|
|
289
|
+
class: vue.normalizeClass(vue.unref(ns).e("label")),
|
|
290
|
+
style: vue.normalizeStyle(vue.unref(labelStyle))
|
|
291
|
+
}, {
|
|
292
|
+
default: vue.withCtx(() => [
|
|
293
|
+
vue.renderSlot(_ctx.$slots, "label", { label: vue.unref(currentLabel) }, () => [
|
|
294
|
+
vue.createTextVNode(vue.toDisplayString(vue.unref(currentLabel)), 1)
|
|
295
|
+
])
|
|
296
|
+
]),
|
|
297
|
+
_: 3
|
|
298
|
+
}, 8, ["id", "for", "class", "style"])) : vue.createCommentVNode("v-if", true)
|
|
299
|
+
]),
|
|
300
|
+
_: 3
|
|
301
|
+
}, 8, ["is-auto-width", "update-all"]),
|
|
302
|
+
vue.createElementVNode("div", {
|
|
303
|
+
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
|
304
|
+
style: vue.normalizeStyle(vue.unref(contentStyle))
|
|
305
|
+
}, [
|
|
306
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
307
|
+
vue.createVNode(vue.Transition, {
|
|
308
|
+
name: `${vue.unref(ns).namespace.value}-zoom-in-top`
|
|
309
|
+
}, {
|
|
310
|
+
default: vue.withCtx(() => [
|
|
311
|
+
vue.unref(shouldShowError) ? vue.renderSlot(_ctx.$slots, "error", {
|
|
312
|
+
key: 0,
|
|
313
|
+
error: validateMessage.value
|
|
314
|
+
}, () => [
|
|
315
|
+
vue.createElementVNode("div", {
|
|
316
|
+
class: vue.normalizeClass(vue.unref(validateClasses))
|
|
317
|
+
}, vue.toDisplayString(validateMessage.value), 3)
|
|
318
|
+
]) : vue.createCommentVNode("v-if", true)
|
|
319
|
+
]),
|
|
320
|
+
_: 3
|
|
321
|
+
}, 8, ["name"])
|
|
322
|
+
], 6)
|
|
323
|
+
], 10, _hoisted_1);
|
|
324
|
+
};
|
|
49
325
|
}
|
|
50
326
|
});
|
|
327
|
+
var FormItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);
|
|
51
328
|
|
|
52
|
-
exports
|
|
53
|
-
exports.formItemValidateStates = formItemValidateStates;
|
|
329
|
+
exports["default"] = FormItem;
|
|
54
330
|
//# sourceMappingURL=form-item.js.map
|