UNPKG

vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

1 lines 1.67 kB
{"version":3,"file":"symbol.cjs","sources":["../../../components/image/symbol.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { ClassType, StyleType } from '@vexip-ui/config'\nimport type { SkeletonProps } from '@/components/skeleton'\n\nexport type ImageObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'\nexport type ImageSkeletonProps = Pick<\n SkeletonProps,\n 'tag' | 'activated' | 'iconScale' | 'imageIcon'\n> & {\n class?: ClassType,\n StyleType?: StyleType,\n}\n\nexport interface ImageState {\n src: string,\n index: number,\n total: number,\n}\n\nexport interface GroupState {\n showAll: boolean,\n preview: boolean,\n increaseItem: (item: ImageState) => void,\n decreaseItem: (item: ImageState) => void,\n handlePreview: (item: ImageState) => void,\n}\n\nexport interface ImageSlots {\n placeholder?: () => any,\n error?: () => any,\n preview?: (params: { src: string }) => any,\n}\n\nexport interface ImageGroupSlots {\n /**\n * @internal\n */\n default?: () => any,\n preview?: (params: { src: string }) => any,\n}\n\nexport interface ImageViewerSlots {\n default?: (params: { src: string }) => any,\n prev?: (params: { disabled: boolean }) => any,\n next?: (params: { disabled: boolean }) => any,\n close?: () => any,\n}\n\nexport const GROUP_STATE = '__VXP_IMAGE_GROUP_STATE' as unknown as InjectionKey<GroupState>\n\nexport const objectFitValues = Object.freeze<ImageObjectFit[]>([\n 'fill',\n 'contain',\n 'cover',\n 'none',\n 'scale-down',\n])\n"],"names":["GROUP_STATE","objectFitValues"],"mappings":"gFAgDO,MAAMA,EAAc,0BAEdC,EAAkB,OAAO,OAAyB,CAC7D,OACA,UACA,QACA,OACA,YACF,CAAC"}