@element-plus/nightly 0.0.20241024 → 0.0.20241025
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/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/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/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/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/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel.mjs +205 -62
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +62 -205
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +42 -401
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +401 -42
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/index.mjs +3 -3
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +70 -25
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +25 -70
- package/es/components/statistic/src/statistic2.mjs.map +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/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel.js +205 -63
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +63 -205
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +42 -399
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +399 -42
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/index.js +3 -3
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +70 -25
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +25 -70
- package/lib/components/statistic/src/statistic2.js.map +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 +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.
|
|
1
|
+
{"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div v-if=\"$slots.title || title\" :class=\"ns.e('head')\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div :class=\"ns.e('content')\">\n <div v-if=\"$slots.prefix || prefix\" :class=\"ns.e('prefix')\">\n <slot name=\"prefix\">\n <span>{{ prefix }}</span>\n </slot>\n </div>\n <span :class=\"ns.e('number')\" :style=\"valueStyle\">\n {{ displayValue }}\n </span>\n <div v-if=\"$slots.suffix || suffix\" :class=\"ns.e('suffix')\">\n <slot name=\"suffix\">\n <span>{{ suffix }}</span>\n </slot>\n </div>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isNumber } from '@element-plus/utils'\nimport { statisticProps } from './statistic'\n\ndefineOptions({\n name: 'ElStatistic',\n})\n\nconst props = defineProps(statisticProps)\nconst ns = useNamespace('statistic')\n\nconst displayValue = computed(() => {\n const { value, formatter, precision, decimalSeparator, groupSeparator } =\n props\n\n if (isFunction(formatter)) return formatter(value)\n\n // https://github.com/element-plus/element-plus/issues/17784\n if (!isNumber(value) || Number.isNaN(value)) return value\n\n let [integer, decimal = ''] = String(value).split('.')\n decimal = decimal\n .padEnd(precision, '0')\n .slice(0, precision > 0 ? precision : 0)\n integer = integer.replace(/\\B(?=(\\d{3})+(?!\\d))/g, groupSeparator)\n return [integer, decimal].join(decimal ? decimalSeparator : '')\n})\n\ndefineExpose({\n /**\n * @description current display value\n */\n displayValue,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCA8Bc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,MAAA,MAAM,EAAE,KAAO,EAAA,SAAA,EAAW,SAAW,EAAA,gBAAA,EAAkB,gBACrD,GAAA,KAAA,CAAA;AAEF,MAAA,IAAI,UAAW,CAAA,SAAS,CAAG;AAG3B,QAAI,gBAAe,CAAA,KAAK;AAExB,MAAI,IAAA,CAAC,SAAS,KAAU,CAAA,IAAA,MAAM,CAAO,KAAA,CAAA,KAAK,CAAE;AAC5C,QAAU,OAAA,KAAA,CAAA;AAGV,MAAU,IAAA,CAAA,OAAA,EAAA,OAAgB,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA,KAAA,CAAA,CAAA,KAAA,CAAA,GAAuC,CAAA,CAAA;AACjE,MAAA,OAAO,GAAU,OAAA,CAAA,MAAO,UAAO,EAAA,GAAA,CAAA,CAAU,qBAAqB,CAAA,GAAA,SAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MAC/D,OAAA,GAAA,OAAA,CAAA,OAAA,CAAA,uBAAA,EAAA,cAAA,CAAA,CAAA;AAED,MAAa,OAAA,CAAA,OAAA,EAAA,OAAA,CAAA,CAAA,IAAA,CAAA,OAAA,GAAA,gBAAA,GAAA,EAAA,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MAAA,CAAA;AAAA,MAAA,YAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IACF,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,76 +1,31 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle } from 'vue';
|
|
2
|
-
import '../../../hooks/index.mjs';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import {
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
-
import { isFunction } from '@vue/shared';
|
|
8
|
-
import { isNumber } from '../../../utils/types.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
9
3
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return (_ctx, _cache) => {
|
|
34
|
-
return openBlock(), createElementBlock("div", {
|
|
35
|
-
class: normalizeClass(unref(ns).b())
|
|
36
|
-
}, [
|
|
37
|
-
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", {
|
|
38
|
-
key: 0,
|
|
39
|
-
class: normalizeClass(unref(ns).e("head"))
|
|
40
|
-
}, [
|
|
41
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
42
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
43
|
-
])
|
|
44
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
45
|
-
createElementVNode("div", {
|
|
46
|
-
class: normalizeClass(unref(ns).e("content"))
|
|
47
|
-
}, [
|
|
48
|
-
_ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", {
|
|
49
|
-
key: 0,
|
|
50
|
-
class: normalizeClass(unref(ns).e("prefix"))
|
|
51
|
-
}, [
|
|
52
|
-
renderSlot(_ctx.$slots, "prefix", {}, () => [
|
|
53
|
-
createElementVNode("span", null, toDisplayString(_ctx.prefix), 1)
|
|
54
|
-
])
|
|
55
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
56
|
-
createElementVNode("span", {
|
|
57
|
-
class: normalizeClass(unref(ns).e("number")),
|
|
58
|
-
style: normalizeStyle(_ctx.valueStyle)
|
|
59
|
-
}, toDisplayString(unref(displayValue)), 7),
|
|
60
|
-
_ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", {
|
|
61
|
-
key: 1,
|
|
62
|
-
class: normalizeClass(unref(ns).e("suffix"))
|
|
63
|
-
}, [
|
|
64
|
-
renderSlot(_ctx.$slots, "suffix", {}, () => [
|
|
65
|
-
createElementVNode("span", null, toDisplayString(_ctx.suffix), 1)
|
|
66
|
-
])
|
|
67
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
68
|
-
], 2)
|
|
69
|
-
], 2);
|
|
70
|
-
};
|
|
4
|
+
const statisticProps = buildProps({
|
|
5
|
+
decimalSeparator: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "."
|
|
8
|
+
},
|
|
9
|
+
groupSeparator: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ","
|
|
12
|
+
},
|
|
13
|
+
precision: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
formatter: Function,
|
|
18
|
+
value: {
|
|
19
|
+
type: definePropType([Number, Object]),
|
|
20
|
+
default: 0
|
|
21
|
+
},
|
|
22
|
+
prefix: String,
|
|
23
|
+
suffix: String,
|
|
24
|
+
title: String,
|
|
25
|
+
valueStyle: {
|
|
26
|
+
type: definePropType([String, Object, Array])
|
|
71
27
|
}
|
|
72
28
|
});
|
|
73
|
-
var Statistic = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "statistic.vue"]]);
|
|
74
29
|
|
|
75
|
-
export {
|
|
30
|
+
export { statisticProps };
|
|
76
31
|
//# sourceMappingURL=statistic2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistic2.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.
|
|
1
|
+
{"version":3,"file":"statistic2.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Statistic from './statistic.vue'\n\nexport const statisticProps = buildProps({\n /**\n * @description Setting the decimal point\n */\n decimalSeparator: {\n type: String,\n default: '.',\n },\n /**\n * @description Sets the thousandth identifier\n */\n groupSeparator: {\n type: String,\n default: ',',\n },\n /**\n * @description numerical precision\n */\n precision: {\n type: Number,\n default: 0,\n },\n /**\n * @description Custom numerical presentation\n */\n formatter: Function,\n /**\n * @description Numerical content\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Sets the prefix of a number\n */\n prefix: String,\n\n /**\n * @description Sets the suffix of a number\n */\n suffix: String,\n /**\n * @description Numeric titles\n */\n title: String,\n /**\n * @description Styles numeric values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\nexport type StatisticProps = ExtractPropTypes<typeof statisticProps>\n\nexport type StatisticInstance = InstanceType<typeof Statistic>\n"],"names":[],"mappings":";;;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ export { calendarEmits, calendarProps } from './components/calendar/src/calendar
|
|
|
29
29
|
export { ElCalendar } from './components/calendar/index.mjs';
|
|
30
30
|
export { cardProps } from './components/card/src/card.mjs';
|
|
31
31
|
export { ElCard } from './components/card/index.mjs';
|
|
32
|
-
export { carouselEmits, carouselProps } from './components/carousel/src/
|
|
32
|
+
export { carouselEmits, carouselProps } from './components/carousel/src/carousel2.mjs';
|
|
33
33
|
export { carouselItemProps } from './components/carousel/src/carousel-item.mjs';
|
|
34
34
|
export { CAROUSEL_ITEM_NAME, carouselContextKey } from './components/carousel/src/constants.mjs';
|
|
35
35
|
export { ElCarousel, ElCarouselItem } from './components/carousel/index.mjs';
|
|
@@ -51,7 +51,7 @@ export { collapseItemProps } from './components/collapse/src/collapse-item.mjs';
|
|
|
51
51
|
export { collapseContextKey } from './components/collapse/src/constants.mjs';
|
|
52
52
|
export { ElCollapse, ElCollapseItem } from './components/collapse/index.mjs';
|
|
53
53
|
export { ElCollapseTransition } from './components/collapse-transition/index.mjs';
|
|
54
|
-
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './components/color-picker/src/color-
|
|
54
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './components/color-picker/src/color-picker.mjs';
|
|
55
55
|
export { ElColorPicker } from './components/color-picker/index.mjs';
|
|
56
56
|
export { messageConfig } from './components/config-provider/src/config-provider.mjs';
|
|
57
57
|
export { configProviderProps } from './components/config-provider/src/config-provider-props.mjs';
|
|
@@ -154,7 +154,7 @@ export { spaceProps } from './components/space/src/space.mjs';
|
|
|
154
154
|
export { spaceItemProps } from './components/space/src/item.mjs';
|
|
155
155
|
export { useSpace } from './components/space/src/use-space.mjs';
|
|
156
156
|
export { ElSpace } from './components/space/index.mjs';
|
|
157
|
-
export { statisticProps } from './components/statistic/src/
|
|
157
|
+
export { statisticProps } from './components/statistic/src/statistic2.mjs';
|
|
158
158
|
export { ElStatistic } from './components/statistic/index.mjs';
|
|
159
159
|
export { stepProps } from './components/steps/src/item.mjs';
|
|
160
160
|
export { stepsEmits, stepsProps } from './components/steps/src/steps.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20241025";
|
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.20241025'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var carousel$1 = require('./src/
|
|
6
|
+
var carousel$1 = require('./src/carousel.js');
|
|
7
7
|
var carouselItem$1 = require('./src/carousel-item2.js');
|
|
8
|
-
var carousel = require('./src/
|
|
8
|
+
var carousel = require('./src/carousel2.js');
|
|
9
9
|
var carouselItem = require('./src/carousel-item.js');
|
|
10
10
|
var constants = require('./src/constants.js');
|
|
11
11
|
var install = require('../../utils/vue/install.js');
|
|
@@ -2,70 +2,212 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$2 = require('../../icon/index.js');
|
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
+
require('../../../hooks/index.js');
|
|
9
|
+
var carousel = require('./carousel2.js');
|
|
10
|
+
var useCarousel = require('./use-carousel.js');
|
|
11
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
|
+
var index$1 = require('../../../hooks/use-locale/index.js');
|
|
8
14
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
default: 0
|
|
13
|
-
},
|
|
14
|
-
height: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
trigger: {
|
|
19
|
-
type: String,
|
|
20
|
-
values: ["hover", "click"],
|
|
21
|
-
default: "hover"
|
|
22
|
-
},
|
|
23
|
-
autoplay: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: true
|
|
26
|
-
},
|
|
27
|
-
interval: {
|
|
28
|
-
type: Number,
|
|
29
|
-
default: 3e3
|
|
30
|
-
},
|
|
31
|
-
indicatorPosition: {
|
|
32
|
-
type: String,
|
|
33
|
-
values: ["", "none", "outside"],
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
arrow: {
|
|
37
|
-
type: String,
|
|
38
|
-
values: ["always", "hover", "never"],
|
|
39
|
-
default: "hover"
|
|
40
|
-
},
|
|
41
|
-
type: {
|
|
42
|
-
type: String,
|
|
43
|
-
values: ["", "card"],
|
|
44
|
-
default: ""
|
|
45
|
-
},
|
|
46
|
-
cardScale: {
|
|
47
|
-
type: Number,
|
|
48
|
-
default: 0.83
|
|
49
|
-
},
|
|
50
|
-
loop: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: true
|
|
53
|
-
},
|
|
54
|
-
direction: {
|
|
55
|
-
type: String,
|
|
56
|
-
values: ["horizontal", "vertical"],
|
|
57
|
-
default: "horizontal"
|
|
58
|
-
},
|
|
59
|
-
pauseOnHover: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: true
|
|
62
|
-
},
|
|
63
|
-
motionBlur: Boolean
|
|
15
|
+
const COMPONENT_NAME = "ElCarousel";
|
|
16
|
+
const __default__ = vue.defineComponent({
|
|
17
|
+
name: COMPONENT_NAME
|
|
64
18
|
});
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
20
|
+
...__default__,
|
|
21
|
+
props: carousel.carouselProps,
|
|
22
|
+
emits: carousel.carouselEmits,
|
|
23
|
+
setup(__props, { expose, emit }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const {
|
|
26
|
+
root,
|
|
27
|
+
activeIndex,
|
|
28
|
+
arrowDisplay,
|
|
29
|
+
hasLabel,
|
|
30
|
+
hover,
|
|
31
|
+
isCardType,
|
|
32
|
+
items,
|
|
33
|
+
isVertical,
|
|
34
|
+
containerStyle,
|
|
35
|
+
handleButtonEnter,
|
|
36
|
+
handleButtonLeave,
|
|
37
|
+
isTransitioning,
|
|
38
|
+
handleIndicatorClick,
|
|
39
|
+
handleMouseEnter,
|
|
40
|
+
handleMouseLeave,
|
|
41
|
+
handleTransitionEnd,
|
|
42
|
+
setActiveItem,
|
|
43
|
+
prev,
|
|
44
|
+
next,
|
|
45
|
+
PlaceholderItem,
|
|
46
|
+
isTwoLengthShow,
|
|
47
|
+
throttledArrowClick,
|
|
48
|
+
throttledIndicatorHover
|
|
49
|
+
} = useCarousel.useCarousel(props, emit, COMPONENT_NAME);
|
|
50
|
+
const ns = index.useNamespace("carousel");
|
|
51
|
+
const { t } = index$1.useLocale();
|
|
52
|
+
const carouselClasses = vue.computed(() => {
|
|
53
|
+
const classes = [ns.b(), ns.m(props.direction)];
|
|
54
|
+
if (vue.unref(isCardType)) {
|
|
55
|
+
classes.push(ns.m("card"));
|
|
56
|
+
}
|
|
57
|
+
return classes;
|
|
58
|
+
});
|
|
59
|
+
const carouselContainer = vue.computed(() => {
|
|
60
|
+
const classes = [ns.e("container")];
|
|
61
|
+
if (props.motionBlur && vue.unref(isTransitioning) && items.value.length > 1) {
|
|
62
|
+
classes.push(vue.unref(isVertical) ? `${ns.namespace.value}-transitioning-vertical` : `${ns.namespace.value}-transitioning`);
|
|
63
|
+
}
|
|
64
|
+
return classes;
|
|
65
|
+
});
|
|
66
|
+
const indicatorsClasses = vue.computed(() => {
|
|
67
|
+
const classes = [ns.e("indicators"), ns.em("indicators", props.direction)];
|
|
68
|
+
if (vue.unref(hasLabel)) {
|
|
69
|
+
classes.push(ns.em("indicators", "labels"));
|
|
70
|
+
}
|
|
71
|
+
if (props.indicatorPosition === "outside") {
|
|
72
|
+
classes.push(ns.em("indicators", "outside"));
|
|
73
|
+
}
|
|
74
|
+
if (vue.unref(isVertical)) {
|
|
75
|
+
classes.push(ns.em("indicators", "right"));
|
|
76
|
+
}
|
|
77
|
+
return classes;
|
|
78
|
+
});
|
|
79
|
+
expose({
|
|
80
|
+
activeIndex,
|
|
81
|
+
setActiveItem,
|
|
82
|
+
prev,
|
|
83
|
+
next
|
|
84
|
+
});
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
87
|
+
ref_key: "root",
|
|
88
|
+
ref: root,
|
|
89
|
+
class: vue.normalizeClass(vue.unref(carouselClasses)),
|
|
90
|
+
onMouseenter: vue.withModifiers(vue.unref(handleMouseEnter), ["stop"]),
|
|
91
|
+
onMouseleave: vue.withModifiers(vue.unref(handleMouseLeave), ["stop"])
|
|
92
|
+
}, [
|
|
93
|
+
vue.unref(arrowDisplay) ? (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
94
|
+
key: 0,
|
|
95
|
+
name: "carousel-arrow-left",
|
|
96
|
+
persisted: ""
|
|
97
|
+
}, {
|
|
98
|
+
default: vue.withCtx(() => [
|
|
99
|
+
vue.withDirectives(vue.createElementVNode("button", {
|
|
100
|
+
type: "button",
|
|
101
|
+
class: vue.normalizeClass([vue.unref(ns).e("arrow"), vue.unref(ns).em("arrow", "left")]),
|
|
102
|
+
"aria-label": vue.unref(t)("el.carousel.leftArrow"),
|
|
103
|
+
onMouseenter: ($event) => vue.unref(handleButtonEnter)("left"),
|
|
104
|
+
onMouseleave: vue.unref(handleButtonLeave),
|
|
105
|
+
onClick: vue.withModifiers(($event) => vue.unref(throttledArrowClick)(vue.unref(activeIndex) - 1), ["stop"])
|
|
106
|
+
}, [
|
|
107
|
+
vue.createVNode(vue.unref(index$2.ElIcon), null, {
|
|
108
|
+
default: vue.withCtx(() => [
|
|
109
|
+
vue.createVNode(vue.unref(iconsVue.ArrowLeft))
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})
|
|
113
|
+
], 42, ["aria-label", "onMouseenter", "onMouseleave", "onClick"]), [
|
|
114
|
+
[
|
|
115
|
+
vue.vShow,
|
|
116
|
+
(_ctx.arrow === "always" || vue.unref(hover)) && (props.loop || vue.unref(activeIndex) > 0)
|
|
117
|
+
]
|
|
118
|
+
])
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
122
|
+
vue.unref(arrowDisplay) ? (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
123
|
+
key: 1,
|
|
124
|
+
name: "carousel-arrow-right",
|
|
125
|
+
persisted: ""
|
|
126
|
+
}, {
|
|
127
|
+
default: vue.withCtx(() => [
|
|
128
|
+
vue.withDirectives(vue.createElementVNode("button", {
|
|
129
|
+
type: "button",
|
|
130
|
+
class: vue.normalizeClass([vue.unref(ns).e("arrow"), vue.unref(ns).em("arrow", "right")]),
|
|
131
|
+
"aria-label": vue.unref(t)("el.carousel.rightArrow"),
|
|
132
|
+
onMouseenter: ($event) => vue.unref(handleButtonEnter)("right"),
|
|
133
|
+
onMouseleave: vue.unref(handleButtonLeave),
|
|
134
|
+
onClick: vue.withModifiers(($event) => vue.unref(throttledArrowClick)(vue.unref(activeIndex) + 1), ["stop"])
|
|
135
|
+
}, [
|
|
136
|
+
vue.createVNode(vue.unref(index$2.ElIcon), null, {
|
|
137
|
+
default: vue.withCtx(() => [
|
|
138
|
+
vue.createVNode(vue.unref(iconsVue.ArrowRight))
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
})
|
|
142
|
+
], 42, ["aria-label", "onMouseenter", "onMouseleave", "onClick"]), [
|
|
143
|
+
[
|
|
144
|
+
vue.vShow,
|
|
145
|
+
(_ctx.arrow === "always" || vue.unref(hover)) && (props.loop || vue.unref(activeIndex) < vue.unref(items).length - 1)
|
|
146
|
+
]
|
|
147
|
+
])
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
151
|
+
vue.createElementVNode("div", {
|
|
152
|
+
class: vue.normalizeClass(vue.unref(carouselContainer)),
|
|
153
|
+
style: vue.normalizeStyle(vue.unref(containerStyle)),
|
|
154
|
+
onTransitionend: vue.unref(handleTransitionEnd)
|
|
155
|
+
}, [
|
|
156
|
+
vue.createVNode(vue.unref(PlaceholderItem)),
|
|
157
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
158
|
+
], 46, ["onTransitionend"]),
|
|
159
|
+
_ctx.indicatorPosition !== "none" ? (vue.openBlock(), vue.createElementBlock("ul", {
|
|
160
|
+
key: 2,
|
|
161
|
+
class: vue.normalizeClass(vue.unref(indicatorsClasses))
|
|
162
|
+
}, [
|
|
163
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(items), (item, index) => {
|
|
164
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
|
|
165
|
+
key: index,
|
|
166
|
+
class: vue.normalizeClass([
|
|
167
|
+
vue.unref(ns).e("indicator"),
|
|
168
|
+
vue.unref(ns).em("indicator", _ctx.direction),
|
|
169
|
+
vue.unref(ns).is("active", index === vue.unref(activeIndex))
|
|
170
|
+
]),
|
|
171
|
+
onMouseenter: ($event) => vue.unref(throttledIndicatorHover)(index),
|
|
172
|
+
onClick: vue.withModifiers(($event) => vue.unref(handleIndicatorClick)(index), ["stop"])
|
|
173
|
+
}, [
|
|
174
|
+
vue.createElementVNode("button", {
|
|
175
|
+
class: vue.normalizeClass(vue.unref(ns).e("button")),
|
|
176
|
+
"aria-label": vue.unref(t)("el.carousel.indicator", { index: index + 1 })
|
|
177
|
+
}, [
|
|
178
|
+
vue.unref(hasLabel) ? (vue.openBlock(), vue.createElementBlock("span", { key: 0 }, vue.toDisplayString(item.props.label), 1)) : vue.createCommentVNode("v-if", true)
|
|
179
|
+
], 10, ["aria-label"])
|
|
180
|
+
], 42, ["onMouseenter", "onClick"])), [
|
|
181
|
+
[vue.vShow, vue.unref(isTwoLengthShow)(index)]
|
|
182
|
+
]);
|
|
183
|
+
}), 128))
|
|
184
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
185
|
+
props.motionBlur ? (vue.openBlock(), vue.createElementBlock("svg", {
|
|
186
|
+
key: 3,
|
|
187
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
188
|
+
version: "1.1",
|
|
189
|
+
style: { "display": "none" }
|
|
190
|
+
}, [
|
|
191
|
+
vue.createElementVNode("defs", null, [
|
|
192
|
+
vue.createElementVNode("filter", { id: "elCarouselHorizontal" }, [
|
|
193
|
+
vue.createElementVNode("feGaussianBlur", {
|
|
194
|
+
in: "SourceGraphic",
|
|
195
|
+
stdDeviation: "12,0"
|
|
196
|
+
})
|
|
197
|
+
]),
|
|
198
|
+
vue.createElementVNode("filter", { id: "elCarouselVertical" }, [
|
|
199
|
+
vue.createElementVNode("feGaussianBlur", {
|
|
200
|
+
in: "SourceGraphic",
|
|
201
|
+
stdDeviation: "0,10"
|
|
202
|
+
})
|
|
203
|
+
])
|
|
204
|
+
])
|
|
205
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
206
|
+
], 42, ["onMouseenter", "onMouseleave"]);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
var Carousel = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel.vue"]]);
|
|
68
211
|
|
|
69
|
-
exports
|
|
70
|
-
exports.carouselProps = carouselProps;
|
|
212
|
+
exports["default"] = Carousel;
|
|
71
213
|
//# sourceMappingURL=carousel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","sources":["../../../../../../packages/components/carousel/src/carousel.
|
|
1
|
+
{"version":3,"file":"carousel.js","sources":["../../../../../../packages/components/carousel/src/carousel.vue"],"sourcesContent":["<template>\n <div\n ref=\"root\"\n :class=\"carouselClasses\"\n @mouseenter.stop=\"handleMouseEnter\"\n @mouseleave.stop=\"handleMouseLeave\"\n >\n <transition v-if=\"arrowDisplay\" name=\"carousel-arrow-left\">\n <button\n v-show=\"\n (arrow === 'always' || hover) && (props.loop || activeIndex > 0)\n \"\n type=\"button\"\n :class=\"[ns.e('arrow'), ns.em('arrow', 'left')]\"\n :aria-label=\"t('el.carousel.leftArrow')\"\n @mouseenter=\"handleButtonEnter('left')\"\n @mouseleave=\"handleButtonLeave\"\n @click.stop=\"throttledArrowClick(activeIndex - 1)\"\n >\n <ElIcon>\n <ArrowLeft />\n </ElIcon>\n </button>\n </transition>\n <transition v-if=\"arrowDisplay\" name=\"carousel-arrow-right\">\n <button\n v-show=\"\n (arrow === 'always' || hover) &&\n (props.loop || activeIndex < items.length - 1)\n \"\n type=\"button\"\n :class=\"[ns.e('arrow'), ns.em('arrow', 'right')]\"\n :aria-label=\"t('el.carousel.rightArrow')\"\n @mouseenter=\"handleButtonEnter('right')\"\n @mouseleave=\"handleButtonLeave\"\n @click.stop=\"throttledArrowClick(activeIndex + 1)\"\n >\n <ElIcon>\n <ArrowRight />\n </ElIcon>\n </button>\n </transition>\n <div\n :class=\"carouselContainer\"\n :style=\"containerStyle\"\n @transitionend=\"handleTransitionEnd\"\n >\n <PlaceholderItem />\n <slot />\n </div>\n <ul v-if=\"indicatorPosition !== 'none'\" :class=\"indicatorsClasses\">\n <li\n v-for=\"(item, index) in items\"\n v-show=\"isTwoLengthShow(index)\"\n :key=\"index\"\n :class=\"[\n ns.e('indicator'),\n ns.em('indicator', direction),\n ns.is('active', index === activeIndex),\n ]\"\n @mouseenter=\"throttledIndicatorHover(index)\"\n @click.stop=\"handleIndicatorClick(index)\"\n >\n <button\n :class=\"ns.e('button')\"\n :aria-label=\"t('el.carousel.indicator', { index: index + 1 })\"\n >\n <span v-if=\"hasLabel\">{{ item.props.label }}</span>\n </button>\n </li>\n </ul>\n <svg\n v-if=\"props.motionBlur\"\n xmlns=\"http://www.w3.org/2000/svg\"\n version=\"1.1\"\n style=\"display: none\"\n >\n <defs>\n <filter id=\"elCarouselHorizontal\">\n <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"12,0\" />\n </filter>\n <filter id=\"elCarouselVertical\">\n <feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"0,10\" />\n </filter>\n </defs>\n </svg>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { carouselEmits, carouselProps } from './carousel'\nimport { useCarousel } from './use-carousel'\n\nconst COMPONENT_NAME = 'ElCarousel'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(carouselProps)\nconst emit = defineEmits(carouselEmits)\nconst {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n items,\n isVertical,\n containerStyle,\n handleButtonEnter,\n handleButtonLeave,\n isTransitioning,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n handleTransitionEnd,\n setActiveItem,\n prev,\n next,\n PlaceholderItem,\n isTwoLengthShow,\n throttledArrowClick,\n throttledIndicatorHover,\n} = useCarousel(props, emit, COMPONENT_NAME)\nconst ns = useNamespace('carousel')\n\nconst { t } = useLocale()\n\nconst carouselClasses = computed(() => {\n const classes = [ns.b(), ns.m(props.direction)]\n if (unref(isCardType)) {\n classes.push(ns.m('card'))\n }\n return classes\n})\n\nconst carouselContainer = computed(() => {\n const classes = [ns.e('container')]\n if (props.motionBlur && unref(isTransitioning) && items.value.length > 1) {\n classes.push(\n unref(isVertical)\n ? `${ns.namespace.value}-transitioning-vertical`\n : `${ns.namespace.value}-transitioning`\n )\n }\n return classes\n})\n\nconst indicatorsClasses = computed(() => {\n const classes = [ns.e('indicators'), ns.em('indicators', props.direction)]\n if (unref(hasLabel)) {\n classes.push(ns.em('indicators', 'labels'))\n }\n if (props.indicatorPosition === 'outside') {\n classes.push(ns.em('indicators', 'outside'))\n }\n if (unref(isVertical)) {\n classes.push(ns.em('indicators', 'right'))\n }\n return classes\n})\n\ndefineExpose({\n /** @description active slide index */\n activeIndex,\n /** @description manually switch slide, index of the slide to be switched to, starting from 0; or the `name` of corresponding `el-carousel-item` */\n setActiveItem,\n /** @description switch to the previous slide */\n prev,\n /** @description switch to the next slide */\n next,\n})\n</script>\n"],"names":["useCarousel","useNamespace","useLocale","computed","unref","_openBlock","_createElementBlock","_normalizeClass","_unref","_withModifiers"],"mappings":"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"}
|