Lightbox (灯箱)

图片灯箱,可用画廊容器 + 项,或独立使用。

基础用法

Basic.vue

画廊

Gallery.vue

独立用法

Standalone.vue

KunLightboxGalleryItem 属性

属性类型默认值说明
src *string
altstring
asstring"span"
wrapbooleantrue

插槽

插槽作用域
#default{ open: () => void; }

KunLightbox 属性(独立使用)

属性类型默认值说明
images *KunLightboxImage[]
isOpen *boolean
initialIndexnumber

事件

事件回调参数
update:isOpenvalue: boolean

KunLightboxGallery 没有属性 —— 它只是包裹这些项。