链接:[Bug Report] el-menu菜单组件引入动态渲染icon图标时,图标组件刚好是Menu时报错,菜单不显示 · Issue #5570 · element-plus/element-plus · GitHub 如果你目前一定要动态渲染使用Menu这个icon图标的话,全局导入时重起一个其他别名也可以,修改后的main.js代码如下: import{createApp}from'vue...
Vue2.x-使⽤render函数动态渲染el-menu 代码:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Document</title> <link rel="...
写法一的,只渲染最后一组的html <ulclass="el-dropdown-menu el-popper"align="center"id="dropdown-menu-3569"style="transform-origin: center top; z-index: 2011; position: absolute; top: 27px; left: 672px;"x-placement="bottom-end"><li tabindex="-1"class="el-dropdown-menu__item">测试...
menuName:'上海市', index:'shanghai', icon:'el-icon-lock', isShow:true, subMenus: [] }, { menuName:'河南省', index:'henan', icon:'el-icon-download', isShow:true, subMenus: [ { subMenuName:'郑州市', index:'zhengzhou', icon:'el-icon-s-operation'}, { subMenuName:'开封市'...
menuName:'浙江省', index:'zhejiang', icon:'el-icon-s-opportunity', isShow:true, subMenus: [{ subMenuName:'杭州市', index:'hangzhou', icon:'el-icon-s-operation'}] }, { menuName:'上海市', index:'shanghai', icon:'el-icon-lock', ...