ViewUIPlus
ViewUIPlus copied to clipboard
[Bug Report] Image组件在第二次动态修改src后不能正常渲染 直接进入了error环节
Environment
mac os , chrome 112.0.5615.137 , "view-ui-plus": "^1.3.0","vue": "^3.2.25"
Steps to reproduce
嵌套格式如下
` <GridItem v-for="product in datas.products" @click="editProduct(product)"> <List split item-layout="vertical"> <ListItem> <ListItemMeta :title="product.name" :description="product.categoryName">
<template #title>
<Ellipsis :text="product.name == '' ? '暂无名称' : product.name" :lines="1" tooltip />
</template>
<template #avatar>
<Image width="60px" height="60px" fit="cover" :src="product.image">
<template #error>
<img v-width="60" v-height="60" src="/imgs/no-img.jpg" />
</template>
</Image>
</template>
</ListItemMeta>
<template #action>
<li>
<div>
<Icon type="md-menu" /> 详情
</div>
</li>
</template>
</ListItem>
</List>
`
第一次渲染时 图片能正常显示 在页面中使用搜索框重新获取服务器数据后将对应的product.image的src修改为''之后 清空搜索框重新获取第一次获取的数据之后 为product.image赋值地址后 这边所有的图片依然是渲染成为了 /imgs/no-img.jpg的形式
观察现象应该是重新为图片组件的src赋值后没有使用新的src进行重新渲染