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 级联选择器自定义节点内容的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!版权声明:
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权、违法违规、事实不符,请将相关资料发送至xkadmin@xkablog.com进行投诉反馈,一经查实,立即处理!
转载请注明出处,原文链接:https://www.xkablog.com/rfx/11265.html