You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 年之前
123456789101112131415161718192021222324252627
  1. /**
  2. * @Author : Caven Chen
  3. */
  4. const cache = {}
  5. /**
  6. * register lib
  7. * @param name
  8. * @param lib
  9. */
  10. export function registerLib(name, lib) {
  11. cache[name] = lib
  12. if (name === 'echarts' && this.registerEcharts) {
  13. this.registerEcharts(lib)
  14. }
  15. return this
  16. }
  17. /**
  18. * get lib
  19. * @param name
  20. * @return {*}
  21. */
  22. export function getLib(name) {
  23. return cache[name]
  24. }