skhj-variant 2.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (346) hide show
  1. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  2. package/.idea/modules.xml +8 -0
  3. package/.idea/package.iml +12 -0
  4. package/README.md +180 -0
  5. package/babel.config.js +5 -0
  6. package/dist/build/css/app.9b74af27.css +1 -0
  7. package/dist/build/css/chunk-vendors.a16c4353.css +1 -0
  8. package/dist/build/favicon.ico +0 -0
  9. package/dist/build/fonts/element-icons.535877f5.woff +0 -0
  10. package/dist/build/fonts/element-icons.732389de.ttf +0 -0
  11. package/dist/build/img/t1.21b2c158.png +0 -0
  12. package/dist/build/img/t2.6991670f.png +0 -0
  13. package/dist/build/img/t3.49724600.png +0 -0
  14. package/dist/build/img/t4.4acb1808.png +0 -0
  15. package/dist/build/img/t5.e5e1948c.png +0 -0
  16. package/dist/build/img/t6.40836551.png +0 -0
  17. package/dist/build/img/t7.94cf1cc9.png +0 -0
  18. package/dist/build/img/t8.9291e9c1.png +0 -0
  19. package/dist/build/index.html +1 -0
  20. package/dist/build/js/app.dbcf7751.js +1 -0
  21. package/dist/build/js/chunk-1d66e3dd.7d669272.js +23 -0
  22. package/dist/build/js/chunk-vendors.be32fc27.js +24 -0
  23. package/dist/build/report.html +53 -0
  24. package/dist/lib/VFormDesigner.common-report.html +53 -0
  25. package/dist/lib/VFormDesigner.common.1.js +14583 -0
  26. package/dist/lib/VFormDesigner.common.1.js.map +1 -0
  27. package/dist/lib/VFormDesigner.common.js +71232 -0
  28. package/dist/lib/VFormDesigner.common.js.map +1 -0
  29. package/dist/lib/VFormDesigner.css +1 -0
  30. package/dist/lib/VFormDesigner.umd-report.html +53 -0
  31. package/dist/lib/VFormDesigner.umd.1.js +14583 -0
  32. package/dist/lib/VFormDesigner.umd.1.js.map +1 -0
  33. package/dist/lib/VFormDesigner.umd.js +71242 -0
  34. package/dist/lib/VFormDesigner.umd.js.map +1 -0
  35. package/dist/lib/VFormDesigner.umd.min-report.html +53 -0
  36. package/dist/lib/VFormDesigner.umd.min.1.js +23 -0
  37. package/dist/lib/VFormDesigner.umd.min.js +19 -0
  38. package/dist/lib/demo.html +10 -0
  39. package/dist/lib/img/t1.21b2c158.png +0 -0
  40. package/dist/lib/img/t2.6991670f.png +0 -0
  41. package/dist/lib/img/t3.49724600.png +0 -0
  42. package/dist/lib/img/t4.4acb1808.png +0 -0
  43. package/dist/lib/img/t5.e5e1948c.png +0 -0
  44. package/dist/lib/img/t6.40836551.png +0 -0
  45. package/dist/lib/img/t7.94cf1cc9.png +0 -0
  46. package/dist/lib/img/t8.9291e9c1.png +0 -0
  47. package/dist/lib-render/VFormRender.common-report.html +53 -0
  48. package/dist/lib-render/VFormRender.common.1.js +14583 -0
  49. package/dist/lib-render/VFormRender.common.1.js.map +1 -0
  50. package/dist/lib-render/VFormRender.common.js +32421 -0
  51. package/dist/lib-render/VFormRender.common.js.map +1 -0
  52. package/dist/lib-render/VFormRender.css +1 -0
  53. package/dist/lib-render/VFormRender.umd-report.html +53 -0
  54. package/dist/lib-render/VFormRender.umd.1.js +14583 -0
  55. package/dist/lib-render/VFormRender.umd.1.js.map +1 -0
  56. package/dist/lib-render/VFormRender.umd.js +32431 -0
  57. package/dist/lib-render/VFormRender.umd.js.map +1 -0
  58. package/dist/lib-render/VFormRender.umd.min-report.html +53 -0
  59. package/dist/lib-render/VFormRender.umd.min.1.js +23 -0
  60. package/dist/lib-render/VFormRender.umd.min.js +15 -0
  61. package/dist/lib-render/demo.html +10 -0
  62. package/index_template/index_dev.html +19 -0
  63. package/index_template/index_prod.html +28 -0
  64. package/index_template/vform_demo.gif +0 -0
  65. package/install-render.js +29 -0
  66. package/install.js +41 -0
  67. package/jsconfig.json +10 -0
  68. package/license.txt +8 -0
  69. package/package.json +58 -0
  70. package/public/favicon.ico +0 -0
  71. package/public/index.html +28 -0
  72. package/src/App.vue +22 -0
  73. package/src/assets/ft-images/t1.png +0 -0
  74. package/src/assets/ft-images/t2.png +0 -0
  75. package/src/assets/ft-images/t3.png +0 -0
  76. package/src/assets/ft-images/t4.png +0 -0
  77. package/src/assets/ft-images/t5.png +0 -0
  78. package/src/assets/ft-images/t6.png +0 -0
  79. package/src/assets/ft-images/t7.png +0 -0
  80. package/src/assets/ft-images/t8.png +0 -0
  81. package/src/assets/style.scss +92 -0
  82. package/src/assets/vform-logo.png +0 -0
  83. package/src/components/code-editor/index.vue +130 -0
  84. package/src/components/form-designer/designer.js +926 -0
  85. package/src/components/form-designer/form-widget/container-widget/container-wrapper.vue +107 -0
  86. package/src/components/form-designer/form-widget/container-widget/containerMixin.js +85 -0
  87. package/src/components/form-designer/form-widget/container-widget/grid-col-widget.vue +310 -0
  88. package/src/components/form-designer/form-widget/container-widget/grid-widget.vue +89 -0
  89. package/src/components/form-designer/form-widget/container-widget/index.js +24 -0
  90. package/src/components/form-designer/form-widget/container-widget/tab-widget.vue +119 -0
  91. package/src/components/form-designer/form-widget/container-widget/table-cell-widget.vue +341 -0
  92. package/src/components/form-designer/form-widget/container-widget/table-widget.vue +111 -0
  93. package/src/components/form-designer/form-widget/field-widget/button-widget.vue +87 -0
  94. package/src/components/form-designer/form-widget/field-widget/cascader-widget.vue +104 -0
  95. package/src/components/form-designer/form-widget/field-widget/checkbox-widget.vue +105 -0
  96. package/src/components/form-designer/form-widget/field-widget/color-widget.vue +99 -0
  97. package/src/components/form-designer/form-widget/field-widget/date-range-widget.vue +104 -0
  98. package/src/components/form-designer/form-widget/field-widget/date-widget.vue +103 -0
  99. package/src/components/form-designer/form-widget/field-widget/divider-widget.vue +83 -0
  100. package/src/components/form-designer/form-widget/field-widget/fieldMixin.js +535 -0
  101. package/src/components/form-designer/form-widget/field-widget/file-upload-widget.vue +271 -0
  102. package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue +331 -0
  103. package/src/components/form-designer/form-widget/field-widget/html-text-widget.vue +82 -0
  104. package/src/components/form-designer/form-widget/field-widget/index.js +10 -0
  105. package/src/components/form-designer/form-widget/field-widget/input-widget.vue +112 -0
  106. package/src/components/form-designer/form-widget/field-widget/number-widget.vue +103 -0
  107. package/src/components/form-designer/form-widget/field-widget/picture-upload-widget.vue +226 -0
  108. package/src/components/form-designer/form-widget/field-widget/radio-widget.vue +105 -0
  109. package/src/components/form-designer/form-widget/field-widget/rate-widget.vue +102 -0
  110. package/src/components/form-designer/form-widget/field-widget/rich-editor-widget.vue +122 -0
  111. package/src/components/form-designer/form-widget/field-widget/select-widget.vue +115 -0
  112. package/src/components/form-designer/form-widget/field-widget/slider-widget.vue +100 -0
  113. package/src/components/form-designer/form-widget/field-widget/static-content-wrapper.vue +189 -0
  114. package/src/components/form-designer/form-widget/field-widget/static-text-widget.vue +82 -0
  115. package/src/components/form-designer/form-widget/field-widget/switch-widget.vue +101 -0
  116. package/src/components/form-designer/form-widget/field-widget/textarea-widget.vue +99 -0
  117. package/src/components/form-designer/form-widget/field-widget/time-range-widget.vue +104 -0
  118. package/src/components/form-designer/form-widget/field-widget/time-widget.vue +103 -0
  119. package/src/components/form-designer/form-widget/index.vue +260 -0
  120. package/src/components/form-designer/index.vue +448 -0
  121. package/src/components/form-designer/setting-panel/form-setting.vue +324 -0
  122. package/src/components/form-designer/setting-panel/index.vue +328 -0
  123. package/src/components/form-designer/setting-panel/option-items-setting.vue +234 -0
  124. package/src/components/form-designer/setting-panel/property-editor/allowCreate-editor.vue +24 -0
  125. package/src/components/form-designer/setting-panel/property-editor/appendButton-editor.vue +28 -0
  126. package/src/components/form-designer/setting-panel/property-editor/appendButtonDisabled-editor.vue +23 -0
  127. package/src/components/form-designer/setting-panel/property-editor/automaticDropdown-editor.vue +23 -0
  128. package/src/components/form-designer/setting-panel/property-editor/border-editor.vue +23 -0
  129. package/src/components/form-designer/setting-panel/property-editor/buttonIcon-editor.vue +23 -0
  130. package/src/components/form-designer/setting-panel/property-editor/buttonStyle-editor.vue +23 -0
  131. package/src/components/form-designer/setting-panel/property-editor/clearable-editor.vue +23 -0
  132. package/src/components/form-designer/setting-panel/property-editor/columnWidth-editor.vue +40 -0
  133. package/src/components/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +28 -0
  134. package/src/components/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +81 -0
  135. package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +24 -0
  136. package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +24 -0
  137. package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +24 -0
  138. package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-responsive-editor.vue +23 -0
  139. package/src/components/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue +48 -0
  140. package/src/components/form-designer/setting-panel/property-editor/container-sub-form/showBlankRow-editor.vue +23 -0
  141. package/src/components/form-designer/setting-panel/property-editor/container-sub-form/showRowNumber-editor.vue +23 -0
  142. package/src/components/form-designer/setting-panel/property-editor/container-sub-form/sub-form-labelAlign-editor.vue +36 -0
  143. package/src/components/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -0
  144. package/src/components/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +23 -0
  145. package/src/components/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +23 -0
  146. package/src/components/form-designer/setting-panel/property-editor/customClass-editor.vue +40 -0
  147. package/src/components/form-designer/setting-panel/property-editor/defaultValue-editor.vue +25 -0
  148. package/src/components/form-designer/setting-panel/property-editor/disabled-editor.vue +23 -0
  149. package/src/components/form-designer/setting-panel/property-editor/displayStyle-editor.vue +26 -0
  150. package/src/components/form-designer/setting-panel/property-editor/editable-editor.vue +24 -0
  151. package/src/components/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +23 -0
  152. package/src/components/form-designer/setting-panel/property-editor/event-handler/eventMixin.js +12 -0
  153. package/src/components/form-designer/setting-panel/property-editor/event-handler/onBeforeUpload-editor.vue +30 -0
  154. package/src/components/form-designer/setting-panel/property-editor/event-handler/onBlur-editor.vue +30 -0
  155. package/src/components/form-designer/setting-panel/property-editor/event-handler/onChange-editor.vue +30 -0
  156. package/src/components/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +30 -0
  157. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue +31 -0
  158. package/src/components/form-designer/setting-panel/property-editor/event-handler/onFocus-editor.vue +30 -0
  159. package/src/components/form-designer/setting-panel/property-editor/event-handler/onInput-editor.vue +30 -0
  160. package/src/components/form-designer/setting-panel/property-editor/event-handler/onMounted-editor.vue +30 -0
  161. package/src/components/form-designer/setting-panel/property-editor/event-handler/onRemoteQuery-editor.vue +30 -0
  162. package/src/components/form-designer/setting-panel/property-editor/event-handler/onSubFormRowAdd-editor.vue +30 -0
  163. package/src/components/form-designer/setting-panel/property-editor/event-handler/onSubFormRowChange-editor.vue +30 -0
  164. package/src/components/form-designer/setting-panel/property-editor/event-handler/onSubFormRowDelete-editor.vue +30 -0
  165. package/src/components/form-designer/setting-panel/property-editor/event-handler/onSubFormRowInsert-editor.vue +30 -0
  166. package/src/components/form-designer/setting-panel/property-editor/event-handler/onUploadError-editor.vue +30 -0
  167. package/src/components/form-designer/setting-panel/property-editor/event-handler/onUploadSuccess-editor.vue +30 -0
  168. package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue +30 -0
  169. package/src/components/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +32 -0
  170. package/src/components/form-designer/setting-panel/property-editor/field-button/circle-editor.vue +23 -0
  171. package/src/components/form-designer/setting-panel/property-editor/field-button/icon-editor.vue +23 -0
  172. package/src/components/form-designer/setting-panel/property-editor/field-button/plain-editor.vue +24 -0
  173. package/src/components/form-designer/setting-panel/property-editor/field-button/round-editor.vue +23 -0
  174. package/src/components/form-designer/setting-panel/property-editor/field-color/color-defaultValue-editor.vue +23 -0
  175. package/src/components/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +24 -0
  176. package/src/components/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +30 -0
  177. package/src/components/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +30 -0
  178. package/src/components/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +26 -0
  179. package/src/components/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +24 -0
  180. package/src/components/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +30 -0
  181. package/src/components/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +27 -0
  182. package/src/components/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +26 -0
  183. package/src/components/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +27 -0
  184. package/src/components/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -0
  185. package/src/components/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +23 -0
  186. package/src/components/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +27 -0
  187. package/src/components/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +43 -0
  188. package/src/components/form-designer/setting-panel/property-editor/field-rate/allowHalf-editor.vue +23 -0
  189. package/src/components/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +24 -0
  190. package/src/components/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +24 -0
  191. package/src/components/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +26 -0
  192. package/src/components/form-designer/setting-panel/property-editor/field-rate/rate-max-editor.vue +25 -0
  193. package/src/components/form-designer/setting-panel/property-editor/field-rate/showScore-editor.vue +23 -0
  194. package/src/components/form-designer/setting-panel/property-editor/field-rate/showText-editor.vue +23 -0
  195. package/src/components/form-designer/setting-panel/property-editor/field-slider/range-editor.vue +23 -0
  196. package/src/components/form-designer/setting-panel/property-editor/field-slider/showStops-editor.vue +23 -0
  197. package/src/components/form-designer/setting-panel/property-editor/field-slider/vertical-editor.vue +23 -0
  198. package/src/components/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +23 -0
  199. package/src/components/form-designer/setting-panel/property-editor/field-switch/activeColor-editor.vue +23 -0
  200. package/src/components/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +23 -0
  201. package/src/components/form-designer/setting-panel/property-editor/field-switch/inactiveColor-editor.vue +23 -0
  202. package/src/components/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +23 -0
  203. package/src/components/form-designer/setting-panel/property-editor/field-switch/switch-defaultValue-editor.vue +25 -0
  204. package/src/components/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +23 -0
  205. package/src/components/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +24 -0
  206. package/src/components/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +27 -0
  207. package/src/components/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +24 -0
  208. package/src/components/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +27 -0
  209. package/src/components/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +23 -0
  210. package/src/components/form-designer/setting-panel/property-editor/filterable-editor.vue +23 -0
  211. package/src/components/form-designer/setting-panel/property-editor/hidden-editor.vue +23 -0
  212. package/src/components/form-designer/setting-panel/property-editor/index.js +10 -0
  213. package/src/components/form-designer/setting-panel/property-editor/label-editor.vue +30 -0
  214. package/src/components/form-designer/setting-panel/property-editor/labelAlign-editor.vue +42 -0
  215. package/src/components/form-designer/setting-panel/property-editor/labelHidden-editor.vue +23 -0
  216. package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +28 -0
  217. package/src/components/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +37 -0
  218. package/src/components/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +23 -0
  219. package/src/components/form-designer/setting-panel/property-editor/labelWidth-editor.vue +25 -0
  220. package/src/components/form-designer/setting-panel/property-editor/limit-editor.vue +24 -0
  221. package/src/components/form-designer/setting-panel/property-editor/max-editor.vue +39 -0
  222. package/src/components/form-designer/setting-panel/property-editor/maxLength-editor.vue +40 -0
  223. package/src/components/form-designer/setting-panel/property-editor/min-editor.vue +40 -0
  224. package/src/components/form-designer/setting-panel/property-editor/minLength-editor.vue +41 -0
  225. package/src/components/form-designer/setting-panel/property-editor/multiple-editor.vue +24 -0
  226. package/src/components/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +24 -0
  227. package/src/components/form-designer/setting-panel/property-editor/multipleSelect-editor.vue +24 -0
  228. package/src/components/form-designer/setting-panel/property-editor/name-editor.vue +80 -0
  229. package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue +28 -0
  230. package/src/components/form-designer/setting-panel/property-editor/placeholder-editor.vue +24 -0
  231. package/src/components/form-designer/setting-panel/property-editor/precision-editor.vue +23 -0
  232. package/src/components/form-designer/setting-panel/property-editor/prefixIcon-editor.vue +23 -0
  233. package/src/components/form-designer/setting-panel/property-editor/propertyMixin.js +47 -0
  234. package/src/components/form-designer/setting-panel/property-editor/readonly-editor.vue +23 -0
  235. package/src/components/form-designer/setting-panel/property-editor/remote-editor.vue +25 -0
  236. package/src/components/form-designer/setting-panel/property-editor/required-editor.vue +23 -0
  237. package/src/components/form-designer/setting-panel/property-editor/rows-editor.vue +24 -0
  238. package/src/components/form-designer/setting-panel/property-editor/showFileList-editor.vue +23 -0
  239. package/src/components/form-designer/setting-panel/property-editor/showPassword-editor.vue +24 -0
  240. package/src/components/form-designer/setting-panel/property-editor/showWordLimit-editor.vue +23 -0
  241. package/src/components/form-designer/setting-panel/property-editor/size-editor.vue +38 -0
  242. package/src/components/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +23 -0
  243. package/src/components/form-designer/setting-panel/property-editor/step-editor.vue +23 -0
  244. package/src/components/form-designer/setting-panel/property-editor/suffixIcon-editor.vue +23 -0
  245. package/src/components/form-designer/setting-panel/property-editor/type-editor.vue +33 -0
  246. package/src/components/form-designer/setting-panel/property-editor/uploadTip-editor.vue +24 -0
  247. package/src/components/form-designer/setting-panel/property-editor/uploadURL-editor.vue +28 -0
  248. package/src/components/form-designer/setting-panel/property-editor/validation-editor.vue +48 -0
  249. package/src/components/form-designer/setting-panel/property-editor/validationHint-editor.vue +23 -0
  250. package/src/components/form-designer/setting-panel/property-editor/withCredentials-editor.vue +23 -0
  251. package/src/components/form-designer/setting-panel/property-editor-factory.js +173 -0
  252. package/src/components/form-designer/setting-panel/propertyRegister.js +198 -0
  253. package/src/components/form-designer/toolbar-panel/index.vue +1070 -0
  254. package/src/components/form-designer/widget-panel/index.vue +530 -0
  255. package/src/components/form-designer/widget-panel/templatesConfig.js +58 -0
  256. package/src/components/form-designer/widget-panel/widgetsConfig.js +966 -0
  257. package/src/components/form-render/container-item/container-item-wrapper.vue +34 -0
  258. package/src/components/form-render/container-item/containerItemMixin.js +136 -0
  259. package/src/components/form-render/container-item/grid-col-item.vue +115 -0
  260. package/src/components/form-render/container-item/grid-item.vue +54 -0
  261. package/src/components/form-render/container-item/index.js +24 -0
  262. package/src/components/form-render/container-item/sub-form-item.vue +405 -0
  263. package/src/components/form-render/container-item/tab-item.vue +89 -0
  264. package/src/components/form-render/container-item/table-cell-item.vue +61 -0
  265. package/src/components/form-render/container-item/table-item.vue +65 -0
  266. package/src/components/form-render/index.vue +712 -0
  267. package/src/components/form-render/refMixin.js +22 -0
  268. package/src/components/svg-icon/index.vue +49 -0
  269. package/src/components/v-table/index.vue +106 -0
  270. package/src/extension/extension-helper.js +23 -0
  271. package/src/extension/extension-loader.js +112 -0
  272. package/src/extension/samples/alert/alert-widget.vue +72 -0
  273. package/src/extension/samples/card/card-item.vue +90 -0
  274. package/src/extension/samples/card/card-widget.vue +119 -0
  275. package/src/extension/samples/extension-schema.js +36 -0
  276. package/src/extension/samples/extension-sfc-generator.js +50 -0
  277. package/src/iconfont/iconfont.css +29 -0
  278. package/src/iconfont/iconfont.eot +0 -0
  279. package/src/iconfont/iconfont.js +1 -0
  280. package/src/iconfont/iconfont.json +37 -0
  281. package/src/iconfont/iconfont.svg +35 -0
  282. package/src/iconfont/iconfont.ttf +0 -0
  283. package/src/iconfont/iconfont.woff +0 -0
  284. package/src/iconfont/iconfont.woff2 +0 -0
  285. package/src/icons/index.js +9 -0
  286. package/src/icons/svg/alert.svg +1 -0
  287. package/src/icons/svg/button.svg +1 -0
  288. package/src/icons/svg/card.svg +1 -0
  289. package/src/icons/svg/cascader-field.svg +1 -0
  290. package/src/icons/svg/checkbox-field.svg +1 -0
  291. package/src/icons/svg/color-field.svg +1 -0
  292. package/src/icons/svg/custom-component.svg +1 -0
  293. package/src/icons/svg/data-table.svg +1 -0
  294. package/src/icons/svg/date-field.svg +1 -0
  295. package/src/icons/svg/date-range-field.svg +1 -0
  296. package/src/icons/svg/divider.svg +1 -0
  297. package/src/icons/svg/document.svg +1 -0
  298. package/src/icons/svg/drag.svg +1 -0
  299. package/src/icons/svg/file-upload-field.svg +1 -0
  300. package/src/icons/svg/github.svg +1 -0
  301. package/src/icons/svg/grid.svg +1 -0
  302. package/src/icons/svg/html-text.svg +1 -0
  303. package/src/icons/svg/node-tree.svg +1 -0
  304. package/src/icons/svg/number-field.svg +1 -0
  305. package/src/icons/svg/picture-upload-field.svg +1 -0
  306. package/src/icons/svg/radio-field.svg +1 -0
  307. package/src/icons/svg/rate-field.svg +1 -0
  308. package/src/icons/svg/redo.svg +1 -0
  309. package/src/icons/svg/rich-editor-field.svg +1 -0
  310. package/src/icons/svg/section.svg +1 -0
  311. package/src/icons/svg/select-field.svg +1 -0
  312. package/src/icons/svg/slider-field.svg +1 -0
  313. package/src/icons/svg/slot-component.svg +1 -0
  314. package/src/icons/svg/static-text.svg +1 -0
  315. package/src/icons/svg/sub-form.svg +1 -0
  316. package/src/icons/svg/switch-field.svg +1 -0
  317. package/src/icons/svg/tab.svg +1 -0
  318. package/src/icons/svg/table.svg +1 -0
  319. package/src/icons/svg/text-field.svg +1 -0
  320. package/src/icons/svg/textarea-field.svg +1 -0
  321. package/src/icons/svg/time-field.svg +1 -0
  322. package/src/icons/svg/time-range-field.svg +1 -0
  323. package/src/icons/svg/undo.svg +1 -0
  324. package/src/icons/svg/vue-sfc.svg +1 -0
  325. package/src/index.js +41 -0
  326. package/src/lang/en-US.js +321 -0
  327. package/src/lang/en-US_extension.js +26 -0
  328. package/src/lang/en-US_render.js +38 -0
  329. package/src/lang/zh-CN.js +321 -0
  330. package/src/lang/zh-CN_extension.js +26 -0
  331. package/src/lang/zh-CN_render.js +38 -0
  332. package/src/main.js +29 -0
  333. package/src/styles/global.scss +103 -0
  334. package/src/styles/index.scss +15 -0
  335. package/src/utils/beautifierLoader.js +77 -0
  336. package/src/utils/code-generator.js +91 -0
  337. package/src/utils/config.js +19 -0
  338. package/src/utils/debug-console.js +7 -0
  339. package/src/utils/directive.js +74 -0
  340. package/src/utils/i18n.js +70 -0
  341. package/src/utils/sfc-generator.js +583 -0
  342. package/src/utils/util.js +232 -0
  343. package/src/utils/validators.js +127 -0
  344. package/src/utils/vue2js-generator.js +144 -0
  345. package/src/utils/vue3js-generator.js +70 -0
  346. package/vue.config.js +92 -0
