ibsp-fg-page 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1043) hide show
  1. package/.babelrc +5 -0
  2. package/.cz-config.cjs +60 -0
  3. package/.vite/deps_temp_029120a0/package.json +3 -0
  4. package/.vscode/extensions.json +3 -0
  5. package/.zed/settings.json +14 -0
  6. package/README.md +1 -0
  7. package/config/.env.dev +21 -0
  8. package/config/.env.fat +21 -0
  9. package/config/.env.pro +21 -0
  10. package/config/.env.sit +21 -0
  11. package/config/.env.template +1 -0
  12. package/config/.env.test +21 -0
  13. package/config/.env.uat +21 -0
  14. package/config/.env.zsdev +21 -0
  15. package/config/.env.zspro +21 -0
  16. package/env.d.ts +6 -0
  17. package/eslint.config.js +202 -0
  18. package/index.html +84 -0
  19. package/jsconfig.json +43 -0
  20. package/package.json +85 -0
  21. package/packages/README.md +1 -0
  22. package/packages/config.d.ts +97 -0
  23. package/packages/index.d.ts +49 -0
  24. package/packages/index.js +16 -0
  25. package/packages/package.json +87 -0
  26. package/public/1.json +1612 -0
  27. package/public/assets/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  28. package/public/assets/vs/base/common/worker/simpleWorker.nls.de.js +8 -0
  29. package/public/assets/vs/base/common/worker/simpleWorker.nls.es.js +8 -0
  30. package/public/assets/vs/base/common/worker/simpleWorker.nls.fr.js +8 -0
  31. package/public/assets/vs/base/common/worker/simpleWorker.nls.it.js +8 -0
  32. package/public/assets/vs/base/common/worker/simpleWorker.nls.ja.js +8 -0
  33. package/public/assets/vs/base/common/worker/simpleWorker.nls.js +8 -0
  34. package/public/assets/vs/base/common/worker/simpleWorker.nls.ko.js +8 -0
  35. package/public/assets/vs/base/common/worker/simpleWorker.nls.ru.js +8 -0
  36. package/public/assets/vs/base/common/worker/simpleWorker.nls.zh-cn.js +8 -0
  37. package/public/assets/vs/base/common/worker/simpleWorker.nls.zh-tw.js +8 -0
  38. package/public/assets/vs/base/worker/workerMain.js +30 -0
  39. package/public/assets/vs/basic-languages/abap/abap.js +10 -0
  40. package/public/assets/vs/basic-languages/apex/apex.js +10 -0
  41. package/public/assets/vs/basic-languages/azcli/azcli.js +10 -0
  42. package/public/assets/vs/basic-languages/bat/bat.js +10 -0
  43. package/public/assets/vs/basic-languages/bicep/bicep.js +11 -0
  44. package/public/assets/vs/basic-languages/cameligo/cameligo.js +10 -0
  45. package/public/assets/vs/basic-languages/clojure/clojure.js +10 -0
  46. package/public/assets/vs/basic-languages/coffee/coffee.js +10 -0
  47. package/public/assets/vs/basic-languages/cpp/cpp.js +10 -0
  48. package/public/assets/vs/basic-languages/csharp/csharp.js +10 -0
  49. package/public/assets/vs/basic-languages/csp/csp.js +10 -0
  50. package/public/assets/vs/basic-languages/css/css.js +12 -0
  51. package/public/assets/vs/basic-languages/cypher/cypher.js +10 -0
  52. package/public/assets/vs/basic-languages/dart/dart.js +10 -0
  53. package/public/assets/vs/basic-languages/dockerfile/dockerfile.js +10 -0
  54. package/public/assets/vs/basic-languages/ecl/ecl.js +10 -0
  55. package/public/assets/vs/basic-languages/elixir/elixir.js +10 -0
  56. package/public/assets/vs/basic-languages/flow9/flow9.js +10 -0
  57. package/public/assets/vs/basic-languages/freemarker2/freemarker2.js +12 -0
  58. package/public/assets/vs/basic-languages/fsharp/fsharp.js +10 -0
  59. package/public/assets/vs/basic-languages/go/go.js +10 -0
  60. package/public/assets/vs/basic-languages/graphql/graphql.js +10 -0
  61. package/public/assets/vs/basic-languages/handlebars/handlebars.js +10 -0
  62. package/public/assets/vs/basic-languages/hcl/hcl.js +10 -0
  63. package/public/assets/vs/basic-languages/html/html.js +10 -0
  64. package/public/assets/vs/basic-languages/ini/ini.js +10 -0
  65. package/public/assets/vs/basic-languages/java/java.js +10 -0
  66. package/public/assets/vs/basic-languages/javascript/javascript.js +10 -0
  67. package/public/assets/vs/basic-languages/julia/julia.js +10 -0
  68. package/public/assets/vs/basic-languages/kotlin/kotlin.js +10 -0
  69. package/public/assets/vs/basic-languages/less/less.js +11 -0
  70. package/public/assets/vs/basic-languages/lexon/lexon.js +10 -0
  71. package/public/assets/vs/basic-languages/liquid/liquid.js +10 -0
  72. package/public/assets/vs/basic-languages/lua/lua.js +10 -0
  73. package/public/assets/vs/basic-languages/m3/m3.js +10 -0
  74. package/public/assets/vs/basic-languages/markdown/markdown.js +10 -0
  75. package/public/assets/vs/basic-languages/mdx/mdx.js +10 -0
  76. package/public/assets/vs/basic-languages/mips/mips.js +10 -0
  77. package/public/assets/vs/basic-languages/msdax/msdax.js +10 -0
  78. package/public/assets/vs/basic-languages/mysql/mysql.js +10 -0
  79. package/public/assets/vs/basic-languages/objective-c/objective-c.js +10 -0
  80. package/public/assets/vs/basic-languages/pascal/pascal.js +10 -0
  81. package/public/assets/vs/basic-languages/pascaligo/pascaligo.js +10 -0
  82. package/public/assets/vs/basic-languages/perl/perl.js +10 -0
  83. package/public/assets/vs/basic-languages/pgsql/pgsql.js +10 -0
  84. package/public/assets/vs/basic-languages/php/php.js +10 -0
  85. package/public/assets/vs/basic-languages/pla/pla.js +10 -0
  86. package/public/assets/vs/basic-languages/postiats/postiats.js +10 -0
  87. package/public/assets/vs/basic-languages/powerquery/powerquery.js +10 -0
  88. package/public/assets/vs/basic-languages/powershell/powershell.js +10 -0
  89. package/public/assets/vs/basic-languages/protobuf/protobuf.js +11 -0
  90. package/public/assets/vs/basic-languages/pug/pug.js +10 -0
  91. package/public/assets/vs/basic-languages/python/python.js +10 -0
  92. package/public/assets/vs/basic-languages/qsharp/qsharp.js +10 -0
  93. package/public/assets/vs/basic-languages/r/r.js +10 -0
  94. package/public/assets/vs/basic-languages/razor/razor.js +10 -0
  95. package/public/assets/vs/basic-languages/redis/redis.js +10 -0
  96. package/public/assets/vs/basic-languages/redshift/redshift.js +10 -0
  97. package/public/assets/vs/basic-languages/restructuredtext/restructuredtext.js +10 -0
  98. package/public/assets/vs/basic-languages/ruby/ruby.js +10 -0
  99. package/public/assets/vs/basic-languages/rust/rust.js +10 -0
  100. package/public/assets/vs/basic-languages/sb/sb.js +10 -0
  101. package/public/assets/vs/basic-languages/scala/scala.js +10 -0
  102. package/public/assets/vs/basic-languages/scheme/scheme.js +10 -0
  103. package/public/assets/vs/basic-languages/scss/scss.js +12 -0
  104. package/public/assets/vs/basic-languages/shell/shell.js +10 -0
  105. package/public/assets/vs/basic-languages/solidity/solidity.js +10 -0
  106. package/public/assets/vs/basic-languages/sophia/sophia.js +10 -0
  107. package/public/assets/vs/basic-languages/sparql/sparql.js +10 -0
  108. package/public/assets/vs/basic-languages/sql/sql.js +10 -0
  109. package/public/assets/vs/basic-languages/st/st.js +10 -0
  110. package/public/assets/vs/basic-languages/swift/swift.js +13 -0
  111. package/public/assets/vs/basic-languages/systemverilog/systemverilog.js +10 -0
  112. package/public/assets/vs/basic-languages/tcl/tcl.js +10 -0
  113. package/public/assets/vs/basic-languages/twig/twig.js +10 -0
  114. package/public/assets/vs/basic-languages/typescript/typescript.js +10 -0
  115. package/public/assets/vs/basic-languages/typespec/typespec.js +10 -0
  116. package/public/assets/vs/basic-languages/vb/vb.js +10 -0
  117. package/public/assets/vs/basic-languages/wgsl/wgsl.js +307 -0
  118. package/public/assets/vs/basic-languages/xml/xml.js +10 -0
  119. package/public/assets/vs/basic-languages/yaml/yaml.js +10 -0
  120. package/public/assets/vs/editor/editor.main.css +8 -0
  121. package/public/assets/vs/editor/editor.main.js +768 -0
  122. package/public/assets/vs/editor/editor.main.nls.de.js +17 -0
  123. package/public/assets/vs/editor/editor.main.nls.es.js +17 -0
  124. package/public/assets/vs/editor/editor.main.nls.fr.js +15 -0
  125. package/public/assets/vs/editor/editor.main.nls.it.js +15 -0
  126. package/public/assets/vs/editor/editor.main.nls.ja.js +17 -0
  127. package/public/assets/vs/editor/editor.main.nls.js +15 -0
  128. package/public/assets/vs/editor/editor.main.nls.ko.js +15 -0
  129. package/public/assets/vs/editor/editor.main.nls.ru.js +17 -0
  130. package/public/assets/vs/editor/editor.main.nls.zh-cn.js +17 -0
  131. package/public/assets/vs/editor/editor.main.nls.zh-tw.js +15 -0
  132. package/public/assets/vs/language/css/cssMode.js +13 -0
  133. package/public/assets/vs/language/css/cssWorker.js +77 -0
  134. package/public/assets/vs/language/html/htmlMode.js +13 -0
  135. package/public/assets/vs/language/html/htmlWorker.js +454 -0
  136. package/public/assets/vs/language/json/jsonMode.js +19 -0
  137. package/public/assets/vs/language/json/jsonWorker.js +42 -0
  138. package/public/assets/vs/language/typescript/tsMode.js +20 -0
  139. package/public/assets/vs/language/typescript/tsWorker.js +51328 -0
  140. package/public/assets/vs/loader.js +11 -0
  141. package/public/data-model-item.json +33 -0
  142. package/public/data-model.json +402 -0
  143. package/public/favicon.ico +0 -0
  144. package/public/form-data.json +78 -0
  145. package/public/form-json-schema.ts +33 -0
  146. package/public/form-json.schema.json +79 -0
  147. package/public/image/logo.png +0 -0
  148. package/public/loading.png +0 -0
  149. package/public/logo.svg +3 -0
  150. package/scripts/autoImportServiceTypes.js +40 -0
  151. package/src/App.vue +29 -0
  152. package/src/api/ibsp-bg-app.js +489 -0
  153. package/src/api/ibsp-bg-auth.js +24 -0
  154. package/src/api/ibsp-bg-counter.js +25 -0
  155. package/src/api/ibsp-bg-dataview.js +124 -0
  156. package/src/api/ibsp-bg-form.js +167 -0
  157. package/src/api/ibsp-bg-oss.js +33 -0
  158. package/src/api/ibsp-bg-page.js +158 -0
  159. package/src/api/ibsp-bg-problem.js +13 -0
  160. package/src/api/ibsp-bg-resource.js +30 -0
  161. package/src/api/ibsp-bg-sif.js +24 -0
  162. package/src/api/ibsp-bg-user.js +59 -0
  163. package/src/assets/font/pinia.ttf +0 -0
  164. package/src/assets/img/bg2.jpeg +0 -0
  165. package/src/assets/img/bg3.jpeg +0 -0
  166. package/src/assets/img/haederBg.png +0 -0
  167. package/src/assets/img/haederName.png +0 -0
  168. package/src/assets/img/login-bg.jpg +0 -0
  169. package/src/assets/img/logo.png +0 -0
  170. package/src/assets/img/logo.svg +1 -0
  171. package/src/assets/img/newLogo.png +0 -0
  172. package/src/assets/img/project.jpg +0 -0
  173. package/src/assets/img/wenjian1.png +0 -0
  174. package/src/assets/img/wenjian2.png +0 -0
  175. package/src/assets/img/wenjianjia.png +0 -0
  176. package/src/assets/img//345/272/225/351/203/250.png +0 -0
  177. package/src/assets/img//351/227/201/347/250/277/347/271/210/351/215/224/346/210/246/345/264/225/347/200/265/351/225/220/346/262/252/351/226/272/345/233/251/345/201/237/347/272/276/347/261/2032x.png +0 -0
  178. package/src/assets/img//351/227/201/347/250/277/347/271/210/351/215/224/346/210/246/345/264/225/351/216/276/356/206/274/347/273/251/351/226/270/346/222/262/350/203/266/347/273/261/346/254/2572x.png +0 -0
  179. package/src/assets/video//347/231/273/345/275/225/350/203/214/346/231/257.mp4 +0 -0
  180. package/src/bootstrap.ts +26 -0
  181. package/src/components/common/CascaderContextMenu.vue +82 -0
  182. package/src/components/common/ContextMenuPlus.vue +103 -0
  183. package/src/components/common/DragNavMenu.vue +248 -0
  184. package/src/components/common/NavMenu.vue +203 -0
  185. package/src/components/common/NavMenuId.vue +140 -0
  186. package/src/components/common/PageDrawerPopup.vue +329 -0
  187. package/src/components/common/PageMenuDrag.vue +245 -0
  188. package/src/components/common/SelectAllIcon.vue +202 -0
  189. package/src/components/globals/ColorPicker.vue +261 -0
  190. package/src/components/globals/ContextMenu.vue +143 -0
  191. package/src/components/globals/FormContainer.vue +122 -0
  192. package/src/components/globals/IbspIcon.vue +21 -0
  193. package/src/components/globals/LoginDialog.vue +365 -0
  194. package/src/components/globals/Message.vue +10 -0
  195. package/src/components/globals/SvgIcon.vue +122 -0
  196. package/src/components/ibsp/Cascader.vue +40 -0
  197. package/src/components/ibsp/FromPage.vue +118 -0
  198. package/src/components/ibsp/IbspAddTag.vue +143 -0
  199. package/src/components/ibsp/IbspButton.vue +27 -0
  200. package/src/components/ibsp/IbspColorPicker.vue +252 -0
  201. package/src/components/ibsp/IbspColorSelect.vue +14 -0
  202. package/src/components/ibsp/IbspContextmenu.vue +176 -0
  203. package/src/components/ibsp/IbspDialog.vue +52 -0
  204. package/src/components/ibsp/IbspDrawer.vue +44 -0
  205. package/src/components/ibsp/IbspInput.vue +29 -0
  206. package/src/components/ibsp/IbspMonacoCode.vue +213 -0
  207. package/src/components/ibsp/IbspSearchInput.vue +48 -0
  208. package/src/components/ibsp/IbspSelect.vue +101 -0
  209. package/src/components/ibsp/IbspSlotEvent.ts +64 -0
  210. package/src/components/ibsp/IbspTextInput.vue +41 -0
  211. package/src/components/ibsp/IbspTree.vue +265 -0
  212. package/src/components/ibsp/IbspTree2.vue +118 -0
  213. package/src/components/nextui/BoxSelection/hooks/useBoxSelection.ts +165 -0
  214. package/src/components/nextui/BoxSelection/index.ts +11 -0
  215. package/src/components/nextui/BoxSelection/index.vue +40 -0
  216. package/src/components/nextui/BoxSelection/types.ts +50 -0
  217. package/src/components/nextui/BoxSelection/utils.ts +35 -0
  218. package/src/components/nextui/Contextmenu/index.ts +230 -0
  219. package/src/components/nextui/Contextmenu/menu.vue +256 -0
  220. package/src/components/nextui/DragNode/hooks/useDrag.ts +222 -0
  221. package/src/components/nextui/DragNode/hooks/useRefLine.ts +878 -0
  222. package/src/components/nextui/DragNode/hooks/useResize.ts +182 -0
  223. package/src/components/nextui/DragNode/hooks/useStyle.ts +31 -0
  224. package/src/components/nextui/DragNode/index.ts +11 -0
  225. package/src/components/nextui/DragNode/index.vue +140 -0
  226. package/src/components/nextui/DragNode/types.ts +158 -0
  227. package/src/components/nextui/DragNode/util.ts +135 -0
  228. package/src/components/nextui/SketchRule/SketchRule.vue +176 -0
  229. package/src/components/nextui/SketchRule/components/RulerCanvas.vue +167 -0
  230. package/src/components/nextui/SketchRule/components/RulerLine.vue +150 -0
  231. package/src/components/nextui/SketchRule/hooks/useCanvas.ts +232 -0
  232. package/src/components/nextui/SketchRule/hooks/useRuler.ts +229 -0
  233. package/src/components/nextui/SketchRule/index.ts +10 -0
  234. package/src/components/nextui/SketchRule/props.ts +62 -0
  235. package/src/components/nextui/_utils/index.ts +2 -0
  236. package/src/components/nextui/_utils/tools.ts +12 -0
  237. package/src/components/nextui/_utils/vue/install.ts +11 -0
  238. package/src/components/nextui/button/Button.vue +78 -0
  239. package/src/components/nextui/button/index.ts +8 -0
  240. package/src/components/nextui/drag-grid/index.ts +1 -0
  241. package/src/components/nextui/drag-grid/src/hooks/useDragGrid.ts +219 -0
  242. package/src/components/nextui/drag-grid/src/hooks/useGridSize.ts +3 -0
  243. package/src/components/nextui/drag-grid/src/index.vue +213 -0
  244. package/src/components/nextui/drag-grid/src/props.ts +3 -0
  245. package/src/components/nextui/index.ts +11 -0
  246. package/src/components/nextui/modal/index.ts +8 -0
  247. package/src/components/nextui/modal/index.vue +336 -0
  248. package/src/components/nextui/monacoCode/MonacoCode.vue +71 -0
  249. package/src/components/nextui/monacoCode/config.ts +51 -0
  250. package/src/components/nextui/monacoCode/index.ts +1 -0
  251. package/src/components/nextui/monacoCode/monacoCode.ts +31 -0
  252. package/src/components/nextui/monacoCode/useMonacoCode.ts +116 -0
  253. package/src/components/nextui/nextIcon/Icon.vue +50 -0
  254. package/src/components/nextui/nextIcon/index.ts +7 -0
  255. package/src/components/nextui/tabs/Tabs.vue +170 -0
  256. package/src/components/nextui/tabs/index.ts +8 -0
  257. package/src/components/nextui/verticalMenu/VerticalMenu.vue +100 -0
  258. package/src/components/nextui/verticalMenu/index.ts +8 -0
  259. package/src/components/production/ibsp-icon/index.vue +52 -0
  260. package/src/components/production/index.ts +1 -0
  261. package/src/directives/index.js +21 -0
  262. package/src/directives/modules/v-drag.js +177 -0
  263. package/src/directives/modules/v-resize.js +277 -0
  264. package/src/hooks/useApp.ts +4 -0
  265. package/src/hooks/useClipboard.ts +56 -0
  266. package/src/hooks/useEnv.ts +13 -0
  267. package/src/hooks/useForm.ts +8 -0
  268. package/src/hooks/useKeyboard.ts +188 -0
  269. package/src/hooks/usePage.ts +11 -0
  270. package/src/icons/iconFont/antd/demo.css +539 -0
  271. package/src/icons/iconFont/antd/demo_index.html +13965 -0
  272. package/src/icons/iconFont/antd/iconfont.css +2411 -0
  273. package/src/icons/iconFont/antd/iconfont.js +27 -0
  274. package/src/icons/iconFont/antd/iconfont.json +4202 -0
  275. package/src/icons/iconFont/antd/iconfont.ttf +0 -0
  276. package/src/icons/iconFont/antd/iconfont.woff +0 -0
  277. package/src/icons/iconFont/antd/iconfont.woff2 +0 -0
  278. package/src/icons/iconFont/import.css +1 -0
  279. package/src/icons/iconFont/index.js +10 -0
  280. package/src/icons/svg/default_file.svg +1 -0
  281. package/src/icons/svg/default_folder.svg +1 -0
  282. package/src/icons/svg/default_folder_opened.svg +1 -0
  283. package/src/icons/svg/file_type_css.svg +1 -0
  284. package/src/icons/svg/file_type_js.svg +1 -0
  285. package/src/icons/svg/file_type_json.svg +1 -0
  286. package/src/icons/svg/file_type_vue.svg +1 -0
  287. package/src/icons/svg/if.svg +1 -0
  288. package/src/icons/svg/logo.svg +14 -0
  289. package/src/icons/svg/softLogo.svg +42 -0
  290. package/src/icons/svg//344/270/212/346/217/222/345/205/245/350/241/214.svg +7 -0
  291. package/src/icons/svg//344/270/212/346/254/241.svg +1 -0
  292. package/src/icons/svg//344/270/212/347/247/273.svg +4 -0
  293. package/src/icons/svg//344/270/213/346/213/211/351/200/211/346/213/251.svg +3 -0
  294. package/src/icons/svg//344/270/213/346/217/222/345/205/245/350/241/214.svg +7 -0
  295. package/src/icons/svg//344/270/213/347/247/273.svg +4 -0
  296. package/src/icons/svg//344/270/273/350/246/201/346/214/211/351/222/256.svg +3 -0
  297. package/src/icons/svg//344/272/244/344/272/222/351/205/215/347/275/256.svg +1 -0
  298. package/src/icons/svg//344/277/235/345/255/230.svg +16 -0
  299. package/src/icons/svg//344/277/235/345/255/2302.svg +1 -0
  300. package/src/icons/svg//344/277/241/346/201/257/346/214/211/351/222/256.svg +3 -0
  301. package/src/icons/svg//345/201/234/346/234/272/345/205/254/345/221/212.svg +5 -0
  302. package/src/icons/svg//345/205/263/344/272/216/346/210/221/344/273/254.svg +5 -0
  303. package/src/icons/svg//345/205/266/344/273/226.svg +3 -0
  304. package/src/icons/svg//345/206/205/350/201/224/346/241/206/346/236/266.svg +6 -0
  305. package/src/icons/svg//345/210/206/346/224/257.svg +1 -0
  306. package/src/icons/svg//345/210/207/346/215/242.svg +1 -0
  307. package/src/icons/svg//345/210/240/351/231/244.svg +1 -0
  308. package/src/icons/svg//345/210/240/351/231/244/345/270/203/345/261/200.svg +1 -0
  309. package/src/icons/svg//345/210/240/351/231/244/345/275/223/345/211/215/345/210/227.svg +7 -0
  310. package/src/icons/svg//345/210/240/351/231/244/345/275/223/345/211/215/350/241/214.svg +7 -0
  311. package/src/icons/svg//345/211/252/345/210/207.svg +1 -0
  312. package/src/icons/svg//345/215/225/350/241/214/350/276/223/345/205/245.svg +3 -0
  313. package/src/icons/svg//345/215/225/351/200/211.svg +4 -0
  314. package/src/icons/svg//345/215/241/347/211/207/345/256/271/345/231/250.svg +7 -0
  315. package/src/icons/svg//345/215/241/347/211/207/345/270/203/345/261/200.svg +3 -0
  316. package/src/icons/svg//345/215/261/351/231/251/346/214/211/351/222/256.svg +3 -0
  317. package/src/icons/svg//345/216/206/345/217/262/346/223/215/344/275/234.svg +1 -0
  318. package/src/icons/svg//345/217/226/346/266/210/347/273/204/345/220/210.svg +3 -0
  319. package/src/icons/svg//345/217/260/350/264/246/344/277/241/346/201/257.svg +1 -0
  320. package/src/icons/svg//345/217/263/346/217/222/345/205/245/345/210/227.svg +7 -0
  321. package/src/icons/svg//345/220/221/344/270/213/345/220/210/345/271/266.svg +6 -0
  322. package/src/icons/svg//345/220/221/345/217/263/345/220/210/345/271/266.svg +6 -0
  323. package/src/icons/svg//345/233/276/345/261/202.svg +1 -0
  324. package/src/icons/svg//345/233/276/347/211/207.svg +3 -0
  325. package/src/icons/svg//345/233/276/350/241/250.svg +3 -0
  326. package/src/icons/svg//345/237/272/347/241/200.svg +7 -0
  327. package/src/icons/svg//345/244/215/345/210/266.svg +1 -0
  328. package/src/icons/svg//345/244/215/351/200/211.svg +3 -0
  329. package/src/icons/svg//345/244/232/350/241/214/350/276/223/345/205/245.svg +5 -0
  330. package/src/icons/svg//345/244/247/347/272/262.svg +1 -0
  331. package/src/icons/svg//345/255/220/350/241/250/345/215/225.svg +13 -0
  332. package/src/icons/svg//345/256/253/346/240/274/345/270/203/345/261/200.svg +9 -0
  333. package/src/icons/svg//345/256/271/345/231/250.svg +3 -0
  334. package/src/icons/svg//345/257/206/347/240/201.svg +3 -0
  335. package/src/icons/svg//345/257/274/350/210/252/346/241/206/346/236/266.svg +9 -0
  336. package/src/icons/svg//345/261/236/346/200/247.svg +1 -0
  337. package/src/icons/svg//345/267/246/346/217/222/345/205/245/345/210/227.svg +7 -0
  338. package/src/icons/svg//345/270/203/345/261/200.svg +5 -0
  339. package/src/icons/svg//345/271/263/345/217/260/347/272/247.svg +1 -0
  340. package/src/icons/svg//345/272/224/347/224/250.svg +1 -0
  341. package/src/icons/svg//345/272/224/347/224/250/347/272/247.svg +12 -0
  342. package/src/icons/svg//345/272/225/351/203/250.png +0 -0
  343. package/src/icons/svg//345/274/200/345/205/263.svg +3 -0
  344. package/src/icons/svg//345/274/200/345/217/221/344/270/255.svg +133 -0
  345. package/src/icons/svg//345/274/271/346/200/247/345/270/203/345/261/200.svg +6 -0
  346. package/src/icons/svg//345/274/271/347/252/227.svg +3 -0
  347. package/src/icons/svg//346/210/220/345/212/237/346/214/211/351/222/256.svg +3 -0
  348. package/src/icons/svg//346/211/223/347/240/201/351/230/237/345/210/227.svg +14 -0
  349. package/src/icons/svg//346/212/230/345/217/240/351/235/242/346/235/277.svg +3 -0
  350. package/src/icons/svg//346/213/206/345/210/206/346/210/220/345/210/227.svg +8 -0
  351. package/src/icons/svg//346/213/206/345/210/206/346/210/220/350/241/214.svg +8 -0
  352. package/src/icons/svg//346/216/247/345/210/266/345/217/260.svg +13 -0
  353. package/src/icons/svg//346/217/217/350/277/260/345/210/227/350/241/250.svg +3 -0
  354. package/src/icons/svg//346/224/276/345/244/247.svg +12 -0
  355. package/src/icons/svg//346/225/260/346/215/256.svg +3 -0
  356. package/src/icons/svg//346/225/260/346/215/256/346/272/220/346/250/241/345/236/213.svg +1 -0
  357. package/src/icons/svg//346/225/260/346/215/256/351/205/215/347/275/256.svg +1 -0
  358. package/src/icons/svg//346/226/207/344/273/266/344/270/212/344/274/240.svg +3 -0
  359. package/src/icons/svg//346/226/207/346/234/254.svg +3 -0
  360. package/src/icons/svg//346/226/207/346/234/254/346/214/211/351/222/256.svg +3 -0
  361. package/src/icons/svg//346/226/260/345/242/236/345/270/203/345/261/200.svg +1 -0
  362. package/src/icons/svg//346/226/260/345/242/236/351/241/265/351/235/242.svg +1 -0
  363. package/src/icons/svg//346/226/271/346/263/225/345/272/223.svg +9 -0
  364. package/src/icons/svg//346/227/245/346/234/237/350/214/203/345/233/264.svg +3 -0
  365. package/src/icons/svg//346/227/245/346/234/237/351/200/211/346/213/251.svg +3 -0
  366. package/src/icons/svg//346/227/266/351/227/264/350/214/203/345/233/264.svg +3 -0
  367. package/src/icons/svg//346/227/266/351/227/264/351/200/211/346/213/251.svg +3 -0
  368. package/src/icons/svg//346/230/276/347/244/272.svg +1 -0
  369. package/src/icons/svg//346/234/215/345/212/241/345/231/250.svg +12 -0
  370. package/src/icons/svg//346/235/203/351/231/220.svg +13 -0
  371. package/src/icons/svg//346/240/205/346/240/274/345/270/203/345/261/200.svg +6 -0
  372. package/src/icons/svg//346/240/207/347/255/276/351/241/265.svg +6 -0
  373. package/src/icons/svg//346/240/207/351/242/230.svg +3 -0
  374. package/src/icons/svg//346/240/221/345/275/242.svg +3 -0
  375. package/src/icons/svg//346/243/200/346/265/213/346/217/220/351/206/222.svg +12 -0
  376. package/src/icons/svg//346/250/241/345/236/213/344/273/223/345/272/223.svg +1 -0
  377. package/src/icons/svg//346/250/241/345/236/213/345/217/202/346/225/260.svg +1 -0
  378. package/src/icons/svg//346/250/241/346/235/277/345/272/223.svg +1 -0
  379. package/src/icons/svg//346/255/245/351/252/244/346/235/241.svg +3 -0
  380. package/src/icons/svg//346/267/273/345/212/240/344/270/200/345/210/227.svg +7 -0
  381. package/src/icons/svg//346/267/273/345/212/240/344/270/200/350/241/214.svg +7 -0
  382. package/src/icons/svg//346/270/205/347/251/272.svg +1 -0
  383. package/src/icons/svg//346/273/221/345/235/227.svg +3 -0
  384. package/src/icons/svg//347/202/271/345/207/273.svg +13 -0
  385. package/src/icons/svg//347/211/210/346/234/254.svg +11 -0
  386. package/src/icons/svg//347/211/210/346/234/254/346/233/264/346/226/260.svg +5 -0
  387. package/src/icons/svg//347/247/273/345/212/250/347/253/257/345/257/274/350/210/252/346/241/206/346/236/266.svg +12 -0
  388. package/src/icons/svg//347/251/272/346/225/260/346/215/2562.svg +1 -0
  389. package/src/icons/svg//347/251/277/346/242/255/346/241/206.svg +3 -0
  390. package/src/icons/svg//347/262/230/350/264/264.svg +1 -0
  391. package/src/icons/svg//347/272/247/350/201/224/351/200/211/346/213/251.svg +3 -0
  392. package/src/icons/svg//347/273/204/344/273/266/345/272/223.svg +1 -0
  393. package/src/icons/svg//347/273/204/344/273/266/350/204/232/346/234/254.svg +9 -0
  394. package/src/icons/svg//347/273/204/345/220/210.svg +4 -0
  395. package/src/icons/svg//347/273/223/346/236/234.svg +10 -0
  396. package/src/icons/svg//347/273/230/345/210/266.svg +1 -0
  397. package/src/icons/svg//347/275/256/345/272/225.svg +4 -0
  398. package/src/icons/svg//347/275/256/351/241/266.svg +4 -0
  399. package/src/icons/svg//350/204/232/346/234/254.svg +1 -0
  400. package/src/icons/svg//350/204/232/346/234/2542.svg +1 -0
  401. package/src/icons/svg//350/204/232/346/234/254/345/272/223.svg +9 -0
  402. package/src/icons/svg//350/204/232/346/234/254/351/205/215/347/275/256.svg +1 -0
  403. package/src/icons/svg//350/204/232/346/234/254/351/235/242/346/235/277.svg +13 -0
  404. package/src/icons/svg//350/207/252/347/224/261/345/270/203/345/261/200.svg +7 -0
  405. package/src/icons/svg//350/241/250/345/215/225.svg +3 -0
  406. package/src/icons/svg//350/241/250/345/215/225/345/256/271/345/231/250.svg +9 -0
  407. package/src/icons/svg//350/241/250/345/215/225/347/273/204/344/273/266.svg +1 -0
  408. package/src/icons/svg//350/241/250/345/215/225/351/207/215/345/244/215/350/212/202.svg +10 -0
  409. package/src/icons/svg//350/241/250/346/240/274.svg +7 -0
  410. package/src/icons/svg//350/241/250/346/240/274/345/210/227.svg +8 -0
  411. package/src/icons/svg//350/241/250/346/240/274/345/270/203/345/261/200.svg +8 -0
  412. package/src/icons/svg//350/241/250/346/240/274/350/241/214.svg +8 -0
  413. package/src/icons/svg//350/241/250/350/276/276/345/274/217.svg +1 -0
  414. package/src/icons/svg//350/247/206/351/242/221.svg +3 -0
  415. package/src/icons/svg//350/255/246/345/221/212/346/214/211/351/222/256.svg +3 -0
  416. package/src/icons/svg//350/257/204/345/210/206.svg +3 -0
  417. package/src/icons/svg//350/257/246/347/273/206.svg +1 -0
  418. package/src/icons/svg//350/264/246/345/217/267.svg +3 -0
  419. package/src/icons/svg//350/264/246/345/217/267/345/256/211/345/205/250.svg +12 -0
  420. package/src/icons/svg//350/275/256/346/222/255.svg +3 -0
  421. package/src/icons/svg//350/277/220/350/241/214/350/204/232/346/234/254.svg +12 -0
  422. package/src/icons/svg//350/277/233/345/272/246/346/235/241.svg +3 -0
  423. package/src/icons/svg//351/200/232/347/224/250.svg +11 -0
  424. package/src/icons/svg//351/203/250/351/227/250.svg +3 -0
  425. package/src/icons/svg//351/207/215/345/244/215/350/212/202.svg +3 -0
  426. package/src/icons/svg//351/207/215/345/244/215/350/241/250.svg +3 -0
  427. package/src/icons/svg//351/232/220/350/227/217.svg +1 -0
  428. package/src/icons/svg//351/241/265/351/235/242.svg +1 -0
  429. package/src/icons/svg//351/241/265/351/235/2421.svg +3 -0
  430. package/src/icons/svg//351/241/265/351/235/2422.svg +3 -0
  431. package/src/icons/svg//351/241/265/351/235/2423.svg +1 -0
  432. package/src/icons/svg//351/241/265/351/235/242/345/256/271/345/231/250.svg +7 -0
  433. package/src/icons/svg//351/241/265/351/235/242/351/205/215/347/275/256.svg +1 -0
  434. package/src/icons/svg//351/242/204/350/247/210.svg +1 -0
  435. package/src/icons/svg//351/273/230/350/256/244/346/214/211/351/222/256.svg +3 -0
  436. package/src/libs/drag/index.vue +1546 -0
  437. package/src/libs/drag/utils/dom.js +60 -0
  438. package/src/libs/drag/utils/fns.js +39 -0
  439. package/src/libs/drag/vue-draggable-resizable.css +102 -0
  440. package/src/libs/ibspForm/FormMaking.common.js +29452 -0
  441. package/src/libs/ibspForm/FormMaking.css +10 -0
  442. package/src/libs/ibspForm/FormMaking.umd.js +29456 -0
  443. package/src/libs/ibspForm/FormMaking.umd.min.js +29441 -0
  444. package/src/libs/ibspForm/demo.html +10 -0
  445. package/src/libs/ibspForm/fonts/iconfont.122c3730.woff2 +0 -0
  446. package/src/libs/ibspForm/fonts/iconfont.2a264583.woff +0 -0
  447. package/src/libs/ibspForm/fonts/iconfont.3e777971.ttf +0 -0
  448. package/src/libs/uni/uni.webview.1.5.5.js +58 -0
  449. package/src/libs/vanilla-js-wheel-zoom/calculator.js +103 -0
  450. package/src/libs/vanilla-js-wheel-zoom/default-options.js +52 -0
  451. package/src/libs/vanilla-js-wheel-zoom/observers/AbstractObserver.js +51 -0
  452. package/src/libs/vanilla-js-wheel-zoom/observers/DragScrollableObserver.js +103 -0
  453. package/src/libs/vanilla-js-wheel-zoom/observers/InteractionObserver.js +122 -0
  454. package/src/libs/vanilla-js-wheel-zoom/observers/PinchToZoomObserver.js +86 -0
  455. package/src/libs/vanilla-js-wheel-zoom/toolkit.js +121 -0
  456. package/src/libs/vanilla-js-wheel-zoom/wheel-zoom.js +446 -0
  457. package/src/libs/vuedraggable/core/componentBuilderHelper.js +47 -0
  458. package/src/libs/vuedraggable/core/componentStructure.js +69 -0
  459. package/src/libs/vuedraggable/core/renderHelper.js +57 -0
  460. package/src/libs/vuedraggable/core/sortableEvents.js +18 -0
  461. package/src/libs/vuedraggable/util/console.js +9 -0
  462. package/src/libs/vuedraggable/util/htmlHelper.js +15 -0
  463. package/src/libs/vuedraggable/util/string.js +12 -0
  464. package/src/libs/vuedraggable/util/tags.js +138 -0
  465. package/src/libs/vuedraggable/vuedraggable.js +317 -0
  466. package/src/libs/vuejs-loadmore/icon/index.js +3 -0
  467. package/src/libs/vuejs-loadmore/icon/loading.scss +59 -0
  468. package/src/libs/vuejs-loadmore/icon/loading.vue +21 -0
  469. package/src/libs/vuejs-loadmore/index.js +18 -0
  470. package/src/libs/vuejs-loadmore/locale/index.js +32 -0
  471. package/src/libs/vuejs-loadmore/locale/lang/en-US.js +13 -0
  472. package/src/libs/vuejs-loadmore/locale/lang/zh-CN.js +13 -0
  473. package/src/libs/vuejs-loadmore/mixins/bind-event.js +21 -0
  474. package/src/libs/vuejs-loadmore/mixins/timer.js +22 -0
  475. package/src/libs/vuejs-loadmore/mixins/touch.js +58 -0
  476. package/src/libs/vuejs-loadmore/style/var.scss +23 -0
  477. package/src/libs/vuejs-loadmore/utils/event.js +20 -0
  478. package/src/libs/vuejs-loadmore/utils/getDeepValByKey.js +14 -0
  479. package/src/libs/vuejs-loadmore/utils/scroll.js +30 -0
  480. package/src/libs/vuejs-loadmore/utils/throttle.js +39 -0
  481. package/src/libs/vuejs-loadmore/vuejs-loadmore/index.scss +39 -0
  482. package/src/libs/vuejs-loadmore/vuejs-loadmore/index.vue +317 -0
  483. package/src/main.ts +85 -0
  484. package/src/models/app/ComponentLib.ts +189 -0
  485. package/src/models/app/IbspApp.ts +362 -0
  486. package/src/models/app/_utils.ts +38 -0
  487. package/src/models/app/app.d.ts +118 -0
  488. package/src/models/app/index.ts +2 -0
  489. package/src/models/app/uni/index.ts +1 -0
  490. package/src/models/app/uni/useUniAction.ts +174 -0
  491. package/src/models/command/CommandTypes.d.ts +24 -0
  492. package/src/models/command/index.ts +40 -0
  493. package/src/models/component/index.ts +56 -0
  494. package/src/models/dataModel/index.ts +243 -0
  495. package/src/models/dataModel/models/CategoryDict.ts +35 -0
  496. package/src/models/dataModel/models/DataSource.ts +181 -0
  497. package/src/models/dataModel/models/DataView.ts +132 -0
  498. package/src/models/dataModel/models/Script.ts +15 -0
  499. package/src/models/dataModel/models/ServiceInterface.ts +114 -0
  500. package/src/models/dataModel/models/Static.ts +24 -0
  501. package/src/models/dataModel/types/DataSource.d.ts +70 -0
  502. package/src/models/disabledState/StateTypes.d.ts +12 -0
  503. package/src/models/disabledState/index.ts +45 -0
  504. package/src/models/dynamicValues/index.ts +1 -0
  505. package/src/models/index.ts +6 -0
  506. package/src/models/page/IbspForm.ts +67 -0
  507. package/src/models/page/IbspPage.ts +571 -0
  508. package/src/models/page/data/api.ts +24 -0
  509. package/src/models/page/data/utils.ts +214 -0
  510. package/src/models/page/index.ts +3 -0
  511. package/src/models/script/index.ts +1 -0
  512. package/src/models/service/index.ts +35 -0
  513. package/src/models/tools/ComponentEvent.ts +42 -0
  514. package/src/models/tools/IbspEvents.ts +40 -0
  515. package/src/models/tools/IbspPageTools.ts +35 -0
  516. package/src/models/useComponentModel.js +1271 -0
  517. package/src/models/useConsole.ts +135 -0
  518. package/src/models/useDynamicValueModel.js +576 -0
  519. package/src/models/useEditorEnv.ts +55 -0
  520. package/src/models/useGlobalEvents.ts +44 -0
  521. package/src/models/useHistoryStackModel.ts +949 -0
  522. package/src/models/useJavascriptAnalysis.js +501 -0
  523. package/src/models/usePageModel.js +1087 -0
  524. package/src/models/useStack.ts +41 -0
  525. package/src/prodModels/index.ts +1 -0
  526. package/src/prodModels/useGlobalEvent/events.ts +7 -0
  527. package/src/prodModels/useGlobalEvent/index.ts +54 -0
  528. package/src/router/hooks/useGuard.ts +16 -0
  529. package/src/router/hooks/useJumpTo.ts +39 -0
  530. package/src/router/index.ts +62 -0
  531. package/src/router/meta.d.ts +7 -0
  532. package/src/stores/index.ts +3 -0
  533. package/src/stores/useComponentStore.ts +250 -0
  534. package/src/stores/usePlatformLibStore.js +212 -0
  535. package/src/stores/usePlatformStore.js +299 -0
  536. package/src/styles/global.less +516 -0
  537. package/src/styles/index-preview.ts +2 -0
  538. package/src/styles/index.ts +4 -0
  539. package/src/styles/reset.css +142 -0
  540. package/src/styles/theme/antdui.less +12 -0
  541. package/src/styles/theme/default-ui.less +9 -0
  542. package/src/styles/theme/elementui.less +178 -0
  543. package/src/styles/theme/index.less +4 -0
  544. package/src/styles/theme/nextui.less +550 -0
  545. package/src/types/config.d.ts +107 -0
  546. package/src/types/config2.d.ts +97 -0
  547. package/src/types/global.d.ts +90 -0
  548. package/src/types/ibsp.d.ts +112 -0
  549. package/src/types/index.ts +1 -0
  550. package/src/types/module.d.ts +105 -0
  551. package/src/types/platform.ts +19 -0
  552. package/src/types/service.d.ts +28 -0
  553. package/src/utils/config.ts +54 -0
  554. package/src/utils/configData.js +170 -0
  555. package/src/utils/dataProcess.js +0 -0
  556. package/src/utils/index.js +558 -0
  557. package/src/utils/request.js +82 -0
  558. package/src/utils/toolFuns.ts +11 -0
  559. package/src/views/builtins/components/message/Index.vue +104 -0
  560. package/src/views/builtins/error/404.vue +527 -0
  561. package/src/views/builtins/index.ts +136 -0
  562. package/src/views/builtins/login/MobileIndex.vue +496 -0
  563. package/src/views/builtins/login/MobileIndex_v1.vue +259 -0
  564. package/src/views/builtins/login/MobileIndex_v2.vue +421 -0
  565. package/src/views/builtins/login/WindowIndex.vue +288 -0
  566. package/src/views/builtins/login/mobile/svgData.js +67 -0
  567. package/src/views/builtins/login/useLogin.ts +63 -0
  568. package/src/views/builtins/message/MobileIndex.vue +309 -0
  569. package/src/views/builtins/message/mobile/svgData.js +28 -0
  570. package/src/views/builtins/my/MobileIndex.vue +508 -0
  571. package/src/views/builtins/my/index.vue +69 -0
  572. package/src/views/builtins/my/mobile/about/index.vue +16 -0
  573. package/src/views/builtins/my/mobile/account/Index.vue +129 -0
  574. package/src/views/builtins/my/mobile/auth/index.vue +16 -0
  575. package/src/views/builtins/my/mobile/password/Index.vue +352 -0
  576. package/src/views/builtins/my/mobile/password/svgData.js +67 -0
  577. package/src/views/builtins/my/mobile/problem/Index.vue +573 -0
  578. package/src/views/builtins/my/mobile/problem/svgData.js +26 -0
  579. package/src/views/builtins/my/mobile/server/Server.vue +152 -0
  580. package/src/views/builtins/my/mobile/setting/index.vue +16 -0
  581. package/src/views/builtins/my/mobile/svgData.js +263 -0
  582. package/src/views/builtins/my/mobile/switch-account/component/UserAvatar.vue +95 -0
  583. package/src/views/builtins/my/mobile/switch-account/index.vue +107 -0
  584. package/src/views/builtins/util/userAccout.ts +33 -0
  585. package/src/views/designer/components/BindValueConfig/components/Component.vue +38 -0
  586. package/src/views/designer/components/BindValueConfig/components/Const.vue +36 -0
  587. package/src/views/designer/components/BindValueConfig/components/Var.vue +38 -0
  588. package/src/views/designer/components/BindValueConfig/index.vue +115 -0
  589. package/src/views/designer/components/DragMenu.vue +135 -0
  590. package/src/views/designer/components/DrawerLodding.vue +69 -0
  591. package/src/views/designer/components/FloatModuleCard.vue +136 -0
  592. package/src/views/designer/components/PlatformLibLayout.vue +238 -0
  593. package/src/views/designer/components/ScriptPopup.vue +8 -0
  594. package/src/views/designer/components/drag/index.vue +1546 -0
  595. package/src/views/designer/components/drag/utils/dom.js +60 -0
  596. package/src/views/designer/components/drag/utils/fns.js +39 -0
  597. package/src/views/designer/components/drag/vue-draggable-resizable.css +102 -0
  598. package/src/views/designer/hooks/keyboardModule/index.js +43 -0
  599. package/src/views/designer/hooks/keyboardModule/modules/cvx.js +543 -0
  600. package/src/views/designer/hooks/keyboardModule/modules/del.js +47 -0
  601. package/src/views/designer/hooks/keyboardModule/modules/direction.js +38 -0
  602. package/src/views/designer/hooks/keyboardModule/modules/redo.js +22 -0
  603. package/src/views/designer/hooks/keyboardModule/modules/undo.js +12 -0
  604. package/src/views/designer/hooks/useConfigComponent.js +28 -0
  605. package/src/views/designer/hooks/useInitPage.ts +60 -0
  606. package/src/views/designer/hooks/useKeyboard.js +51 -0
  607. package/src/views/designer/hooks/usePageFloatMenu.js +137 -0
  608. package/src/views/designer/hooks/usePageValueData.js +92 -0
  609. package/src/views/designer/hooks/usePullDrag.js +160 -0
  610. package/src/views/designer/hooks/useRegisterKeyboard.js +328 -0
  611. package/src/views/designer/index.ts +3 -0
  612. package/src/views/designer/index.vue +121 -0
  613. package/src/views/designer/layout/FrameworkLayout.vue +542 -0
  614. package/src/views/designer/layout/LayoutDefault.vue +299 -0
  615. package/src/views/designer/layout/LayoutNextUi.vue +18 -0
  616. package/src/views/designer/layout/index.vue +54 -0
  617. package/src/views/designer/modules/canvas/canvas.service.ts +62 -0
  618. package/src/views/designer/modules/canvas/index.ts +4 -0
  619. package/src/views/designer/modules/canvas/src/CanvasHeaderTools.vue +409 -0
  620. package/src/views/designer/modules/canvas/src/components/AliginButtons.vue +120 -0
  621. package/src/views/designer/modules/canvas/src/components/GroupButton.vue +76 -0
  622. package/src/views/designer/modules/canvas/src/components/HistoryButton.vue +80 -0
  623. package/src/views/designer/modules/canvas/src/components/SortIndex.vue +86 -0
  624. package/src/views/designer/modules/canvas/src/components/toolbarPanel.vue +194 -0
  625. package/src/views/designer/modules/canvas/src/hooks/commonDisabledState.ts +42 -0
  626. package/src/views/designer/modules/canvas/src/hooks/commonMethods.ts +167 -0
  627. package/src/views/designer/modules/canvas/src/hooks/useAligin.ts +239 -0
  628. package/src/views/designer/modules/canvas/src/hooks/useCanvas copy.ts +117 -0
  629. package/src/views/designer/modules/canvas/src/hooks/useCanvas.ts +39 -0
  630. package/src/views/designer/modules/canvas/src/hooks/useGroup.ts +121 -0
  631. package/src/views/designer/modules/canvas/src/hooks/useHistory.ts +37 -0
  632. package/src/views/designer/modules/canvas/src/hooks/useSketchRuler.ts +167 -0
  633. package/src/views/designer/modules/canvas/src/hooks/useSortIndex.ts +147 -0
  634. package/src/views/designer/modules/canvas/src/hooks/useTranslate.ts +20 -0
  635. package/src/views/designer/modules/canvas/src/index.vue +600 -0
  636. package/src/views/designer/modules/canvas/src/scroll/index.vue +46 -0
  637. package/src/views/designer/modules/canvas/src/scroll/scroll.ts +230 -0
  638. package/src/views/designer/modules/config-data/dataConfig.service.ts +3 -0
  639. package/src/views/designer/modules/config-data/index.ts +3 -0
  640. package/src/views/designer/modules/config-data/src/index.vue +49 -0
  641. package/src/views/designer/modules/config-interactive/index.ts +4 -0
  642. package/src/views/designer/modules/config-interactive/interactive.service.ts +459 -0
  643. package/src/views/designer/modules/config-interactive/src/actionConfig/componentAction/RefreshComponent.js +46 -0
  644. package/src/views/designer/modules/config-interactive/src/actionConfig/componentAction/RefreshData.js +33 -0
  645. package/src/views/designer/modules/config-interactive/src/actionConfig/componentAction/SaveForm.js +130 -0
  646. package/src/views/designer/modules/config-interactive/src/actionConfig/componentAction/ShowHidden.js +60 -0
  647. package/src/views/designer/modules/config-interactive/src/actionConfig/formAction/ChangeFormMode.js +64 -0
  648. package/src/views/designer/modules/config-interactive/src/actionConfig/formAction/GetFormModel.js +40 -0
  649. package/src/views/designer/modules/config-interactive/src/actionConfig/formAction/SaveFormModel.js +40 -0
  650. package/src/views/designer/modules/config-interactive/src/actionConfig/formAction/SetFormModel.js +91 -0
  651. package/src/views/designer/modules/config-interactive/src/actionConfig/index.js +52 -0
  652. package/src/views/designer/modules/config-interactive/src/actionConfig/linkAction/AppOpenLink.js +110 -0
  653. package/src/views/designer/modules/config-interactive/src/actionConfig/linkAction/FrameOpenLink.js +117 -0
  654. package/src/views/designer/modules/config-interactive/src/actionConfig/linkAction/PlatformOutsideLink.js +119 -0
  655. package/src/views/designer/modules/config-interactive/src/actionConfig/linkAction/PlatformWithinLink.js +107 -0
  656. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/ClosePopup.js +31 -0
  657. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/ExecuteScript.js +37 -0
  658. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/GetCounterValue.js +67 -0
  659. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/ModalOpen.js +115 -0
  660. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/OpenMessage.js +95 -0
  661. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/RequestInterface.js +57 -0
  662. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/SetComponentValue.js +83 -0
  663. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/TriggerEvent.js +54 -0
  664. package/src/views/designer/modules/config-interactive/src/actionConfig/outerAction/VariableAssignment.js +145 -0
  665. package/src/views/designer/modules/config-interactive/src/components/ConditionPopup.vue +880 -0
  666. package/src/views/designer/modules/config-interactive/src/components/ConfigActionIndex.vue +218 -0
  667. package/src/views/designer/modules/config-interactive/src/components/IbspActionConfig.vue +210 -0
  668. package/src/views/designer/modules/config-interactive/src/components/IbspInteractivceList.vue +553 -0
  669. package/src/views/designer/modules/config-interactive/src/components/IbspInteractivePanel.vue +253 -0
  670. package/src/views/designer/modules/config-interactive/src/components/PopUpContainer.vue +61 -0
  671. package/src/views/designer/modules/config-interactive/src/components/SelectInteractiveList.vue +112 -0
  672. package/src/views/designer/modules/config-interactive/src/hooks/useEventAction.js +61 -0
  673. package/src/views/designer/modules/config-interactive/src/hooks/useInteractiveContext.ts +77 -0
  674. package/src/views/designer/modules/config-interactive/src/index.vue +382 -0
  675. package/src/views/designer/modules/config-interactive/src/stores/interactiveData.js +106 -0
  676. package/src/views/designer/modules/config-interactive/src/stores/interactiveDataPlus.js +36 -0
  677. package/src/views/designer/modules/config-page/index.ts +3 -0
  678. package/src/views/designer/modules/config-page/pageConfig.service.ts +1 -0
  679. package/src/views/designer/modules/config-page/src/config.js +652 -0
  680. package/src/views/designer/modules/config-page/src/index.vue +120 -0
  681. package/src/views/designer/modules/config-props/index.ts +3 -0
  682. package/src/views/designer/modules/config-props/propsConfig.service.ts +1 -0
  683. package/src/views/designer/modules/config-props/src/CommonConfig.vue +576 -0
  684. package/src/views/designer/modules/config-props/src/ScriptConfig.vue +67 -0
  685. package/src/views/designer/modules/config-props/src/components/Background.vue +372 -0
  686. package/src/views/designer/modules/config-props/src/components/BorderPlus.vue +128 -0
  687. package/src/views/designer/modules/config-props/src/components/Collapse.vue +137 -0
  688. package/src/views/designer/modules/config-props/src/components/Input.vue +262 -0
  689. package/src/views/designer/modules/config-props/src/components/Radio.vue +108 -0
  690. package/src/views/designer/modules/config-props/src/components/Switch.vue +57 -0
  691. package/src/views/designer/modules/config-props/src/index.vue +82 -0
  692. package/src/views/designer/modules/data-model/index.ts +3 -0
  693. package/src/views/designer/modules/data-model/src/components/CategoryDict.vue +144 -0
  694. package/src/views/designer/modules/data-model/src/components/DataModel.vue +638 -0
  695. package/src/views/designer/modules/data-model/src/components/DataModel2.vue +583 -0
  696. package/src/views/designer/modules/data-model/src/components/DataView.vue +169 -0
  697. package/src/views/designer/modules/data-model/src/components/EditScript.vue +83 -0
  698. package/src/views/designer/modules/data-model/src/components/EditTable.vue +208 -0
  699. package/src/views/designer/modules/data-model/src/components/FieldsGroup.vue +199 -0
  700. package/src/views/designer/modules/data-model/src/components/ParamSelect.vue +64 -0
  701. package/src/views/designer/modules/data-model/src/components/ScriptConfig.vue +53 -0
  702. package/src/views/designer/modules/data-model/src/components/ScriptData.vue +62 -0
  703. package/src/views/designer/modules/data-model/src/components/ServiceInterface.vue +248 -0
  704. package/src/views/designer/modules/data-model/src/components/Static.vue +236 -0
  705. package/src/views/designer/modules/data-model/src/components/TestData.vue +39 -0
  706. package/src/views/designer/modules/data-model/src/components/filter-data/components/MoreConfig.vue +121 -0
  707. package/src/views/designer/modules/data-model/src/components/filter-data/components/select-field/index.vue +337 -0
  708. package/src/views/designer/modules/data-model/src/components/filter-data/components/select-field/useSelectField.ts +104 -0
  709. package/src/views/designer/modules/data-model/src/components/filter-data/index.vue +140 -0
  710. package/src/views/designer/modules/data-model/src/hooks/useModelConfig.ts +98 -0
  711. package/src/views/designer/modules/data-model/src/hooks/useModelDefaultValue.ts +153 -0
  712. package/src/views/designer/modules/data-model/src/index.vue +374 -0
  713. package/src/views/designer/modules/data-model/src/types/model.d.ts +144 -0
  714. package/src/views/designer/modules/headerWidgetModule/HeaderWidgetIndex.vue +937 -0
  715. package/src/views/designer/modules/headerWidgetModule/components/CodeEditor.vue +315 -0
  716. package/src/views/designer/modules/headerWidgetModule/components/DirectionTooltip.vue +164 -0
  717. package/src/views/designer/modules/headerWidgetModule/components/DirectionTooltipComponent.vue +164 -0
  718. package/src/views/designer/modules/headerWidgetModule/components/MirrorTextArea.vue +73 -0
  719. package/src/views/designer/modules/headerWidgetModule/components/PlatformLibLayout.vue +238 -0
  720. package/src/views/designer/modules/headerWidgetModule/components/quoteConfig/components/configCenter.vue +51 -0
  721. package/src/views/designer/modules/headerWidgetModule/components/quoteConfig/index.vue +89 -0
  722. package/src/views/designer/modules/headerWidgetModule/constantLib/index.vue +433 -0
  723. package/src/views/designer/modules/headerWidgetModule/dataSource/components/CategoryDict.vue +141 -0
  724. package/src/views/designer/modules/headerWidgetModule/dataSource/components/DataModel.vue +638 -0
  725. package/src/views/designer/modules/headerWidgetModule/dataSource/components/DataModel2.vue +455 -0
  726. package/src/views/designer/modules/headerWidgetModule/dataSource/components/DataView.vue +233 -0
  727. package/src/views/designer/modules/headerWidgetModule/dataSource/components/EditTable.vue +208 -0
  728. package/src/views/designer/modules/headerWidgetModule/dataSource/components/FieldsGroup.vue +199 -0
  729. package/src/views/designer/modules/headerWidgetModule/dataSource/components/ScriptConfig.vue +53 -0
  730. package/src/views/designer/modules/headerWidgetModule/dataSource/components/ScriptData.vue +63 -0
  731. package/src/views/designer/modules/headerWidgetModule/dataSource/components/ServiceInterface.vue +287 -0
  732. package/src/views/designer/modules/headerWidgetModule/dataSource/components/Static.vue +170 -0
  733. package/src/views/designer/modules/headerWidgetModule/dataSource/components/TestData.vue +33 -0
  734. package/src/views/designer/modules/headerWidgetModule/dataSource/hooks/useLeaveParams.ts +26 -0
  735. package/src/views/designer/modules/headerWidgetModule/dataSource/hooks/useUtils.js +53 -0
  736. package/src/views/designer/modules/headerWidgetModule/dataSource/index.vue +471 -0
  737. package/src/views/designer/modules/headerWidgetModule/designerConfig/index.vue +15 -0
  738. package/src/views/designer/modules/headerWidgetModule/globalVarLib/index.vue +471 -0
  739. package/src/views/designer/modules/headerWidgetModule/iconLib/index.vue +346 -0
  740. package/src/views/designer/modules/headerWidgetModule/materialLib/index.vue +901 -0
  741. package/src/views/designer/modules/headerWidgetModule/methodLib/index.vue +551 -0
  742. package/src/views/designer/modules/headerWidgetModule/scriptLib/index.vue +415 -0
  743. package/src/views/designer/modules/ibsp-component-lib/componentLib.service.ts +17 -0
  744. package/src/views/designer/modules/ibsp-component-lib/index.ts +5 -0
  745. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/index.ts +5 -0
  746. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/ComponentDes.vue +175 -0
  747. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/ComponentPre.vue +84 -0
  748. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/FormItemComponent.vue +314 -0
  749. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/FormItemComponentPre.vue +154 -0
  750. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/components/middleware/useContextModel.ts +30 -0
  751. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/hooks/useCommonFuns.ts +91 -0
  752. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/hooks/useComponentContext.ts +304 -0
  753. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/hooks/useFormDropComponent.ts +69 -0
  754. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/hooks/useFromItemDnD.ts +264 -0
  755. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/index.js +47 -0
  756. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/content-container/ContentContainerDes.vue +56 -0
  757. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/content-container/ContentContainerPre.vue +32 -0
  758. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/content-container/index.vue +33 -0
  759. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/index.vue +80 -0
  760. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/vueDrag/index.vue +1362 -0
  761. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/vueDrag/utils/dom.js +60 -0
  762. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/vueDrag/utils/fns.js +39 -0
  763. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/drag-container/vueDrag/vue-draggable-resizable.css +125 -0
  764. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/builtinContainer/index.ts +4 -0
  765. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/Template.vue +214 -0
  766. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/config/config.js +37 -0
  767. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/config/data.js +191 -0
  768. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/config/props.js +150 -0
  769. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/card/index.vue +32 -0
  770. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/data/config.js +49 -0
  771. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/data/index.vue +205 -0
  772. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/data/utils.ts +20 -0
  773. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/RenderComponent.vue +33 -0
  774. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/config.ts +25 -0
  775. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/form-item/config.ts +25 -0
  776. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/form-item/index.vue +72 -0
  777. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/index.vue +248 -0
  778. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/sub-form/RenderComponent.vue +328 -0
  779. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/sub-form/config.ts +30 -0
  780. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/formContainer/sub-form/index.vue +217 -0
  781. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/mobileNavFrame/components/MobileMenu.vue +107 -0
  782. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/mobileNavFrame/config.js +151 -0
  783. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/mobileNavFrame/index.vue +789 -0
  784. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/mobileNavFrame/utils/uni.webview.1.5.5.js +58 -0
  785. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/components/AddMenuConfig.vue +320 -0
  786. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/components/Header.vue +139 -0
  787. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/components/IMenu.vue +65 -0
  788. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/config.ts +25 -0
  789. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/prop/aside.ts +41 -0
  790. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/prop/header.ts +139 -0
  791. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/prop/index.ts +12 -0
  792. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/config/prop/nav.ts +143 -0
  793. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/hooks/useAppMenus.js +164 -0
  794. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigation-framework-v2/index.vue +100 -0
  795. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/SystemNavComponent.vue +810 -0
  796. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/components/AddMenuConfig.vue +322 -0
  797. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/components/MyElMenu.vue +59 -0
  798. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/config.js +283 -0
  799. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/hooks/useAppMenus.js +164 -0
  800. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/navigationFrame/index.vue +74 -0
  801. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/pageContainer/config.js +127 -0
  802. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/container/pageContainer/index.vue +135 -0
  803. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/BaseContainer.vue +90 -0
  804. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/hooks/useAddComponent.ts +69 -0
  805. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/hooks/useContainerDnD.ts +79 -0
  806. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/index.ts +3 -0
  807. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/types/containerProps.ts +46 -0
  808. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/core/types/dnd.ts +17 -0
  809. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/flexLayout/RenderComponent.vue +33 -0
  810. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/flexLayout/config.js +691 -0
  811. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/flexLayout/index.vue +344 -0
  812. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/grid-drag-layout/config.js +26 -0
  813. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/grid-drag-layout/hooks/useDragGrid.ts +3 -0
  814. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/grid-drag-layout/index.vue +40 -0
  815. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/config.ts +36 -0
  816. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/gird-row/config.ts +37 -0
  817. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/gird-row/index.vue +173 -0
  818. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/gird-row/render.vue +56 -0
  819. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/grid-col/config.ts +51 -0
  820. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/grid-col/index.vue +105 -0
  821. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/grid-col/render.vue +34 -0
  822. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/index.vue +154 -0
  823. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/render.vue +65 -0
  824. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/types/grid.ts +15 -0
  825. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/gridLayout/types/gridProps.ts +126 -0
  826. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/PreviewComponent.vue +101 -0
  827. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/PreviewGroup.vue +71 -0
  828. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/SectionGroup.vue +627 -0
  829. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/SectionGroup4_back.vue +388 -0
  830. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/SectionGroup_back.vue +503 -0
  831. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/MergeBox.vue +294 -0
  832. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/SectionTools.vue +0 -0
  833. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/vueDrag/index.vue +1360 -0
  834. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/vueDrag/utils/dom.js +60 -0
  835. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/vueDrag/utils/fns.js +39 -0
  836. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/components/vueDrag/vue-draggable-resizable.css +125 -0
  837. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/config.js +117 -0
  838. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/group-config.js +26 -0
  839. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/index.vue +1200 -0
  840. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/section.js +67 -0
  841. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/sectionLayout/section.service.ts +7 -0
  842. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/config.ts +28 -0
  843. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/hooks/useColActions.ts +244 -0
  844. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/index.vue +218 -0
  845. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/render.vue +97 -0
  846. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-col/config.ts +41 -0
  847. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-col/index.vue +69 -0
  848. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-col/render.vue +47 -0
  849. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-row/config.ts +25 -0
  850. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-row/index.vue +78 -0
  851. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/table-row/render.vue +38 -0
  852. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/types/table.ts +15 -0
  853. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/modules/layout/tableLayout/types/tableProps.ts +87 -0
  854. package/src/views/designer/modules/ibsp-component-lib/src/componentLibs/types/props.d.ts +12 -0
  855. package/src/views/designer/modules/ibsp-component-lib/src/components/ColorPalette.vue +394 -0
  856. package/src/views/designer/modules/ibsp-component-lib/src/index.vue +530 -0
  857. package/src/views/designer/modules/ibsp-config/ConfigIndex.vue +222 -0
  858. package/src/views/designer/modules/ibsp-config/builtinComponents/DataModel.jsx +65 -0
  859. package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/batchGroup.ts +8 -0
  860. package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectComponents.ts +22 -0
  861. package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectDataModel.ts +9 -0
  862. package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectForms.ts +14 -0
  863. package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectPages.ts +14 -0
  864. package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectScript.ts +46 -0
  865. package/src/views/designer/modules/ibsp-config/commonlyConfig/configs/selectVars.ts +32 -0
  866. package/src/views/designer/modules/ibsp-config/commonlyConfig/configs.d.ts +5 -0
  867. package/src/views/designer/modules/ibsp-config/commonlyConfig/index.ts +7 -0
  868. package/src/views/designer/modules/ibsp-config/components/BuiltinFormItems.vue +82 -0
  869. package/src/views/designer/modules/ibsp-config/components/CollapseItem.vue +23 -0
  870. package/src/views/designer/modules/ibsp-config/components/ExpressionPopup.vue +357 -0
  871. package/src/views/designer/modules/ibsp-config/components/FormItem.vue +201 -0
  872. package/src/views/designer/modules/ibsp-config/components/InterfaceParam.vue +714 -0
  873. package/src/views/designer/modules/ibsp-config/components/ResourcePopup.vue +319 -0
  874. package/src/views/designer/modules/ibsp-config/components/dynamicValueBindingModule/DynamicValuePlusIndex.vue +283 -0
  875. package/src/views/designer/modules/ibsp-config/components/dynamicValueBindingModule/index.vue +266 -0
  876. package/src/views/designer/modules/ibsp-config/components/staticTable/ContextMenu.vue +107 -0
  877. package/src/views/designer/modules/ibsp-config/components/staticTable/index.vue +264 -0
  878. package/src/views/designer/modules/ibsp-config/components/staticTable/upload.vue +60 -0
  879. package/src/views/designer/modules/ibsp-config/config.service.ts +17 -0
  880. package/src/views/designer/modules/ibsp-config/configComponentLibs/Button.vue +56 -0
  881. package/src/views/designer/modules/ibsp-config/configComponentLibs/CascaderSelect.vue +83 -0
  882. package/src/views/designer/modules/ibsp-config/configComponentLibs/CateTreeList.vue +571 -0
  883. package/src/views/designer/modules/ibsp-config/configComponentLibs/Checkbox.vue +57 -0
  884. package/src/views/designer/modules/ibsp-config/configComponentLibs/Collapse.vue +163 -0
  885. package/src/views/designer/modules/ibsp-config/configComponentLibs/Color.vue +57 -0
  886. package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/RadioConfig.vue +11 -0
  887. package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/RegionalSelectionConfig.vue +159 -0
  888. package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/SelectConfig.vue +599 -0
  889. package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/components/table.vue +51 -0
  890. package/src/views/designer/modules/ibsp-config/configComponentLibs/ControlConfig/index.vue +62 -0
  891. package/src/views/designer/modules/ibsp-config/configComponentLibs/DataColumns.vue +171 -0
  892. package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/CategoryDict.vue +67 -0
  893. package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/DataView.vue +124 -0
  894. package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/EditTable.vue +209 -0
  895. package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/ScriptConfig.vue +48 -0
  896. package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/ServiceInterface.vue +130 -0
  897. package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/components/Static.vue +141 -0
  898. package/src/views/designer/modules/ibsp-config/configComponentLibs/DataSource/index.vue +122 -0
  899. package/src/views/designer/modules/ibsp-config/configComponentLibs/Dialog.vue +147 -0
  900. package/src/views/designer/modules/ibsp-config/configComponentLibs/DragTabs.vue +836 -0
  901. package/src/views/designer/modules/ibsp-config/configComponentLibs/Drawer.vue +61 -0
  902. package/src/views/designer/modules/ibsp-config/configComponentLibs/DynamicDataValue.vue +120 -0
  903. package/src/views/designer/modules/ibsp-config/configComponentLibs/Expression/hooks/useWhere.ts +67 -0
  904. package/src/views/designer/modules/ibsp-config/configComponentLibs/Expression/index.vue +679 -0
  905. package/src/views/designer/modules/ibsp-config/configComponentLibs/FormItem.vue +133 -0
  906. package/src/views/designer/modules/ibsp-config/configComponentLibs/Input.vue +205 -0
  907. package/src/views/designer/modules/ibsp-config/configComponentLibs/InputNumber.vue +101 -0
  908. package/src/views/designer/modules/ibsp-config/configComponentLibs/InterfaceParamConfig.vue +51 -0
  909. package/src/views/designer/modules/ibsp-config/configComponentLibs/Modal.vue +84 -0
  910. package/src/views/designer/modules/ibsp-config/configComponentLibs/MonacoEditor.vue +108 -0
  911. package/src/views/designer/modules/ibsp-config/configComponentLibs/ParamConfig.vue +501 -0
  912. package/src/views/designer/modules/ibsp-config/configComponentLibs/Position.vue +94 -0
  913. package/src/views/designer/modules/ibsp-config/configComponentLibs/Radio.vue +182 -0
  914. package/src/views/designer/modules/ibsp-config/configComponentLibs/ScriptData.vue +55 -0
  915. package/src/views/designer/modules/ibsp-config/configComponentLibs/Select.vue +148 -0
  916. package/src/views/designer/modules/ibsp-config/configComponentLibs/SelectExpression.vue +94 -0
  917. package/src/views/designer/modules/ibsp-config/configComponentLibs/SelectIcon.vue +107 -0
  918. package/src/views/designer/modules/ibsp-config/configComponentLibs/SelectResource.vue +117 -0
  919. package/src/views/designer/modules/ibsp-config/configComponentLibs/SetParamSource.vue +181 -0
  920. package/src/views/designer/modules/ibsp-config/configComponentLibs/Slider.vue +55 -0
  921. package/src/views/designer/modules/ibsp-config/configComponentLibs/StaticTable.vue +42 -0
  922. package/src/views/designer/modules/ibsp-config/configComponentLibs/Switch.vue +40 -0
  923. package/src/views/designer/modules/ibsp-config/configComponentLibs/Tab.vue +221 -0
  924. package/src/views/designer/modules/ibsp-config/configComponentLibs/Tabs.vue +91 -0
  925. package/src/views/designer/modules/ibsp-config/configComponentLibs/Tabs2.vue +546 -0
  926. package/src/views/designer/modules/ibsp-config/configComponentLibs/Title.vue +86 -0
  927. package/src/views/designer/modules/ibsp-config/configComponentLibs/TreeSelect.vue +142 -0
  928. package/src/views/designer/modules/ibsp-config/configComponentLibs/TreeSelectPlus.vue +70 -0
  929. package/src/views/designer/modules/ibsp-config/configGroups/BaseData.js +60 -0
  930. package/src/views/designer/modules/ibsp-config/hooks/useModelValue.ts +22 -0
  931. package/src/views/designer/modules/ibsp-config/index.ts +44 -0
  932. package/src/views/designer/modules/ibsp-config/utils.ts +6 -0
  933. package/src/views/designer/modules/ibsp-form-domain/index.ts +3 -0
  934. package/src/views/designer/modules/ibsp-form-domain/src/index.vue +178 -0
  935. package/src/views/designer/modules/ibsp-history/history.service.ts +3 -0
  936. package/src/views/designer/modules/ibsp-history/index.ts +3 -0
  937. package/src/views/designer/modules/ibsp-history/src/index.vue +126 -0
  938. package/src/views/designer/modules/ibsp-outline/index.ts +3 -0
  939. package/src/views/designer/modules/ibsp-outline/outline.service.ts +1 -0
  940. package/src/views/designer/modules/ibsp-outline/src/index.vue +256 -0
  941. package/src/views/designer/modules/ibsp-page/index.ts +4 -0
  942. package/src/views/designer/modules/ibsp-page/pageList.service.ts +3 -0
  943. package/src/views/designer/modules/ibsp-page/src/index.vue +393 -0
  944. package/src/views/designer/modules/ibsp-script/index.ts +3 -0
  945. package/src/views/designer/modules/ibsp-script/script.service.ts +161 -0
  946. package/src/views/designer/modules/ibsp-script/src/ScriptIndex.vue +408 -0
  947. package/src/views/designer/modules/ibsp-script/src/components/Contextmenu.vue +104 -0
  948. package/src/views/designer/modules/ibsp-script/src/components/ScriptData.vue +518 -0
  949. package/src/views/designer/modules/ibsp-script/src/components/ScriptPanel.vue +415 -0
  950. package/src/views/designer/modules/ibsp-script/src/components/ScriptSetting.vue +48 -0
  951. package/src/views/designer/modules/ibsp-script/src/components/console/Console.vue +53 -0
  952. package/src/views/designer/modules/ibsp-script/src/components/console/components/ConsoleError.vue +33 -0
  953. package/src/views/designer/modules/ibsp-script/src/components/console/components/ConsoleLine.vue +53 -0
  954. package/src/views/designer/modules/ibsp-script/src/components/console/components/ConsoleLog.vue +93 -0
  955. package/src/views/designer/modules/ibsp-script/src/components/console/console.ts +11 -0
  956. package/src/views/designer/modules/ibsp-script/src/hooks/useComponentEditor.ts +21 -0
  957. package/src/views/designer/modules/ibsp-script/src/hooks/useContextmenu.js +70 -0
  958. package/src/views/designer/modules/ibsp-script/src/hooks/useScriptData.ts +73 -0
  959. package/src/views/designer/modules/ibsp-script/src/index.vue +114 -0
  960. package/src/views/designer/modules/ibsp-template/index.ts +3 -0
  961. package/src/views/designer/modules/ibsp-template/src/index.vue +19 -0
  962. package/src/views/designer/modules/ibsp-template/template.service.ts +1 -0
  963. package/src/views/designer/modules/index.ts +198 -0
  964. package/src/views/designer/modules/platform-const/const.service.ts +1 -0
  965. package/src/views/designer/modules/platform-const/index.ts +4 -0
  966. package/src/views/designer/modules/platform-const/src/index.vue +432 -0
  967. package/src/views/designer/modules/platform-icon/icon.service.ts +1 -0
  968. package/src/views/designer/modules/platform-icon/index.ts +4 -0
  969. package/src/views/designer/modules/platform-icon/src/index.vue +346 -0
  970. package/src/views/designer/modules/platform-material/index.ts +3 -0
  971. package/src/views/designer/modules/platform-material/material.service.ts +1 -0
  972. package/src/views/designer/modules/platform-material/src/index.vue +901 -0
  973. package/src/views/designer/modules/platform-method/index.ts +4 -0
  974. package/src/views/designer/modules/platform-method/method.service.ts +1 -0
  975. package/src/views/designer/modules/platform-method/src/index.vue +14 -0
  976. package/src/views/designer/modules/platform-script/index.ts +4 -0
  977. package/src/views/designer/modules/platform-script/script.service.ts +1 -0
  978. package/src/views/designer/modules/platform-script/src/index.vue +14 -0
  979. package/src/views/designer/modules/platform-var/index.ts +6 -0
  980. package/src/views/designer/modules/platform-var/src/index.vue +450 -0
  981. package/src/views/designer/modules/platform-var/var.service.ts +1 -0
  982. package/src/views/designer/modules/scriptModule/ScriptIndex.vue +686 -0
  983. package/src/views/designer/modules/scriptModule/ScriptIndexPlus.vue +1308 -0
  984. package/src/views/designer/modules/scriptModule/components/Contextmenu.vue +100 -0
  985. package/src/views/designer/modules/scriptModule/components/EnvData.vue +78 -0
  986. package/src/views/designer/modules/scriptModule/components/ScriptData.vue +541 -0
  987. package/src/views/designer/modules/scriptModule/components/ScriptEditPanel.vue +658 -0
  988. package/src/views/designer/modules/scriptModule/components/ScriptList.vue +365 -0
  989. package/src/views/designer/modules/scriptModule/components/ScriptNavContentLayout.vue +66 -0
  990. package/src/views/designer/modules/scriptModule/components/console/Console.vue +53 -0
  991. package/src/views/designer/modules/scriptModule/components/console/components/ConsoleError.vue +33 -0
  992. package/src/views/designer/modules/scriptModule/components/console/components/ConsoleLine.vue +53 -0
  993. package/src/views/designer/modules/scriptModule/components/console/components/ConsoleLog.vue +93 -0
  994. package/src/views/designer/modules/scriptModule/components/console/console.ts +11 -0
  995. package/src/views/designer/modules/scriptModule/components/scriptManagement.vue +78 -0
  996. package/src/views/designer/modules/scriptModule/hooks/useComponentEditor.ts +22 -0
  997. package/src/views/designer/modules/scriptModule/hooks/useContextmenu.js +70 -0
  998. package/src/views/designer/modules/scriptModule/hooks/useIbspScript.js +95 -0
  999. package/src/views/designer/modules/scriptModule/hooks/useIbspScriptPlus.js +38 -0
  1000. package/src/views/designer/modules/scriptModule/hooks/useScript.js +27 -0
  1001. package/src/views/designer/modules/scriptModule/useScriptStore.js +142 -0
  1002. package/src/views/designer/modules/shortcut-keys/index.ts +2 -0
  1003. package/src/views/designer/modules/shortcut-keys/shortcutKey.service.ts +1 -0
  1004. package/src/views/doc/index.ts +3 -0
  1005. package/src/views/doc/src/index.vue +40 -0
  1006. package/src/views/home/hooks/useApp.ts +127 -0
  1007. package/src/views/home/index.vue +397 -0
  1008. package/src/views/preview/index.ts +6 -0
  1009. package/src/views/preview/src/PreviewPage.vue +215 -0
  1010. package/src/views/preview/src/action-parse-lib/componentAction/RefreshComponent.js +10 -0
  1011. package/src/views/preview/src/action-parse-lib/componentAction/RefreshData.js +8 -0
  1012. package/src/views/preview/src/action-parse-lib/componentAction/SaveForm.js +111 -0
  1013. package/src/views/preview/src/action-parse-lib/componentAction/ShowHidden.js +20 -0
  1014. package/src/views/preview/src/action-parse-lib/formAction/ChangeFormMode.js +86 -0
  1015. package/src/views/preview/src/action-parse-lib/formAction/GetFormModel.js +42 -0
  1016. package/src/views/preview/src/action-parse-lib/formAction/SaveFormModel.js +47 -0
  1017. package/src/views/preview/src/action-parse-lib/formAction/SetFormModel.js +28 -0
  1018. package/src/views/preview/src/action-parse-lib/index.js +23 -0
  1019. package/src/views/preview/src/action-parse-lib/linkAction/AppOpenLink.js +34 -0
  1020. package/src/views/preview/src/action-parse-lib/linkAction/FrameOpenLink.js +33 -0
  1021. package/src/views/preview/src/action-parse-lib/linkAction/PlatformOutsideLink.js +34 -0
  1022. package/src/views/preview/src/action-parse-lib/linkAction/PlatformWithinLink.js +51 -0
  1023. package/src/views/preview/src/action-parse-lib/outerAction/ClosePopup.js +8 -0
  1024. package/src/views/preview/src/action-parse-lib/outerAction/ExecuteScript.js +22 -0
  1025. package/src/views/preview/src/action-parse-lib/outerAction/GetCounterValue.js +7 -0
  1026. package/src/views/preview/src/action-parse-lib/outerAction/ModalOpen.js +48 -0
  1027. package/src/views/preview/src/action-parse-lib/outerAction/OpenMessage.js +14 -0
  1028. package/src/views/preview/src/action-parse-lib/outerAction/RequestInterface.js +135 -0
  1029. package/src/views/preview/src/action-parse-lib/outerAction/SetComponentValue.js +41 -0
  1030. package/src/views/preview/src/action-parse-lib/outerAction/TriggerEvent.js +6 -0
  1031. package/src/views/preview/src/action-parse-lib/outerAction/VariableAssignment.js +12 -0
  1032. package/src/views/preview/src/hooks/useHandleParams.js +13 -0
  1033. package/src/views/preview/src/index.vue +113 -0
  1034. package/src/views/preview/src/index_back.vue +149 -0
  1035. package/src/views/preview/src/interaction-model/Interaction.ts +280 -0
  1036. package/src/views/preview/src/preview.ts +42 -0
  1037. package/src/views/template/index.ts +4 -0
  1038. package/src/views/template/src/PreviewIndex.vue +36 -0
  1039. package/src/views/template/src/TemplateDesignerIndex.vue +492 -0
  1040. package/src/views/template/src/index.vue +15 -0
  1041. package/tsconfig.json +63 -0
  1042. package/vite.config.js +106 -0
  1043. package/vite.config.template.js +31 -0
