当前位置: 首页 > news >正文

el-dropdown自定义“更多操作⌵”上下文关联按钮)下拉菜单

<template><div :class="$options.name"><!-- 更多操作 --><el-dropdownstyle="margin-left: 10px":show-timeout="0":split-button="false":placement="`bottom-end`"@command="(command) => {//dropdownActive = command;let index = dropdownItems.findIndex((v) => v.label == command);let item = dropdownItems[index];item.clickEvent && item.clickEvent({ item, index, scope: scope });}"><!-- @click="clickMore" 更多 --><span style="cursor: default">更多<i class="el-icon-arrow-down" /></span><!-- <el-button type="text" icon="el-icon-more" title="更多" /> --><el-dropdown-menuslot="dropdown"style="transition: none; overflow-y: auto; max-height: 400px; margin-top: 5px"><el-dropdown-itemv-for="(d, i) in dropdownItems"v-if="$g.item.show({ item: d, index: i, scope })":key="i":active="d.label == dropdownActive":command="d.label":disabled="d.label == dropdownActive || $g.item.disabled({ item: d, index: i, scope })":divided="d.divided":type="d.type"><i :class="d.icon" v-if="d.icon" />{{ d.label }}</el-dropdown-item></el-dropdown-menu></el-dropdown></div>
</template>
<script>
export default {data() {return {scope: {},dropdownActive: ``,dropdownItems: [{hide: true,label: `编辑`,clickEvent: ({ item, index, scope }) => {this.edit(scope.row);},},{disabled: true,label: `重命名`,icon: `el-icon-edit`,clickEvent: ({ item, index, scope }) => {this.edit_rename(scope.row);},},{show: ({ item, index, scope }) => scope.row.show,label: `分享`,icon: `el-icon-share`,clickEvent: ({ item, index, scope }) => {this.share(scope.row);},},{label: `下载`,type: `success`,icon: `el-icon-download`,clickEvent: ({ item, index, scope }) => {this.download(scope.row);},},{divided: true,label: `删除`,icon: `el-icon-delete`,type: `danger`,clickEvent: ({ item, index, scope }) => {this.del([scope.row]);},},],};},
};
</script>

基于element UI el-dropdown打造表格操作列的“更多⌵”上下文关联菜单_dropdown 更多操作 样式-CSDN博客文章浏览阅读520次。【代码】基于element UI el-dropdown打造表格操作列的“更多⌵”上下文关联菜单。_dropdown 更多操作 样式 https://blog.csdn.net/qq_37860634/article/details/145044081

相关文章:

  • 网站示例关键词优化上海
  • 好的做淘宝详情页的网站有哪些内容广州快速排名
  • 网站做推广 建设哪种类型合适关键词在线优化
  • 做网站5年工资多少seo站内优化站外优化
  • wordpress界面只有文字吉安seo招聘
  • 战鼓网这种网站怎么做谷歌推广外贸建站
  • Python Matplotlib绘图指南,10分钟制作专业级数据可视化图表
  • 复盘与导出工具最新版V25.0版本更新--新增东方财富,指南针,同花顺远航版,金融大师联动
  • 求助deepsee 生成语法树代码
  • 详细讲解oracle的视图
  • 数字图像处理——物体识别和邻域运算的关系
  • 板凳-------Mysql cookbook学习 (十--10)
  • Java期末复习题(二)
  • Linux 内存管理之page cache
  • LOOP如何让长周期交互LLM代理在复杂环境中实现突破?
  • JSON框架转化isSuccess()为sucess字段
  • DataX(3)—— 核心流程源码
  • 计算机网络 网络层:数据平面(二)
  • 北斗导航 | 基于改进奇偶矢量法的CAT I精密进近RAIM算法
  • 若依框架配置+相关报错
  • [日志收集]
  • [ linux-系统 ] 基础IO
  • 区间求最值问题高效解决方法
  • 仿Apple官网设计风格
  • 基于STM32的智能节能风扇的设计
  • IT运维效率提升: 当IT监控遇上3D可视化