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 line
4.7 KiB

{"ast":null,"code":"import '../../../utils/index.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { mutable } from '../../../utils/typescript.mjs';\nimport { isNumber } from '../../../utils/types.mjs';\nconst imageViewerProps = buildProps({\n urlList: {\n type: definePropType(Array),\n default: () => mutable([])\n },\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 hideOnClickModal: Boolean,\n teleported: Boolean,\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 imageViewerEmits = {\n close: () => true,\n switch: index => isNumber(index),\n rotate: deg => isNumber(deg)\n};\nexport { imageViewerEmits, imageViewerProps };","map":{"version":3,"names":["imageViewerProps","buildProps","urlList","type","definePropType","Array","default","mutable","zIndex","Number","initialIndex","infinite","Boolean","hideOnClickModal","teleported","closeOnPressEscape","zoomRate","minScale","maxScale","crossorigin","String","imageViewerEmits","close","switch","index","isNumber","rotate","deg"],"sources":["../../../../../../packages/components/image-viewer/src/image-viewer.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isNumber,\n mutable,\n} from '@element-plus/utils'\n\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type ImageViewer from './image-viewer.vue'\n\nexport type ImageViewerAction =\n | 'zoomIn'\n | 'zoomOut'\n | 'clockwise'\n | 'anticlockwise'\n\nexport const imageViewerProps = buildProps({\n /**\n * @description preview link list.\n */\n urlList: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description preview backdrop z-index.\n */\n zIndex: {\n type: Number,\n },\n /**\n * @description the initial preview image index, less than or equal to the length of `url-list`.\n */\n initialIndex: {\n type: Number,\n default: 0,\n },\n /**\n * @description whether preview is infinite.\n */\n infinite: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether user can emit close event when clicking backdrop.\n */\n hideOnClickModal: Boolean,\n /**\n * @description whether to append image itself to body. A nested parent element attribute transform should have this attribute set to `true`.\n */\n teleported: Boolean,\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 ImageViewerProps = ExtractPropTypes<typeof imageViewerProps>\n\nexport const imageViewerEmits = {\n close: () => true,\n switch: (index: number) => isNumber(index),\n rotate: (deg: number) => isNumber(deg),\n}\nexport type ImageViewerEmits = typeof imageViewerEmits\n\nexport interface ImageViewerMode {\n name: string\n icon: Component\n}\n\nexport type ImageViewerInstance = InstanceType<typeof ImageViewer>\n"],"mappings":";;;;AAMY,MAACA,gBAAgB,GAAGC,UAAU,CAAC;EACzCC,OAAO,EAAE;IACPC,IAAI,EAAEC,cAAc,CAACC,KAAK,CAAC;IAC3BC,OAAO,EAAEA,CAAA,KAAMC,OAAO,CAAC,EAAE;EAC7B,CAAG;EACDC,MAAM,EAAE;IACNL,IAAI,EAAEM;EACV,CAAG;EACDC,YAAY,EAAE;IACZP,IAAI,EAAEM,MAAM;IACZH,OAAO,EAAE;EACb,CAAG;EACDK,QAAQ,EAAE;IACRR,IAAI,EAAES,OAAO;IACbN,OAAO,EAAE;EACb,CAAG;EACDO,gBAAgB,EAAED,OAAO;EACzBE,UAAU,EAAEF,OAAO;EACnBG,kBAAkB,EAAE;IAClBZ,IAAI,EAAES,OAAO;IACbN,OAAO,EAAE;EACb,CAAG;EACDU,QAAQ,EAAE;IACRb,IAAI,EAAEM,MAAM;IACZH,OAAO,EAAE;EACb,CAAG;EACDW,QAAQ,EAAE;IACRd,IAAI,EAAEM,MAAM;IACZH,OAAO,EAAE;EACb,CAAG;EACDY,QAAQ,EAAE;IACRf,IAAI,EAAEM,MAAM;IACZH,OAAO,EAAE;EACb,CAAG;EACDa,WAAW,EAAE;IACXhB,IAAI,EAAEC,cAAc,CAACgB,MAAM;EAC/B;AACA,CAAC;AACW,MAACC,gBAAgB,GAAG;EAC9BC,KAAK,EAAEA,CAAA,KAAM,IAAI;EACjBC,MAAM,EAAGC,KAAK,IAAKC,QAAQ,CAACD,KAAK,CAAC;EAClCE,MAAM,EAAGC,GAAG,IAAKF,QAAQ,CAACE,GAAG;AAC/B","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}