-
Notifications
You must be signed in to change notification settings - Fork 46
Description
//父组件
<WaterfallList
:list="imgsArrExample"
:options="{ width: 140, lazyload: false, imgSelector: 'url' }"
// 子组件
<Waterfall
ref="waterfall"
:list="list"
:row-key="customOptions.rowKey"
:gutter="customOptions.gutter"
:has-around-gutter="customOptions.hasAroundGutter"
:width="customOptions.width"
:img-selector="customOptions.imgSelector"
:background-color="customOptions.backgroundColor"
:animation-effect="customOptions.animationEffect"
:animation-duration="customOptions.animationDuration"
:animation-delay="customOptions.animationDelay"
:lazyload="customOptions.lazyload"
:cross-origin="customOptions.crossOrigin"
:align="customOptions.align"
@afterRender="afterRender"
>
<template #default="{ item, url, index }">
<div
class="bg-gray-900 rounded-lg shadow-md overflow-hidden transition-all duration-300 ease-linear hover:shadow-lg hover:shadow-gray-600 group"
@click="handleClick(item)"
>
<LazyImg
:url="url"
title="title"
class="cursor-pointer transition-all duration-300 ease-linear group-hover:scale-105"
@load="imageLoad"
@error="imageError"
@success="imageSuccess"
/>
这样设置宽度没有生效