@@ -0,0 +1,321 @@
1
+ export default {
2
+ application: {
3
+ 'zh-CN': '简体中文',
4
+ 'en-US': 'English',
5
+ productTitle: '表单设计器',
6
+ github: 'GitHub',
7
+ document: '文档',
8
+ qqGroup: '技术WX群',
9
+ deployment: '私有部署',
10
+ subscription: '订阅Pro',
11
+ },
12
+
13
+ designer: {
14
+ componentLib: '组件库',
15
+ formLib: '表单模板',
16
+ containerTitle: '容器',
17
+ dragHandlerHint: '鼠标拖拽容器组件或字段组件并放置于表单中',
18
+ dragAction: '拖动',
19
+ basicFieldTitle: '基础字段',
20
+ advancedFieldTitle: '高级字段',
21
+ customFieldTitle: '自定义扩展字段',
22
+
23
+ noWidgetHint: '请从左侧列表中选择一个组件, 然后用鼠标拖动组件放置于此处.',
24
+
25
+ widgetLabel: {
26
+ grid: '栅格',
27
+ table: '表格',
28
+ tab: '标签页',
29
+ section: '区块',
30
+ 'sub-form': '子表单',
31
+ 'grid-col': '栅格列',
32
+ 'table-cell': '单元格',
33
+ 'tab-pane': '选项卡页',
34
+ 'data-table': '数据表格',
35
+
36
+ input: '单行输入',
37
+ textarea: '多行输入',
38
+ number: '计数器',
39
+ radio: '单选项',
40
+ checkbox: '多选项',
41
+ select: '下拉选项',
42
+ time: '时间',
43
+ 'time-range': '时间范围',
44
+ date: '日期',
45
+ 'date-range': '日期范围',
46
+ switch: '开关',
47
+ rate: '评分',
48
+ color: '颜色选择器',
49
+ slider: '滑块',
50
+ 'static-text': '静态文字',
51
+ 'html-text': 'HTML',
52
+ button: '按钮',
53
+ divider: '分隔线',
54
+
55
+ 'picture-upload': '图片',
56
+ 'file-upload': '文件',
57
+ 'rich-editor': '富文本',
58
+ cascader: '级联选择',
59
+
60
+ custom: 'Custom Component',
61
+ slot: 'Slot'
62
+ },
63
+
64
+ hint: {
65
+ selectParentWidget: '选中父组件',
66
+ moveUpWidget: '上移组件',
67
+ moveDownWidget: '下移组件',
68
+ cloneWidget: '复制组件',
69
+ insertRow: '插入新行',
70
+ insertColumn: '插入新列',
71
+ remove: '移除组件',
72
+ cellSetting: '单元格操作',
73
+ dragHandler: '拖拽手柄',
74
+ copyField: '复制字段组件',
75
+ onlyFieldWidgetAcceptable: '子表单只能接收字段组件',
76
+ moveUpFirstChildHint: '已经移动到最上面',
77
+ moveDownLastChildHint: '已经移动到最下面',
78
+
79
+ closePreview: '关闭',
80
+ copyJson: '复制JSON',
81
+ saveFormJson: '保存为文件',
82
+ copyVueCode: '复制Vue代码',
83
+ copyHtmlCode: '复制HTML代码',
84
+ copyJsonSuccess: '复制JSON成功',
85
+ importJsonSuccess: '导入JSON成功',
86
+ copyJsonFail: '复制JSON失败',
87
+ copyVueCodeSuccess: '复制Vue代码成功',
88
+ copyVueCodeFail: '复制Vue代码失败',
89
+ copyHtmlCodeSuccess: '复制HTML代码成功',
90
+ copyHtmlCodeFail: '复制HTML代码失败',
91
+ saveVueCode: '保存Vue文件',
92
+ saveHtmlCode: '保存Html文件',
93
+ getFormData: '获取数据',
94
+ resetForm: '重置表单',
95
+ disableForm: '禁用编辑',
96
+ enableForm: '恢复编辑',
97
+ exportFormData: '表单数据',
98
+ copyFormData: '复制JSON',
99
+ saveFormData: '保存为文件',
100
+ copyVue2SFC: '复制Vue2代码',
101
+ copyVue3SFC: '复制Vue3代码',
102
+ copySFCFail: '复制SFC代码失败',
103
+ copySFCSuccess: '复制SFC代码成功',
104
+ saveVue2SFC: '保存为Vue2组件',
105
+ saveVue3SFC: '保存为Vue3组件',
106
+ fileNameForSave: '文件名:',
107
+ saveFileTitle: '保存为文件',
108
+ fileNameInputPlaceholder: '请输入文件名',
109
+ sampleLoadedSuccess: '表单示例加载成功',
110
+ sampleLoadedFail: '表单示例加载失败',
111
+ loadFormTemplate: '加载此模板',
112
+ loadFormTemplateHint: '是否加载这个模板?加载后会覆盖设计器当前表单,你可以使用“撤销”功能恢复。',
113
+ loadFormTemplateSuccess: '表单模板加载成功',
114
+ loadFormTemplateFailed: '表单模板加载失败',
115
+ currentNodeCannotBeSelected: '当前组件节点不可选择',
116
+
117
+ widgetSetting: '组件设置',
118
+ formSetting: '表单设置',
119
+
120
+ prompt: '提示',
121
+ confirm: '确定',
122
+ cancel: '取消',
123
+ import: '导入',
124
+ importJsonHint: '导入的JSON内容须符合下述格式,以保证顺利导入.',
125
+ invalidOptionsData: '无效的选项数据:',
126
+ lastPaneCannotBeDeleted: '仅剩一个选项卡页不可删除.',
127
+ duplicateName: '组件名称已存在: ',
128
+ nameRequired: '组件名称不可为空',
129
+
130
+ numberValidator: '数字',
131
+ letterValidator: '字母',
132
+ letterAndNumberValidator: '数字字母',
133
+ mobilePhoneValidator: '手机号码',
134
+ emailValidator: '邮箱',
135
+ urlValidator: '网址',
136
+ noChineseValidator: '非中文字符',
137
+ chineseValidator: '仅中文字符',
138
+
139
+ rowspanNotConsistentForMergeEntireRow: '存在行高不一致的单元格, 无法合并整行.',
140
+ colspanNotConsistentForMergeEntireColumn: '存在列宽不一致的单元格, 无法合并整列.',
141
+ rowspanNotConsistentForDeleteEntireRow: '存在行高不一致的单元格, 不可删除整行.',
142
+ colspanNotConsistentForDeleteEntireColumn: '存在列宽不一致的单元格, 不可删除整列.',
143
+ lastColCannotBeDeleted: '最后一列不可删除.',
144
+ lastRowCannotBeDeleted: '最后一行不可删除.',
145
+ },
146
+
147
+ toolbar: {
148
+ undoHint: '撤销',
149
+ redoHint: '重做',
150
+ pcLayout: 'PC',
151
+ padLayout: 'Pad',
152
+ mobileLayout: 'H5',
153
+ nodeTreeHint: '组件层次结构树',
154
+ nodeTreeTitle: '组件层次结构树',
155
+ clear: '清空',
156
+ preview: '预览',
157
+ importJson: '导入JSON',
158
+ exportJson: '导出JSON',
159
+ exportCode: '导出代码',
160
+ generateCode: '生成代码',
161
+ generateSFC: '生成SFC',
162
+ },
163
+
164
+ setting: {
165
+ basicSetting: '基本属性',
166
+ attributeSetting: '属性设置',
167
+ commonSetting: '常见属性',
168
+ advancedSetting: '高级属性',
169
+ eventSetting: '事件属性',
170
+ uniqueName: '唯一名称',
171
+ editNameHelp: '修改名称后需按回车确认',
172
+ label: '字段标签',
173
+ displayType: '显示类型',
174
+ defaultValue: '默认值',
175
+ placeholder: '占位内容',
176
+ startPlaceholder: '起始占位内容',
177
+ endPlaceholder: '截止占位内容',
178
+ widgetColumnWidth: '组件列宽',
179
+ widgetSize: '组件大小',
180
+ showStops: '显示间断点',
181
+ displayStyle: '显示样式',
182
+ inlineLayout: '行内',
183
+ blockLayout: '块',
184
+ buttonStyle: '显示为按钮',
185
+ border: '带有边框',
186
+ labelWidth: '标签宽度',
187
+ rows: '行数',
188
+ labelHidden: '隐藏字段标签',
189
+ required: '必填字段',
190
+ validation: '字段校验',
191
+ validationHelp: '支持输入正则表达式',
192
+ validationHint: '校验失败提示',
193
+ readonly: '只读',
194
+ disabled: '禁用',
195
+ hidden: '隐藏',
196
+ textContent: '静态文字',
197
+ htmlContent: 'HTML',
198
+ clearable: '可清除',
199
+ editable: '可输入',
200
+ format: '显示格式',
201
+ valueFormat: '绑定值格式',
202
+ showPassword: '可显示密码',
203
+ filterable: '可搜索选项',
204
+ allowCreate: '允许创建选项',
205
+ remote: '可远程搜索',
206
+ automaticDropdown: '自动弹出选项',
207
+ multiple: '选项可多选',
208
+ multipleLimit: '多选数量限制',
209
+ contentPosition: '文字位置',
210
+ plain: '朴素按钮',
211
+ round: '圆角按钮',
212
+ circle: '圆形按钮',
213
+ icon: '图标',
214
+ optionsSetting: '选项设置',
215
+ addOption: '增加选项',
216
+ importOptions: '导入选项',
217
+ resetDefault: '重设选中项',
218
+ uploadSetting: '上传参数设置',
219
+ uploadURL: '上传地址',
220
+ uploadTip: '上传提示内容',
221
+ withCredentials: '发送cookie凭证',
222
+ multipleSelect: '文件可多选',
223
+ showFileList: '显示文件列表',
224
+ limit: '最大上传数量',
225
+ fileMaxSize: '文件大小限制(MB)',
226
+ fileTypes: '上传文件类型',
227
+ fileTypesHelp: '支持添加其他文件类型',
228
+ headers: '上传请求头',
229
+
230
+ cellWidth: '宽度',
231
+ cellHeight: '高度',
232
+ gridColHeight: '栅格列统一高度(px)',
233
+ gutter: '栅格间隔(px)',
234
+ columnSetting: '栅格属性设置',
235
+ colsOfGrid: '当前栅格列:',
236
+ colSpanTitle: '栅格宽度',
237
+ colOffsetTitle: '左侧间隔格数',
238
+ colPushTitle: '右移栅格数',
239
+ colPullTitle: '左移栅格数',
240
+ addColumn: '增加栅格',
241
+ responsive: '响应式布局',
242
+
243
+ tabPaneSetting: '选项卡设置',
244
+ addTabPane: '增加选项卡页',
245
+ paneActive: '激活',
246
+
247
+ customLabelIcon: '定制字段标签',
248
+ labelIconClass: '标签Icon样式',
249
+ labelIconPosition: '标签Icon位置',
250
+ labelTooltip: '标签文字提示',
251
+ minValue: '最小值',
252
+ maxValue: '最大值',
253
+ precision: '精度',
254
+ step: '增减步长',
255
+ controlsPosition: '控制按钮位置',
256
+ minLength: '最小长度',
257
+ maxLength: '最大长度',
258
+ showWordLimit: '显示字数统计',
259
+ prefixIcon: '头部Icon',
260
+ suffixIcon: '尾部Icon',
261
+ inputButton: '输入框按钮设置',
262
+ appendButton: '添加后置按钮',
263
+ appendButtonDisabled: '后置按钮禁用',
264
+ appendButtonIcon: '后置按钮Icon',
265
+ buttonIcon: '按钮Icon',
266
+ switchWidth: '开关宽度(像素)',
267
+ activeText: '开启时文字描述',
268
+ inactiveText: '关闭时文字描述',
269
+ activeColor: '开启时背景色',
270
+ inactiveColor: '关闭时背景色',
271
+ maxStars: '最大评分值',
272
+ lowThreshold: '低分界限值',
273
+ highThreshold: '高分界限值',
274
+ allowHalf: '允许半选',
275
+ showText: '显示辅助文字',
276
+ showScore: '显示当前分数',
277
+ range: '是否为范围选择',
278
+ vertical: '是否竖向显示',
279
+ showBlankRow: '默认显示新行',
280
+ showRowNumber: '显示行号',
281
+
282
+ insertColumnToLeft: '插入左侧列',
283
+ insertColumnToRight: '插入右侧列',
284
+ insertRowAbove: '插入上方行',
285
+ insertRowBelow: '插入下方行',
286
+ mergeLeftColumn: '合并左侧单元格',
287
+ mergeRightColumn: '合并右侧单元格',
288
+ mergeEntireRow: '合并整行',
289
+ mergeRowAbove: '合并上方单元格',
290
+ mergeRowBelow: '合并下方单元格',
291
+ mergeEntireColumn: '合并整列',
292
+ undoMergeCol: '撤销列合并',
293
+ undoMergeRow: '撤销行合并',
294
+ deleteEntireCol: '删除整列',
295
+ deleteEntireRow: '删除整行',
296
+
297
+ widgetName: '组件唯一名称',
298
+ formSize: '全局组件大小',
299
+ labelPosition: '字段标签位置',
300
+ topPosition: '顶部',
301
+ leftPosition: '左边',
302
+ labelAlign: '字段标签对齐',
303
+ leftAlign: '居左',
304
+ centerAlign: '居中',
305
+ rightAlign: '居右',
306
+ formCss: '表单全局CSS',
307
+ addCss: '编写CSS',
308
+ customClass: '自定义CSS样式',
309
+ globalFunctions: '表单全局函数',
310
+ addEventHandler: '编写代码',
311
+ editWidgetEventHandler: '组件事件处理',
312
+ editFormEventHandler: '表单事件处理',
313
+ formSFCSetting: '生成SFC设置',
314
+ formModelName: '数据对象名称',
315
+ formRefName: '引用名称',
316
+ formRulesName: '验证规则名称',
317
+
318
+ }
319
+
320
+ }
321
+ }
@@ -0,0 +1,26 @@
1
+ export default {
2
+ extension: {
3
+ widgetLabel: {
4
+ card: '卡片',
5
+ alert: '提示',
6
+ },
7
+
8
+ setting: {
9
+ cardFolded: '是否收起',
10
+ cardShowFold: '显示折叠按钮',
11
+ cardWidth: '卡片宽度',
12
+ cardShadow: '显示阴影',
13
+
14
+ alertTitle: '标题',
15
+ alertType: '类型',
16
+ description: '辅助性文字',
17
+ closable: '是否可关闭',
18
+ closeText: '关闭按钮文字',
19
+ center: '文字居中',
20
+ showIcon: '显示图标',
21
+ effect: '显示效果',
22
+
23
+ },
24
+
25
+ }
26
+ }
@@ -0,0 +1,38 @@
1
+ export default {
2
+ render: {
3
+
4
+ hint: {
5
+ prompt: '提示',
6
+ confirm: '确定',
7
+ cancel: '取消',
8
+
9
+ selectPlaceholder: '请选择',
10
+ timePlaceholder: '选择时间',
11
+ startTimePlaceholder: '起始时间',
12
+ endTimePlaceholder: '截止时间',
13
+ datePlaceholder: '选择日期',
14
+ startDatePlaceholder: '起始日期',
15
+ endDatePlaceholder: '截止日期',
16
+ blankCellContent: '--',
17
+
18
+ uploadError: '上传错误: ',
19
+ uploadExceed: '最大上传数量(${uploadLimit})已超出.',
20
+ unsupportedFileType: '不支持格式: ',
21
+ fileSizeExceed: '文件大小已超出: ',
22
+ refNotFound: '组件未找到: ',
23
+ fieldRequired: '字段值不可为空',
24
+ invalidNumber: '数据格式错误',
25
+ selectFile: ' 选择文件',
26
+ downloadFile: '下载',
27
+ removeFile: '移除',
28
+ validationFailed: '表单数据校验失败',
29
+
30
+ subFormAction: '操作',
31
+ subFormAddAction: '新增',
32
+ subFormAddActionHint: '新增行',
33
+ insertSubFormRow: '插入行',
34
+ deleteSubFormRow: '删除行',
35
+ nonSubFormType: '组件类型不是子表单',
36
+ }
37
+ }
38
+ }
package/src/main.js ADDED
@@ -0,0 +1,29 @@
1
+ import 'babel-polyfill'
2
+ import './utils/debug-console'
3
+ import Vue from 'vue'
4
+ import axios from "axios";
5
+ import App from './App.vue'
6
+ import ElementUI from 'element-ui'
7
+ import './utils/directive'
8
+ import './icons'
9
+ import "./assets/style.scss"
10
+ import 'element-ui/lib/theme-chalk/index.css'
11
+ import '@/styles/index.scss'
12
+ import '@/iconfont/iconfont.css'
13
+
14
+ import {loadExtension} from '@/extension/extension-loader'
15
+
16
+ loadExtension()
17
+
18
+ Vue.use(ElementUI, { size: 'small' })
19
+
20
+ if (typeof window !== 'undefined') {
21
+ window.axios = axios
22
+ }
23
+
24
+ Vue.config.productionTip = false
25
+
26
+ new Vue({
27
+ el: "#app",
28
+ render: h => h(App),
29
+ })
@@ -0,0 +1,103 @@
1
+ /* 全局css变量 */
2
+ $--color-primary: #409EFF;
3
+
4
+ .primary-color {
5
+ color: $--color-primary;
6
+ }
7
+
8
+ .background-opacity {
9
+ background: rgba(64, 158, 255, 0.6);
10
+ }
11
+
12
+ .form-widget-list {
13
+
14
+ .ghost{
15
+ content: '';
16
+ font-size: 0;
17
+ height: 3px;
18
+ box-sizing: border-box;
19
+ background: $--color-primary;
20
+ border: 2px solid $--color-primary;
21
+ outline-width: 0;
22
+ padding: 0;
23
+ overflow: hidden;
24
+ }
25
+ }
26
+
27
+ .el-form-item--medium {
28
+ .el-radio {
29
+ line-height: 36px !important;
30
+ }
31
+
32
+ .el-rate{
33
+ margin-top: 8px;
34
+ }
35
+ }
36
+
37
+ .el-form-item--small {
38
+ .el-radio {
39
+ line-height: 32px !important;
40
+ }
41
+
42
+ .el-rate{
43
+ margin-top: 6px;
44
+ }
45
+ }
46
+
47
+ .el-form-item--mini {
48
+ .el-radio {
49
+ line-height: 28px !important;
50
+ }
51
+
52
+ .el-rate{
53
+ margin-top: 4px;
54
+ }
55
+ }
56
+
57
+ input[type="password"]::-ms-reveal { /* 隐藏IE/Edge原生的密码查看按钮 */
58
+ display: none;
59
+ }
60
+
61
+ /* 滚动条样式 begin */
62
+ ::-webkit-scrollbar {
63
+ width: 8px;
64
+ height: 8px;
65
+ }
66
+
67
+ ::-webkit-scrollbar-track {
68
+ width: 8px;
69
+ background: rgba(#101F1C, 0.1);
70
+ -webkit-border-radius: 2em;
71
+ -moz-border-radius: 2em;
72
+ border-radius: 2em;
73
+ }
74
+
75
+ ::-webkit-scrollbar-thumb {
76
+ background-color: rgba(#101F1C, 0.35);
77
+ background-clip: padding-box;
78
+ min-height: 28px;
79
+ -webkit-border-radius: 2em;
80
+ -moz-border-radius: 2em;
81
+ border-radius: 2em;
82
+ }
83
+
84
+ ::-webkit-scrollbar-thumb:hover {
85
+ background-color: rgba(#101F1C, 0.85);
86
+ }
87
+
88
+ * {//Firefox浏览器滚动条样式
89
+ scrollbar-color: #e5e5e5 #f7f7f9; //滚动条轨道颜色、滚动条滑块的颜色
90
+ scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失
91
+ }
92
+
93
+
94
+ /*
95
+ body {//IE浏览器滚动条样式
96
+ scrollbar-shadow-color: #e5e5e5;
97
+ scrollbar-face-color: #e5e5e5;
98
+ scrollbar-base-color: #ffffff;
99
+ scrollbar-arrow-color: #444040;
100
+ }
101
+ */
102
+
103
+ /* 滚动条样式 end */
@@ -0,0 +1,15 @@
1
+
2
+ html {
3
+ height: 100%;
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ body {
8
+ height: 100%;
9
+ margin: 0; /* */
10
+ background-color: #ffffff;
11
+ -moz-osx-font-smoothing: grayscale;
12
+ -webkit-font-smoothing: antialiased;
13
+ text-rendering: optimizeLegibility;
14
+ font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
15
+ }
@@ -0,0 +1,77 @@
1
+ import {loadRemoteScript} from "@/utils/util";
2
+ import {BEAUTIFIER_PATH} from "@/utils/config";
3
+
4
+ let beautifierObj
5
+
6
+ export const beautifierOpts = {
7
+ html: {
8
+ indent_size: '2',
9
+ indent_char: ' ',
10
+ max_preserve_newlines: '-1',
11
+ preserve_newlines: false,
12
+ keep_array_indentation: false,
13
+ break_chained_methods: false,
14
+ indent_scripts: 'separate',
15
+ brace_style: 'end-expand',
16
+ space_before_conditional: true,
17
+ unescape_strings: false,
18
+ jslint_happy: false,
19
+ end_with_newline: true,
20
+ wrap_line_length: '110',
21
+ indent_inner_html: true,
22
+ comma_first: false,
23
+ e4x: true,
24
+ indent_empty_lines: true
25
+ },
26
+ js: {
27
+ indent_size: '2',
28
+ indent_char: ' ',
29
+ max_preserve_newlines: '-1',
30
+ preserve_newlines: false,
31
+ keep_array_indentation: false,
32
+ break_chained_methods: false,
33
+ indent_scripts: 'normal',
34
+ brace_style: 'end-expand',
35
+ space_before_conditional: true,
36
+ unescape_strings: false,
37
+ jslint_happy: true,
38
+ end_with_newline: true,
39
+ wrap_line_length: '110',
40
+ indent_inner_html: true,
41
+ comma_first: false,
42
+ e4x: true,
43
+ indent_empty_lines: true
44
+ },
45
+ css: {
46
+ indent_size: '2',
47
+ indent_char: ' ',
48
+ max_preserve_newlines: '-1',
49
+ preserve_newlines: false,
50
+ keep_array_indentation: false,
51
+ break_chained_methods: false,
52
+ indent_scripts: 'normal',
53
+ brace_style: 'end-expand',
54
+ space_before_conditional: true,
55
+ unescape_strings: false,
56
+ jslint_happy: true,
57
+ end_with_newline: true,
58
+ wrap_line_length: '110',
59
+ indent_inner_html: true,
60
+ comma_first: false,
61
+ e4x: true,
62
+ indent_empty_lines: true
63
+ }
64
+ }
65
+
66
+ export default function loadBeautifier(callback) {
67
+ if (beautifierObj) {
68
+ callback(beautifierObj)
69
+ return
70
+ }
71
+
72
+ loadRemoteScript(BEAUTIFIER_PATH, () => {
73
+ // eslint-disable-next-line no-undef
74
+ beautifierObj = beautifier //beautifier为全局对象
75
+ callback(beautifierObj)
76
+ })
77
+ }