index.js 923 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import BotFloatButton from './src/components/BotFloatButton'
  2. import CustomForm from './src/components/Form'
  3. import DragIcon from './src/components/DragIcon'
  4. import CustomList from './src/components/List'
  5. import CustomListItem from './src/components/ListItem'
  6. import NoData from './src/components/NoData'
  7. import Tools from './src/utils/tool'
  8. import _Vue from 'vue'
  9. const components = [
  10. BotFloatButton,
  11. DragIcon,
  12. CustomForm,
  13. CustomList,
  14. CustomListItem,
  15. NoData,
  16. ]
  17. const install = function(Vue){
  18. if (!Vue) {
  19. window.Vue = Vue = _Vue
  20. }
  21. components.forEach(component => {
  22. Vue.component(component.name, component);
  23. });
  24. }
  25. const setDictLoader = function(dictLoad){
  26. Tools.dictLoad = dictLoad
  27. }
  28. export default {
  29. version: '1.0.1',
  30. BotFloatButton,
  31. DragIcon,
  32. CustomForm,
  33. CustomList,
  34. CustomListItem,
  35. NoData,
  36. install,
  37. setDictLoader
  38. }