el-dropdown的command方法添加自定义参数

news/2024/10/9 15:14:32/

代码

<div v-for="(item, index) in queryParams.changeParams" :key="index"><el-form-item prop="dataConditionSearch"><el-dropdown @command="handleCommand" style="margin-right: 3px;"><span class="el-dropdown-link" style="cursor: pointer;">{{queryParams.changeParams[index].dataCondition}}<i class="el-icon-arrow-down el-icon--right"></i></span><el-dropdown-menu slot="dropdown"><el-dropdown-item :command="beforeHandleCommand('大于', index)">大于</el-dropdown-item><el-dropdown-item :command="beforeHandleCommand('小于', index)">小于</el-dropdown-item><el-dropdown-item :command="beforeHandleCommand('等于', index)">等于</el-dropdown-item></el-dropdown-menu></el-dropdown><el-input v-model="queryParams.changeParams[index].dataConditionSearch" placeholder="请输入" clearable style="width: 130px;" /></el-form-item><el-form-item label-width="10px"><i class="el-icon-remove-outline" style="cursor: pointer;" @click.prevent="deleteChangeParams(item)" /></el-form-item></div>

使用:command

    beforeHandleCommand(command, index) {return {'command': command,'index': index}},handleCommand(command) {let condition = command.command;let index = command.index;this.queryParams.changeParams[index].dataCondition = condition;},

http://www.ppmy.cn/news/1474368.html

相关文章

宪法学学习笔记(个人向) Part.3

宪法学学习笔记(个人向) Part 3 3. 国家基本制度 3.1 国家性质 3.1.1 国家性质概述 国家性质的概念 国家性质也称国体&#xff0c;或国家的阶级本质&#xff0c;是指各个阶级在国家中的地位&#xff08;哪个阶层是统治阶层&#xff0c;哪个阶层是被统治阶层&#xff0c;哪个…

Java中的类与对象

一、类 定义&#xff1a;对具有相同特征的这一类事物所进行的抽象描述 比如&#xff1a;人类 二、对象&#xff08;实例&#xff09; 定义&#xff1a;实际存在的该类事物的具体个体 比如&#xff1a;张三 三、定义类 编程是对现实生活中事物的体现&#xff0c;是对现实…

关于数组的常见算法

一、案例一 案例说明 案例&#xff1a;定义一个int型的一维数组&#xff0c;包含10个元素&#xff0c;分别赋一些随机整数&#xff0c;然后求出所有元素的最大值&#xff0c;最小值&#xff0c;总和&#xff0c;平均值&#xff0c;并输出出来 要求&#xff1a;所有随机数都是两…

element el-table实现表格动态增加/删除/编辑表格行,带校验规则

本篇文章记录el-table增加一行可编辑的数据列&#xff0c;进行增删改。 1.增加空白行 直接在页面mounted时对form里面的table列表增加一行数据&#xff0c;直接使用push() 方法增加一列数据这个时候也可以设置一些默认值。比如案例里面的 产品件数 。 mounted() {this.$nextTi…

通勤数据:Comma2k19 数据集

A Commute in Data: The comma2k19 Dataset 通勤数据&#xff1a;Comma2k19 数据集 https://arxiv.org/pdf/1812.05752v1 Abstract— comma.ai presents comma2k19, a dataset of over 33 hours of commute in California’s 280 highway. This means 2019 segments, 1 minut…

性能测试的流程(企业真实流程详解)(二)

性能测试的流程 1.需求分析以及需求确定(指标值&#xff0c;场景&#xff0c;环境&#xff0c;人员) 一般提出需求的人员有&#xff1a;客户&#xff0c;产品经理&#xff0c;项目组领导等 2.性能测试计划和方案制定 基准测试: 负觋测试: 压力测试: 稳定性测试: 其他:配置测试…

Codeforces Round #956 (Div. 2) and ByteRace 2024

A. Array Divisibility Given n&#x1d45b;, find an array of positive nonzero integers, with each element less than or equal to 105 that is beautiful subject to all 1≤&#x1d458;≤&#x1d45b;. It can be shown that an answer always exists. #include<…

嵌入式应用开发之代码整洁之道

前言&#xff1a;本系列教程旨在如何将自己的代码写的整洁&#xff0c;同时也希望小伙伴们懂如何把代码写脏&#xff0c;以备不时之需&#xff0c;同时本系列参考 正点原子 &#xff0c; C代码整洁之道&#xff0c;编写可读的代码艺术。 #好的代码的特点 好的代码应该都有着几…