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

相关推荐
镜宇秋霖丶2 小时前
2026.5.6@霖宇博客制作中遇见的问题
前端·javascript·vue.js
计算机专业码农一枚2 小时前
微信小程序 uniapp+vue高校社团管理
vue.js·微信小程序·uni-app
吴声子夜歌3 小时前
Vue3——TypeScript基础
javascript·typescript
小李子呢02113 小时前
前端八股Vue---Vue-router路由管理器
前端·javascript·vue.js
百锦再4 小时前
Auto.js变成基础知识学习
开发语言·javascript·学习·sqlite·kotlin·android studio·数据库开发
洛_尘5 小时前
Python 5:使用库
java·前端·python
Bigger5 小时前
Bun 能上生产吗?我的实战结论
前端·node.js·bun
kyriewen7 小时前
你的前端滤镜慢得像PPT?用Rust+WebAssembly,一秒处理4K图
前端·rust·webassembly
kyriewen117 小时前
你等的Babel编译,够喝三杯咖啡了——用Rust重写的SWC,只需眨个眼
开发语言·前端·javascript·后端·性能优化·rust·前端框架
IT_陈寒7 小时前
SpringBoot自动配置坑了我,原来要这样绕过去
前端·人工智能·后端