You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
6.3 KiB
1 lines
6.3 KiB
{"ast":null,"code":"import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { mutable } from '../../../utils/typescript.mjs';\nimport { isNumber } from '../../../utils/types.mjs';\nconst imageProps = buildProps({\n hideOnClickModal: Boolean,\n src: {\n type: String,\n default: \"\"\n },\n fit: {\n type: String,\n values: [\"\", \"contain\", \"cover\", \"fill\", \"none\", \"scale-down\"],\n default: \"\"\n },\n loading: {\n type: String,\n values: [\"eager\", \"lazy\"]\n },\n lazy: Boolean,\n scrollContainer: {\n type: definePropType([String, Object])\n },\n previewSrcList: {\n type: definePropType(Array),\n default: () => mutable([])\n },\n previewTeleported: Boolean,\n zIndex: {\n type: Number\n },\n initialIndex: {\n type: Number,\n default: 0\n },\n infinite: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n zoomRate: {\n type: Number,\n default: 1.2\n },\n minScale: {\n type: Number,\n default: 0.2\n },\n maxScale: {\n type: Number,\n default: 7\n },\n crossorigin: {\n type: definePropType(String)\n }\n});\nconst imageEmits = {\n load: evt => evt instanceof Event,\n error: evt => evt instanceof Event,\n switch: val => isNumber(val),\n close: () => true,\n show: () => true\n};\nexport { imageEmits, imageProps };","map":{"version":3,"names":["imageProps","buildProps","hideOnClickModal","Boolean","src","type","String","default","fit","values","loading","lazy","scrollContainer","definePropType","Object","previewSrcList","Array","mutable","previewTeleported","zIndex","Number","initialIndex","infinite","closeOnPressEscape","zoomRate","minScale","maxScale","crossorigin","imageEmits","load","evt","Event","error","switch","val","isNumber","close","show"],"sources":["../../../../../../packages/components/image/src/image.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const imageProps = buildProps({\n /**\n * @description when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode.\n */\n hideOnClickModal: Boolean,\n /**\n * @description image source, same as native.\n */\n src: {\n type: String,\n default: '',\n },\n /**\n * @description indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit).\n */\n fit: {\n type: String,\n values: ['', 'contain', 'cover', 'fill', 'none', 'scale-down'],\n default: '',\n },\n /**\n * @description Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading)\n */\n loading: {\n type: String,\n values: ['eager', 'lazy'],\n },\n /**\n * @description whether to use lazy load.\n */\n lazy: Boolean,\n /**\n * @description the container to add scroll listener when using lazy load.\n */\n scrollContainer: {\n type: definePropType<string | HTMLElement | undefined>([String, Object]),\n },\n /**\n * @description allow big image preview.\n */\n previewSrcList: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`.\n */\n previewTeleported: Boolean,\n /**\n * @description set image preview z-index.\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description initial preview image index, less than the length of `url-list`.\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether the viewer preview is infinite.\n */\n infinite: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the image-viewer can be closed by pressing ESC.\n */\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n /**\n * @description the zoom rate of the image viewer zoom event\n */\n zoomRate: {\n type: Number,\n default: 1.2,\n },\n /**\n * @description the min scale of the image viewer zoom event.\n */\n minScale: {\n type: Number,\n default: 0.2,\n },\n /**\n * @description the max scale of the image viewer zoom event.\n */\n maxScale: {\n type: Number,\n default: 7,\n },\n /**\n * @description set HTML attribute: crossorigin.\n */\n crossorigin: {\n type: definePropType<'anonymous' | 'use-credentials' | ''>(String),\n },\n} as const)\nexport type ImageProps = ExtractPropTypes<typeof imageProps>\n\nexport const imageEmits = {\n load: (evt: Event) => evt instanceof Event,\n error: (evt: Event) => evt instanceof Event,\n switch: (val: number) => isNumber(val),\n close: () => true,\n show: () => true,\n}\nexport type ImageEmits = typeof imageEmits\n"],"mappings":";;;AAMY,MAACA,UAAU,GAAGC,UAAU,CAAC;EACnCC,gBAAgB,EAAEC,OAAO;EACzBC,GAAG,EAAE;IACHC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACb,CAAG;EACDC,GAAG,EAAE;IACHH,IAAI,EAAEC,MAAM;IACZG,MAAM,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC;IAC9DF,OAAO,EAAE;EACb,CAAG;EACDG,OAAO,EAAE;IACPL,IAAI,EAAEC,MAAM;IACZG,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM;EAC5B,CAAG;EACDE,IAAI,EAAER,OAAO;EACbS,eAAe,EAAE;IACfP,IAAI,EAAEQ,cAAc,CAAC,CAACP,MAAM,EAAEQ,MAAM,CAAC;EACzC,CAAG;EACDC,cAAc,EAAE;IACdV,IAAI,EAAEQ,cAAc,CAACG,KAAK,CAAC;IAC3BT,OAAO,EAAEA,CAAA,KAAMU,OAAO,CAAC,EAAE;EAC7B,CAAG;EACDC,iBAAiB,EAAEf,OAAO;EAC1BgB,MAAM,EAAE;IACNd,IAAI,EAAEe;EACV,CAAG;EACDC,YAAY,EAAE;IACZhB,IAAI,EAAEe,MAAM;IACZb,OAAO,EAAE;EACb,CAAG;EACDe,QAAQ,EAAE;IACRjB,IAAI,EAAEF,OAAO;IACbI,OAAO,EAAE;EACb,CAAG;EACDgB,kBAAkB,EAAE;IAClBlB,IAAI,EAAEF,OAAO;IACbI,OAAO,EAAE;EACb,CAAG;EACDiB,QAAQ,EAAE;IACRnB,IAAI,EAAEe,MAAM;IACZb,OAAO,EAAE;EACb,CAAG;EACDkB,QAAQ,EAAE;IACRpB,IAAI,EAAEe,MAAM;IACZb,OAAO,EAAE;EACb,CAAG;EACDmB,QAAQ,EAAE;IACRr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