2023-03-01 15:05:23 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Displays an image with preview and tranformation options. For multiple image, see Galleria.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/image/)
|
|
|
|
*
|
|
|
|
* @module image
|
|
|
|
*
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
import { VNode } from 'vue';
|
|
|
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
|
|
|
2023-03-01 15:05:23 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in Image component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface ImageProps {
|
|
|
|
/**
|
|
|
|
* Controls the preview functionality.
|
2023-03-01 15:05:23 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
preview?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Inline style of the image element.
|
|
|
|
*/
|
|
|
|
imageStyle?: any;
|
|
|
|
/**
|
|
|
|
* Style class of the image element.
|
|
|
|
*/
|
|
|
|
imageClass?: any;
|
2023-03-21 13:59:02 +00:00
|
|
|
/**
|
|
|
|
* Custom indicator icon.
|
2023-04-18 10:51:10 +00:00
|
|
|
* @deprecated since v3.27.0. Use 'indicator' slot.
|
2023-03-21 13:59:02 +00:00
|
|
|
*/
|
|
|
|
indicatorIcon?: string;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-03-01 15:05:23 +00:00
|
|
|
/**
|
|
|
|
* Defines valid slots in Image slots.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface ImageSlots {
|
|
|
|
/**
|
|
|
|
* Custom indicator template.
|
|
|
|
*/
|
2023-03-01 15:05:23 +00:00
|
|
|
indicator(): VNode[];
|
2023-03-22 13:40:31 +00:00
|
|
|
/**
|
|
|
|
* Custom refresh template.
|
|
|
|
*/
|
|
|
|
refresh(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom undo template.
|
|
|
|
*/
|
|
|
|
undo(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom zoomout template.
|
|
|
|
*/
|
|
|
|
zoomout(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom zoomin template.
|
|
|
|
*/
|
|
|
|
zoomin(): VNode[];
|
|
|
|
/**
|
|
|
|
* Custom close template.
|
|
|
|
*/
|
|
|
|
close(): VNode[];
|
2023-05-03 17:54:50 +00:00
|
|
|
/**
|
|
|
|
* Custom image template.
|
|
|
|
*/
|
|
|
|
image(scope: {
|
|
|
|
/**
|
|
|
|
* Style class of the image element.
|
|
|
|
*/
|
|
|
|
class: any;
|
|
|
|
/**
|
|
|
|
* Style of the image element.
|
|
|
|
*/
|
|
|
|
style: any;
|
|
|
|
/**
|
|
|
|
* Image error function.
|
|
|
|
*/
|
|
|
|
onError: void;
|
|
|
|
}): VNode[];
|
|
|
|
/**
|
2023-04-29 18:43:56 +00:00
|
|
|
* Custom preview template.
|
|
|
|
*/
|
2023-05-03 17:54:50 +00:00
|
|
|
preview(scope: {
|
|
|
|
/**
|
|
|
|
* Style class of the preview image element.
|
|
|
|
*/
|
|
|
|
class: any;
|
|
|
|
/**
|
|
|
|
* Style of the preview image element.
|
|
|
|
*/
|
|
|
|
style: any;
|
|
|
|
/**
|
|
|
|
* Preview click function.
|
|
|
|
*/
|
|
|
|
onClick: void;
|
|
|
|
}): VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-03-01 15:05:23 +00:00
|
|
|
export interface ImageEmits {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 15:05:23 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - Image**
|
|
|
|
*
|
|
|
|
* _Displays an image with preview and tranformation options. For multiple image, see Galleria._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/image/)
|
|
|
|
* --- ---
|
2023-03-03 10:55:20 +00:00
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
2023-03-01 15:05:23 +00:00
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
declare class Image extends ClassComponent<ImageProps, ImageSlots, ImageEmits> {
|
|
|
|
/**
|
|
|
|
* Triggered when the preview overlay is shown.
|
|
|
|
*
|
|
|
|
* @memberof Image
|
|
|
|
*/
|
2023-03-01 15:05:23 +00:00
|
|
|
show(): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Triggered when the preview overlay is hidden.
|
|
|
|
*
|
|
|
|
* @memberof Image
|
|
|
|
*/
|
2023-03-01 15:05:23 +00:00
|
|
|
hide(): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Triggered when an error occurs while loading an image file.
|
2022-09-14 11:26:01 +00:00
|
|
|
*
|
2022-09-06 12:03:37 +00:00
|
|
|
* @memberof Image
|
|
|
|
*/
|
2023-03-01 15:05:23 +00:00
|
|
|
error(): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
Image: GlobalComponentConstructor<Image>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Image;
|