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.

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * @Author: Caven
  3. * @Date: 2021-03-12 16:45:45
  4. */
  5. const install = function(DC) {
  6. if (!DC || !DC.init) {
  7. throw new Error('Mapv: Missing DC Base')
  8. }
  9. DC.init(() => {
  10. try {
  11. let mapv = require('mapv-lib')
  12. DC.Namespace['mapv'] = mapv
  13. const components = require('./src/components.js').default
  14. DC.mixin(components)
  15. DC.mixin({
  16. MapvDataSet: mapv?.DataSet
  17. })
  18. } catch (e) {
  19. // eslint-disable-next-line no-console
  20. console.error(e)
  21. }
  22. })
  23. }
  24. /* istanbul ignore if */
  25. if (typeof window !== 'undefined' && window.DC) {
  26. install(DC)
  27. }
  28. export default {
  29. version: __VERSION__,
  30. compile_time: __TIME__,
  31. install
  32. }