@zhangqingcq/vgce 0.0.13 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/README.md +16 -2
  2. package/dist/style.css +1 -1
  3. package/dist/vgce.js +28 -34
  4. package/dist/vgce.umd.cjs +5 -5
  5. package/package.json +3 -2
  6. package/src/App.vue +11 -0
  7. package/src/assets/base.less +49 -0
  8. package/src/assets/icons/add.svg +1 -0
  9. package/src/assets/icons/delete.svg +12 -0
  10. package/src/assets/icons/export.svg +1 -0
  11. package/src/assets/icons/group.svg +13 -0
  12. package/src/assets/icons/import.svg +1 -0
  13. package/src/assets/icons/lock.svg +7 -0
  14. package/src/assets/icons/menu-fold.svg +9 -0
  15. package/src/assets/icons/menu-unfold.svg +9 -0
  16. package/src/assets/icons/preview.svg +6 -0
  17. package/src/assets/icons/redo.svg +8 -0
  18. package/src/assets/icons/return.svg +8 -0
  19. package/src/assets/icons/rotate.svg +1 -0
  20. package/src/assets/icons/save.svg +9 -0
  21. package/src/assets/icons/setting.svg +6 -0
  22. package/src/assets/icons/undo.svg +7 -0
  23. package/src/assets/icons/ungroup.svg +16 -0
  24. package/src/assets/icons/unlock.svg +7 -0
  25. package/src/assets/main.less +6 -0
  26. package/src/assets/svgs/alternator.svg +8 -0
  27. package/src/assets/svgs/bot-12.svg +1 -0
  28. package/src/assets/svgs/bot-2.svg +1 -0
  29. package/src/assets/svgs/bot-3.svg +1 -0
  30. package/src/assets/svgs/bot-7.svg +1 -0
  31. package/src/assets/svgs/bot-9.svg +94 -0
  32. package/src/assets/svgs/car.svg +1 -0
  33. package/src/assets/svgs/circuit-breaker.svg +11 -0
  34. package/src/assets/svgs/clock-a.svg +23 -0
  35. package/src/assets/svgs/common-table.svg +7 -0
  36. package/src/assets/svgs/el-button.svg +10 -0
  37. package/src/assets/svgs/el-tag.svg +13 -0
  38. package/src/assets/svgs/hospital.svg +1 -0
  39. package/src/assets/svgs/house.svg +1 -0
  40. package/src/assets/svgs/light.svg +24 -0
  41. package/src/assets/svgs/now-time.svg +9 -0
  42. package/src/assets/svgs/package.svg +1 -0
  43. package/src/assets/svgs/pie-charts.svg +10 -0
  44. package/src/assets/svgs/progress-a.svg +1 -0
  45. package/src/assets/svgs/reservoir.svg +10 -0
  46. package/src/assets/svgs/svg-text.svg +5 -0
  47. package/src/assets/svgs/switch-a.svg +5 -0
  48. package/src/assets/svgs/traction-transformer.svg +11 -0
  49. package/src/components/ace-edit/index.ts +27 -0
  50. package/src/components/config/index.ts +450 -0
  51. package/src/components/config/types.ts +25 -0
  52. package/src/components/svg-analysis/index.vue +11 -0
  53. package/src/components/svg-editor/center-panel/index.vue +867 -0
  54. package/src/components/svg-editor/center-panel/types.ts +11 -0
  55. package/src/components/svg-editor/component-tree/index.vue +33 -0
  56. package/src/components/svg-editor/connection-line/index.vue +125 -0
  57. package/src/components/svg-editor/connection-panel/index.vue +198 -0
  58. package/src/components/svg-editor/export-json/index.vue +37 -0
  59. package/src/components/svg-editor/handle-panel/index.vue +342 -0
  60. package/src/components/svg-editor/import-json/index.vue +37 -0
  61. package/src/components/svg-editor/index.vue +280 -0
  62. package/src/components/svg-editor/left-panel/index.vue +83 -0
  63. package/src/components/svg-editor/right-panel/code-edit-modal.vue +50 -0
  64. package/src/components/svg-editor/right-panel/common-animate.vue +96 -0
  65. package/src/components/svg-editor/right-panel/condition.vue +101 -0
  66. package/src/components/svg-editor/right-panel/dynamic-el-form-item.vue +97 -0
  67. package/src/components/svg-editor/right-panel/index.vue +304 -0
  68. package/src/components/svg-editor/right-panel/list.vue +86 -0
  69. package/src/components/svg-editor/top-panel/index.vue +139 -0
  70. package/src/components/svg-editor/types.ts +22 -0
  71. package/src/components/svg-viewer/index.vue +340 -0
  72. package/src/components/vue3-ruler-tool/index.vue +506 -0
  73. package/src/config/files/clock-a.vue +66 -0
  74. package/src/config/files/common-table.vue +49 -0
  75. package/src/config/files/light-a.vue +72 -0
  76. package/src/config/files/now-time.vue +53 -0
  77. package/src/config/files/pie-charts.vue +72 -0
  78. package/src/config/files/progress.vue +40 -0
  79. package/src/config/files/svg-text.vue +39 -0
  80. package/src/config/files/switch-a.vue +45 -0
  81. package/src/config/index.ts +28 -0
  82. package/src/config/svg/animation/index.ts +8 -0
  83. package/src/config/svg/animation/reservoir.ts +32 -0
  84. package/src/config/svg/custom/clock-a.ts +23 -0
  85. package/src/config/svg/custom/index.ts +11 -0
  86. package/src/config/svg/custom/light.ts +29 -0
  87. package/src/config/svg/custom/svg-text.ts +54 -0
  88. package/src/config/svg/custom/switch-a.ts +29 -0
  89. package/src/config/svg/index.ts +12 -0
  90. package/src/config/svg/stateful/circuit-breaker.ts +38 -0
  91. package/src/config/svg/stateful/index.ts +8 -0
  92. package/src/config/svg/stateless/alternator.ts +28 -0
  93. package/src/config/svg/stateless/bot-12.ts +22 -0
  94. package/src/config/svg/stateless/bot-2.ts +22 -0
  95. package/src/config/svg/stateless/bot-3.ts +22 -0
  96. package/src/config/svg/stateless/bot-7.ts +22 -0
  97. package/src/config/svg/stateless/bot-9.ts +22 -0
  98. package/src/config/svg/stateless/car.ts +22 -0
  99. package/src/config/svg/stateless/hospital.ts +22 -0
  100. package/src/config/svg/stateless/house.ts +22 -0
  101. package/src/config/svg/stateless/index.ts +30 -0
  102. package/src/config/svg/stateless/package.ts +22 -0
  103. package/src/config/svg/stateless/traction-transformer.ts +28 -0
  104. package/src/config/types.ts +126 -0
  105. package/src/config/vue/component/button.ts +57 -0
  106. package/src/config/vue/component/common-table.ts +124 -0
  107. package/src/config/vue/component/index.ts +13 -0
  108. package/src/config/vue/component/now-time.ts +29 -0
  109. package/src/config/vue/component/progress.ts +29 -0
  110. package/src/config/vue/component/tag.ts +46 -0
  111. package/src/config/vue/echarts/index.ts +8 -0
  112. package/src/config/vue/echarts/pie-charts.ts +60 -0
  113. package/src/config/vue/index.ts +5 -0
  114. package/src/hooks.ts +47 -0
  115. package/src/index.ts +14 -0
  116. package/src/main.ts +15 -0
  117. package/src/router.ts +24 -0
  118. package/src/stores/config/index.ts +44 -0
  119. package/src/stores/config/types.ts +27 -0
  120. package/src/stores/global/index.ts +109 -0
  121. package/src/stores/global/types.ts +115 -0
  122. package/src/stores/main.ts +10 -0
  123. package/src/stores/svg-edit-layout/index.ts +17 -0
  124. package/src/stores/svg-edit-layout/types.ts +8 -0
  125. package/src/stores/system/index.ts +174 -0
  126. package/src/stores/system/types.ts +43 -0
  127. package/src/utils/fetch.ts +351 -0
  128. package/src/utils/file-read-write.ts +26 -0
  129. package/src/utils/index.ts +397 -0
  130. package/src/utils/mqtt-net.ts +48 -0
  131. package/src/utils/proxy.ts +7 -0
  132. package/src/utils/scale-core.ts +214 -0
  133. package/src/utils/types.ts +13 -0
  134. package/src/views/EditorS.vue +18 -0
  135. package/src/views/Preview.vue +12 -0
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1686643109382" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1704" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M324.266667 599.466667c-6.4-4.266667-12.8-8.533333-14.933334-17.066667s-6.4-17.066667-6.4-27.733333h32c0 6.4 2.133333 10.666667 4.266667 14.933333s6.4 4.266667 10.666667 4.266667 8.533333-2.133333 10.666666-4.266667 4.266667-6.4 4.266667-12.8v-27.733333c0-4.266667-2.133333-8.533333-4.266667-10.666667s-4.266667-6.4-8.533333-6.4-6.4 0-8.533333 2.133333-4.266667 4.266667-4.266667 8.533334h-32v-102.4h87.466667v32h-55.466667v34.133333c2.133333-2.133333 6.4-4.266667 8.533333-6.4s8.533333-2.133333 10.666667-2.133333c8.533333 0 14.933333 2.133333 19.2 6.4s10.666667 8.533333 12.8 17.066666c2.133333 6.4 4.266667 14.933333 4.266667 25.6V554.666667c0 10.666667-2.133333 19.2-6.4 25.6-4.266667 6.4-8.533333 12.8-17.066667 17.066666s-14.933333 6.4-25.6 6.4c-6.4 2.133333-14.933333 0-21.333333-4.266666zM437.333333 593.066667c-8.533333-8.533333-12.8-19.2-12.8-34.133334V469.333333c0-14.933333 4.266667-27.733333 12.8-34.133333s19.2-12.8 36.266667-12.8 27.733333 4.266667 36.266667 12.8 12.8 19.2 12.8 34.133333v89.6c0 14.933333-4.266667 27.733333-12.8 36.266667s-19.2 12.8-36.266667 12.8c-17.066667-2.133333-27.733333-6.4-36.266667-14.933333z m46.933334-25.6c2.133333-4.266667 4.266667-8.533333 4.266666-14.933334v-81.066666c0-6.4-2.133333-10.666667-4.266666-14.933334s-6.4-4.266667-10.666667-4.266666-8.533333 2.133333-12.8 4.266666-4.266667 8.533333-4.266667 14.933334v81.066666c0 6.4 2.133333 10.666667 4.266667 14.933334s6.4 4.266667 10.666667 4.266666 10.666667 0 12.8-4.266666zM554.666667 490.666667c-4.266667-6.4-8.533333-12.8-8.533334-23.466667v-14.933333c0-10.666667 2.133333-17.066667 8.533334-23.466667s12.8-8.533333 21.333333-8.533333 17.066667 2.133333 21.333333 8.533333 8.533333 12.8 8.533334 23.466667v14.933333c0 10.666667-2.133333 17.066667-8.533334 23.466667s-12.8 8.533333-21.333333 8.533333-17.066667-2.133333-21.333333-8.533333z m32-10.666667c2.133333-2.133333 4.266667-6.4 4.266666-12.8V448c0-4.266667-2.133333-8.533333-4.266666-10.666667s-6.4-4.266667-10.666667-4.266666-8.533333 2.133333-10.666667 4.266666-4.266667 6.4-4.266666 10.666667v21.333333c0 4.266667 2.133333 8.533333 4.266666 12.8s6.4 4.266667 10.666667 4.266667 8.533333-4.266667 10.666667-6.4z m74.666666-59.733333h17.066667l-98.133333 181.333333h-17.066667l98.133333-181.333333z m-17.066666 177.066666c-4.266667-6.4-8.533333-12.8-8.533334-23.466666v-14.933334c0-10.666667 2.133333-17.066667 8.533334-23.466666s12.8-8.533333 21.333333-8.533334 17.066667 2.133333 21.333333 8.533334 8.533333 12.8 8.533334 23.466666v14.933334c0 10.666667-2.133333 17.066667-8.533334 23.466666s-12.8 8.533333-21.333333 8.533334-14.933333-4.266667-21.333333-8.533334z m34.133333-10.666666c2.133333-2.133333 4.266667-6.4 4.266667-12.8V554.666667c0-4.266667-2.133333-8.533333-4.266667-10.666667s-6.4-4.266667-10.666667-4.266667-8.533333 2.133333-10.666666 4.266667-4.266667 6.4-4.266667 10.666667v19.2c0 4.266667 2.133333 8.533333 4.266667 12.8s6.4 4.266667 10.666666 4.266666 8.533333-2.133333 10.666667-4.266666z" fill="#4C64FE" p-id="1705"></path><path d="M512 85.333333C277.333333 85.333333 85.333333 277.333333 85.333333 512s192 426.666667 426.666667 426.666667 426.666667-192 426.666667-426.666667S746.666667 85.333333 512 85.333333z m0 768c-187.733333 0-341.333333-153.6-341.333333-341.333333S324.266667 170.666667 512 170.666667s341.333333 153.6 341.333333 341.333333-153.6 341.333333-341.333333 341.333333z" fill="#4C64FE" opacity=".6" p-id="1706"></path><path d="M853.333333 512c0 187.733333-153.6 341.333333-341.333333 341.333333v85.333334c234.666667 0 426.666667-192 426.666667-426.666667S746.666667 85.333333 512 85.333333v85.333334c187.733333 0 341.333333 153.6 341.333333 341.333333z" fill="#4C64FE" p-id="1707"></path></svg>
@@ -0,0 +1,10 @@
1
+ <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200"
2
+ height="200">
3
+ <rect transform="rotate(180,427,410)" x="0" y="0" width="680" height="400" stroke="none">
4
+ <animate attributeName="height" from="0" to="400" dur="5s" repeatCount="indefinite" />
5
+ </rect>
6
+ <polygon
7
+ points="283.2,131 87.7,129.1 85.1,911.2 938.9,911.2 938.9,131 740.8,131 740.8,241.3 849,245.4 853.1,807.1
8
+ 177.1,799.2 181.1,246.6 283.2,245 "
9
+ stroke-width="10" />
10
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg viewBox="0 0 1024 1024" version="1.1"
2
+ xmlns="http://www.w3.org/2000/svg"
3
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
4
+ <text x="250" y="700" font-family="Microsoft YaHei" font-size="505" >T</text>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg t="1683299647629" class="icon" viewBox="0 0 1024 1024" version="1.1"
2
+ xmlns="http://www.w3.org/2000/svg" width="200" height="200">
3
+ <path d="M735.2 792.4H287.6C136.9 792.4 14.2 669.8 14.2 519c0-150.9 122.6-273.5 273.4-273.5h447.6c150.7 0 273.4 122.6 273.4 273.4 0 150.9-122.7 273.5-273.4 273.5zM287.6 300.2c-120.6 0-218.7 98.1-218.7 218.7 0 120.8 98.1 218.9 218.7 218.9h447.6c120.6 0 218.7-98.1 218.7-218.7 0-120.8-98.1-218.9-218.7-218.9H287.6z" fill="#666666"></path>
4
+ <path d="M724.7 687.1c-92.7 0-168.1-75.4-168.1-168.1S632 350.9 724.7 350.9 892.8 426.3 892.8 519s-75.4 168.1-168.1 168.1z m0-278.6c-60.9 0-110.5 49.6-110.5 110.5s49.5 110.5 110.5 110.5S835.1 579.9 835.1 519s-49.5-110.5-110.4-110.5z" fill="#666666"></path>
5
+ </svg>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <svg viewBox="0 0 1024 1024" version="1.1"
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
5
+ <path d="M500.181333 308.757333a118.421333 118.421333 0 1 1-118.421333 118.421334 118.421333 118.421333 0 0 1 118.421333-118.421334m0-19.2a137.514667 137.514667 0 1 0 137.514667 137.514667 137.514667 137.514667 0 0 0-137.514667-137.514667z"></path>
6
+ <path d="M500.181333 478.741333a118.421333 118.421333 0 1 1-118.421333 118.421334 118.421333 118.421333 0 0 1 118.421333-118.421334m0-19.2a137.514667 137.514667 0 1 0 137.514667 137.514667 137.514667 137.514667 0 0 0-137.514667-137.514667z"></path>
7
+ <path d="M500.266667 234.666667a9.557333 9.557333 0 0 1 9.557333 9.557333v54.869333a9.557333 9.557333 0 0 1-9.557333 9.557334 9.557333 9.557333 0 0 1-9.557334-9.557334v-54.848A9.557333 9.557333 0 0 1 500.266667 234.666667z"></path>
8
+ <path d="M500.266667 715.349333a9.557333 9.557333 0 0 1 9.557333 9.557334v54.890666a9.557333 9.557333 0 0 1-9.557333 9.557334 9.557333 9.557333 0 0 1-9.557334-9.557334v-54.869333a9.557333 9.557333 0 0 1 9.557334-9.578667z"></path>
9
+ <path d="M500.266667 446.357333a10.666667 10.666667 0 0 1-10.218667-6.186666l-36.053333-77.312a10.666667 10.666667 0 0 1 5.205333-14.186667 10.666667 10.666667 0 0 1 14.101333 5.205333l26.986667 57.728 26.922667-57.728a10.666667 10.666667 0 0 1 14.186666-5.205333 10.666667 10.666667 0 0 1 5.12 14.186667l-36.053333 77.312a10.666667 10.666667 0 0 1-9.664 6.208z"></path>
10
+ <path d="M500.266667 681.024a10.666667 10.666667 0 0 1-10.218667-6.186667l-36.053333-77.312a10.666667 10.666667 0 0 1 5.205333-14.186666 10.666667 10.666667 0 0 1 14.101333 5.205333l26.986667 57.728 26.922667-57.728a10.666667 10.666667 0 0 1 14.186666-5.205333 10.666667 10.666667 0 0 1 5.12 14.186666l-36.053333 77.312a10.666667 10.666667 0 0 1-9.664 6.208z"></path>
11
+ </svg>
@@ -0,0 +1,27 @@
1
+ import ace from 'ace-builds'
2
+
3
+ import themeUrl from 'ace-builds/src-noconflict/theme-github?url'
4
+ ace.config.setModuleUrl('ace/theme/github', themeUrl)
5
+
6
+ import themeUrl2 from 'ace-builds/src-noconflict/theme-kr_theme?url'
7
+ ace.config.setModuleUrl('ace/theme/kr_theme', themeUrl2)
8
+
9
+ import workerBaseUrl from 'ace-builds/src-noconflict/worker-base?url'
10
+ ace.config.setModuleUrl('ace/mode/base', workerBaseUrl)
11
+
12
+ import modeJsonUrl from 'ace-builds/src-noconflict/mode-json?url'
13
+ ace.config.setModuleUrl('ace/mode/json', modeJsonUrl)
14
+ import workerJsonUrl from 'ace-builds/src-noconflict/worker-json?url'
15
+ ace.config.setModuleUrl('ace/mode/json_worker', workerJsonUrl)
16
+ import snippetsJsonUrl from 'ace-builds/src-noconflict/snippets/json?url'
17
+ ace.config.setModuleUrl('ace/snippets/json', snippetsJsonUrl)
18
+
19
+ import modeJavascriptUrl from 'ace-builds/src-noconflict/mode-javascript?url'
20
+ ace.config.setModuleUrl('ace/mode/javascript', modeJavascriptUrl)
21
+ import workerJavascriptUrl from 'ace-builds/src-noconflict/worker-javascript?url'
22
+ ace.config.setModuleUrl('ace/mode/javascript_worker', workerJavascriptUrl)
23
+ import snippetsJavascriptUrl from 'ace-builds/src-noconflict/snippets/javascript?url'
24
+ ace.config.setModuleUrl('ace/snippets/javascript', snippetsJavascriptUrl)
25
+
26
+ import 'ace-builds/src-noconflict/ext-language_tools'
27
+ ace.require('ace/ext/language_tools')
@@ -0,0 +1,450 @@
1
+ import { EConfigAnimationsType, EConfigItemPropsType, EDoneJsonType } from '@/config/types'
2
+ import type { ISystemStraightLine, IAnimateConfig } from './types'
3
+
4
+ export const straight_line_system: ISystemStraightLine = Object.seal({
5
+ name: 'straight-line',
6
+ title: '直线',
7
+ type: EDoneJsonType.StraightLine,
8
+ config: {
9
+ can_zoom: false,
10
+ have_anchor: false,
11
+ actual_rect: false
12
+ },
13
+ display: true,
14
+ props: {
15
+ fill: {
16
+ title: '填充色',
17
+ type: EConfigItemPropsType.Color,
18
+ val: '#ff0000'
19
+ },
20
+ start_x: {
21
+ title: '起点x坐标',
22
+ type: EConfigItemPropsType.InputNumber,
23
+ val: 0
24
+ },
25
+ start_y: {
26
+ title: '起点y坐标',
27
+ type: EConfigItemPropsType.InputNumber,
28
+ val: 0
29
+ },
30
+ end_x: {
31
+ title: '终点x坐标',
32
+ type: EConfigItemPropsType.InputNumber,
33
+ val: 0
34
+ },
35
+ end_y: {
36
+ title: '终点y坐标',
37
+ type: EConfigItemPropsType.InputNumber,
38
+ val: 0
39
+ }
40
+ },
41
+ bind_anchors: {
42
+ start: null,
43
+ end: null
44
+ },
45
+ events: []
46
+ })
47
+ export const connection_line_system: ISystemStraightLine = {
48
+ name: 'connection_line',
49
+ title: '连接线',
50
+ type: EDoneJsonType.ConnectionLine,
51
+ config: {
52
+ can_zoom: false,
53
+ have_anchor: false,
54
+ actual_rect: false
55
+ },
56
+ display: true,
57
+ props: {
58
+ stroke: {
59
+ title: '线条颜色',
60
+ type: EConfigItemPropsType.Color,
61
+ val: '#ff0000'
62
+ },
63
+ 'stroke-width': {
64
+ title: '线条宽度',
65
+ type: EConfigItemPropsType.InputNumber,
66
+ val: 2
67
+ },
68
+ point_position: {
69
+ title: '点坐标',
70
+ type: EConfigItemPropsType.JsonEdit,
71
+ val: []
72
+ }
73
+ },
74
+ animations: {
75
+ type: {
76
+ title: '动画类型',
77
+ type: EConfigItemPropsType.Select,
78
+ val: EConfigAnimationsType.None,
79
+ options: [
80
+ {
81
+ label: '无',
82
+ value: EConfigAnimationsType.None
83
+ },
84
+ {
85
+ label: '电流',
86
+ value: EConfigAnimationsType.Electricity
87
+ },
88
+ {
89
+ label: '轨迹',
90
+ value: EConfigAnimationsType.Track
91
+ },
92
+ {
93
+ label: '水珠',
94
+ value: EConfigAnimationsType.WaterDrop
95
+ }
96
+ ]
97
+ },
98
+ dur: {
99
+ title: '持续时间',
100
+ type: EConfigItemPropsType.InputNumber,
101
+ val: 20
102
+ },
103
+ repeatCount: {
104
+ title: '循环次数',
105
+ type: EConfigItemPropsType.Input,
106
+ val: 'indefinite',
107
+ disabled: true
108
+ },
109
+ color: {
110
+ title: '颜色',
111
+ type: EConfigItemPropsType.Color,
112
+ val: '#0a7ae2'
113
+ },
114
+ reverse: {
115
+ title: '反转动画',
116
+ type: EConfigItemPropsType.Switch,
117
+ val: false
118
+ }
119
+ },
120
+ bind_anchors: {
121
+ start: null,
122
+ end: null
123
+ },
124
+ events: []
125
+ }
126
+ export const common_animate_list: Array<{ label: string; children: IAnimateConfig[] }> = [
127
+ {
128
+ label: '进入',
129
+ children: [
130
+ {
131
+ label: '渐显',
132
+ value: 'fadeIn'
133
+ },
134
+ {
135
+ label: '向右进入',
136
+ value: 'fadeInLeft'
137
+ },
138
+ {
139
+ label: '向左进入',
140
+ value: 'fadeInRight'
141
+ },
142
+ {
143
+ label: '向上进入',
144
+ value: 'fadeInUp'
145
+ },
146
+ {
147
+ label: '向下进入',
148
+ value: 'fadeInDown'
149
+ },
150
+ {
151
+ label: '向右长距进入',
152
+ value: 'fadeInLeftBig'
153
+ },
154
+ {
155
+ label: '向左长距进入',
156
+ value: 'fadeInRightBig'
157
+ },
158
+ {
159
+ label: '向上长距进入',
160
+ value: 'fadeInUpBig'
161
+ },
162
+ {
163
+ label: '向下长距进入',
164
+ value: 'fadeInDownBig'
165
+ },
166
+ {
167
+ label: '旋转进入',
168
+ value: 'rotateIn'
169
+ },
170
+ {
171
+ label: '左顺时针旋转',
172
+ value: 'rotateInDownLeft'
173
+ },
174
+ {
175
+ label: '右逆时针旋转',
176
+ value: 'rotateInDownRight'
177
+ },
178
+ {
179
+ label: '左逆时针旋转',
180
+ value: 'rotateInUpLeft'
181
+ },
182
+ {
183
+ label: '右逆时针旋转',
184
+ value: 'rotateInUpRight'
185
+ },
186
+ {
187
+ label: '弹入',
188
+ value: 'bounceIn'
189
+ },
190
+ {
191
+ label: '向右弹入',
192
+ value: 'bounceInLeft'
193
+ },
194
+ {
195
+ label: '向左弹入',
196
+ value: 'bounceInRight'
197
+ },
198
+ {
199
+ label: '向上弹入',
200
+ value: 'bounceInUp'
201
+ },
202
+ {
203
+ label: '向下弹入',
204
+ value: 'bounceInDown'
205
+ },
206
+ {
207
+ label: '光速从右进入',
208
+ value: 'lightSpeedInRight'
209
+ },
210
+ {
211
+ label: '光速从左进入',
212
+ value: 'lightSpeedInLeft'
213
+ },
214
+ {
215
+ label: '光速从右退出',
216
+ value: 'lightSpeedOutRight'
217
+ },
218
+ {
219
+ label: '光速从左退出',
220
+ value: 'lightSpeedOutLeft'
221
+ },
222
+ {
223
+ label: 'Y轴旋转',
224
+ value: 'flip'
225
+ },
226
+ {
227
+ label: '中心X轴旋转',
228
+ value: 'flipInX'
229
+ },
230
+ {
231
+ label: '中心Y轴旋转',
232
+ value: 'flipInY'
233
+ },
234
+ {
235
+ label: '左长半径旋转',
236
+ value: 'rollIn'
237
+ },
238
+ {
239
+ label: '由小变大进入',
240
+ value: 'zoomIn'
241
+ },
242
+ {
243
+ label: '左变大进入',
244
+ value: 'zoomInLeft'
245
+ },
246
+ {
247
+ label: '右变大进入',
248
+ value: 'zoomInRight'
249
+ },
250
+ {
251
+ label: '向上变大进入',
252
+ value: 'zoomInUp'
253
+ },
254
+ {
255
+ label: '向下变大进入',
256
+ value: 'zoomInDown'
257
+ },
258
+ {
259
+ label: '向右滑动展开',
260
+ value: 'slideInLeft'
261
+ },
262
+ {
263
+ label: '向左滑动展开',
264
+ value: 'slideInRight'
265
+ },
266
+ {
267
+ label: '向上滑动展开',
268
+ value: 'slideInUp'
269
+ },
270
+ {
271
+ label: '向下滑动展开',
272
+ value: 'slideInDown'
273
+ }
274
+ ]
275
+ },
276
+ {
277
+ label: '强调',
278
+ children: [
279
+ {
280
+ label: '弹跳',
281
+ value: 'bounce'
282
+ },
283
+ {
284
+ label: '闪烁',
285
+ value: 'flash'
286
+ },
287
+ {
288
+ label: '放大缩小',
289
+ value: 'pulse'
290
+ },
291
+ {
292
+ label: '放大缩小弹簧',
293
+ value: 'rubberBand'
294
+ },
295
+ {
296
+ label: '左右晃动',
297
+ value: 'headShake'
298
+ },
299
+ {
300
+ label: '左右扇形摇摆',
301
+ value: 'swing'
302
+ },
303
+ {
304
+ label: '放大晃动缩小',
305
+ value: 'tada'
306
+ },
307
+ {
308
+ label: '扇形摇摆',
309
+ value: 'wobble'
310
+ },
311
+ {
312
+ label: '左右上下晃动',
313
+ value: 'jello'
314
+ },
315
+ {
316
+ label: 'Y轴旋转',
317
+ value: 'flip'
318
+ }
319
+ ]
320
+ },
321
+ {
322
+ label: '退出',
323
+ children: [
324
+ {
325
+ label: '渐隐',
326
+ value: 'fadeOut'
327
+ },
328
+ {
329
+ label: '向左退出',
330
+ value: 'fadeOutLeft'
331
+ },
332
+ {
333
+ label: '向右退出',
334
+ value: 'fadeOutRight'
335
+ },
336
+ {
337
+ label: '向上退出',
338
+ value: 'fadeOutUp'
339
+ },
340
+ {
341
+ label: '向下退出',
342
+ value: 'fadeOutDown'
343
+ },
344
+ {
345
+ label: '向左长距退出',
346
+ value: 'fadeOutLeftBig'
347
+ },
348
+ {
349
+ label: '向右长距退出',
350
+ value: 'fadeOutRightBig'
351
+ },
352
+ {
353
+ label: '向上长距退出',
354
+ value: 'fadeOutUpBig'
355
+ },
356
+ {
357
+ label: '向下长距退出',
358
+ value: 'fadeOutDownBig'
359
+ },
360
+ {
361
+ label: '旋转退出',
362
+ value: 'rotateOut'
363
+ },
364
+ {
365
+ label: '左顺时针旋转',
366
+ value: 'rotateOutDownLeft'
367
+ },
368
+ {
369
+ label: '右逆时针旋转',
370
+ value: 'rotateOutDownRight'
371
+ },
372
+ {
373
+ label: '左逆时针旋转',
374
+ value: 'rotateOutUpLeft'
375
+ },
376
+ {
377
+ label: '右逆时针旋转',
378
+ value: 'rotateOutUpRight'
379
+ },
380
+ {
381
+ label: '弹出',
382
+ value: 'bounceOut'
383
+ },
384
+ {
385
+ label: '向左弹出',
386
+ value: 'bounceOutLeft'
387
+ },
388
+ {
389
+ label: '向右弹出',
390
+ value: 'bounceOutRight'
391
+ },
392
+ {
393
+ label: '向上弹出',
394
+ value: 'bounceOutUp'
395
+ },
396
+ {
397
+ label: '向下弹出',
398
+ value: 'bounceOutDown'
399
+ },
400
+ {
401
+ label: '中心X轴旋转',
402
+ value: 'flipOutX'
403
+ },
404
+ {
405
+ label: '中心Y轴旋转',
406
+ value: 'flipOutY'
407
+ },
408
+ {
409
+ label: '左长半径旋转',
410
+ value: 'rollOut'
411
+ },
412
+ {
413
+ label: '由小变大退出',
414
+ value: 'zoomOut'
415
+ },
416
+ {
417
+ label: '左变大退出',
418
+ value: 'zoomOutLeft'
419
+ },
420
+ {
421
+ label: '右变大退出',
422
+ value: 'zoomOutRight'
423
+ },
424
+ {
425
+ label: '向上变大退出',
426
+ value: 'zoomOutUp'
427
+ },
428
+ {
429
+ label: '向下变大退出',
430
+ value: 'zoomOutDown'
431
+ },
432
+ {
433
+ label: '向左滑动收起',
434
+ value: 'slideOutLeft'
435
+ },
436
+ {
437
+ label: '向右滑动收起',
438
+ value: 'slideOutRight'
439
+ },
440
+ {
441
+ label: '向上滑动收起',
442
+ value: 'slideOutUp'
443
+ },
444
+ {
445
+ label: '向下滑动收起',
446
+ value: 'slideOutDown'
447
+ }
448
+ ]
449
+ }
450
+ ]
@@ -0,0 +1,25 @@
1
+ import type { IConfigItem } from '@/config/types'
2
+
3
+ export interface ISystemStraightLine extends IConfigItem {
4
+ //绑定锚点
5
+ bind_anchors: {
6
+ start: IBindAnchors | null
7
+ end: IBindAnchors | null
8
+ }
9
+ }
10
+ export interface IBindAnchors {
11
+ type: ELineBindAnchors
12
+ target_id: string
13
+ }
14
+
15
+ export interface IAnimateConfig {
16
+ label: string
17
+ value: string
18
+ }
19
+
20
+ export enum ELineBindAnchors {
21
+ TopCenter = 'TopCenter',
22
+ Left = 'Left',
23
+ Right = 'Right',
24
+ BottomCenter = 'BottomCenter'
25
+ }
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ import { computed } from 'vue'
3
+
4
+ const props = withDefaults(defineProps<{ name: string; props?: object }>(), { props: () => ({}) })
5
+ const symbolId = computed(() => `#svg-${props.name}`)
6
+ </script>
7
+ <template>
8
+ <svg aria-hidden="true">
9
+ <use :xlink:href="symbolId" v-bind="props.props" />
10
+ </svg>
11
+ </template>