index.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //lifetimes
  2. import { pageLifetimes } from './lifecycle/pageLifetimes';
  3. //methods
  4. import { clone } from './methods/clone';
  5. import { handleDataset } from './methods/dataset';
  6. import { escape2Html, html2Escape } from './methods/escape';
  7. import { parseEventDynamicCode } from './methods/event';
  8. import { getTabBar } from './methods/getTabBar';
  9. import { getRelationNodes } from './methods/relation';
  10. import { selectComponent as zpSelectComponent,
  11. selectAllComponents as zpSelectAllComponents } from './methods/selectComponent';
  12. import { setData } from './methods/setData';
  13. export default {
  14. // #ifndef VUE3
  15. install(Vue, option) {
  16. Vue.mixin({
  17. ...pageLifetimes,
  18. methods: {
  19. clone,
  20. handleDataset,
  21. escape2Html,
  22. html2Escape,
  23. parseEventDynamicCode,
  24. getTabBar,
  25. getRelationNodes,
  26. zpSelectComponent,
  27. zpSelectAllComponents,
  28. setData
  29. }
  30. })
  31. }
  32. // #endif
  33. // #ifdef VUE3
  34. ...pageLifetimes,
  35. methods: {
  36. clone,
  37. handleDataset,
  38. escape2Html,
  39. html2Escape,
  40. parseEventDynamicCode,
  41. getTabBar,
  42. getRelationNodes,
  43. zpSelectComponent,
  44. zpSelectAllComponents,
  45. setData
  46. }
  47. // #endif
  48. }