@@ -0,0 +1,1546 @@
1
+ <script>
2
+ import { addEvent, getComputedSize, matchesSelectorToParentElements, removeEvent } from './utils/dom.js';
3
+ import { computeHeight, computeWidth, restrictToBounds, snapToGrid } from './utils/fns.js';
4
+
5
+ const events = {
6
+ mouse: {
7
+ start: 'mousedown',
8
+ move: 'mousemove',
9
+ stop: 'mouseup'
10
+ },
11
+ touch: {
12
+ start: 'touchstart',
13
+ move: 'touchmove',
14
+ stop: 'touchend'
15
+ }
16
+ };
17
+
18
+ // 禁止用户选取
19
+ const userSelectNone = {
20
+ userSelect: 'none',
21
+ MozUserSelect: 'none',
22
+ WebkitUserSelect: 'none',
23
+ MsUserSelect: 'none'
24
+ };
25
+ // 用户选中自动
26
+ const userSelectAuto = {
27
+ userSelect: 'auto',
28
+ MozUserSelect: 'auto',
29
+ WebkitUserSelect: 'auto',
30
+ MsUserSelect: 'auto'
31
+ };
32
+
33
+ let eventsFor = events.mouse;
34
+
35
+ export default {
36
+ replace: true,
37
+ name: 'vue-draggable-resizable',
38
+ props: {
39
+ handleParentResize: {
40
+ type: Object,
41
+ default: () => ({})
42
+ },
43
+ parentDargActive: {
44
+ type: Boolean,
45
+ default: false
46
+ },
47
+ isContextmenu: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ flipY: {
52
+ type: Number,
53
+ default: 1
54
+ },
55
+ flipX: {
56
+ type: Number,
57
+ default: 1
58
+ },
59
+ o: {
60
+ type: Number,
61
+ default: 0
62
+ },
63
+ isMultipleChoice: {
64
+ type: Boolean,
65
+ default: false
66
+ },
67
+ isCtrl: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ className: {
72
+ type: String,
73
+ default: 'vdr'
74
+ },
75
+ classNameDraggable: {
76
+ type: String,
77
+ default: 'draggable'
78
+ },
79
+ classNameResizable: {
80
+ type: String,
81
+ default: 'resizable'
82
+ },
83
+ classNameDragging: {
84
+ type: String,
85
+ default: 'dragging'
86
+ },
87
+ classNameResizing: {
88
+ type: String,
89
+ default: 'resizing'
90
+ },
91
+ classNameActive: {
92
+ type: String,
93
+ default: 'active'
94
+ },
95
+ classNameHandle: {
96
+ type: String,
97
+ default: 'handle'
98
+ },
99
+ disableUserSelect: {
100
+ type: Boolean,
101
+ default: true
102
+ },
103
+ enableNativeDrag: {
104
+ type: Boolean,
105
+ default: false
106
+ },
107
+ preventDeactivation: {
108
+ type: Boolean,
109
+ default: false
110
+ },
111
+ active: {
112
+ type: Boolean,
113
+ default: false
114
+ },
115
+ draggable: {
116
+ type: Boolean,
117
+ default: true
118
+ },
119
+ resizable: {
120
+ type: Boolean,
121
+ default: true
122
+ },
123
+ // 锁定宽高比
124
+ lockAspectRatio: {
125
+ type: Boolean,
126
+ default: false
127
+ },
128
+ w: {
129
+ type: [Number, String],
130
+ default: 200,
131
+ validator: (val) => {
132
+ if (typeof val === 'number') {
133
+ return val > 0;
134
+ }
135
+ if (typeof val === 'string') {
136
+ return val;
137
+ }
138
+ return val === 'auto';
139
+ }
140
+ },
141
+ h: {
142
+ type: [Number, String],
143
+ default: 200,
144
+ validator: (val) => {
145
+ if (typeof val === 'number') {
146
+ return val > 0;
147
+ }
148
+ return val === 'auto';
149
+ }
150
+ },
151
+ minWidth: {
152
+ type: Number,
153
+ default: 0,
154
+ validator: (val) => val >= 0
155
+ },
156
+ minHeight: {
157
+ type: Number,
158
+ default: 0,
159
+ validator: (val) => val >= 0
160
+ },
161
+ maxWidth: {
162
+ type: Number,
163
+ default: null,
164
+ validator: (val) => val >= 0
165
+ },
166
+ maxHeight: {
167
+ type: Number,
168
+ default: null,
169
+ validator: (val) => val >= 0
170
+ },
171
+ x: {
172
+ type: Number,
173
+ default: 0
174
+ },
175
+ y: {
176
+ type: Number,
177
+ default: 0
178
+ },
179
+ z: {
180
+ type: [String, Number],
181
+ default: 'auto',
182
+ validator: (val) => typeof val === 'string' ? val === 'auto' : val >= 0
183
+ },
184
+ handles: {
185
+ type: Array,
186
+ default: () => ['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml'],
187
+ validator: (val) => {
188
+ const s = new Set(['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']);
189
+
190
+ return new Set(val.filter((h) => s.has(h))).size === val.length;
191
+ }
192
+ },
193
+ dragHandle: {
194
+ type: String,
195
+ default: null
196
+ },
197
+ dragCancel: {
198
+ type: String,
199
+ default: null
200
+ },
201
+ axis: {
202
+ type: String,
203
+ default: 'both',
204
+ validator: (val) => ['x', 'y', 'both'].includes(val)
205
+ },
206
+ grid: {
207
+ type: Array,
208
+ default: () => [1, 1]
209
+ },
210
+ parent: {
211
+ type: [Boolean, String],
212
+ default: false
213
+ },
214
+ onDragStart: {
215
+ type: Function,
216
+ default: () => true
217
+ },
218
+ onDrag: {
219
+ type: Function,
220
+ default: () => true
221
+ },
222
+ onResizeStart: {
223
+ type: Function,
224
+ default: () => true
225
+ },
226
+ onResize: {
227
+ type: Function,
228
+ default: () => true
229
+ },
230
+ // 冲突检测
231
+ isConflictCheck: {
232
+ type: Boolean,
233
+ default: false
234
+ },
235
+ // 元素对齐
236
+ snap: {
237
+ type: Boolean,
238
+ default: false
239
+ },
240
+ // 当调用对齐时,用来设置组件与组件之间的对齐距离,以像素为单位
241
+ snapTolerance: {
242
+ type: Number,
243
+ default: 5,
244
+ validator: function(val) {
245
+ return typeof val === 'number';
246
+ }
247
+ },
248
+ // 缩放比例
249
+ scaleRatio: {
250
+ type: Number,
251
+ default: 1,
252
+ validator: (val) => typeof val === 'number'
253
+ },
254
+ // handle是否缩放
255
+ handleInfo: {
256
+ type: Object,
257
+ default: () => {
258
+ return {
259
+ size: 8,
260
+ offset: -5,
261
+ switch: true
262
+ };
263
+ }
264
+ }
265
+ },
266
+
267
+ data: function() {
268
+ return {
269
+ left: this.x,
270
+ top: this.y,
271
+ right: null,
272
+ bottom: null,
273
+
274
+ width: null,
275
+ height: null,
276
+ widthTouched: false,
277
+ heightTouched: false,
278
+ aspectFactor: null,
279
+
280
+ parentWidth: null,
281
+ parentHeight: null,
282
+
283
+ minW: this.minWidth,
284
+ minH: this.minHeight,
285
+
286
+ maxW: this.maxWidth,
287
+ maxH: this.maxHeight,
288
+
289
+ handle: null,
290
+ enabled: this.active,
291
+ resizing: false,
292
+ dragging: false,
293
+ zIndex: this.z
294
+ };
295
+ },
296
+
297
+ created: function() {
298
+ if (this.maxWidth && this.minWidth > this.maxWidth) {
299
+ console.warn(
300
+ '[Vdr warn]: Invalid prop: minWidth cannot be greater than maxWidth'
301
+ );
302
+ }
303
+
304
+ if (this.maxWidth && this.minHeight > this.maxHeight) {
305
+ console.warn(
306
+ '[Vdr warn]: Invalid prop: minHeight cannot be greater than maxHeight'
307
+ );
308
+ }
309
+
310
+ this.resetBoundsAndMouseState();
311
+ },
312
+ mounted: function() {
313
+ if (!this.enableNativeDrag) {
314
+ this.$el.ondragstart = () => false;
315
+ }
316
+
317
+ const [parentWidth, parentHeight] = this.getParentSize();
318
+
319
+ this.parentWidth = parentWidth;
320
+ this.parentHeight = parentHeight;
321
+ const [width, height] = getComputedSize(this.$el);
322
+ this.aspectFactor =
323
+ (typeof this.w !== 'string' ? this.w : width) /
324
+ (typeof this.h !== 'string' ? this.h : height);
325
+ this.width = typeof this.w !== 'string' ? this.w : width;
326
+ this.height = typeof this.h !== 'string' ? this.h : height;
327
+ this.right = this.parentWidth - this.width - this.left;
328
+ this.bottom = this.parentHeight - this.height - this.top;
329
+
330
+ this.settingAttribute();
331
+
332
+ // 优化:取消选中的行为优先绑定在父节点上
333
+ const parentElement = this.$el.parentNode;
334
+ addEvent(
335
+ parentElement || document.documentElement,
336
+ 'mousedown',
337
+ this.deselect
338
+ );
339
+ addEvent(
340
+ parentElement || document.documentElement,
341
+ 'touchend touchcancel',
342
+ this.deselect
343
+ );
344
+
345
+ addEvent(window, 'resize', this.checkParentSize);
346
+ },
347
+ beforeUnmount: function() {
348
+ removeEvent(document.documentElement, 'mousedown', this.deselect);
349
+ removeEvent(document.documentElement, 'touchstart', this.handleUp);
350
+ removeEvent(document.documentElement, 'mousemove', this.move);
351
+ removeEvent(document.documentElement, 'touchmove', this.move);
352
+ removeEvent(document.documentElement, 'mouseup', this.handleUp);
353
+ removeEvent(
354
+ document.documentElement,
355
+ 'touchend touchcancel',
356
+ this.deselect
357
+ );
358
+
359
+ removeEvent(window, 'resize', this.checkParentSize);
360
+ },
361
+
362
+ methods: {
363
+ // 右键菜单
364
+ onContextMenu(e) {
365
+ this.$emit('contextmenu', e);
366
+ },
367
+ // 重置边界和鼠标状态
368
+ resetBoundsAndMouseState() {
369
+ this.mouseClickPosition = {
370
+ mouseX: 0,
371
+ mouseY: 0,
372
+ x: 0,
373
+ y: 0,
374
+ w: 0,
375
+ h: 0
376
+ };
377
+
378
+ this.bounds = {
379
+ minLeft: null,
380
+ maxLeft: null,
381
+ minRight: null,
382
+ maxRight: null,
383
+ minTop: null,
384
+ maxTop: null,
385
+ minBottom: null,
386
+ maxBottom: null
387
+ };
388
+ },
389
+ // 检查父元素大小
390
+ checkParentSize() {
391
+ if (this.parent) {
392
+ const [newParentWidth, newParentHeight] = this.getParentSize();
393
+ // 修复父元素改变大小后,组件resizing时活动异常
394
+ this.right = newParentWidth - this.width - this.left;
395
+ this.bottom = newParentHeight - this.height - this.top;
396
+
397
+ this.parentWidth = newParentWidth;
398
+ this.parentHeight = newParentHeight;
399
+ }
400
+ },
401
+ // 获取父元素大小
402
+ getParentSize() {
403
+ if (this.parent === true) {
404
+ const style = window.getComputedStyle(this.$el.parentNode, null);
405
+ return [
406
+ parseInt(style.getPropertyValue('width'), 10),
407
+ parseInt(style.getPropertyValue('height'), 10)
408
+ ];
409
+ }
410
+ if (typeof this.parent === 'string') {
411
+ const parentNode = document.querySelector(this.parent);
412
+ if (!(parentNode instanceof HTMLElement)) {
413
+ throw new Error(
414
+ `The selector ${this.parent} does not match any element`
415
+ );
416
+ }
417
+ return [parentNode.offsetWidth, parentNode.offsetHeight];
418
+ }
419
+
420
+ return [null, null];
421
+ },
422
+ // 元素触摸按下
423
+ elementTouchDown(e) {
424
+
425
+ eventsFor = events.touch;
426
+
427
+ this.elementDown(e);
428
+ },
429
+ elementMouseDown(e) {
430
+ if (e.button !== 0) {
431
+ return;
432
+ }
433
+
434
+ eventsFor = events.mouse;
435
+ this.elementDown(e);
436
+ },
437
+ // 元素按下
438
+ elementDown(e) {
439
+
440
+
441
+ if (e instanceof MouseEvent && e.which !== 1) {
442
+ return;
443
+ }
444
+
445
+ const target = e.target || e.srcElement;
446
+
447
+ if (this.$el.contains(target)) {
448
+ if (this.onDragStart(e) === false) {
449
+ return;
450
+ }
451
+
452
+ if (
453
+ this.dragHandle &&
454
+ !matchesSelectorToParentElements(
455
+ target,
456
+ this.dragHandle,
457
+ this.$el
458
+ ) ||
459
+ this.dragCancel &&
460
+ matchesSelectorToParentElements(target, this.dragCancel, this.$el)
461
+ ) {
462
+ this.dragging = false;
463
+
464
+ return;
465
+ }
466
+
467
+ if (!this.enabled) {
468
+ this.enabled = true;
469
+
470
+ this.$emit('activated');
471
+ this.$emit('update:active', true);
472
+ }
473
+
474
+ if (this.draggable) {
475
+ this.dragging = true;
476
+ }
477
+
478
+ this.mouseClickPosition.mouseX = e.touches
479
+ ? e.touches[0].pageX
480
+ : e.pageX;
481
+ this.mouseClickPosition.mouseY = e.touches
482
+ ? e.touches[0].pageY
483
+ : e.pageY;
484
+
485
+ this.mouseClickPosition.left = this.left;
486
+ this.mouseClickPosition.right = this.right;
487
+ this.mouseClickPosition.top = this.top;
488
+ this.mouseClickPosition.bottom = this.bottom;
489
+ this.mouseClickPosition.w = this.width;
490
+ this.mouseClickPosition.h = this.height;
491
+
492
+ if (this.parent) {
493
+ this.bounds = this.calcDragLimits();
494
+ }
495
+
496
+ addEvent(document.documentElement, eventsFor.move, this.move);
497
+ addEvent(document.documentElement, eventsFor.stop, this.handleUp);
498
+ }
499
+ },
500
+ // 计算移动范围
501
+ calcDragLimits() {
502
+ return {
503
+ minLeft: this.left % this.grid[0],
504
+ maxLeft:
505
+ Math.floor(
506
+ (this.parentWidth - this.width - this.left) / this.grid[0]
507
+ ) *
508
+ this.grid[0] +
509
+ this.left,
510
+ minRight: this.right % this.grid[0],
511
+ maxRight:
512
+ Math.floor(
513
+ (this.parentWidth - this.width - this.right) / this.grid[0]
514
+ ) *
515
+ this.grid[0] +
516
+ this.right,
517
+ minTop: this.top % this.grid[1],
518
+ maxTop:
519
+ Math.floor(
520
+ (this.parentHeight - this.height - this.top) / this.grid[1]
521
+ ) *
522
+ this.grid[1] +
523
+ this.top,
524
+ minBottom: this.bottom % this.grid[1],
525
+ maxBottom:
526
+ Math.floor(
527
+ (this.parentHeight - this.height - this.bottom) / this.grid[1]
528
+ ) *
529
+ this.grid[1] +
530
+ this.bottom
531
+ };
532
+ },
533
+ // 取消
534
+ deselect(e) {
535
+ if (e.which && e.which !== 1) {
536
+ return;
537
+ }
538
+ const target = e.target || e.srcElement;
539
+ const regex = new RegExp(this.className + '-([trmbl]{2})', '');
540
+
541
+ if (!this.$el.contains(target) && !regex.test(target.className)) {
542
+ if (
543
+ this.enabled &&
544
+ !this.preventDeactivation &&
545
+ !this.isMultipleChoice &&
546
+ !this.isCtrl
547
+ ) {
548
+ this.enabled = false;
549
+
550
+ this.$emit('deactivated');
551
+ this.$emit('update:active', false);
552
+ }
553
+
554
+ removeEvent(
555
+ document.documentElement,
556
+ eventsFor.move,
557
+ this.handleResize
558
+ );
559
+ }
560
+
561
+ this.resetBoundsAndMouseState();
562
+ },
563
+ // 控制柄触摸按下
564
+ handleTouchDown(handle, e) {
565
+ eventsFor = events.touch;
566
+
567
+ this.handleDown(handle, e);
568
+ },
569
+ // 控制柄按下
570
+ handleDown(handle, e) {
571
+ if (e instanceof MouseEvent && e.which !== 1) {
572
+ return;
573
+ }
574
+
575
+ if (this.onResizeStart(handle, e) === false) {
576
+ return;
577
+ }
578
+
579
+ if (e.stopPropagation) {
580
+ e.stopPropagation();
581
+ }
582
+
583
+ // Here we avoid a dangerous recursion by faking
584
+ // corner handles as middle handles
585
+ if (this.lockAspectRatio && !handle.includes('m')) {
586
+ this.handle = 'm' + handle.substring(1);
587
+ } else {
588
+ this.handle = handle;
589
+ }
590
+
591
+ this.resizing = true;
592
+
593
+ this.mouseClickPosition.mouseX = e.touches ? e.touches[0].pageX : e.pageX;
594
+ this.mouseClickPosition.mouseY = e.touches ? e.touches[0].pageY : e.pageY;
595
+ this.mouseClickPosition.left = this.left;
596
+ this.mouseClickPosition.right = this.right;
597
+ this.mouseClickPosition.top = this.top;
598
+ this.mouseClickPosition.bottom = this.bottom;
599
+ this.mouseClickPosition.w = this.width;
600
+ this.mouseClickPosition.h = this.height;
601
+
602
+ this.bounds = this.calcResizeLimits();
603
+
604
+ addEvent(document.documentElement, eventsFor.move, this.handleResize);
605
+ addEvent(document.documentElement, eventsFor.stop, this.handleUp);
606
+ },
607
+ // 计算调整大小范围
608
+ calcResizeLimits() {
609
+ let minW = this.minW;
610
+ let minH = this.minH;
611
+ let maxW = this.maxW;
612
+ let maxH = this.maxH;
613
+
614
+ const aspectFactor = this.aspectFactor;
615
+ const [gridX, gridY] = this.grid;
616
+ const width = this.width;
617
+ const height = this.height;
618
+ const left = this.left;
619
+ const top = this.top;
620
+ const right = this.right;
621
+ const bottom = this.bottom;
622
+
623
+ if (this.lockAspectRatio) {
624
+ if (minW / minH > aspectFactor) {
625
+ minH = minW / aspectFactor;
626
+ } else {
627
+ minW = aspectFactor * minH;
628
+ }
629
+
630
+ if (maxW && maxH) {
631
+ maxW = Math.min(maxW, aspectFactor * maxH);
632
+ maxH = Math.min(maxH, maxW / aspectFactor);
633
+ } else if (maxW) {
634
+ maxH = maxW / aspectFactor;
635
+ } else if (maxH) {
636
+ maxW = aspectFactor * maxH;
637
+ }
638
+ }
639
+
640
+ maxW = maxW - maxW % gridX;
641
+ maxH = maxH - maxH % gridY;
642
+
643
+ const limits = {
644
+ minLeft: null,
645
+ maxLeft: null,
646
+ minTop: null,
647
+ maxTop: null,
648
+ minRight: null,
649
+ maxRight: null,
650
+ minBottom: null,
651
+ maxBottom: null
652
+ };
653
+
654
+ if (this.parent) {
655
+ limits.minLeft = left % gridX;
656
+ limits.maxLeft = left + Math.floor((width - minW) / gridX) * gridX;
657
+ limits.minTop = top % gridY;
658
+ limits.maxTop = top + Math.floor((height - minH) / gridY) * gridY;
659
+ limits.minRight = right % gridX;
660
+ limits.maxRight = right + Math.floor((width - minW) / gridX) * gridX;
661
+ limits.minBottom = bottom % gridY;
662
+ limits.maxBottom = bottom + Math.floor((height - minH) / gridY) * gridY;
663
+
664
+ if (maxW) {
665
+ limits.minLeft = Math.max(
666
+ limits.minLeft,
667
+ this.parentWidth - right - maxW
668
+ );
669
+ limits.minRight = Math.max(
670
+ limits.minRight,
671
+ this.parentWidth - left - maxW
672
+ );
673
+ }
674
+
675
+ if (maxH) {
676
+ limits.minTop = Math.max(
677
+ limits.minTop,
678
+ this.parentHeight - bottom - maxH
679
+ );
680
+ limits.minBottom = Math.max(
681
+ limits.minBottom,
682
+ this.parentHeight - top - maxH
683
+ );
684
+ }
685
+
686
+ if (this.lockAspectRatio) {
687
+ limits.minLeft = Math.max(limits.minLeft, left - top * aspectFactor);
688
+ limits.minTop = Math.max(limits.minTop, top - left / aspectFactor);
689
+ limits.minRight = Math.max(
690
+ limits.minRight,
691
+ right - bottom * aspectFactor
692
+ );
693
+ limits.minBottom = Math.max(
694
+ limits.minBottom,
695
+ bottom - right / aspectFactor
696
+ );
697
+ }
698
+ } else {
699
+ limits.minLeft = null;
700
+ limits.maxLeft = left + Math.floor((width - minW) / gridX) * gridX;
701
+ limits.minTop = null;
702
+ limits.maxTop = top + Math.floor((height - minH) / gridY) * gridY;
703
+ limits.minRight = null;
704
+ limits.maxRight = right + Math.floor((width - minW) / gridX) * gridX;
705
+ limits.minBottom = null;
706
+ limits.maxBottom = bottom + Math.floor((height - minH) / gridY) * gridY;
707
+
708
+ if (maxW) {
709
+ limits.minLeft = -(right + maxW);
710
+ limits.minRight = -(left + maxW);
711
+ }
712
+
713
+ if (maxH) {
714
+ limits.minTop = -(bottom + maxH);
715
+ limits.minBottom = -(top + maxH);
716
+ }
717
+
718
+ if (this.lockAspectRatio && maxW && maxH) {
719
+ limits.minLeft = Math.min(limits.minLeft, -(right + maxW));
720
+ limits.minTop = Math.min(limits.minTop, -(maxH + bottom));
721
+ limits.minRight = Math.min(limits.minRight, -left - maxW);
722
+ limits.minBottom = Math.min(limits.minBottom, -top - maxH);
723
+ }
724
+ }
725
+
726
+ return limits;
727
+ },
728
+ // 移动
729
+ move(e) {
730
+ if (this.resizing) {
731
+ this.handleResize(e);
732
+ } else if (this.dragging) {
733
+ this.handleDrag(e);
734
+ }
735
+ },
736
+ // 元素移动
737
+ async handleDrag(e) {
738
+ const axis = this.axis;
739
+ const grid = this.grid;
740
+ const bounds = this.bounds;
741
+ const mouseClickPosition = this.mouseClickPosition;
742
+
743
+ const tmpDeltaX =
744
+ axis && axis !== 'y'
745
+ ? mouseClickPosition.mouseX -
746
+ (e.touches ? e.touches[0].pageX : e.pageX)
747
+ : 0;
748
+ const tmpDeltaY =
749
+ axis && axis !== 'x'
750
+ ? mouseClickPosition.mouseY -
751
+ (e.touches ? e.touches[0].pageY : e.pageY)
752
+ : 0;
753
+
754
+ const [deltaX, deltaY] = snapToGrid(
755
+ grid,
756
+ tmpDeltaX,
757
+ tmpDeltaY,
758
+ this.scaleRatio
759
+ );
760
+
761
+ const left = restrictToBounds(
762
+ mouseClickPosition.left - deltaX,
763
+ bounds.minLeft,
764
+ bounds.maxLeft
765
+ );
766
+ const top = restrictToBounds(
767
+ mouseClickPosition.top - deltaY,
768
+ bounds.minTop,
769
+ bounds.maxTop
770
+ );
771
+ if (this.onDrag(left, top) === false) {
772
+ return;
773
+ }
774
+ const right = restrictToBounds(
775
+ mouseClickPosition.right + deltaX,
776
+ bounds.minRight,
777
+ bounds.maxRight
778
+ );
779
+ const bottom = restrictToBounds(
780
+ mouseClickPosition.bottom + deltaY,
781
+ bounds.minBottom,
782
+ bounds.maxBottom
783
+ );
784
+ this.left = left;
785
+ this.top = top;
786
+ this.right = right;
787
+ this.bottom = bottom;
788
+
789
+ await this.snapCheck();
790
+ this.$emit('dragging', this.left, this.top);
791
+ },
792
+ moveHorizontally(val) {
793
+ const [deltaX, _] = snapToGrid(this.grid, val, this.top, this.scale);
794
+ const left = restrictToBounds(
795
+ deltaX,
796
+ this.bounds.minLeft,
797
+ this.bounds.maxLeft
798
+ );
799
+ this.left = left;
800
+ this.right = this.parentWidth - this.width - left;
801
+ },
802
+ moveVertically(val) {
803
+ const [_, deltaY] = snapToGrid(this.grid, this.left, val, this.scale);
804
+ const top = restrictToBounds(
805
+ deltaY,
806
+ this.bounds.minTop,
807
+ this.bounds.maxTop
808
+ );
809
+ this.top = top;
810
+ this.bottom = this.parentHeight - this.height - top;
811
+ },
812
+ // 控制柄移动
813
+ handleResize(e) {
814
+ let left = this.left;
815
+ let top = this.top;
816
+ let right = this.right;
817
+ let bottom = this.bottom;
818
+
819
+ const mouseClickPosition = this.mouseClickPosition;
820
+ const lockAspectRatio = this.lockAspectRatio;
821
+ const aspectFactor = this.aspectFactor;
822
+
823
+ const tmpDeltaX =
824
+ mouseClickPosition.mouseX - (e.touches ? e.touches[0].pageX : e.pageX);
825
+ const tmpDeltaY =
826
+ mouseClickPosition.mouseY - (e.touches ? e.touches[0].pageY : e.pageY);
827
+
828
+ if (!this.widthTouched && tmpDeltaX) {
829
+ this.widthTouched = true;
830
+ }
831
+ if (!this.heightTouched && tmpDeltaY) {
832
+ this.heightTouched = true;
833
+ }
834
+ const [deltaX, deltaY] = snapToGrid(
835
+ this.grid,
836
+ tmpDeltaX,
837
+ tmpDeltaY,
838
+ this.scaleRatio
839
+ );
840
+
841
+ if (this.handle.includes('b')) {
842
+ bottom = restrictToBounds(
843
+ mouseClickPosition.bottom + deltaY,
844
+ this.bounds.minBottom,
845
+ this.bounds.maxBottom
846
+ );
847
+ if (this.lockAspectRatio && this.resizingOnY) {
848
+ right = this.right - (this.bottom - bottom) * aspectFactor;
849
+ }
850
+ } else if (this.handle.includes('t')) {
851
+ top = restrictToBounds(
852
+ mouseClickPosition.top - deltaY,
853
+ this.bounds.minTop,
854
+ this.bounds.maxTop
855
+ );
856
+ if (this.lockAspectRatio && this.resizingOnY) {
857
+ left = this.left - (this.top - top) * aspectFactor;
858
+ }
859
+ }
860
+
861
+ if (this.handle.includes('r')) {
862
+ right = restrictToBounds(
863
+ mouseClickPosition.right + deltaX,
864
+ this.bounds.minRight,
865
+ this.bounds.maxRight
866
+ );
867
+ if (this.lockAspectRatio && this.resizingOnX) {
868
+ bottom = this.bottom - (this.right - right) / aspectFactor;
869
+ }
870
+ } else if (this.handle.includes('l')) {
871
+ left = restrictToBounds(
872
+ mouseClickPosition.left - deltaX,
873
+ this.bounds.minLeft,
874
+ this.bounds.maxLeft
875
+ );
876
+ if (this.lockAspectRatio && this.resizingOnX) {
877
+ top = this.top - (this.left - left) / aspectFactor;
878
+ }
879
+ }
880
+
881
+ const width = computeWidth(this.parentWidth, left, right);
882
+ const height = computeHeight(this.parentHeight, top, bottom);
883
+ if (this.onResize(this.handle, left, top, width, height) === false) {
884
+ return;
885
+ }
886
+ this.left = left;
887
+ this.top = top;
888
+ this.right = right;
889
+ this.bottom = bottom;
890
+ this.width = width;
891
+ this.height = height;
892
+ this.$emit('resizing', this.left, this.top, this.width, this.height);
893
+ },
894
+ changeWidth(val) {
895
+ const [newWidth, _] = snapToGrid(this.grid, val, 0, this.scale);
896
+ let right = restrictToBounds(
897
+ this.parentWidth - newWidth - this.left,
898
+ this.bounds.minRight,
899
+ this.bounds.maxRight
900
+ );
901
+ let bottom = this.bottom;
902
+ if (this.lockAspectRatio) {
903
+ bottom = this.bottom - (this.right - right) / this.aspectFactor;
904
+ }
905
+ const width = computeWidth(this.parentWidth, this.left, right);
906
+ const height = computeHeight(this.parentHeight, this.top, bottom);
907
+ this.right = right;
908
+ this.bottom = bottom;
909
+ this.width = width;
910
+ this.height = height;
911
+ },
912
+ changeHeight(val) {
913
+ const [_, newHeight] = snapToGrid(this.grid, 0, val, this.scale);
914
+ let bottom = restrictToBounds(
915
+ this.parentHeight - newHeight - this.top,
916
+ this.bounds.minBottom,
917
+ this.bounds.maxBottom
918
+ );
919
+ let right = this.right;
920
+ if (this.lockAspectRatio) {
921
+ right = this.right - (this.bottom - bottom) * this.aspectFactor;
922
+ }
923
+ const width = computeWidth(this.parentWidth, this.left, right);
924
+ const height = computeHeight(this.parentHeight, this.top, bottom);
925
+ this.right = right;
926
+ this.bottom = bottom;
927
+ this.width = width;
928
+ this.height = height;
929
+ },
930
+ // 从控制柄松开
931
+ async handleUp(e) {
932
+ this.handle = null;
933
+
934
+ // 初始化辅助线数据
935
+ const temArr = new Array(3).fill({
936
+ display: false,
937
+ position: '',
938
+ origin: '',
939
+ lineLength: ''
940
+ });
941
+ const refLine = { vLine: [], hLine: [] };
942
+ for (let i in refLine) {
943
+ refLine[i] = JSON.parse(JSON.stringify(temArr));
944
+ }
945
+
946
+ if (this.resizing) {
947
+ this.resizing = false;
948
+ await this.conflictCheck();
949
+ this.$emit('refLineParams', refLine);
950
+ this.$emit('resizestop', this.left, this.top, this.width, this.height);
951
+ }
952
+ if (this.dragging) {
953
+ this.dragging = false;
954
+ await this.conflictCheck();
955
+ this.$emit('refLineParams', refLine);
956
+ this.$emit('dragstop', this.left, this.top);
957
+ }
958
+ this.resetBoundsAndMouseState();
959
+ removeEvent(document.documentElement, eventsFor.move, this.handleResize);
960
+ },
961
+ // 新增方法 ↓↓↓
962
+ // 设置属性
963
+ settingAttribute() {
964
+ // 设置冲突检测
965
+ this.$el.setAttribute('data-is-check', `${this.isConflictCheck}`);
966
+ // 设置对齐元素
967
+ this.$el.setAttribute('data-is-snap', `${this.snap}`);
968
+ },
969
+ // 冲突检测
970
+ conflictCheck() {
971
+ const top = this.top;
972
+ const left = this.left;
973
+ const width = this.width;
974
+ const height = this.height;
975
+
976
+ if (this.isConflictCheck) {
977
+ const nodes = this.$el.parentNode.childNodes; // 获取当前父节点下所有子节点
978
+ for (let item of nodes) {
979
+ if (
980
+ item.className !== undefined &&
981
+ !item.className.includes(this.classNameActive) &&
982
+ item.getAttribute('data-is-check') !== null &&
983
+ item.getAttribute('data-is-check') !== 'false'
984
+ ) {
985
+ const tw = item.offsetWidth;
986
+ const th = item.offsetHeight;
987
+ // 正则获取left与right
988
+ let [tl, tt] = this.formatTransformVal(item.style.transform);
989
+
990
+ // 左上角与右下角重叠
991
+ const tfAndBr =
992
+ top >= tt && left >= tl && tt + th > top && tl + tw > left ||
993
+ top <= tt &&
994
+ left < tl &&
995
+ top + height > tt &&
996
+ left + width > tl;
997
+ // 右上角与左下角重叠
998
+ const brAndTf =
999
+ left <= tl && top >= tt && left + width > tl && top < tt + th ||
1000
+ top < tt && left > tl && top + height > tt && left < tl + tw;
1001
+ // 下边与上边重叠
1002
+ const bAndT =
1003
+ top <= tt &&
1004
+ left >= tl &&
1005
+ top + height > tt &&
1006
+ left < tl + tw ||
1007
+ top >= tt && left <= tl && top < tt + th && left > tl + tw;
1008
+ // 上边与下边重叠(宽度不一样)
1009
+ const tAndB =
1010
+ top <= tt &&
1011
+ left >= tl &&
1012
+ top + height > tt &&
1013
+ left < tl + tw ||
1014
+ top >= tt && left <= tl && top < tt + th && left > tl + tw;
1015
+ // 左边与右边重叠
1016
+ const lAndR =
1017
+ left >= tl && top >= tt && left < tl + tw && top < tt + th ||
1018
+ top > tt && left <= tl && left + width > tl && top < tt + th;
1019
+ // 左边与右边重叠(高度不一样)
1020
+ const rAndL =
1021
+ top <= tt &&
1022
+ left >= tl &&
1023
+ top + height > tt &&
1024
+ left < tl + tw ||
1025
+ top >= tt && left <= tl && top < tt + th && left + width > tl;
1026
+
1027
+ // 如果冲突,就将回退到移动前的位置
1028
+ if (tfAndBr || brAndTf || bAndT || tAndB || lAndR || rAndL) {
1029
+ this.top = this.mouseClickPosition.top;
1030
+ this.left = this.mouseClickPosition.left;
1031
+ this.right = this.mouseClickPosition.right;
1032
+ this.bottom = this.mouseClickPosition.bottom;
1033
+ this.width = this.mouseClickPosition.w;
1034
+ this.height = this.mouseClickPosition.h;
1035
+ this.$emit(
1036
+ 'resizing',
1037
+ this.left,
1038
+ this.top,
1039
+ this.width,
1040
+ this.height
1041
+ );
1042
+ }
1043
+ }
1044
+ }
1045
+ }
1046
+ },
1047
+ // 检测对齐元素
1048
+ async snapCheck() {
1049
+ let width = this.width;
1050
+ let height = this.height;
1051
+ if (this.snap) {
1052
+ let activeLeft = this.left;
1053
+ let activeRight = this.left + width;
1054
+ let activeTop = this.top;
1055
+ let activeBottom = this.top + height;
1056
+
1057
+ // 初始化辅助线数据
1058
+ const temArr = new Array(3).fill({
1059
+ display: false,
1060
+ position: '',
1061
+ origin: '',
1062
+ lineLength: ''
1063
+ });
1064
+ const refLine = { vLine: [], hLine: [] };
1065
+ for (let i in refLine) {
1066
+ refLine[i] = JSON.parse(JSON.stringify(temArr));
1067
+ }
1068
+
1069
+ // 获取当前父节点下所有子节点
1070
+ const nodes = this.$el.parentNode.childNodes;
1071
+
1072
+ let tem = {
1073
+ value: { x: [[], [], []], y: [[], [], []] },
1074
+ display: [],
1075
+ position: []
1076
+ };
1077
+ const { groupWidth, groupHeight, groupLeft, groupTop, bln } =
1078
+ await this.getActiveAll(nodes);
1079
+ if (!bln) {
1080
+ width = groupWidth;
1081
+ height = groupHeight;
1082
+ activeLeft = groupLeft;
1083
+ activeRight = groupLeft + groupWidth;
1084
+ activeTop = groupTop;
1085
+ activeBottom = groupTop + groupHeight;
1086
+ }
1087
+ for (let item of nodes) {
1088
+ if (
1089
+ item.className !== undefined &&
1090
+ !item.className.includes(this.classNameActive) &&
1091
+ item.getAttribute('data-is-snap') !== null &&
1092
+ item.getAttribute('data-is-snap') !== 'false'
1093
+ ) {
1094
+ const w = item.offsetWidth;
1095
+ const h = item.offsetHeight;
1096
+ const [l, t] = this.formatTransformVal(item.style.transform);
1097
+ const r = l + w; // 对齐目标right
1098
+ const b = t + h; // 对齐目标的bottom
1099
+
1100
+ const hc =
1101
+ Math.abs(activeTop + height / 2 - (t + h / 2)) <=
1102
+ this.snapTolerance; // 水平中线
1103
+ const vc =
1104
+ Math.abs(activeLeft + width / 2 - (l + w / 2)) <=
1105
+ this.snapTolerance; // 垂直中线
1106
+
1107
+ const ts = Math.abs(t - activeBottom) <= this.snapTolerance; // 从上到下
1108
+ const TS = Math.abs(b - activeBottom) <= this.snapTolerance; // 从上到下
1109
+ const bs = Math.abs(t - activeTop) <= this.snapTolerance; // 从下到上
1110
+ const BS = Math.abs(b - activeTop) <= this.snapTolerance; // 从下到上
1111
+
1112
+ const ls = Math.abs(l - activeRight) <= this.snapTolerance; // 外左
1113
+ const LS = Math.abs(r - activeRight) <= this.snapTolerance; // 外左
1114
+ const rs = Math.abs(l - activeLeft) <= this.snapTolerance; // 外右
1115
+ const RS = Math.abs(r - activeLeft) <= this.snapTolerance; // 外右
1116
+
1117
+ tem.display = [ts, TS, bs, BS, hc, hc, ls, LS, rs, RS, vc, vc];
1118
+ tem.position = [
1119
+ t,
1120
+ b,
1121
+ t,
1122
+ b,
1123
+ t + h / 2,
1124
+ t + h / 2,
1125
+ l,
1126
+ r,
1127
+ l,
1128
+ r,
1129
+ l + w / 2,
1130
+ l + w / 2
1131
+ ];
1132
+
1133
+ // fix:中线自动对齐,元素可能超过父元素边界的问题
1134
+ if (ts) {
1135
+ if (bln) {
1136
+ this.top = Math.max(t - height, this.bounds.minTop);
1137
+ this.bottom = this.parentHeight - this.top - height;
1138
+ }
1139
+ tem.value.y[0].push(l, r, activeLeft, activeRight);
1140
+ }
1141
+ if (bs) {
1142
+ if (bln) {
1143
+ this.top = t;
1144
+ this.bottom = this.parentHeight - this.top - height;
1145
+ }
1146
+ tem.value.y[0].push(l, r, activeLeft, activeRight);
1147
+ }
1148
+ if (TS) {
1149
+ if (bln) {
1150
+ this.top = Math.max(b - height, this.bounds.minTop);
1151
+ this.bottom = this.parentHeight - this.top - height;
1152
+ }
1153
+ tem.value.y[1].push(l, r, activeLeft, activeRight);
1154
+ }
1155
+ if (BS) {
1156
+ if (bln) {
1157
+ this.top = b;
1158
+ this.bottom = this.parentHeight - this.top - height;
1159
+ }
1160
+ tem.value.y[1].push(l, r, activeLeft, activeRight);
1161
+ }
1162
+
1163
+ if (ls) {
1164
+ if (bln) {
1165
+ this.left = Math.max(l - width, this.bounds.minLeft);
1166
+ this.right = this.parentWidth - this.left - width;
1167
+ }
1168
+ tem.value.x[0].push(t, b, activeTop, activeBottom);
1169
+ }
1170
+ if (rs) {
1171
+ if (bln) {
1172
+ this.left = l;
1173
+ this.right = this.parentWidth - this.left - width;
1174
+ }
1175
+ tem.value.x[0].push(t, b, activeTop, activeBottom);
1176
+ }
1177
+ if (LS) {
1178
+ if (bln) {
1179
+ this.left = Math.max(r - width, this.bounds.minLeft);
1180
+ this.right = this.parentWidth - this.left - width;
1181
+ }
1182
+ tem.value.x[1].push(t, b, activeTop, activeBottom);
1183
+ }
1184
+ if (RS) {
1185
+ if (bln) {
1186
+ this.left = r;
1187
+ this.right = this.parentWidth - this.left - width;
1188
+ }
1189
+ tem.value.x[1].push(t, b, activeTop, activeBottom);
1190
+ }
1191
+
1192
+ if (hc) {
1193
+ if (bln) {
1194
+ this.top = Math.max(t + h / 2 - height / 2, this.bounds.minTop);
1195
+ this.bottom = this.parentHeight - this.top - height;
1196
+ }
1197
+ tem.value.y[2].push(l, r, activeLeft, activeRight);
1198
+ }
1199
+ if (vc) {
1200
+ if (bln) {
1201
+ this.left = Math.max(
1202
+ l + w / 2 - width / 2,
1203
+ this.bounds.minLeft
1204
+ );
1205
+ this.right = this.parentWidth - this.left - width;
1206
+ }
1207
+ tem.value.x[2].push(t, b, activeTop, activeBottom);
1208
+ }
1209
+ // 辅助线坐标与是否显示(display)对应的数组,易于循环遍历
1210
+ const arrTem = [0, 1, 0, 1, 2, 2, 0, 1, 0, 1, 2, 2];
1211
+ for (let i = 0; i <= arrTem.length; i++) {
1212
+ // 前6为Y辅助线,后6为X辅助线
1213
+ const xory = i < 6 ? 'y' : 'x';
1214
+ const horv = i < 6 ? 'hLine' : 'vLine';
1215
+ if (tem.display[i]) {
1216
+ const { origin, length } = this.calcLineValues(
1217
+ tem.value[xory][arrTem[i]]
1218
+ );
1219
+ refLine[horv][arrTem[i]].display = tem.display[i];
1220
+ refLine[horv][arrTem[i]].position = tem.position[i] + 'px';
1221
+ refLine[horv][arrTem[i]].origin = origin;
1222
+ refLine[horv][arrTem[i]].lineLength = length;
1223
+ }
1224
+ }
1225
+ }
1226
+ }
1227
+ this.$emit('refLineParams', refLine);
1228
+ }
1229
+ },
1230
+ calcLineValues(arr) {
1231
+ const length = Math.max(...arr) - Math.min(...arr) + 'px';
1232
+ const origin = Math.min(...arr) + 'px';
1233
+ return { length, origin };
1234
+ },
1235
+ async getActiveAll(nodes) {
1236
+ const activeAll = [];
1237
+ const XArray = [];
1238
+ const YArray = [];
1239
+ let groupWidth = 0;
1240
+ let groupHeight = 0;
1241
+ let groupLeft = 0;
1242
+ let groupTop = 0;
1243
+ for (let item of nodes) {
1244
+ if (
1245
+ item.className !== undefined &&
1246
+ item.className.includes(this.classNameActive)
1247
+ ) {
1248
+ activeAll.push(item);
1249
+ }
1250
+ }
1251
+ const AllLength = activeAll.length;
1252
+ if (AllLength > 1) {
1253
+ for (let i of activeAll) {
1254
+ const l = i.offsetLeft;
1255
+ const r = l + i.offsetWidth;
1256
+ const t = i.offsetTop;
1257
+ const b = t + i.offsetHeight;
1258
+ XArray.push(t, b);
1259
+ YArray.push(l, r);
1260
+ }
1261
+ groupWidth = Math.max(...YArray) - Math.min(...YArray);
1262
+ groupHeight = Math.max(...XArray) - Math.min(...XArray);
1263
+ groupLeft = Math.min(...YArray);
1264
+ groupTop = Math.min(...XArray);
1265
+ }
1266
+ const bln = AllLength === 1;
1267
+ return { groupWidth, groupHeight, groupLeft, groupTop, bln };
1268
+ },
1269
+ // 正则获取left与top
1270
+ formatTransformVal(string) {
1271
+ let [left, top] = string.replace(/[^0-9\-,]/g, '').split(',');
1272
+ if (top === undefined) {
1273
+ top = 0;
1274
+ }
1275
+ return [+left, +top];
1276
+ },
1277
+ /**
1278
+ *
1279
+ * @param {Object} position { left: Number, top: Number, width: Number, height: Number}
1280
+ */
1281
+ setPosition(position) {
1282
+ // // eslint-disable-next-line no-unused-expressions
1283
+ // position.left ?? (this.left = position.left);
1284
+ // // eslint-disable-next-line no-unused-expressions
1285
+ // position.top ?? (this.top = position.top);
1286
+ // // eslint-disable-next-line no-unused-expressions
1287
+ // position.width ?? (this.width = position.width);
1288
+ // // eslint-disable-next-line no-unused-expressions
1289
+ // position.height ?? (this.height = position.height);
1290
+ if (position.left !== undefined) {
1291
+ this.left = position.left;
1292
+ }
1293
+ if (position.top !== undefined) {
1294
+ this.top = position.top;
1295
+ }
1296
+ if (position.width !== undefined) {
1297
+ this.width = position.width;
1298
+ }
1299
+ if (position.height !== undefined) {
1300
+ this.height = position.height;
1301
+ }
1302
+ },
1303
+ },
1304
+ computed: {
1305
+ handleStyle() {
1306
+ return (stick) => {
1307
+ if (!this.handleInfo.switch) {
1308
+ return { display: this.enabled ? 'block' : 'none' };
1309
+ }
1310
+
1311
+ const size = (this.handleInfo.size / this.scaleRatio).toFixed(2);
1312
+ const offset = (this.handleInfo.offset / this.scaleRatio).toFixed(2);
1313
+ const center = (size / 2).toFixed(2);
1314
+
1315
+ const styleMap = {
1316
+ tl: {
1317
+ top: `${offset}px`,
1318
+ left: `${offset}px`
1319
+ },
1320
+ tm: {
1321
+ top: `${offset}px`,
1322
+ left: `calc(50% - ${center}px)`
1323
+ },
1324
+ tr: {
1325
+ top: `${offset}px`,
1326
+ right: `${offset}px`
1327
+ },
1328
+ mr: {
1329
+ top: `calc(50% - ${center}px)`,
1330
+ right: `${offset}px`
1331
+ },
1332
+ br: {
1333
+ bottom: `${offset}px`,
1334
+ right: `${offset}px`
1335
+ },
1336
+ bm: {
1337
+ bottom: `${offset}px`,
1338
+ right: `calc(50% - ${center}px)`
1339
+ },
1340
+ bl: {
1341
+ bottom: `${offset}px`,
1342
+ left: `${offset}px`
1343
+ },
1344
+ ml: {
1345
+ top: `calc(50% - ${center}px)`,
1346
+ left: `${offset}px`
1347
+ }
1348
+ };
1349
+ const stickStyle = {
1350
+ width: `${size}px`,
1351
+ height: `${size}px`,
1352
+ top: styleMap[stick].top,
1353
+ left: styleMap[stick].left,
1354
+ right: styleMap[stick].right,
1355
+ bottom: styleMap[stick].bottom
1356
+ };
1357
+ stickStyle.display = this.enabled ? 'block' : 'none';
1358
+ return stickStyle;
1359
+ };
1360
+ },
1361
+ style() {
1362
+ return {
1363
+ transform: `translate(${this.left}px, ${this.top}px)`,
1364
+ width: this.computedWidth,
1365
+ height: this.computedHeight,
1366
+ zIndex: this.zIndex,
1367
+ ...this.dragging && this.disableUserSelect
1368
+ ? userSelectNone
1369
+ : userSelectAuto
1370
+ };
1371
+ },
1372
+ // 控制柄显示与否
1373
+ actualHandles() {
1374
+ if (!this.resizable) {
1375
+ return [];
1376
+ }
1377
+
1378
+ return this.handles;
1379
+ },
1380
+ computedWidth() {
1381
+ if (typeof this.w === 'string') {
1382
+ if (!this.widthTouched) {
1383
+ return this.w;
1384
+ }
1385
+ }
1386
+ return this.width + 'px';
1387
+ },
1388
+ computedHeight() {
1389
+ if (typeof this.h === 'string') {
1390
+ if (!this.heightTouched) {
1391
+ return this.h;
1392
+ }
1393
+ }
1394
+ return this.height + 'px';
1395
+ },
1396
+ resizingOnX() {
1397
+ return (
1398
+ Boolean(this.handle) &&
1399
+ (this.handle.includes('l') || this.handle.includes('r'))
1400
+ );
1401
+ },
1402
+ resizingOnY() {
1403
+ return (
1404
+ Boolean(this.handle) &&
1405
+ (this.handle.includes('t') || this.handle.includes('b'))
1406
+ );
1407
+ },
1408
+ isCornerHandle() {
1409
+ return (
1410
+ Boolean(this.handle) && ['tl', 'tr', 'br', 'bl'].includes(this.handle)
1411
+ );
1412
+ }
1413
+ },
1414
+
1415
+ watch: {
1416
+ 'handleParentResize.height'() {
1417
+ this.checkParentSize();
1418
+ },
1419
+ 'handleParentResize.width'() {
1420
+ this.checkParentSize();
1421
+ },
1422
+ resizable(val) {
1423
+ if (!val) {
1424
+ this.resizing = false;
1425
+ }
1426
+ },
1427
+ active(val) {
1428
+ this.enabled = val;
1429
+
1430
+ if (val) {
1431
+ this.$emit('activated');
1432
+ } else {
1433
+ this.$emit('deactivated');
1434
+ }
1435
+ },
1436
+ z(val) {
1437
+ if (val >= 0 || val === 'auto') {
1438
+ this.zIndex = val;
1439
+ }
1440
+ },
1441
+ x(val) {
1442
+ if (this.resizing || this.dragging) {
1443
+ return;
1444
+ }
1445
+
1446
+ if (this.parent) {
1447
+ this.bounds = this.calcDragLimits();
1448
+ }
1449
+
1450
+ this.moveHorizontally(val);
1451
+ },
1452
+ y(val) {
1453
+ if (this.resizing || this.dragging) {
1454
+ return;
1455
+ }
1456
+
1457
+ if (this.parent) {
1458
+ this.bounds = this.calcDragLimits();
1459
+ }
1460
+
1461
+ this.moveVertically(val);
1462
+ },
1463
+ lockAspectRatio(val) {
1464
+ if (val) {
1465
+ this.aspectFactor = this.width / this.height;
1466
+ } else {
1467
+ this.aspectFactor = undefined;
1468
+ }
1469
+ },
1470
+ minWidth(val) {
1471
+ if (val > 0 && val <= this.width) {
1472
+ this.minW = val;
1473
+ }
1474
+ },
1475
+ minHeight(val) {
1476
+ if (val > 0 && val <= this.height) {
1477
+ this.minH = val;
1478
+ }
1479
+ },
1480
+ maxWidth(val) {
1481
+ this.maxW = val;
1482
+ },
1483
+ maxHeight(val) {
1484
+ this.maxH = val;
1485
+ },
1486
+ w(val) {
1487
+ if (this.resizing || this.dragging) {
1488
+ return;
1489
+ }
1490
+
1491
+ if (this.parent) {
1492
+ this.bounds = this.calcResizeLimits();
1493
+ }
1494
+
1495
+ this.changeWidth(val);
1496
+ },
1497
+ h(val) {
1498
+ if (this.resizing || this.dragging) {
1499
+ return;
1500
+ }
1501
+
1502
+ if (this.parent) {
1503
+ this.bounds = this.calcResizeLimits();
1504
+ }
1505
+
1506
+ this.changeHeight(val);
1507
+ }
1508
+ }
1509
+ };
1510
+ </script>
1511
+
1512
+ <template>
1513
+ <div
1514
+ :style="style"
1515
+ :class="[
1516
+ {
1517
+ [classNameActive]: enabled,
1518
+ [classNameDragging]: dragging,
1519
+ [classNameResizing]: resizing,
1520
+ [classNameDraggable]: draggable,
1521
+ [classNameResizable]: resizable,
1522
+ },
1523
+ className,
1524
+ 'tz'
1525
+ ]"
1526
+ @mousedown="elementMouseDown"
1527
+ @touchstart="elementTouchDown"
1528
+ @contextmenu.prevent.stop="onContextMenu"
1529
+ >
1530
+ <div
1531
+ v-for="handle in actualHandles"
1532
+ :key="handle"
1533
+ :class="[classNameHandle, classNameHandle + '-' + handle]"
1534
+ :style="handleStyle(handle)"
1535
+ @mousedown.stop.prevent="handleDown(handle, $event)"
1536
+ @touchstart.stop.prevent="handleTouchDown(handle, $event)"
1537
+ >
1538
+ <slot :name="handle"></slot>
1539
+ </div>
1540
+ <slot></slot>
1541
+ </div>
1542
+ </template>
1543
+
1544
+ <style>
1545
+ @import "./vue-draggable-resizable.css";
1546
+ </style>