@extclp/vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
1 lines • 1.81 kB
Source Map (JSON)
{"version":3,"file":"symbol.mjs","sources":["../../../components/image/symbol.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\r\nimport type { ClassType, StyleType } from '@vexip-ui/config'\r\nimport type { SkeletonProps } from '@/components/skeleton'\r\n\r\nexport type ImageObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'\r\nexport type ImageSkeletonProps = Pick<\r\n SkeletonProps,\r\n 'tag' | 'activated' | 'iconScale' | 'imageIcon'\r\n> & {\r\n class?: ClassType,\r\n StyleType?: StyleType,\r\n}\r\n\r\nexport interface ImageState {\r\n src: string,\r\n index: number,\r\n total: number,\r\n}\r\n\r\nexport interface GroupState {\r\n showAll: boolean,\r\n preview: boolean,\r\n increaseItem: (item: ImageState) => void,\r\n decreaseItem: (item: ImageState) => void,\r\n handlePreview: (item: ImageState) => void,\r\n}\r\n\r\nexport interface ImageSlots {\r\n placeholder?: () => any,\r\n error?: () => any,\r\n preview?: (params: { src: string }) => any,\r\n}\r\n\r\nexport interface ImageGroupSlots {\r\n /**\r\n * @internal\r\n */\r\n default?: () => any,\r\n preview?: (params: { src: string }) => any,\r\n}\r\n\r\nexport interface ImageViewerSlots {\r\n default?: (params: { src: string }) => any,\r\n prev?: (params: { disabled: boolean }) => any,\r\n next?: (params: { disabled: boolean }) => any,\r\n close?: () => any,\r\n}\r\n\r\nexport const GROUP_STATE = '__VXP_IMAGE_GROUP_STATE' as unknown as InjectionKey<GroupState>\r\n\r\nexport const objectFitValues = Object.freeze<ImageObjectFit[]>([\r\n 'fill',\r\n 'contain',\r\n 'cover',\r\n 'none',\r\n 'scale-down',\r\n])\r\n"],"names":["GROUP_STATE","objectFitValues"],"mappings":"AAgDO,MAAMA,IAAc,2BAEdC,IAAkB,OAAO,OAAyB;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;"}