当前位置:网站首页 > C++编程 > 正文

ElementUI 根据条件筛选符合条件的下拉框选项@visible-change

<template slot-scope="scope"> <el-select v-model="scope.row.value" placeholder="请选择" size="mini" @visible-change="canChange(scope.row)"> <el-option v-for="(item,key) in themeOption" :key="key" :label="item.name" :value="item.name" > </el-option> </el-select> </template> canChange(scope){ var themeOption=[{ "displayName": "名称", "usage": "init,output", "name": "CS_EntityName", "type": "string", "value": "" }, { "displayName": "所属阵营", "usage": "init,output", "name": "CS_ForceSide", "type": "uint16_t", "value": "1" }, { "displayName": "ID", "usage": "init,output", "name": "id", "type": "uint64_t", "value": "1000" }, { "displayName": "位置", "usage": "output", "name": "pos", "type": "UDPosition", "value": "" }, { "displayName": "发送方ID", "usage": "fake,input", "name": "senderID", "type": "uint64_t", "value": "1000" }, { "displayName": "接收方ID", "usage": "fake,input", "name": "receiverID", "type": "uint64_t", "value": "1000" }, { "displayName": "目标ID", "usage": "fake,input", "name": "targetID", "type": "uint64_t", "value": "1000" }, { "displayName": "目标位置", "usage": "fake,input", "name": "targetPos", "type": "UDPosition", "value": "1000" }, { "displayName": "模型名称", "usage": "fake,output", "name": "modelUUID", "type": "string", "value": "" }, { "displayName": "经度", "usage": "fake,output", "name": "longitude", "type": "double", "value": "0.0" }, { "displayName": "纬度", "usage": "fake,output", "name": "latitude", "type": "double", "value": "0.0" }, { "displayName": "高度", "usage": "fake,output", "name": "altitude", "type": "double", "value": "0.0" }, { "displayName": "翻滚角", "usage": "fake,output", "name": "roll", "type": "double", "value": "0.0" }, { "displayName": "俯仰角", "usage": "fake,output", "name": "pitch", "type": "double", "value": "0.0" }, { "displayName": "偏航角", "usage": "fake,output", "name": "yaw", "type": "double", "value": "0.0" }] console.log(themeOption,"this.themeOption筛选展示前") console.log(scope.type,"scope.type") themeOption.forEach((element,i) => { if(scope.type!=element.type){ themeOption.splice(i,1) } }); console.log(themeOption,"this.themeOption筛选展示后") },

到此这篇ElementUI 根据条件筛选符合条件的下拉框选项@visible-change的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!

  • 上一篇: Cesium-CZML介绍
  • 下一篇: cesium新增实体demo
  • 版权声明


    相关文章:

  • Cesium-CZML介绍2024-11-27 17:18:05
  • Cesium笛卡尔坐标转wgs84坐标x、y、z2024-11-27 17:18:05
  • cesium经纬度转笛卡尔坐标2024-11-27 17:18:05
  • Ceisum二维状态下czml贴地光滑运动2024-11-27 17:18:05
  • Cesium:entity实体二维贴地运动+模型转向2024-11-27 17:18:05
  • cesium新增实体demo2024-11-27 17:18:05
  • 阿司匹林apc的作用(阿司匹林adp)2024-11-27 17:18:05
  • junit5 mock静态方法(junit mock 方法)2024-11-27 17:18:05
  • ceph存储池(ceph存储池容量阈值)2024-11-27 17:18:05
  • tcp工具支持ipv6(tcp工具支持ipv6吗?)2024-11-27 17:18:05
  • 全屏图片