Comments (8)
能提供一个demo吗,我试了一下之前写的demo,不会有这个问题
from vue-waterfall2.
<template>
<div >
<waterfall :col="4" :data="images" :gutterWidth="7" ref="waterfallRef" class="w-full">
<div class="mb-2" v-for="(item, index) in images" :key="index">
<img v-if="item.imageUrl" :src="item.imageUrl"
class="w-full h-auto block object-cover rounded-lg cursor-pointer"/>
</div>
</waterfall>
</div>
</template>
<script setup>
import { ref} from "vue";
const images = ref([
{
"imageId": "....",
"imageUrl": "...."
},
.....
])
const waterfallRef = ref(null)
</script>
from vue-waterfall2.
写了个demo,同样的代码,在我实际的项目中行为是拖动窗口,有重复图片会添加到瀑布流中,但是在demo中行为是拖动窗口,瀑布流不会重新渲染
from vue-waterfall2.
项目中有监听resize吗
from vue-waterfall2.
有,但是我的监听函数并没有修改瀑布流的数据或者布局
from vue-waterfall2.
看一下data的赋值方式?是不是resize修改了data, 这时瀑布流数据就重复了
from vue-waterfall2.
我用vue插件看数据是没有重复的
from vue-waterfall2.
拼接数据的时候看一下你的赋值方式?使用concat赋值试试, #115 有可能类似这个问题
from vue-waterfall2.
Related Issues (20)
- 滚动到底部无法触发加载更多
- 如何添加占位图片 HOT 5
- 图片比例出现问题
- this.$waterfall.forceUpdate()失效 HOT 2
- 并未实现两列 HOT 1
- 如果滚动加载loadmore时,新增数据diff无法大于max是不是会导致无法再次加载? HOT 1
- 使用懒加载lazy-src,只有每列的第一个图片生效了,其他图片都没生效(lazy-src没有被替换) HOT 1
- 关于loadmore没有触发的问题: HOT 10
- TypeError: Cannot read properties of undefined (reading 'offsetWidth') HOT 1
- vue3 下 如何调用this.$waterfall.forceUpdate() setup语法糖中 HOT 2
- vue3 code demo 里添加图片少的时候,快速滑会停住 HOT 1
- 好像数据失去响应式了? HOT 2
- loadmore触发机制问题
- 页面渲染问题 HOT 2
- 华为P60鸿蒙系统兼容性问题
- 弱网情况下,.vue-waterfall-column里面item加载不出来
- 请求在线链接,图片返回慢会阻塞页面加载 HOT 3
- 对VUE的版本要求高,3.2.47用不了
- 单列问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-waterfall2.