el-table-column叠加el-popover使用

需求:el-table-column有一列展示多个tag信息,实现点击tag展示tag信息以及tag对应的详细信息

table的数据格式
data:[
	{
		...,
		isPopoverVisible:false,
	},
	{
		...,
		isPopoverVisible:false,
	},
	...
]

写法:

<el-table-column label="配置信息" prop="listName">
        <template slot-scope="scope">
          <el-popover
            placement="bottom"
            title="配置信息以及对应详情"
            trigger="manual"
            v-model="scope.row.isPopoverVisible"
          >
            <el-cascader-panel :options="scope.row.CopyList"></el-cascader-panel>
            <template slot="reference">
              <div @click="scope.row.isPopoverVisible = !scope.row.isPopoverVisible" style="cursor: pointer;">
                <div style="display: inline-block;white-space: nowrap; overflow: hidden;text-overflow: ellipsis;width: 200px;">
                  <el-tag type="info" style="margin-right: 5px;" v-for="item in scope.row.tableList" :key="item.index">{{ item.dbName }}</el-tag>
                </div>
              </div>
            </template>
          </el-popover>
        </template>
</el-table-column>

实现了鼠标控制悬浮数据的显隐

相关推荐

  1. el-table-column叠加el-popover使用

    2024-04-22 19:30:06       33 阅读
  2. el-table-column表格匹配字典数据

    2024-04-22 19:30:06       21 阅读
  3. html使用el-table-column />时不能正常渲染出页面

    2024-04-22 19:30:06       27 阅读
  4. el-table-column 有两个input怎么校验

    2024-04-22 19:30:06       36 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-22 19:30:06       75 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-22 19:30:06       80 阅读
  3. 在Django里面运行非项目文件

    2024-04-22 19:30:06       64 阅读
  4. Python语言-面向对象

    2024-04-22 19:30:06       75 阅读

热门阅读

  1. iOS隐私清单

    2024-04-22 19:30:06       41 阅读
  2. ES系列之相似度模型

    2024-04-22 19:30:06       134 阅读
  3. Linux文件压缩与文件管理

    2024-04-22 19:30:06       34 阅读
  4. 深入浅出Python机器学习:从零开始的SVM教程/厾罗

    2024-04-22 19:30:06       38 阅读
  5. 模块化low

    2024-04-22 19:30:06       30 阅读
  6. PHP中有哪些数据类型?请举例说明

    2024-04-22 19:30:06       103 阅读
  7. 【数据结构与算法】力扣 344. 反转字符串

    2024-04-22 19:30:06       41 阅读