vue el-table使用、el-popover关闭、el-image大图预览

1、html

html 复制代码
<el-table :data="list" :header-cell-style="{ background: '#F7F8F9' }">
		<el-table-column type="index" width="100px" label="序号"></el-table-column>
        <el-table-column prop="pic" label="图片" width="100">
          <template #default="{ row }">
            <img :src="picUrl + row.img" alt="">
          </template>
        </el-table-column>

		<el-table-column
          v-for="(columnInfo, columnIndex) in tableColumn"
          :key="columnIndex"
          :prop="columnInfo.code"
          :label="columnInfo.label"
          :width="columnInfo.width || 'auto'"
        >
          <template slot-scope="scope">
            {{ scope.row[columnInfo.code] || '-' }}
          </template>
        </el-table-column>

		<el-table-column prop="postInfo" label="运单" align="center" >
           <template slot-scope="scope">
             <span v-html="scope.row.postInfo">
             </span>
           </template>
         </el-table-column>
         <el-table-column v-if="order.orderStatus === '已付款'" prop="operation" label="操作" align="center" width="100">
           <template slot-scope="scope">
             <!-- trigger="hover"  -->
             <el-popover v-show="!scope.row.postNum" ref="popoverRef" placement="bottom">
             <!-- 这里是弹窗弹出来的样式(start)------->
               <div class="pop">
               </div>
             <!-- 这里是弹窗弹出来的样式(end)------->
               <div slot="reference">
               	<!-- 这里是触发弹窗弹出来的样式(start)------->
                 <div class="item-edit">
                 </div>
             		<!-- 这里是触发弹窗弹出来的样式(start)------->
               </div>
             </el-popover>
           </template>
         </el-table-column>
</el-table>             

tableColum 格式

html 复制代码
export const tableColum = [ 
  {
    label: '姓名',
    code: 'name',
    type: 'normal',
    width: '55',
  },
  {
    label: '手机号',
    code: 'tel',
    type: 'template',
  },
]

2、关闭popover

javascript 复制代码
this.$refs.popover.doClose()

3、el-image 图片大图预览-详解

el-image

el-image-view

相关推荐
不说别的就是很菜3 分钟前
【前端面试】Git篇
前端·git
threelab3 分钟前
Merge3D:重塑三维可视化体验的 Cesium+Three.js 融合引擎
开发语言·javascript·3d
欧阳码农12 分钟前
盘点这两年我接触过的副业赚钱赛道,对于你来说可能是信息差
前端·人工智能·后端
恋猫de小郭13 分钟前
Dart 3.10 发布,快来看有什么更新吧
android·前端·flutter
q***471818 分钟前
解决 Tomcat 跨域问题 - Tomcat 配置静态文件和 Java Web 服务(Spring MVC Springboot)同时允许跨域
java·前端·spring
小光学长22 分钟前
基于Web的课前问题导入系统pn8lj4ii(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
java·前端·数据库
Mintopia26 分钟前
🌐 跨模态迁移学习:WebAIGC多场景适配的未来技术核心
前端·javascript·aigc
JarvanMo32 分钟前
使用 MediaPipe 在 Flutter web 中识别姿势
前端
saadiya~33 分钟前
基于 Vue3 封装大华 RTSP 回放视频组件(PlayerControl.js 实现)
前端·vue3·大华视频相机前端播放
LSL666_39 分钟前
spring多配置文件
java·服务器·前端·spring