@element-plus/nightly 0.0.20240428 → 0.0.20240430
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.css +1 -1
- package/dist/index.full.js +8 -6
- package/dist/index.full.min.js +9 -9
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +8 -6
- 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/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/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +67 -32
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +32 -67
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +36 -8
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +8 -36
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/index.mjs +4 -4
- package/es/components/infinite-scroll/src/index.mjs +2 -0
- package/es/components/infinite-scroll/src/index.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +97 -14
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +14 -97
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/message-box/src/message-box.type.d.ts +1 -1
- package/es/components/pagination/src/components/jumper.mjs +9 -60
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +60 -9
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +23 -69
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +69 -23
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/time-picker/src/common/picker.mjs +4 -4
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +152 -69
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +69 -152
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/index.mjs +4 -4
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +67 -33
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +33 -67
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +36 -8
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +8 -36
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/index.js +4 -4
- package/lib/components/infinite-scroll/src/index.js +2 -0
- package/lib/components/infinite-scroll/src/index.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +97 -15
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +15 -97
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/message-box/src/message-box.type.d.ts +1 -1
- package/lib/components/pagination/src/components/jumper.js +9 -60
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +60 -9
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +23 -69
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +69 -23
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/time-picker/src/common/picker.js +4 -4
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +151 -69
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +69 -151
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/index.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/el-tour.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/tour.scss +1 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tour.mjs","sources":["../../../../../../packages/components/tour/src/tour.
|
|
1
|
+
{"version":3,"file":"tour.mjs","sources":["../../../../../../packages/components/tour/src/tour.vue"],"sourcesContent":["<template>\n <teleport :to=\"appendTo\">\n <div :class=\"kls\" v-bind=\"$attrs\">\n <el-tour-mask\n :visible=\"mergedShowMask\"\n :fill=\"mergedMaskStyle?.color\"\n :style=\"mergedMaskStyle?.style\"\n :pos=\"pos\"\n :z-index=\"mergedZIndex\"\n :target-area-clickable=\"targetAreaClickable\"\n />\n <el-tour-content\n v-if=\"modelValue\"\n :key=\"current\"\n :reference=\"triggerTarget\"\n :placement=\"mergedPlacement\"\n :show-arrow=\"mergedShowArrow\"\n :z-index=\"mergedZIndex\"\n :style=\"mergedContentStyle\"\n @close=\"onEscClose\"\n >\n <el-tour-steps :current=\"current\" @update-total=\"onUpdateTotal\">\n <slot />\n </el-tour-steps>\n </el-tour-content>\n </div>\n </teleport>\n <!-- just for IDE -->\n <slot v-if=\"false\" name=\"indicators\" :current=\"current + 1\" :total=\"total\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref, toRef, useSlots, watch } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { useNamespace, useZIndex } from '@element-plus/hooks'\nimport { isBoolean } from '@element-plus/utils'\nimport ElTourMask from './mask.vue'\nimport ElTourContent from './content.vue'\nimport ElTourSteps from './steps'\nimport { tourEmits, tourProps } from './tour'\nimport { tourKey, useTarget } from './helper'\nimport type { TourStepProps } from './step'\n\ndefineOptions({\n name: 'ElTour',\n})\n\nconst props = defineProps(tourProps)\nconst emit = defineEmits(tourEmits)\n\nconst ns = useNamespace('tour')\nconst total = ref(0)\nconst currentStep = ref<TourStepProps>()\n\nconst current = useVModel(props, 'current', emit, {\n passive: true,\n})\n\nconst currentTarget = computed(() => currentStep.value?.target)\n\nconst kls = computed(() => [\n ns.b(),\n mergedType.value === 'primary' ? ns.m('primary') : '',\n])\n\nconst mergedPlacement = computed(\n () => currentStep.value?.placement || props.placement\n)\n\nconst mergedContentStyle = computed(\n () => currentStep.value?.contentStyle ?? props.contentStyle\n)\n\nconst mergedMask = computed(() => currentStep.value?.mask ?? props.mask)\nconst mergedShowMask = computed(() => !!mergedMask.value && props.modelValue)\nconst mergedMaskStyle = computed(() =>\n isBoolean(mergedMask.value) ? undefined : mergedMask.value\n)\n\nconst mergedShowArrow = computed(\n () =>\n !!currentTarget.value && (currentStep.value?.showArrow ?? props.showArrow)\n)\n\nconst mergedScrollIntoViewOptions = computed(\n () => currentStep.value?.scrollIntoViewOptions ?? props.scrollIntoViewOptions\n)\nconst mergedType = computed(() => currentStep.value?.type ?? props.type)\n\nconst { nextZIndex } = useZIndex()\nconst nowZIndex = nextZIndex()\nconst mergedZIndex = computed(() => props.zIndex ?? nowZIndex)\n\nconst { mergedPosInfo: pos, triggerTarget } = useTarget(\n currentTarget,\n toRef(props, 'modelValue'),\n toRef(props, 'gap'),\n mergedMask,\n mergedScrollIntoViewOptions\n)\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (!val) {\n current.value = 0\n }\n }\n)\n\nconst onEscClose = () => {\n if (props.closeOnPressEscape) {\n emit('update:modelValue', false)\n emit('close', current.value)\n }\n}\n\nconst onUpdateTotal = (val: number) => {\n total.value = val\n}\n\nconst slots = useSlots()\n\nprovide(tourKey, {\n currentStep,\n current,\n total,\n showClose: toRef(props, 'showClose'),\n closeIcon: toRef(props, 'closeIcon') as any,\n mergedType: mergedType as any,\n ns,\n slots,\n updateModelValue(modelValue) {\n emit('update:modelValue', modelValue)\n },\n onClose() {\n emit('close', current.value)\n },\n onFinish() {\n emit('finish')\n },\n onChange() {\n emit('change', current.value)\n },\n})\n</script>\n"],"names":[],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,158 +1,75 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, toRef, watch, useSlots, provide, openBlock, createElementBlock, Fragment, createBlock, Teleport, createElementVNode, mergeProps, unref, createVNode, normalizeStyle, withCtx, renderSlot, createCommentVNode } from 'vue';
|
|
2
|
-
import { useVModel } from '@vueuse/core';
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
1
|
import '../../../utils/index.mjs';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
-
import { isBoolean } from '../../../utils/types.mjs';
|
|
13
|
-
import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import { tourContentProps } from './content.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
6
|
+
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
7
|
+
import { isBoolean, isNumber } from '../../../utils/types.mjs';
|
|
14
8
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
])
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const { mergedPosInfo: pos, triggerTarget } = useTarget(currentTarget, toRef(props, "modelValue"), toRef(props, "gap"), mergedMask, mergedScrollIntoViewOptions);
|
|
71
|
-
watch(() => props.modelValue, (val) => {
|
|
72
|
-
if (!val) {
|
|
73
|
-
current.value = 0;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const onEscClose = () => {
|
|
77
|
-
if (props.closeOnPressEscape) {
|
|
78
|
-
emit("update:modelValue", false);
|
|
79
|
-
emit("close", current.value);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const onUpdateTotal = (val) => {
|
|
83
|
-
total.value = val;
|
|
84
|
-
};
|
|
85
|
-
const slots = useSlots();
|
|
86
|
-
provide(tourKey, {
|
|
87
|
-
currentStep,
|
|
88
|
-
current,
|
|
89
|
-
total,
|
|
90
|
-
showClose: toRef(props, "showClose"),
|
|
91
|
-
closeIcon: toRef(props, "closeIcon"),
|
|
92
|
-
mergedType,
|
|
93
|
-
ns,
|
|
94
|
-
slots,
|
|
95
|
-
updateModelValue(modelValue) {
|
|
96
|
-
emit("update:modelValue", modelValue);
|
|
97
|
-
},
|
|
98
|
-
onClose() {
|
|
99
|
-
emit("close", current.value);
|
|
100
|
-
},
|
|
101
|
-
onFinish() {
|
|
102
|
-
emit("finish");
|
|
103
|
-
},
|
|
104
|
-
onChange() {
|
|
105
|
-
emit("change", current.value);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
return (_ctx, _cache) => {
|
|
109
|
-
var _a, _b;
|
|
110
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
111
|
-
(openBlock(), createBlock(Teleport, { to: _ctx.appendTo }, [
|
|
112
|
-
createElementVNode("div", mergeProps({ class: unref(kls) }, _ctx.$attrs), [
|
|
113
|
-
createVNode(ElTourMask, {
|
|
114
|
-
visible: unref(mergedShowMask),
|
|
115
|
-
fill: (_a = unref(mergedMaskStyle)) == null ? void 0 : _a.color,
|
|
116
|
-
style: normalizeStyle((_b = unref(mergedMaskStyle)) == null ? void 0 : _b.style),
|
|
117
|
-
pos: unref(pos),
|
|
118
|
-
"z-index": unref(mergedZIndex),
|
|
119
|
-
"target-area-clickable": _ctx.targetAreaClickable
|
|
120
|
-
}, null, 8, ["visible", "fill", "style", "pos", "z-index", "target-area-clickable"]),
|
|
121
|
-
_ctx.modelValue ? (openBlock(), createBlock(ElTourContent, {
|
|
122
|
-
key: unref(current),
|
|
123
|
-
reference: unref(triggerTarget),
|
|
124
|
-
placement: unref(mergedPlacement),
|
|
125
|
-
"show-arrow": unref(mergedShowArrow),
|
|
126
|
-
"z-index": unref(mergedZIndex),
|
|
127
|
-
style: normalizeStyle(unref(mergedContentStyle)),
|
|
128
|
-
onClose: onEscClose
|
|
129
|
-
}, {
|
|
130
|
-
default: withCtx(() => [
|
|
131
|
-
createVNode(unref(ElTourSteps), {
|
|
132
|
-
current: unref(current),
|
|
133
|
-
onUpdateTotal
|
|
134
|
-
}, {
|
|
135
|
-
default: withCtx(() => [
|
|
136
|
-
renderSlot(_ctx.$slots, "default")
|
|
137
|
-
]),
|
|
138
|
-
_: 3
|
|
139
|
-
}, 8, ["current"])
|
|
140
|
-
]),
|
|
141
|
-
_: 3
|
|
142
|
-
}, 8, ["reference", "placement", "show-arrow", "z-index", "style"])) : createCommentVNode("v-if", true)
|
|
143
|
-
], 16)
|
|
144
|
-
], 8, ["to"])),
|
|
145
|
-
createCommentVNode(" just for IDE "),
|
|
146
|
-
false ? renderSlot(_ctx.$slots, "indicators", {
|
|
147
|
-
key: 0,
|
|
148
|
-
current: unref(current) + 1,
|
|
149
|
-
total: total.value
|
|
150
|
-
}) : createCommentVNode("v-if", true)
|
|
151
|
-
], 64);
|
|
152
|
-
};
|
|
9
|
+
const tourProps = buildProps({
|
|
10
|
+
modelValue: Boolean,
|
|
11
|
+
current: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 0
|
|
14
|
+
},
|
|
15
|
+
showArrow: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: true
|
|
18
|
+
},
|
|
19
|
+
showClose: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: true
|
|
22
|
+
},
|
|
23
|
+
closeIcon: {
|
|
24
|
+
type: iconPropType
|
|
25
|
+
},
|
|
26
|
+
placement: tourContentProps.placement,
|
|
27
|
+
contentStyle: {
|
|
28
|
+
type: definePropType([Object])
|
|
29
|
+
},
|
|
30
|
+
mask: {
|
|
31
|
+
type: definePropType([Boolean, Object]),
|
|
32
|
+
default: true
|
|
33
|
+
},
|
|
34
|
+
gap: {
|
|
35
|
+
type: definePropType(Object),
|
|
36
|
+
default: () => ({
|
|
37
|
+
offset: 6,
|
|
38
|
+
radius: 2
|
|
39
|
+
})
|
|
40
|
+
},
|
|
41
|
+
zIndex: {
|
|
42
|
+
type: Number
|
|
43
|
+
},
|
|
44
|
+
scrollIntoViewOptions: {
|
|
45
|
+
type: definePropType([Boolean, Object]),
|
|
46
|
+
default: () => ({
|
|
47
|
+
block: "center"
|
|
48
|
+
})
|
|
49
|
+
},
|
|
50
|
+
type: {
|
|
51
|
+
type: definePropType(String)
|
|
52
|
+
},
|
|
53
|
+
appendTo: {
|
|
54
|
+
type: definePropType([String, Object]),
|
|
55
|
+
default: "body"
|
|
56
|
+
},
|
|
57
|
+
closeOnPressEscape: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: true
|
|
60
|
+
},
|
|
61
|
+
targetAreaClickable: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: true
|
|
153
64
|
}
|
|
154
65
|
});
|
|
155
|
-
|
|
66
|
+
const tourEmits = {
|
|
67
|
+
[UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
|
|
68
|
+
["update:current"]: (current) => isNumber(current),
|
|
69
|
+
close: (current) => isNumber(current),
|
|
70
|
+
finish: () => true,
|
|
71
|
+
change: (current) => isNumber(current)
|
|
72
|
+
};
|
|
156
73
|
|
|
157
|
-
export {
|
|
74
|
+
export { tourEmits, tourProps };
|
|
158
75
|
//# sourceMappingURL=tour2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tour2.mjs","sources":["../../../../../../packages/components/tour/src/tour.
|
|
1
|
+
{"version":3,"file":"tour2.mjs","sources":["../../../../../../packages/components/tour/src/tour.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { tourContentProps } from './content'\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type Tour from './tour.vue'\nimport type { TourGap, TourMask } from './types'\n\nexport const tourProps = buildProps({\n /**\n * @description open tour\n */\n modelValue: Boolean,\n /**\n * @description what is the current step\n */\n current: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether to show the arrow\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom close icon\n */\n closeIcon: {\n type: iconPropType,\n },\n /**\n * @description position of the guide card relative to the target element\n */\n placement: tourContentProps.placement,\n /**\n * @description custom style for content\n */\n contentStyle: {\n type: definePropType<CSSProperties>([Object]),\n },\n /**\n * @description whether to enable masking, change mask style and fill color by pass custom props\n */\n mask: {\n type: definePropType<TourMask>([Boolean, Object]),\n default: true,\n },\n /**\n * @description transparent gap between mask and target\n */\n gap: {\n type: definePropType<TourGap>(Object),\n default: () => ({\n offset: 6,\n radius: 2,\n }),\n },\n /**\n * @description tour's zIndex\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description support pass custom scrollIntoView options\n */\n scrollIntoViewOptions: {\n type: definePropType<boolean | ScrollIntoViewOptions>([Boolean, Object]),\n default: () => ({\n block: 'center',\n }),\n },\n /**\n * @description type, affects the background color and text color\n */\n type: {\n type: definePropType<'default' | 'primary'>(String),\n },\n /**\n * @description which element the TourContent appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n default: 'body',\n },\n /**\n * @description whether the Tour can be closed by pressing ESC\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type TourProps = ExtractPropTypes<typeof tourProps>\nexport type TourInstance = InstanceType<typeof Tour>\n\nexport const tourEmits = {\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n ['update:current']: (current: number) => isNumber(current),\n close: (current: number) => isNumber(current),\n finish: () => true,\n change: (current: number) => isNumber(current),\n}\nexport type TourEmits = typeof tourEmits\n"],"names":[],"mappings":";;;;;;;;AASY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS;AACvC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,IAAI,EAAE;A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EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,MAAM,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC;AACxC;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ export { alertEffects, alertEmits, alertProps } from './components/alert/src/ale
|
|
|
12
12
|
export { ElAlert } from './components/alert/index.mjs';
|
|
13
13
|
export { autocompleteEmits, autocompleteProps } from './components/autocomplete/src/autocomplete.mjs';
|
|
14
14
|
export { ElAutocomplete } from './components/autocomplete/index.mjs';
|
|
15
|
-
export { avatarEmits, avatarProps } from './components/avatar/src/
|
|
15
|
+
export { avatarEmits, avatarProps } from './components/avatar/src/avatar2.mjs';
|
|
16
16
|
export { ElAvatar } from './components/avatar/index.mjs';
|
|
17
17
|
export { backtopEmits, backtopProps } from './components/backtop/src/backtop.mjs';
|
|
18
18
|
export { ElBacktop } from './components/backtop/index.mjs';
|
|
@@ -86,7 +86,7 @@ export { formContextKey, formItemContextKey } from './components/form/src/consta
|
|
|
86
86
|
export { useDisabled, useFormDisabled, useFormSize, useSize } from './components/form/src/hooks/use-form-common-props.mjs';
|
|
87
87
|
export { useFormItem, useFormItemInputId } from './components/form/src/hooks/use-form-item.mjs';
|
|
88
88
|
export { ElForm, ElFormItem } from './components/form/index.mjs';
|
|
89
|
-
export { iconProps } from './components/icon/src/
|
|
89
|
+
export { iconProps } from './components/icon/src/icon2.mjs';
|
|
90
90
|
export { ElIcon } from './components/icon/index.mjs';
|
|
91
91
|
export { imageEmits, imageProps } from './components/image/src/image.mjs';
|
|
92
92
|
export { ElImage } from './components/image/index.mjs';
|
|
@@ -99,7 +99,7 @@ export { ElInputNumber } from './components/input-number/index.mjs';
|
|
|
99
99
|
export { linkEmits, linkProps } from './components/link/src/link.mjs';
|
|
100
100
|
export { ElLink } from './components/link/index.mjs';
|
|
101
101
|
export { menuEmits, menuProps } from './components/menu/src/menu.mjs';
|
|
102
|
-
export { menuItemEmits, menuItemProps } from './components/menu/src/menu-
|
|
102
|
+
export { menuItemEmits, menuItemProps } from './components/menu/src/menu-item2.mjs';
|
|
103
103
|
export { menuItemGroupProps } from './components/menu/src/menu-item-group.mjs';
|
|
104
104
|
export { subMenuProps } from './components/menu/src/sub-menu.mjs';
|
|
105
105
|
export { ElMenu, ElMenuItem, ElMenuItemGroup, ElSubMenu } from './components/menu/index.mjs';
|
|
@@ -211,7 +211,7 @@ export { default as DynamicSizeGrid } from './components/virtual-list/src/compon
|
|
|
211
211
|
export { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps } from './components/virtual-list/src/props.mjs';
|
|
212
212
|
export { watermarkProps } from './components/watermark/src/watermark.mjs';
|
|
213
213
|
export { ElWatermark } from './components/watermark/index.mjs';
|
|
214
|
-
export { tourEmits, tourProps } from './components/tour/src/
|
|
214
|
+
export { tourEmits, tourProps } from './components/tour/src/tour2.mjs';
|
|
215
215
|
export { tourStepEmits, tourStepProps } from './components/tour/src/step.mjs';
|
|
216
216
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './components/tour/src/content.mjs';
|
|
217
217
|
export { ElTour, ElTourStep } from './components/tour/index.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240430";
|
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.20240430'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var avatar$1 = require('./src/
|
|
7
|
-
var avatar = require('./src/
|
|
6
|
+
var avatar$1 = require('./src/avatar.js');
|
|
7
|
+
var avatar = require('./src/avatar2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElAvatar = install.withInstall(avatar$1["default"]);
|
|
@@ -2,43 +2,77 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
|
+
require('../../../hooks/index.js');
|
|
5
8
|
require('../../../utils/index.js');
|
|
6
|
-
require('
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
+
var avatar = require('./avatar2.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
|
+
var shared = require('@vue/shared');
|
|
9
13
|
var types = require('../../../utils/types.js');
|
|
10
|
-
var
|
|
14
|
+
var style = require('../../../utils/dom/style.js');
|
|
11
15
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
const _hoisted_1 = ["src", "alt", "srcset"];
|
|
17
|
+
const __default__ = vue.defineComponent({
|
|
18
|
+
name: "ElAvatar"
|
|
19
|
+
});
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
21
|
+
...__default__,
|
|
22
|
+
props: avatar.avatarProps,
|
|
23
|
+
emits: avatar.avatarEmits,
|
|
24
|
+
setup(__props, { emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const ns = index.useNamespace("avatar");
|
|
27
|
+
const hasLoadError = vue.ref(false);
|
|
28
|
+
const avatarClass = vue.computed(() => {
|
|
29
|
+
const { size, icon, shape } = props;
|
|
30
|
+
const classList = [ns.b()];
|
|
31
|
+
if (shared.isString(size))
|
|
32
|
+
classList.push(ns.m(size));
|
|
33
|
+
if (icon)
|
|
34
|
+
classList.push(ns.m("icon"));
|
|
35
|
+
if (shape)
|
|
36
|
+
classList.push(ns.m(shape));
|
|
37
|
+
return classList;
|
|
38
|
+
});
|
|
39
|
+
const sizeStyle = vue.computed(() => {
|
|
40
|
+
const { size } = props;
|
|
41
|
+
return types.isNumber(size) ? ns.cssVarBlock({
|
|
42
|
+
size: style.addUnit(size) || ""
|
|
43
|
+
}) : void 0;
|
|
44
|
+
});
|
|
45
|
+
const fitStyle = vue.computed(() => ({
|
|
46
|
+
objectFit: props.fit
|
|
47
|
+
}));
|
|
48
|
+
vue.watch(() => props.src, () => hasLoadError.value = false);
|
|
49
|
+
function handleError(e) {
|
|
50
|
+
hasLoadError.value = true;
|
|
51
|
+
emit("error", e);
|
|
52
|
+
}
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
55
|
+
class: vue.normalizeClass(vue.unref(avatarClass)),
|
|
56
|
+
style: vue.normalizeStyle(vue.unref(sizeStyle))
|
|
57
|
+
}, [
|
|
58
|
+
(_ctx.src || _ctx.srcSet) && !hasLoadError.value ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
59
|
+
key: 0,
|
|
60
|
+
src: _ctx.src,
|
|
61
|
+
alt: _ctx.alt,
|
|
62
|
+
srcset: _ctx.srcSet,
|
|
63
|
+
style: vue.normalizeStyle(vue.unref(fitStyle)),
|
|
64
|
+
onError: handleError
|
|
65
|
+
}, null, 44, _hoisted_1)) : _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 1 }, {
|
|
66
|
+
default: vue.withCtx(() => [
|
|
67
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
})) : vue.renderSlot(_ctx.$slots, "default", { key: 2 })
|
|
71
|
+
], 6);
|
|
72
|
+
};
|
|
36
73
|
}
|
|
37
74
|
});
|
|
38
|
-
|
|
39
|
-
error: (evt) => evt instanceof Event
|
|
40
|
-
};
|
|
75
|
+
var Avatar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "avatar.vue"]]);
|
|
41
76
|
|
|
42
|
-
exports
|
|
43
|
-
exports.avatarProps = avatarProps;
|
|
77
|
+
exports["default"] = Avatar;
|
|
44
78
|
//# sourceMappingURL=avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sources":["../../../../../../packages/components/avatar/src/avatar.
|
|
1
|
+
{"version":3,"file":"avatar.js","sources":["../../../../../../packages/components/avatar/src/avatar.vue"],"sourcesContent":["<template>\n <span :class=\"avatarClass\" :style=\"sizeStyle\">\n <img\n v-if=\"(src || srcSet) && !hasLoadError\"\n :src=\"src\"\n :alt=\"alt\"\n :srcset=\"srcSet\"\n :style=\"fitStyle\"\n @error=\"handleError\"\n />\n <el-icon v-else-if=\"icon\">\n <component :is=\"icon\" />\n </el-icon>\n <slot v-else />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { addUnit, isNumber, isString } from '@element-plus/utils'\nimport { avatarEmits, avatarProps } from './avatar'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElAvatar',\n})\n\nconst props = defineProps(avatarProps)\nconst emit = defineEmits(avatarEmits)\n\nconst ns = useNamespace('avatar')\n\nconst hasLoadError = ref(false)\n\nconst avatarClass = computed(() => {\n const { size, icon, shape } = props\n const classList = [ns.b()]\n if (isString(size)) classList.push(ns.m(size))\n if (icon) classList.push(ns.m('icon'))\n if (shape) classList.push(ns.m(shape))\n return classList\n})\n\nconst sizeStyle = computed(() => {\n const { size } = props\n return isNumber(size)\n ? (ns.cssVarBlock({\n size: addUnit(size) || '',\n }) as CSSProperties)\n : undefined\n})\n\nconst fitStyle = computed<CSSProperties>(() => ({\n objectFit: props.fit,\n}))\n\n// need reset hasLoadError to false if src changed\nwatch(\n () => props.src,\n () => (hasLoadError.value = false)\n)\n\nfunction handleError(e: Event) {\n hasLoadError.value = true\n emit('error', e)\n}\n</script>\n"],"names":["useNamespace","ref","computed","isString","isNumber","addUnit","watch"],"mappings":";;;;;;;;;;;;;;;;uCA0Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,YAAA,GAAeC,QAAI,KAAK,CAAA,CAAA;AAE9B,IAAM,MAAA,WAAA,GAAcC,aAAS,MAAM;AACjC,MAAM,MAAA,EAAE,IAAM,EAAA,IAAA,EAAM,KAAU,EAAA,GAAA,KAAA,CAAA;AAC9B,MAAA,MAAM,SAAY,GAAA,CAAC,EAAG,CAAA,CAAA,EAAG,CAAA,CAAA;AACzB,MAAA,IAAIC,gBAAS,IAAI,CAAA;AAAG,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,IAAI,CAAC,CAAA,CAAA;AAC7C,MAAI,IAAA,IAAA;AAAM,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,MAAM,CAAC,CAAA,CAAA;AACrC,MAAI,IAAA,KAAA;AAAO,QAAA,SAAA,CAAU,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,KAAK,CAAC,CAAA,CAAA;AACrC,MAAO,OAAA,SAAA,CAAA;AAAA,KACR,CA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