Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

index.js 633B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @Author: Caven
  3. * @Date: 2020-02-02 15:55:53
  4. */
  5. const install = function(DC) {
  6. if (!echarts) {
  7. throw new Error('Chart: missing charts lib')
  8. }
  9. if (!DC || !DC.init) {
  10. throw new Error('Chart: Missing DC Base')
  11. }
  12. DC.init(() => {
  13. try {
  14. const components = require('./src/components.js').default
  15. DC.mixin(components)
  16. } catch (e) {
  17. // eslint-disable-next-line no-console
  18. console.error(e)
  19. }
  20. })
  21. }
  22. /* istanbul ignore if */
  23. if (typeof window !== 'undefined' && window.DC) {
  24. install(window.DC)
  25. }
  26. export default {
  27. version: __VERSION__,
  28. compile_time: __TIME__,
  29. install
  30. }