当前位置:网站首页 > R语言数据分析 > 正文

ElementUI 之 Cascader 级联选择器自定义节点内容

Cascader 级联选择器:自定义备选项的节点内容,参数为 { node, data },分别为当前节点的 Node 对象和数据

modeType:[{ "children": [{ "children": [{ "children": [], "label": { "id": 237, "modelStorageId": 142, "name": "导弹发射车", "number": 4 } }, { "children": [], "label": { "id": 239, "modelStorageId": 144, "name": "进攻弹", "number": 4 } }, { "children": [], "label": { "id": 240, "modelStorageId": 145, "name": "基地", "number": 4 } }, { "children": [], "label": { "id": 241, "modelStorageId": 146, "name": "指挥所", "number": 4 } }], "label": { "id": 4, "modelStorageId": null, "name": "地面武器", "number": 1 } }, { "children": [], "label": { "id": 8, "modelStorageId": null, "name": "地面兵种", "number": 1 } }], "label": { "id": 1, "modelStorageId": null, "name": "地面作战", "number": 0 } }, { "children": [{ "children": [], "label": { "id": 103, "modelStorageId": null, "name": "作战舰船", "number": 126 } }], "label": { "id": 126, "modelStorageId": null, "name": "海面作战", "number": 0 } }, { "children": [{ "children": [{ "children": [], "label": { "id": 245, "modelStorageId": null, "name": "嘎嘎嘎1", "number": 130 } }, { "children": [], "label": { "id": 246, "modelStorageId": null, "name": "嘎嘎嘎", "number": 130 } }], "label": { "id": 130, "modelStorageId": null, "name": "空中武器", "number": 153 } }], "label": { "id": 153, "modelStorageId": null, "name": "空中作战", "number": 0 } }], <el-cascader v-model="newData.number" :options="modeType" :props="{ expandTrigger: 'hover' }" > <template slot-scope="{ node }"> <span>{ 
  { node.label.name }}</span> </template> </el-cascader>

ElementUI 级联选择器的el-cascader校验 

ElementUI 之 Cascader 级联选择器指定 value label

ElementUI 之 Cascader 级联选择器回显

vue element Cascader 级联选择器 选择任意一级选项 点击收起,点击label选中等问题详解

到此这篇ElementUI 之 Cascader 级联选择器自定义节点内容的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!

版权声明


相关文章:

  • ElementUI 获取el-tree选中节点信息2024-12-02 12:00:07
  • ElementUI报错 Error in callback for watcher "data": "Error: [ElTable] prop row-key is required"2024-12-02 12:00:07
  • ElementUI遍历生成Form表单2024-12-02 12:00:07
  • InputNumber 计数器 连续点击一定时间内只允许执行一次2024-12-02 12:00:07
  • ElementUI 之 Cascader 级联选择器回显2024-12-02 12:00:07
  • ElementUI 之 Cascader 级联选择器指定 value label2024-12-02 12:00:07
  • ElementUI-textarea文本域高度自适应设置的方法2024-12-02 12:00:07
  • ElementUI 级联选择器的el-cascader校验2024-12-02 12:00:07
  • 现代大学英语精读第二版(第四册)学习笔记(原文及全文翻译)——4A - Lions and Tigers and Bears(狮子、老虎和熊)2024-12-02 12:00:07
  • 群晖设置root密码(群晖root默认密码)2024-12-02 12:00:07
  • 全屏图片