FooterCom


公共底部菜单

默认用法(图标+文字)
  1. <nut-footercom :menuList='footerMenuList' @changeMenuFn="changeMenuFn"></nut-footercom>//配置数据footerMenuList 数组长度支持2到4个子对象,具体看下方使用须知
  2. //配置数据每一项为
  3. {
  4. iconselect: "http://img13.360buyimg.com/uba/jfs/t27010/39/1558743/896/9e3c3096/5b7fc73dN636e01f4.png",
  5. icon:"http://img20.360buyimg.com/uba/jfs/t24202/290/2428485933/1010/db808515/5b7fc6afN8d31330b.png",
  6. url: "/orderDetail",
  7. text:'首页'
  8. }

仅显示图标

  1. <nut-footercom :menuList='footerMenuList' @changeMenuFn="changeMenuFn"></nut-footercom>
  2. //配置数据每一项为
  3. {
  4. iconselect: "http://img13.360buyimg.com/uba/jfs/t27010/39/1558743/896/9e3c3096/5b7fc73dN636e01f4.png",
  5. icon:"http://img20.360buyimg.com/uba/jfs/t24202/290/2428485933/1010/db808515/5b7fc6afN8d31330b.png",
  6. url: "/orderDetail"
  7. }

使用须知与通用数据代码和回调示例
  1. //菜单图标文案 数组对象 使用须知:
  2. // 1, 数组内对象可用属性共有: iconselect(选中图标) icon(默认图标) url(跳转地址) text(文案)
  3. // 2, text(文案) 要配置请全部配置。
  4. // 3, url(跳转地址) 不配置则不做跳转
  5. // 4, iconselect(选中图标) icon(默认图标) 为必选属性
  6. export default {
  7. data() {
  8. return {
  9. footerMenuList:[
  10. {
  11. iconselect:
  12. "http://img13.360buyimg.com/uba/jfs/t27010/39/1558743/896/9e3c3096/5b7fc73dN636e01f4.png",
  13. icon:
  14. "http://img20.360buyimg.com/uba/jfs/t24202/290/2428485933/1010/db808515/5b7fc6afN8d31330b.png",
  15. url: "/orderDetail",
  16. text:'首页'
  17. },
  18. {
  19. iconselect:
  20. "http://img13.360buyimg.com/uba/jfs/t27010/39/1558743/896/9e3c3096/5b7fc73dN636e01f4.png",
  21. icon:
  22. "http://img20.360buyimg.com/uba/jfs/t24202/290/2428485933/1010/db808515/5b7fc6afN8d31330b.png",
  23. url: "/orderDetail",
  24. text:'测试1'
  25. },
  26. {
  27. iconselect:
  28. "http://img13.360buyimg.com/uba/jfs/t27010/39/1558743/896/9e3c3096/5b7fc73dN636e01f4.png",
  29. icon:
  30. "http://img20.360buyimg.com/uba/jfs/t24202/290/2428485933/1010/db808515/5b7fc6afN8d31330b.png",
  31. url: "/orderDetail",
  32. text:'测试2'
  33. },
  34. {
  35. iconselect:
  36. "http://img12.360buyimg.com/uba/jfs/t26998/32/1861936/1307/776501d8/5b7fc73dNf725ab6d.png",
  37. icon:
  38. "http://img13.360buyimg.com/uba/jfs/t22762/195/2428374466/1450/70f02b6/5b7fc73dN45d94c02.png",
  39. text:'测试3'
  40. }
  41. ]
  42. }
  43. },
  44. methods: {
  45. changeMenuFn(item) {
  46. console.log(item)
  47. },
  48. }
  49. }

Props
参数说明类型默认值可选值
footerMenuList 菜单图标文案数组配置请参考上方注释Array如图所见选中前后的icon和文字(文字可不配置)
Events
事件名说明回调参数
changeMenuFn当点击某个菜单时触发被点击菜单的数据对象