@element-plus/nightly 0.0.20241025 → 0.0.20241026
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 +62 -205
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +205 -62
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +10 -62
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +62 -10
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +137 -93
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +93 -137
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +25 -70
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +70 -25
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +175 -29
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +29 -175
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +209 -28
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +28 -209
- package/es/components/watermark/src/watermark2.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/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel.js +63 -205
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +205 -63
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +9 -62
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +62 -9
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/index.js +6 -6
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +137 -98
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +98 -137
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +25 -70
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +70 -25
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-list.js +175 -30
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +30 -175
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +209 -28
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +28 -209
- package/lib/components/watermark/src/watermark2.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content2.js","sources":["../../../../../../packages/components/popper/src/content.
|
|
1
|
+
{"version":3,"file":"content2.js","sources":["../../../../../../packages/components/popper/src/content.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { PopperEffect } from './popper'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record<string, boolean>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n id: String,\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n className: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n effect: {\n type: definePropType<PopperEffect | string>(String),\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: {\n type: Boolean,\n default: false,\n },\n trapping: {\n type: Boolean,\n default: false,\n },\n popperClass: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType<HTMLElement>(Object),\n },\n triggerTargetEl: {\n type: definePropType<HTMLElement>(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type PopperContentProps = ExtractPropTypes<typeof popperContentProps>\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType<typeof Content>\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n"],"names":["buildProps","definePropType","placements","useAriaProps"],"mappings":"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"}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('../../../utils/index.js');
|
|
6
6
|
require('../../collection/index.js');
|
|
7
7
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
8
|
-
var collection = require('../../collection/src/
|
|
8
|
+
var collection = require('../../collection/src/collection2.js');
|
|
9
9
|
|
|
10
10
|
const rovingFocusGroupProps = runtime.buildProps({
|
|
11
11
|
style: { type: runtime.definePropType([String, Array, Object]) },
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var statistic$1 = require('./src/
|
|
7
|
-
var statistic = require('./src/
|
|
6
|
+
var statistic$1 = require('./src/statistic2.js');
|
|
7
|
+
var statistic = require('./src/statistic.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElStatistic = install.withInstall(statistic$1["default"]);
|
|
@@ -2,79 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
require('../../../hooks/index.js');
|
|
7
5
|
require('../../../utils/index.js');
|
|
8
|
-
var
|
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
11
|
-
var shared = require('@vue/shared');
|
|
12
|
-
var types = require('../../../utils/types.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
13
7
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return (_ctx, _cache) => {
|
|
38
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
39
|
-
class: vue.normalizeClass(vue.unref(ns).b())
|
|
40
|
-
}, [
|
|
41
|
-
_ctx.$slots.title || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: vue.normalizeClass(vue.unref(ns).e("head"))
|
|
44
|
-
}, [
|
|
45
|
-
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
46
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
47
|
-
])
|
|
48
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
49
|
-
vue.createElementVNode("div", {
|
|
50
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
51
|
-
}, [
|
|
52
|
-
_ctx.$slots.prefix || _ctx.prefix ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
53
|
-
key: 0,
|
|
54
|
-
class: vue.normalizeClass(vue.unref(ns).e("prefix"))
|
|
55
|
-
}, [
|
|
56
|
-
vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
|
|
57
|
-
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.prefix), 1)
|
|
58
|
-
])
|
|
59
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
|
60
|
-
vue.createElementVNode("span", {
|
|
61
|
-
class: vue.normalizeClass(vue.unref(ns).e("number")),
|
|
62
|
-
style: vue.normalizeStyle(_ctx.valueStyle)
|
|
63
|
-
}, vue.toDisplayString(vue.unref(displayValue)), 7),
|
|
64
|
-
_ctx.$slots.suffix || _ctx.suffix ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
65
|
-
key: 1,
|
|
66
|
-
class: vue.normalizeClass(vue.unref(ns).e("suffix"))
|
|
67
|
-
}, [
|
|
68
|
-
vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
|
|
69
|
-
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.suffix), 1)
|
|
70
|
-
])
|
|
71
|
-
], 2)) : vue.createCommentVNode("v-if", true)
|
|
72
|
-
], 2)
|
|
73
|
-
], 2);
|
|
74
|
-
};
|
|
8
|
+
const statisticProps = runtime.buildProps({
|
|
9
|
+
decimalSeparator: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "."
|
|
12
|
+
},
|
|
13
|
+
groupSeparator: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ","
|
|
16
|
+
},
|
|
17
|
+
precision: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 0
|
|
20
|
+
},
|
|
21
|
+
formatter: Function,
|
|
22
|
+
value: {
|
|
23
|
+
type: runtime.definePropType([Number, Object]),
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
prefix: String,
|
|
27
|
+
suffix: String,
|
|
28
|
+
title: String,
|
|
29
|
+
valueStyle: {
|
|
30
|
+
type: runtime.definePropType([String, Object, Array])
|
|
75
31
|
}
|
|
76
32
|
});
|
|
77
|
-
var Statistic = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "statistic.vue"]]);
|
|
78
33
|
|
|
79
|
-
exports
|
|
34
|
+
exports.statisticProps = statisticProps;
|
|
80
35
|
//# sourceMappingURL=statistic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistic.js","sources":["../../../../../../packages/components/statistic/src/statistic.
|
|
1
|
+
{"version":3,"file":"statistic.js","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":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,cAAc,GAAGA,kBAAU,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,EAAEC,sBAAc,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,EAAEA,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC;;;;"}
|
|
@@ -2,34 +2,79 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
5
7
|
require('../../../utils/index.js');
|
|
6
|
-
var
|
|
8
|
+
var statistic = require('./statistic.js');
|
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
11
|
+
var shared = require('@vue/shared');
|
|
12
|
+
var types = require('../../../utils/types.js');
|
|
7
13
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
const __default__ = vue.defineComponent({
|
|
15
|
+
name: "ElStatistic"
|
|
16
|
+
});
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: statistic.statisticProps,
|
|
20
|
+
setup(__props, { expose }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const ns = index.useNamespace("statistic");
|
|
23
|
+
const displayValue = vue.computed(() => {
|
|
24
|
+
const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
|
|
25
|
+
if (shared.isFunction(formatter))
|
|
26
|
+
return formatter(value);
|
|
27
|
+
if (!types.isNumber(value) || Number.isNaN(value))
|
|
28
|
+
return value;
|
|
29
|
+
let [integer, decimal = ""] = String(value).split(".");
|
|
30
|
+
decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
|
|
31
|
+
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
|
|
32
|
+
return [integer, decimal].join(decimal ? decimalSeparator : "");
|
|
33
|
+
});
|
|
34
|
+
expose({
|
|
35
|
+
displayValue
|
|
36
|
+
});
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
39
|
+
class: vue.normalizeClass(vue.unref(ns).b())
|
|
40
|
+
}, [
|
|
41
|
+
_ctx.$slots.title || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: vue.normalizeClass(vue.unref(ns).e("head"))
|
|
44
|
+
}, [
|
|
45
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
46
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
47
|
+
])
|
|
48
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
49
|
+
vue.createElementVNode("div", {
|
|
50
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
51
|
+
}, [
|
|
52
|
+
_ctx.$slots.prefix || _ctx.prefix ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: vue.normalizeClass(vue.unref(ns).e("prefix"))
|
|
55
|
+
}, [
|
|
56
|
+
vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
|
|
57
|
+
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.prefix), 1)
|
|
58
|
+
])
|
|
59
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
60
|
+
vue.createElementVNode("span", {
|
|
61
|
+
class: vue.normalizeClass(vue.unref(ns).e("number")),
|
|
62
|
+
style: vue.normalizeStyle(_ctx.valueStyle)
|
|
63
|
+
}, vue.toDisplayString(vue.unref(displayValue)), 7),
|
|
64
|
+
_ctx.$slots.suffix || _ctx.suffix ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
65
|
+
key: 1,
|
|
66
|
+
class: vue.normalizeClass(vue.unref(ns).e("suffix"))
|
|
67
|
+
}, [
|
|
68
|
+
vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
|
|
69
|
+
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.suffix), 1)
|
|
70
|
+
])
|
|
71
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
72
|
+
], 2)
|
|
73
|
+
], 2);
|
|
74
|
+
};
|
|
31
75
|
}
|
|
32
76
|
});
|
|
77
|
+
var Statistic = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "statistic.vue"]]);
|
|
33
78
|
|
|
34
|
-
exports
|
|
79
|
+
exports["default"] = Statistic;
|
|
35
80
|
//# sourceMappingURL=statistic2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistic2.js","sources":["../../../../../../packages/components/statistic/src/statistic.
|
|
1
|
+
{"version":3,"file":"statistic2.js","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":["useNamespace","computed","isFunction","isNumber"],"mappings":";;;;;;;;;;;;;uCA8Bc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKA,mBAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,EAAE,KAAO,EAAA,SAAA,EAAW,SAAW,EAAA,gBAAA,EAAkB,gBACrD,GAAA,KAAA,CAAA;AAEF,MAAA,IAAIC,iBAAW,CAAA,SAAS,CAAG;AAG3B,QAAI,gBAAe,CAAA,KAAK;AAExB,MAAI,IAAA,CAACC,eAAS,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,7 +7,7 @@ require('../../popper/index.js');
|
|
|
7
7
|
require('../../../hooks/index.js');
|
|
8
8
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
9
9
|
var index = require('../../../hooks/use-delayed-toggle/index.js');
|
|
10
|
-
var content = require('../../popper/src/
|
|
10
|
+
var content = require('../../popper/src/content2.js');
|
|
11
11
|
var index$1 = require('../../../hooks/use-aria/index.js');
|
|
12
12
|
|
|
13
13
|
const useTooltipContentProps = runtime.buildProps({
|
|
@@ -14,7 +14,7 @@ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper
|
|
|
14
14
|
var index = require('../../../hooks/use-popper-container/index.js');
|
|
15
15
|
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
16
16
|
var event = require('../../../utils/dom/event.js');
|
|
17
|
-
var content$1 = require('../../popper/src/
|
|
17
|
+
var content$1 = require('../../popper/src/content.js');
|
|
18
18
|
|
|
19
19
|
const __default__ = vue.defineComponent({
|
|
20
20
|
name: "ElTooltipContent",
|
|
@@ -6,7 +6,7 @@ require('../../utils/index.js');
|
|
|
6
6
|
var upload$1 = require('./src/upload2.js');
|
|
7
7
|
var upload = require('./src/upload.js');
|
|
8
8
|
var uploadContent = require('./src/upload-content.js');
|
|
9
|
-
var uploadList = require('./src/upload-
|
|
9
|
+
var uploadList = require('./src/upload-list2.js');
|
|
10
10
|
var uploadDragger = require('./src/upload-dragger.js');
|
|
11
11
|
var constants = require('./src/constants.js');
|
|
12
12
|
var install = require('../../utils/vue/install.js');
|
|
@@ -2,38 +2,183 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
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 index$3 = require('../../progress/index.js');
|
|
10
|
+
require('../../form/index.js');
|
|
11
|
+
var uploadList = require('./upload-list2.js');
|
|
12
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
+
var index = require('../../../hooks/use-locale/index.js');
|
|
14
|
+
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
15
|
+
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
|
10
16
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
const __default__ = vue.defineComponent({
|
|
18
|
+
name: "ElUploadList"
|
|
19
|
+
});
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
21
|
+
...__default__,
|
|
22
|
+
props: uploadList.uploadListProps,
|
|
23
|
+
emits: uploadList.uploadListEmits,
|
|
24
|
+
setup(__props, { emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const { t } = index.useLocale();
|
|
27
|
+
const nsUpload = index$1.useNamespace("upload");
|
|
28
|
+
const nsIcon = index$1.useNamespace("icon");
|
|
29
|
+
const nsList = index$1.useNamespace("list");
|
|
30
|
+
const disabled = useFormCommonProps.useFormDisabled();
|
|
31
|
+
const focusing = vue.ref(false);
|
|
32
|
+
const containerKls = vue.computed(() => [
|
|
33
|
+
nsUpload.b("list"),
|
|
34
|
+
nsUpload.bm("list", props.listType),
|
|
35
|
+
nsUpload.is("disabled", props.disabled)
|
|
36
|
+
]);
|
|
37
|
+
const handleRemove = (file) => {
|
|
38
|
+
emit("remove", file);
|
|
39
|
+
};
|
|
40
|
+
return (_ctx, _cache) => {
|
|
41
|
+
return vue.openBlock(), vue.createBlock(vue.TransitionGroup, {
|
|
42
|
+
tag: "ul",
|
|
43
|
+
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
44
|
+
name: vue.unref(nsList).b()
|
|
45
|
+
}, {
|
|
46
|
+
default: vue.withCtx(() => [
|
|
47
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.files, (file, index) => {
|
|
48
|
+
return vue.openBlock(), vue.createElementBlock("li", {
|
|
49
|
+
key: file.uid || file.name,
|
|
50
|
+
class: vue.normalizeClass([
|
|
51
|
+
vue.unref(nsUpload).be("list", "item"),
|
|
52
|
+
vue.unref(nsUpload).is(file.status),
|
|
53
|
+
{ focusing: focusing.value }
|
|
54
|
+
]),
|
|
55
|
+
tabindex: "0",
|
|
56
|
+
onKeydown: vue.withKeys(($event) => !vue.unref(disabled) && handleRemove(file), ["delete"]),
|
|
57
|
+
onFocus: ($event) => focusing.value = true,
|
|
58
|
+
onBlur: ($event) => focusing.value = false,
|
|
59
|
+
onClick: ($event) => focusing.value = false
|
|
60
|
+
}, [
|
|
61
|
+
vue.renderSlot(_ctx.$slots, "default", {
|
|
62
|
+
file,
|
|
63
|
+
index
|
|
64
|
+
}, () => [
|
|
65
|
+
_ctx.listType === "picture" || file.status !== "uploading" && _ctx.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: vue.normalizeClass(vue.unref(nsUpload).be("list", "item-thumbnail")),
|
|
68
|
+
src: file.url,
|
|
69
|
+
crossorigin: _ctx.crossorigin,
|
|
70
|
+
alt: ""
|
|
71
|
+
}, null, 10, ["src", "crossorigin"])) : vue.createCommentVNode("v-if", true),
|
|
72
|
+
file.status === "uploading" || _ctx.listType !== "picture-card" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
73
|
+
key: 1,
|
|
74
|
+
class: vue.normalizeClass(vue.unref(nsUpload).be("list", "item-info"))
|
|
75
|
+
}, [
|
|
76
|
+
vue.createElementVNode("a", {
|
|
77
|
+
class: vue.normalizeClass(vue.unref(nsUpload).be("list", "item-name")),
|
|
78
|
+
onClick: vue.withModifiers(($event) => _ctx.handlePreview(file), ["prevent"])
|
|
79
|
+
}, [
|
|
80
|
+
vue.createVNode(vue.unref(index$2.ElIcon), {
|
|
81
|
+
class: vue.normalizeClass(vue.unref(nsIcon).m("document"))
|
|
82
|
+
}, {
|
|
83
|
+
default: vue.withCtx(() => [
|
|
84
|
+
vue.createVNode(vue.unref(iconsVue.Document))
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 8, ["class"]),
|
|
88
|
+
vue.createElementVNode("span", {
|
|
89
|
+
class: vue.normalizeClass(vue.unref(nsUpload).be("list", "item-file-name")),
|
|
90
|
+
title: file.name
|
|
91
|
+
}, vue.toDisplayString(file.name), 11, ["title"])
|
|
92
|
+
], 10, ["onClick"]),
|
|
93
|
+
file.status === "uploading" ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElProgress), {
|
|
94
|
+
key: 0,
|
|
95
|
+
type: _ctx.listType === "picture-card" ? "circle" : "line",
|
|
96
|
+
"stroke-width": _ctx.listType === "picture-card" ? 6 : 2,
|
|
97
|
+
percentage: Number(file.percentage),
|
|
98
|
+
style: vue.normalizeStyle(_ctx.listType === "picture-card" ? "" : "margin-top: 0.5rem")
|
|
99
|
+
}, null, 8, ["type", "stroke-width", "percentage", "style"])) : vue.createCommentVNode("v-if", true)
|
|
100
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
101
|
+
vue.createElementVNode("label", {
|
|
102
|
+
class: vue.normalizeClass(vue.unref(nsUpload).be("list", "item-status-label"))
|
|
103
|
+
}, [
|
|
104
|
+
_ctx.listType === "text" ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), {
|
|
105
|
+
key: 0,
|
|
106
|
+
class: vue.normalizeClass([vue.unref(nsIcon).m("upload-success"), vue.unref(nsIcon).m("circle-check")])
|
|
107
|
+
}, {
|
|
108
|
+
default: vue.withCtx(() => [
|
|
109
|
+
vue.createVNode(vue.unref(iconsVue.CircleCheck))
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
}, 8, ["class"])) : ["picture-card", "picture"].includes(_ctx.listType) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), {
|
|
113
|
+
key: 1,
|
|
114
|
+
class: vue.normalizeClass([vue.unref(nsIcon).m("upload-success"), vue.unref(nsIcon).m("check")])
|
|
115
|
+
}, {
|
|
116
|
+
default: vue.withCtx(() => [
|
|
117
|
+
vue.createVNode(vue.unref(iconsVue.Check))
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
|
121
|
+
], 2),
|
|
122
|
+
!vue.unref(disabled) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElIcon), {
|
|
123
|
+
key: 2,
|
|
124
|
+
class: vue.normalizeClass(vue.unref(nsIcon).m("close")),
|
|
125
|
+
onClick: ($event) => handleRemove(file)
|
|
126
|
+
}, {
|
|
127
|
+
default: vue.withCtx(() => [
|
|
128
|
+
vue.createVNode(vue.unref(iconsVue.Close))
|
|
129
|
+
]),
|
|
130
|
+
_: 2
|
|
131
|
+
}, 1032, ["class", "onClick"])) : vue.createCommentVNode("v-if", true),
|
|
132
|
+
vue.createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),
|
|
133
|
+
vue.createCommentVNode(" This is a bug which needs to be fixed "),
|
|
134
|
+
vue.createCommentVNode(" TODO: Fix the incorrect navigation interaction "),
|
|
135
|
+
!vue.unref(disabled) ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
136
|
+
key: 3,
|
|
137
|
+
class: vue.normalizeClass(vue.unref(nsIcon).m("close-tip"))
|
|
138
|
+
}, vue.toDisplayString(vue.unref(t)("el.upload.deleteTip")), 3)) : vue.createCommentVNode("v-if", true),
|
|
139
|
+
_ctx.listType === "picture-card" ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
140
|
+
key: 4,
|
|
141
|
+
class: vue.normalizeClass(vue.unref(nsUpload).be("list", "item-actions"))
|
|
142
|
+
}, [
|
|
143
|
+
vue.createElementVNode("span", {
|
|
144
|
+
class: vue.normalizeClass(vue.unref(nsUpload).be("list", "item-preview")),
|
|
145
|
+
onClick: ($event) => _ctx.handlePreview(file)
|
|
146
|
+
}, [
|
|
147
|
+
vue.createVNode(vue.unref(index$2.ElIcon), {
|
|
148
|
+
class: vue.normalizeClass(vue.unref(nsIcon).m("zoom-in"))
|
|
149
|
+
}, {
|
|
150
|
+
default: vue.withCtx(() => [
|
|
151
|
+
vue.createVNode(vue.unref(iconsVue.ZoomIn))
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["class"])
|
|
155
|
+
], 10, ["onClick"]),
|
|
156
|
+
!vue.unref(disabled) ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
157
|
+
key: 0,
|
|
158
|
+
class: vue.normalizeClass(vue.unref(nsUpload).be("list", "item-delete")),
|
|
159
|
+
onClick: ($event) => handleRemove(file)
|
|
160
|
+
}, [
|
|
161
|
+
vue.createVNode(vue.unref(index$2.ElIcon), {
|
|
162
|
+
class: vue.normalizeClass(vue.unref(nsIcon).m("delete"))
|
|
163
|
+
}, {
|
|
164
|
+
default: vue.withCtx(() => [
|
|
165
|
+
vue.createVNode(vue.unref(iconsVue.Delete))
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
}, 8, ["class"])
|
|
169
|
+
], 10, ["onClick"])) : vue.createCommentVNode("v-if", true)
|
|
170
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
171
|
+
])
|
|
172
|
+
], 42, ["onKeydown", "onFocus", "onBlur", "onClick"]);
|
|
173
|
+
}), 128)),
|
|
174
|
+
vue.renderSlot(_ctx.$slots, "append")
|
|
175
|
+
]),
|
|
176
|
+
_: 3
|
|
177
|
+
}, 8, ["class", "name"]);
|
|
178
|
+
};
|
|
31
179
|
}
|
|
32
180
|
});
|
|
33
|
-
|
|
34
|
-
remove: (file) => !!file
|
|
35
|
-
};
|
|
181
|
+
var UploadList = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "upload-list.vue"]]);
|
|
36
182
|
|
|
37
|
-
exports
|
|
38
|
-
exports.uploadListProps = uploadListProps;
|
|
183
|
+
exports["default"] = UploadList;
|
|
39
184
|
//# sourceMappingURL=upload-list.js.map
|