@element-plus/nightly 0.0.20250418 → 0.0.20250419
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/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-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.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/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.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/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.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/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.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/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.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/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.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/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +7 -69
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +69 -7
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +47 -319
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +319 -47
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +24 -49
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +49 -24
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +15 -97
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +97 -15
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +83 -258
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +258 -83
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +19 -91
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +91 -19
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tooltip-v2/src/trigger.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/index.mjs +6 -6
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +7 -69
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +69 -7
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +48 -323
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +323 -48
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/index.js +6 -6
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +25 -49
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +49 -25
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +16 -97
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +97 -16
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +83 -257
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +257 -83
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/slider/src/button.js +20 -91
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +91 -20
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tooltip-v2/src/trigger.js +12 -89
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +89 -12
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/index.js +6 -6
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
@@ -2,77 +2,15 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var carouselItem = require('./carousel-item2.js');
|
7
|
-
var useCarouselItem = require('./use-carousel-item.js');
|
8
|
-
var constants = require('./constants.js');
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
11
6
|
|
12
|
-
const
|
13
|
-
name:
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
props: carouselItem.carouselItemProps,
|
18
|
-
setup(__props) {
|
19
|
-
const props = __props;
|
20
|
-
const ns = index.useNamespace("carousel");
|
21
|
-
const {
|
22
|
-
carouselItemRef,
|
23
|
-
active,
|
24
|
-
animating,
|
25
|
-
hover,
|
26
|
-
inStage,
|
27
|
-
isVertical,
|
28
|
-
translate,
|
29
|
-
isCardType,
|
30
|
-
scale,
|
31
|
-
ready,
|
32
|
-
handleItemClick
|
33
|
-
} = useCarouselItem.useCarouselItem(props);
|
34
|
-
const itemKls = vue.computed(() => [
|
35
|
-
ns.e("item"),
|
36
|
-
ns.is("active", active.value),
|
37
|
-
ns.is("in-stage", inStage.value),
|
38
|
-
ns.is("hover", hover.value),
|
39
|
-
ns.is("animating", animating.value),
|
40
|
-
{
|
41
|
-
[ns.em("item", "card")]: isCardType.value,
|
42
|
-
[ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
|
43
|
-
}
|
44
|
-
]);
|
45
|
-
const itemStyle = vue.computed(() => {
|
46
|
-
const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
|
47
|
-
const _translate = `${translateType}(${vue.unref(translate)}px)`;
|
48
|
-
const _scale = `scale(${vue.unref(scale)})`;
|
49
|
-
const transform = [_translate, _scale].join(" ");
|
50
|
-
return {
|
51
|
-
transform
|
52
|
-
};
|
53
|
-
});
|
54
|
-
return (_ctx, _cache) => {
|
55
|
-
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
56
|
-
ref_key: "carouselItemRef",
|
57
|
-
ref: carouselItemRef,
|
58
|
-
class: vue.normalizeClass(vue.unref(itemKls)),
|
59
|
-
style: vue.normalizeStyle(vue.unref(itemStyle)),
|
60
|
-
onClick: vue.unref(handleItemClick)
|
61
|
-
}, [
|
62
|
-
vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
63
|
-
key: 0,
|
64
|
-
class: vue.normalizeClass(vue.unref(ns).e("mask"))
|
65
|
-
}, null, 2)), [
|
66
|
-
[vue.vShow, !vue.unref(active)]
|
67
|
-
]) : vue.createCommentVNode("v-if", true),
|
68
|
-
vue.renderSlot(_ctx.$slots, "default")
|
69
|
-
], 14, ["onClick"])), [
|
70
|
-
[vue.vShow, vue.unref(ready)]
|
71
|
-
]);
|
72
|
-
};
|
7
|
+
const carouselItemProps = runtime.buildProps({
|
8
|
+
name: { type: String, default: "" },
|
9
|
+
label: {
|
10
|
+
type: [String, Number],
|
11
|
+
default: ""
|
73
12
|
}
|
74
13
|
});
|
75
|
-
var CarouselItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel-item.vue"]]);
|
76
14
|
|
77
|
-
exports
|
15
|
+
exports.carouselItemProps = carouselItemProps;
|
78
16
|
//# sourceMappingURL=carousel-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"carousel-item.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.
|
1
|
+
{"version":3,"file":"carousel-item.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselItemProps = buildProps({\n /**\n * @description name of the item, can be used in `setActiveItem`\n */\n name: { type: String, default: '' },\n /**\n * @description text content for the corresponding indicator\n */\n label: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type CarouselItemProps = ExtractPropTypes<typeof carouselItemProps>\n"],"names":["buildProps"],"mappings":";;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
@@ -2,15 +2,77 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var carouselItem = require('./carousel-item.js');
|
7
|
+
var useCarouselItem = require('./use-carousel-item.js');
|
8
|
+
var constants = require('./constants.js');
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
6
11
|
|
7
|
-
const
|
8
|
-
name:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
+
const __default__ = vue.defineComponent({
|
13
|
+
name: constants.CAROUSEL_ITEM_NAME
|
14
|
+
});
|
15
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
16
|
+
...__default__,
|
17
|
+
props: carouselItem.carouselItemProps,
|
18
|
+
setup(__props) {
|
19
|
+
const props = __props;
|
20
|
+
const ns = index.useNamespace("carousel");
|
21
|
+
const {
|
22
|
+
carouselItemRef,
|
23
|
+
active,
|
24
|
+
animating,
|
25
|
+
hover,
|
26
|
+
inStage,
|
27
|
+
isVertical,
|
28
|
+
translate,
|
29
|
+
isCardType,
|
30
|
+
scale,
|
31
|
+
ready,
|
32
|
+
handleItemClick
|
33
|
+
} = useCarouselItem.useCarouselItem(props);
|
34
|
+
const itemKls = vue.computed(() => [
|
35
|
+
ns.e("item"),
|
36
|
+
ns.is("active", active.value),
|
37
|
+
ns.is("in-stage", inStage.value),
|
38
|
+
ns.is("hover", hover.value),
|
39
|
+
ns.is("animating", animating.value),
|
40
|
+
{
|
41
|
+
[ns.em("item", "card")]: isCardType.value,
|
42
|
+
[ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
|
43
|
+
}
|
44
|
+
]);
|
45
|
+
const itemStyle = vue.computed(() => {
|
46
|
+
const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
|
47
|
+
const _translate = `${translateType}(${vue.unref(translate)}px)`;
|
48
|
+
const _scale = `scale(${vue.unref(scale)})`;
|
49
|
+
const transform = [_translate, _scale].join(" ");
|
50
|
+
return {
|
51
|
+
transform
|
52
|
+
};
|
53
|
+
});
|
54
|
+
return (_ctx, _cache) => {
|
55
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
56
|
+
ref_key: "carouselItemRef",
|
57
|
+
ref: carouselItemRef,
|
58
|
+
class: vue.normalizeClass(vue.unref(itemKls)),
|
59
|
+
style: vue.normalizeStyle(vue.unref(itemStyle)),
|
60
|
+
onClick: vue.unref(handleItemClick)
|
61
|
+
}, [
|
62
|
+
vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
63
|
+
key: 0,
|
64
|
+
class: vue.normalizeClass(vue.unref(ns).e("mask"))
|
65
|
+
}, null, 2)), [
|
66
|
+
[vue.vShow, !vue.unref(active)]
|
67
|
+
]) : vue.createCommentVNode("v-if", true),
|
68
|
+
vue.renderSlot(_ctx.$slots, "default")
|
69
|
+
], 14, ["onClick"])), [
|
70
|
+
[vue.vShow, vue.unref(ready)]
|
71
|
+
]);
|
72
|
+
};
|
12
73
|
}
|
13
74
|
});
|
75
|
+
var CarouselItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel-item.vue"]]);
|
14
76
|
|
15
|
-
exports
|
77
|
+
exports["default"] = CarouselItem;
|
16
78
|
//# sourceMappingURL=carousel-item2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.
|
1
|
+
{"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n ref=\"carouselItemRef\"\n :class=\"itemKls\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\nimport { CAROUSEL_ITEM_NAME } from './constants'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: CAROUSEL_ITEM_NAME,\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\n\n// inject\nconst {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props)\n\nconst itemKls = computed(() => [\n ns.e('item'),\n ns.is('active', active.value),\n ns.is('in-stage', inStage.value),\n ns.is('hover', hover.value),\n ns.is('animating', animating.value),\n {\n [ns.em('item', 'card')]: isCardType.value,\n [ns.em('item', 'card-vertical')]: isCardType.value && isVertical.value,\n },\n])\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"names":["CAROUSEL_ITEM_NAME","useNamespace","useCarouselItem","computed","unref"],"mappings":";;;;;;;;;;;uCAsBc,CAAA;AAAA,EACZ,IAAM,EAAAA,4BAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKC,mBAAa,UAAU,CAAA,CAAA;AAGlC,IAAM,MAAA;AAAA,MACJ,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,eAAA;AAAA,KACF,GAAIC,gCAAgB,KAAK,CAAA,CAAA;AAEzB,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAAA,MAC7B,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,MAAA,CAAO,KAAK,CAAA;AAAA,MAC5B,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,MAC/B,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,KAAA,CAAM,KAAK,CAAA;AAAA,MAC1B,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,MAClC;AAAA,QACE,CAAC,EAAG,CAAA,EAAA,CAAG,QAAQ,MAAM,CAAC,GAAG,UAAW,CAAA,KAAA;AAAA,QACpC,CAAC,GAAG,EAAG,CAAA,MAAA,EAAQ,eAAe,CAAC,GAAG,UAAW,CAAA,KAAA,IAAS,UAAW,CAAA,KAAA;AAAA,OACnE;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAYA,aAAwB,MAAM;AAC9C,MAAA,MAAM,gBAAgB,CAAY,SAAA,EAAAC,SAAA,CAAM,UAAU,CAAA,GAAI,MAAM,GAAG,CAAA,CAAA,CAAA;AAC/D,MAAA,MAAM,aAAa,CAAG,EAAA,aAAa,CAAI,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAC,CAAA,GAAA,CAAA,CAAA;AACvD,MAAA,MAAM,MAAS,GAAA,CAAA,MAAA,EAASA,SAAM,CAAA,KAAK,CAAC,CAAA,CAAA,CAAA,CAAA;AACpC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -3,9 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var form$1 = require('./src/form2.js');
|
6
|
-
var formItem$1 = require('./src/form-
|
6
|
+
var formItem$1 = require('./src/form-item2.js');
|
7
7
|
var form = require('./src/form.js');
|
8
|
-
var formItem = require('./src/form-
|
8
|
+
var formItem = require('./src/form-item.js');
|
9
9
|
var constants = require('./src/constants.js');
|
10
10
|
var install = require('../../utils/vue/install.js');
|
11
11
|
var useFormCommonProps = require('./src/hooks/use-form-common-props.js');
|
@@ -2,331 +2,56 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var lodashUnified = require('lodash-unified');
|
8
|
-
var core = require('@vueuse/core');
|
9
|
-
var formItem = require('./form-item2.js');
|
10
|
-
var formLabelWrap = require('./form-label-wrap.js');
|
11
|
-
var constants = require('./constants.js');
|
12
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
13
|
-
var objects = require('../../../utils/objects.js');
|
14
|
-
var useFormCommonProps = require('./hooks/use-form-common-props.js');
|
15
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
16
|
-
var index$1 = require('../../../hooks/use-id/index.js');
|
17
|
-
var style = require('../../../utils/dom/style.js');
|
18
|
-
var types = require('../../../utils/types.js');
|
19
|
-
var shared = require('@vue/shared');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
6
|
+
var size = require('../../../constants/size.js');
|
20
7
|
|
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
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
return { marginLeft: labelWidth };
|
66
|
-
}
|
67
|
-
return {};
|
68
|
-
});
|
69
|
-
const formItemClasses = vue.computed(() => [
|
70
|
-
ns.b(),
|
71
|
-
ns.m(_size.value),
|
72
|
-
ns.is("error", validateState.value === "error"),
|
73
|
-
ns.is("validating", validateState.value === "validating"),
|
74
|
-
ns.is("success", validateState.value === "success"),
|
75
|
-
ns.is("required", isRequired.value || props.required),
|
76
|
-
ns.is("no-asterisk", formContext == null ? void 0 : formContext.hideRequiredAsterisk),
|
77
|
-
(formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
78
|
-
{
|
79
|
-
[ns.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon,
|
80
|
-
[ns.m(`label-${labelPosition.value}`)]: labelPosition.value
|
81
|
-
}
|
82
|
-
]);
|
83
|
-
const _inlineMessage = vue.computed(() => types.isBoolean(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false);
|
84
|
-
const validateClasses = vue.computed(() => [
|
85
|
-
ns.e("error"),
|
86
|
-
{ [ns.em("error", "inline")]: _inlineMessage.value }
|
87
|
-
]);
|
88
|
-
const propString = vue.computed(() => {
|
89
|
-
if (!props.prop)
|
90
|
-
return "";
|
91
|
-
return shared.isString(props.prop) ? props.prop : props.prop.join(".");
|
92
|
-
});
|
93
|
-
const hasLabel = vue.computed(() => {
|
94
|
-
return !!(props.label || slots.label);
|
95
|
-
});
|
96
|
-
const labelFor = vue.computed(() => {
|
97
|
-
return props.for || (inputIds.value.length === 1 ? inputIds.value[0] : void 0);
|
98
|
-
});
|
99
|
-
const isGroup = vue.computed(() => {
|
100
|
-
return !labelFor.value && hasLabel.value;
|
101
|
-
});
|
102
|
-
const isNested = !!parentFormItemContext;
|
103
|
-
const fieldValue = vue.computed(() => {
|
104
|
-
const model = formContext == null ? void 0 : formContext.model;
|
105
|
-
if (!model || !props.prop) {
|
106
|
-
return;
|
107
|
-
}
|
108
|
-
return objects.getProp(model, props.prop).value;
|
109
|
-
});
|
110
|
-
const normalizedRules = vue.computed(() => {
|
111
|
-
const { required } = props;
|
112
|
-
const rules = [];
|
113
|
-
if (props.rules) {
|
114
|
-
rules.push(...lodashUnified.castArray(props.rules));
|
115
|
-
}
|
116
|
-
const formRules = formContext == null ? void 0 : formContext.rules;
|
117
|
-
if (formRules && props.prop) {
|
118
|
-
const _rules = objects.getProp(formRules, props.prop).value;
|
119
|
-
if (_rules) {
|
120
|
-
rules.push(...lodashUnified.castArray(_rules));
|
121
|
-
}
|
122
|
-
}
|
123
|
-
if (required !== void 0) {
|
124
|
-
const requiredRules = rules.map((rule, i) => [rule, i]).filter(([rule]) => Object.keys(rule).includes("required"));
|
125
|
-
if (requiredRules.length > 0) {
|
126
|
-
for (const [rule, i] of requiredRules) {
|
127
|
-
if (rule.required === required)
|
128
|
-
continue;
|
129
|
-
rules[i] = { ...rule, required };
|
130
|
-
}
|
131
|
-
} else {
|
132
|
-
rules.push({ required });
|
133
|
-
}
|
134
|
-
}
|
135
|
-
return rules;
|
136
|
-
});
|
137
|
-
const validateEnabled = vue.computed(() => normalizedRules.value.length > 0);
|
138
|
-
const getFilteredRule = (trigger) => {
|
139
|
-
const rules = normalizedRules.value;
|
140
|
-
return rules.filter((rule) => {
|
141
|
-
if (!rule.trigger || !trigger)
|
142
|
-
return true;
|
143
|
-
if (shared.isArray(rule.trigger)) {
|
144
|
-
return rule.trigger.includes(trigger);
|
145
|
-
} else {
|
146
|
-
return rule.trigger === trigger;
|
147
|
-
}
|
148
|
-
}).map(({ trigger: trigger2, ...rule }) => rule);
|
149
|
-
};
|
150
|
-
const isRequired = vue.computed(() => normalizedRules.value.some((rule) => rule.required));
|
151
|
-
const shouldShowError = vue.computed(() => {
|
152
|
-
var _a;
|
153
|
-
return validateStateDebounced.value === "error" && props.showMessage && ((_a = formContext == null ? void 0 : formContext.showMessage) != null ? _a : true);
|
154
|
-
});
|
155
|
-
const currentLabel = vue.computed(() => `${props.label || ""}${(formContext == null ? void 0 : formContext.labelSuffix) || ""}`);
|
156
|
-
const setValidationState = (state) => {
|
157
|
-
validateState.value = state;
|
158
|
-
};
|
159
|
-
const onValidationFailed = (error) => {
|
160
|
-
var _a, _b;
|
161
|
-
const { errors, fields } = error;
|
162
|
-
if (!errors || !fields) {
|
163
|
-
console.error(error);
|
164
|
-
}
|
165
|
-
setValidationState("error");
|
166
|
-
validateMessage.value = errors ? (_b = (_a = errors == null ? void 0 : errors[0]) == null ? void 0 : _a.message) != null ? _b : `${props.prop} is required` : "";
|
167
|
-
formContext == null ? void 0 : formContext.emit("validate", props.prop, false, validateMessage.value);
|
168
|
-
};
|
169
|
-
const onValidationSucceeded = () => {
|
170
|
-
setValidationState("success");
|
171
|
-
formContext == null ? void 0 : formContext.emit("validate", props.prop, true, "");
|
172
|
-
};
|
173
|
-
const doValidate = async (rules) => {
|
174
|
-
const modelName = propString.value;
|
175
|
-
const validator = new AsyncValidator__default["default"]({
|
176
|
-
[modelName]: rules
|
177
|
-
});
|
178
|
-
return validator.validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
|
179
|
-
onValidationSucceeded();
|
180
|
-
return true;
|
181
|
-
}).catch((err) => {
|
182
|
-
onValidationFailed(err);
|
183
|
-
return Promise.reject(err);
|
184
|
-
});
|
185
|
-
};
|
186
|
-
const validate = async (trigger, callback) => {
|
187
|
-
if (isResettingField || !props.prop) {
|
188
|
-
return false;
|
189
|
-
}
|
190
|
-
const hasCallback = shared.isFunction(callback);
|
191
|
-
if (!validateEnabled.value) {
|
192
|
-
callback == null ? void 0 : callback(false);
|
193
|
-
return false;
|
194
|
-
}
|
195
|
-
const rules = getFilteredRule(trigger);
|
196
|
-
if (rules.length === 0) {
|
197
|
-
callback == null ? void 0 : callback(true);
|
198
|
-
return true;
|
199
|
-
}
|
200
|
-
setValidationState("validating");
|
201
|
-
return doValidate(rules).then(() => {
|
202
|
-
callback == null ? void 0 : callback(true);
|
203
|
-
return true;
|
204
|
-
}).catch((err) => {
|
205
|
-
const { fields } = err;
|
206
|
-
callback == null ? void 0 : callback(false, fields);
|
207
|
-
return hasCallback ? false : Promise.reject(fields);
|
208
|
-
});
|
209
|
-
};
|
210
|
-
const clearValidate = () => {
|
211
|
-
setValidationState("");
|
212
|
-
validateMessage.value = "";
|
213
|
-
isResettingField = false;
|
214
|
-
};
|
215
|
-
const resetField = async () => {
|
216
|
-
const model = formContext == null ? void 0 : formContext.model;
|
217
|
-
if (!model || !props.prop)
|
218
|
-
return;
|
219
|
-
const computedValue = objects.getProp(model, props.prop);
|
220
|
-
isResettingField = true;
|
221
|
-
computedValue.value = lodashUnified.clone(initialValue);
|
222
|
-
await vue.nextTick();
|
223
|
-
clearValidate();
|
224
|
-
isResettingField = false;
|
225
|
-
};
|
226
|
-
const addInputId = (id) => {
|
227
|
-
if (!inputIds.value.includes(id)) {
|
228
|
-
inputIds.value.push(id);
|
229
|
-
}
|
230
|
-
};
|
231
|
-
const removeInputId = (id) => {
|
232
|
-
inputIds.value = inputIds.value.filter((listId) => listId !== id);
|
233
|
-
};
|
234
|
-
vue.watch(() => props.error, (val) => {
|
235
|
-
validateMessage.value = val || "";
|
236
|
-
setValidationState(val ? "error" : "");
|
237
|
-
}, { immediate: true });
|
238
|
-
vue.watch(() => props.validateStatus, (val) => setValidationState(val || ""));
|
239
|
-
const context = vue.reactive({
|
240
|
-
...vue.toRefs(props),
|
241
|
-
$el: formItemRef,
|
242
|
-
size: _size,
|
243
|
-
validateState,
|
244
|
-
labelId,
|
245
|
-
inputIds,
|
246
|
-
isGroup,
|
247
|
-
hasLabel,
|
248
|
-
fieldValue,
|
249
|
-
addInputId,
|
250
|
-
removeInputId,
|
251
|
-
resetField,
|
252
|
-
clearValidate,
|
253
|
-
validate
|
254
|
-
});
|
255
|
-
vue.provide(constants.formItemContextKey, context);
|
256
|
-
vue.onMounted(() => {
|
257
|
-
if (props.prop) {
|
258
|
-
formContext == null ? void 0 : formContext.addField(context);
|
259
|
-
initialValue = lodashUnified.clone(fieldValue.value);
|
260
|
-
}
|
261
|
-
});
|
262
|
-
vue.onBeforeUnmount(() => {
|
263
|
-
formContext == null ? void 0 : formContext.removeField(context);
|
264
|
-
});
|
265
|
-
expose({
|
266
|
-
size: _size,
|
267
|
-
validateMessage,
|
268
|
-
validateState,
|
269
|
-
validate,
|
270
|
-
clearValidate,
|
271
|
-
resetField
|
272
|
-
});
|
273
|
-
return (_ctx, _cache) => {
|
274
|
-
var _a;
|
275
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
276
|
-
ref_key: "formItemRef",
|
277
|
-
ref: formItemRef,
|
278
|
-
class: vue.normalizeClass(vue.unref(formItemClasses)),
|
279
|
-
role: vue.unref(isGroup) ? "group" : void 0,
|
280
|
-
"aria-labelledby": vue.unref(isGroup) ? vue.unref(labelId) : void 0
|
281
|
-
}, [
|
282
|
-
vue.createVNode(vue.unref(formLabelWrap["default"]), {
|
283
|
-
"is-auto-width": vue.unref(labelStyle).width === "auto",
|
284
|
-
"update-all": ((_a = vue.unref(formContext)) == null ? void 0 : _a.labelWidth) === "auto"
|
285
|
-
}, {
|
286
|
-
default: vue.withCtx(() => [
|
287
|
-
vue.unref(hasLabel) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(labelFor) ? "label" : "div"), {
|
288
|
-
key: 0,
|
289
|
-
id: vue.unref(labelId),
|
290
|
-
for: vue.unref(labelFor),
|
291
|
-
class: vue.normalizeClass(vue.unref(ns).e("label")),
|
292
|
-
style: vue.normalizeStyle(vue.unref(labelStyle))
|
293
|
-
}, {
|
294
|
-
default: vue.withCtx(() => [
|
295
|
-
vue.renderSlot(_ctx.$slots, "label", { label: vue.unref(currentLabel) }, () => [
|
296
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(currentLabel)), 1)
|
297
|
-
])
|
298
|
-
]),
|
299
|
-
_: 3
|
300
|
-
}, 8, ["id", "for", "class", "style"])) : vue.createCommentVNode("v-if", true)
|
301
|
-
]),
|
302
|
-
_: 3
|
303
|
-
}, 8, ["is-auto-width", "update-all"]),
|
304
|
-
vue.createElementVNode("div", {
|
305
|
-
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
306
|
-
style: vue.normalizeStyle(vue.unref(contentStyle))
|
307
|
-
}, [
|
308
|
-
vue.renderSlot(_ctx.$slots, "default"),
|
309
|
-
vue.createVNode(vue.TransitionGroup, {
|
310
|
-
name: `${vue.unref(ns).namespace.value}-zoom-in-top`
|
311
|
-
}, {
|
312
|
-
default: vue.withCtx(() => [
|
313
|
-
vue.unref(shouldShowError) ? vue.renderSlot(_ctx.$slots, "error", {
|
314
|
-
key: 0,
|
315
|
-
error: validateMessage.value
|
316
|
-
}, () => [
|
317
|
-
vue.createElementVNode("div", {
|
318
|
-
class: vue.normalizeClass(vue.unref(validateClasses))
|
319
|
-
}, vue.toDisplayString(validateMessage.value), 3)
|
320
|
-
]) : vue.createCommentVNode("v-if", true)
|
321
|
-
]),
|
322
|
-
_: 3
|
323
|
-
}, 8, ["name"])
|
324
|
-
], 6)
|
325
|
-
], 10, ["role", "aria-labelledby"]);
|
326
|
-
};
|
8
|
+
const formItemValidateStates = [
|
9
|
+
"",
|
10
|
+
"error",
|
11
|
+
"validating",
|
12
|
+
"success"
|
13
|
+
];
|
14
|
+
const formItemProps = runtime.buildProps({
|
15
|
+
label: String,
|
16
|
+
labelWidth: {
|
17
|
+
type: [String, Number],
|
18
|
+
default: ""
|
19
|
+
},
|
20
|
+
labelPosition: {
|
21
|
+
type: String,
|
22
|
+
values: ["left", "right", "top", ""],
|
23
|
+
default: ""
|
24
|
+
},
|
25
|
+
prop: {
|
26
|
+
type: runtime.definePropType([String, Array])
|
27
|
+
},
|
28
|
+
required: {
|
29
|
+
type: Boolean,
|
30
|
+
default: void 0
|
31
|
+
},
|
32
|
+
rules: {
|
33
|
+
type: runtime.definePropType([Object, Array])
|
34
|
+
},
|
35
|
+
error: String,
|
36
|
+
validateStatus: {
|
37
|
+
type: String,
|
38
|
+
values: formItemValidateStates
|
39
|
+
},
|
40
|
+
for: String,
|
41
|
+
inlineMessage: {
|
42
|
+
type: [String, Boolean],
|
43
|
+
default: ""
|
44
|
+
},
|
45
|
+
showMessage: {
|
46
|
+
type: Boolean,
|
47
|
+
default: true
|
48
|
+
},
|
49
|
+
size: {
|
50
|
+
type: String,
|
51
|
+
values: size.componentSizes
|
327
52
|
}
|
328
53
|
});
|
329
|
-
var FormItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "form-item.vue"]]);
|
330
54
|
|
331
|
-
exports
|
55
|
+
exports.formItemProps = formItemProps;
|
56
|
+
exports.formItemValidateStates = formItemValidateStates;
|
332
57
|
//# sourceMappingURL=form-item.js.map
|