el-popover实现缩略图
时间: 2023-09-29 22:02:22 浏览: 87
react-native-modal-popover:使用Modal的React-Native纯JS popover
要实现el-popover的缩略图效果,可以使用el-image和el-popover组件结合起来。首先,需要在el-image标签中添加slot="reference"属性,将该el-image组件作为popover的触发元素。然后,在el-popover组件中设置placement属性为适当的位置,如"right",trigger属性为"hover",表示鼠标移入时显示popover。在popover的内容中,可以使用el-image组件来展示缩略图的预览图。具体代码如下:
<<<el-popover placement="right" trigger="hover">
<el-image src="${request.contextPath}/static/images/class1.png"></el-image>
<el-image slot="reference" src="${request.contextPath}/static/images/class1.png" alt="${request.contextPath}/static/images/class1.png" style="max-height: 150px;max-width: 200px"></el-image>
</el-popover>>><span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vue图片缩略图及图片预览功能](https://blog.csdn.net/moshowgame/article/details/111829281)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [element table组件实现鼠标移入hover展示图片大图功能——Popover 弹出框组件的使用](https://blog.csdn.net/yehaocheng520/article/details/117227029)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文