1. main.js文件里添加

import { Icon } from 'ant-design-vue'const IconFont = Icon.createFromIconfontCN({  scriptUrl: '/font_icons.js',});Vue.component('IconFont', IconFont)

2.路径:node_modules->@ant-design-vue->es->components->RouteMenu->BaseMenu.js


//添加:const IconFont = Icon.createFromIconfontCN({ //引入  scriptUrl: '/font_icons.js'});//修改:// var props = {};// typeof icon === 'object' ? props.component = icon : props.type = icon;// return h(Icon, { props: props });//改成:var props = {};  if (typeof icon === 'object') { //if else代码是修改    props.component = icon.component    props.type = icon.type    return h(IconFont, { props: props });  } else {    props.type = icon;    return h(Icon, { props: props });  }

3.路由中的配置:

icon: { component: 'IconFont', type: icon },


©著作权归作者所有:来自51CTO博客作者爱笑嘚蛋蛋的原创作品,如需转载,请注明出处,否则将追究法律责任

更多相关文章

  1. Kubernetes日志系统新贵Loki-Stack
  2. Netscaler添加首页下载连接
  3. ubuntu14.04开启root用户
  4. Linux运维教程-Linux系统网络管理
  5. weh shell高大上?一文教你实现
  6. Xmind8 激活
  7. Power BI基础知识——添加列
  8. 3.14 为vCenter Server服务器添加外部DSN连接
  9. kubernets中部署高可用nacos

随机推荐

  1. android版本号版本名
  2. Android Studio插件
  3. Android auto-answer Project
  4. Android Localization Tutorial (Android
  5. Android 如何设置网关和路由
  6. Android Logging System
  7. android 市场
  8. 申请Android开发者账号
  9. Android Asynchronous Http Client
  10. android 自学笔记2-布局