@vtx/components 4.0.0-beta.2 → 4.0.0-beta.20

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 (357) hide show
  1. package/es/index.js +3 -1
  2. package/es/utils/filterSpecialCharacters.js +47 -46
  3. package/es/utils/index.js +1 -2
  4. package/es/vtx-color-picker/index.js +50 -39
  5. package/es/vtx-combogrid/Combogrid.js +11 -6
  6. package/es/vtx-combogrid/index.js +1 -1
  7. package/es/vtx-combogrid/style/index.js +4 -4
  8. package/es/vtx-datagrid/Store/Provide.js +6 -5
  9. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +8 -3
  10. package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  11. package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  12. package/es/vtx-datagrid/ToolBar/index.js +2 -2
  13. package/es/vtx-datagrid/index.js +26 -14
  14. package/es/vtx-datagrid/style/index.js +22 -7
  15. package/es/vtx-descriptions/Descriptions.js +30 -0
  16. package/es/vtx-descriptions/index.js +3 -0
  17. package/es/vtx-descriptions/style/index.js +19 -0
  18. package/es/vtx-ellipsis-text/index.js +6 -1
  19. package/es/vtx-export/index.js +24 -25
  20. package/es/vtx-export-async/index.js +28 -8
  21. package/es/vtx-form-layout/Card.js +10 -10
  22. package/es/vtx-form-layout/Divider.js +1 -1
  23. package/es/vtx-form-layout/Pane.js +23 -12
  24. package/es/vtx-form-layout/style/index.js +0 -1
  25. package/es/vtx-icon/index.js +41 -4
  26. package/es/vtx-image/Preview.js +11 -6
  27. package/es/vtx-import/index.js +78 -37
  28. package/es/vtx-import/result.js +2 -1
  29. package/es/vtx-import/style/index.js +11 -1
  30. package/es/vtx-import2/index.js +4 -2
  31. package/es/vtx-import2/style/index.js +1 -1
  32. package/es/vtx-input/TextArea/index.js +11 -6
  33. package/es/vtx-modal/style/index.js +5 -3
  34. package/es/vtx-page-layout/Content.js +1 -1
  35. package/es/vtx-page-layout/TabLayout.js +1 -7
  36. package/es/vtx-page-layout/TableLayout.js +14 -4
  37. package/es/vtx-page-layout/TableWrap.js +3 -2
  38. package/es/vtx-page-layout/TreeLayout.js +2 -8
  39. package/es/vtx-page-layout/container.js +6 -5
  40. package/es/vtx-provider/index.js +11 -4
  41. package/es/vtx-provider/locale/en_US.js +10 -2
  42. package/es/vtx-provider/locale/zh_CN.js +20 -2
  43. package/es/vtx-scrollable-row/index.js +38 -28
  44. package/es/vtx-search/index.js +5 -4
  45. package/es/vtx-search/style/index.js +2 -1
  46. package/es/vtx-select/index.js +25 -11
  47. package/es/vtx-signature/index.js +5 -4
  48. package/es/vtx-signature/style/index.js +1 -1
  49. package/es/vtx-split-pane/SplitPane.js +34 -24
  50. package/es/vtx-split-pane/style/index.js +7 -112
  51. package/es/vtx-transfer/Transfer.js +16 -233
  52. package/es/vtx-transfer/style/index.js +5 -28
  53. package/es/vtx-transfer-select/TransferSelect.js +143 -0
  54. package/es/vtx-transfer-select/index.js +3 -0
  55. package/es/vtx-transfer-select/style/index.js +19 -0
  56. package/es/vtx-tree/index.js +104 -40
  57. package/es/vtx-tree-select/index.js +55 -92
  58. package/es/vtx-tree-select/style/index.js +4 -2
  59. package/es/vtx-upload/FilePreview.js +2 -1
  60. package/es/vtx-wang-editor/index.js +278 -108
  61. package/es/vtx-wang-editor/wangEditorUtil.js +59 -9
  62. package/lib/index.js +28 -4
  63. package/lib/utils/filterSpecialCharacters.js +48 -46
  64. package/lib/utils/index.js +0 -7
  65. package/lib/vtx-color-picker/index.js +50 -39
  66. package/lib/vtx-combogrid/Combogrid.js +11 -6
  67. package/lib/vtx-combogrid/index.js +1 -1
  68. package/lib/vtx-combogrid/style/index.js +4 -4
  69. package/lib/vtx-datagrid/Store/Provide.js +21 -19
  70. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +8 -4
  71. package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  72. package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  73. package/lib/vtx-datagrid/ToolBar/index.js +2 -2
  74. package/lib/vtx-datagrid/index.js +27 -14
  75. package/lib/vtx-datagrid/style/index.js +22 -7
  76. package/lib/vtx-descriptions/Descriptions.js +39 -0
  77. package/lib/vtx-descriptions/index.js +15 -0
  78. package/lib/vtx-descriptions/style/index.js +25 -0
  79. package/lib/vtx-ellipsis-text/index.js +6 -1
  80. package/lib/vtx-export/index.js +25 -26
  81. package/lib/vtx-export-async/index.js +26 -6
  82. package/lib/vtx-form-layout/Card.js +9 -9
  83. package/lib/vtx-form-layout/Divider.js +1 -1
  84. package/lib/vtx-form-layout/Pane.js +22 -11
  85. package/lib/vtx-form-layout/style/index.js +0 -1
  86. package/lib/vtx-icon/index.js +59 -14
  87. package/lib/vtx-image/Preview.js +11 -6
  88. package/lib/vtx-import/index.js +77 -36
  89. package/lib/vtx-import/result.js +2 -1
  90. package/lib/vtx-import/style/index.js +11 -1
  91. package/lib/vtx-import2/index.js +4 -2
  92. package/lib/vtx-import2/style/index.js +1 -1
  93. package/lib/vtx-input/TextArea/index.js +11 -6
  94. package/lib/vtx-modal/style/index.js +5 -3
  95. package/lib/vtx-page-layout/Content.js +1 -1
  96. package/lib/vtx-page-layout/TabLayout.js +3 -9
  97. package/lib/vtx-page-layout/TableLayout.js +14 -4
  98. package/lib/vtx-page-layout/TableWrap.js +3 -2
  99. package/lib/vtx-page-layout/TreeLayout.js +4 -10
  100. package/lib/vtx-page-layout/container.js +6 -5
  101. package/lib/vtx-provider/index.js +11 -4
  102. package/lib/vtx-provider/locale/en_US.js +10 -2
  103. package/lib/vtx-provider/locale/zh_CN.js +20 -2
  104. package/lib/vtx-scrollable-row/index.js +38 -28
  105. package/lib/vtx-search/index.js +5 -4
  106. package/lib/vtx-search/style/index.js +2 -1
  107. package/lib/vtx-select/index.js +25 -11
  108. package/lib/vtx-signature/index.js +4 -3
  109. package/lib/vtx-signature/style/index.js +1 -1
  110. package/lib/vtx-split-pane/SplitPane.js +32 -22
  111. package/lib/vtx-split-pane/style/index.js +7 -112
  112. package/lib/vtx-transfer/Transfer.js +15 -231
  113. package/lib/vtx-transfer/style/index.js +5 -28
  114. package/lib/vtx-transfer-select/TransferSelect.js +151 -0
  115. package/lib/vtx-transfer-select/index.js +15 -0
  116. package/lib/vtx-transfer-select/style/index.js +25 -0
  117. package/lib/vtx-tree/index.js +102 -38
  118. package/lib/vtx-tree-select/index.js +55 -92
  119. package/lib/vtx-tree-select/style/index.js +4 -2
  120. package/lib/vtx-upload/FilePreview.js +2 -1
  121. package/lib/vtx-wang-editor/index.js +277 -109
  122. package/lib/vtx-wang-editor/wangEditorUtil.js +59 -10
  123. package/package.json +60 -33
  124. package/dist/1077.66b69576.async.js +0 -1
  125. package/dist/1572.2b90c634.async.js +0 -1
  126. package/dist/1632.03c8f7ad.async.js +0 -2
  127. package/dist/2267.aeefe75c.async.js +0 -137
  128. package/dist/2791.54c703a9.async.js +0 -5
  129. package/dist/2952.348f2c3f.async.js +0 -654
  130. package/dist/3421.4387ba14.async.js +0 -1264
  131. package/dist/3500.29895123.async.js +0 -1
  132. package/dist/404.html +0 -17
  133. package/dist/4195.93b9d34d.async.js +0 -1
  134. package/dist/4680.bca43384.async.js +0 -1
  135. package/dist/7965.a57e8f9a.async.js +0 -1
  136. package/dist/8300.66a39b1b.async.js +0 -1
  137. package/dist/8982.8e38e68e.async.js +0 -1
  138. package/dist/9877.87ec0c28.async.js +0 -11
  139. package/dist/VtxColorPicker__demos.60d61929.async.js +0 -1
  140. package/dist/VtxCombogrid__demos.8c798bc7.async.js +0 -1
  141. package/dist/VtxDatagrid__demos.e07857d0.async.js +0 -1
  142. package/dist/VtxEllipsisText__demos.2e269d20.async.js +0 -1
  143. package/dist/VtxExportAsync__demos.13e3bb1c.async.js +0 -1
  144. package/dist/VtxExport__demos.1cce5217.async.js +0 -1
  145. package/dist/VtxFormLayout__demos.b8bb038a.async.js +0 -1
  146. package/dist/VtxImage__demos.774c697e.async.js +0 -1
  147. package/dist/VtxImport2__demos.8182b8d2.async.js +0 -1
  148. package/dist/VtxImport__demos.3865c4e9.async.js +0 -1
  149. package/dist/VtxInput__demos.5fd77ccb.async.js +0 -1
  150. package/dist/VtxModal__demos.e0aae505.async.js +0 -1
  151. package/dist/VtxPageLayout__demos.b1cd7624.async.js +0 -1
  152. package/dist/VtxRpsFrame__demos.07c3fb5e.async.js +0 -1
  153. package/dist/VtxScrollableRow__demos.eeb18c3c.async.js +0 -1
  154. package/dist/VtxSearch__demos.f6b048ae.async.js +0 -1
  155. package/dist/VtxSelect__demos.0e8f1c52.async.js +0 -1
  156. package/dist/VtxSignature__demos.d0c4bcac.async.js +0 -1
  157. package/dist/VtxSplitPane__demos.6dda4f09.async.js +0 -1
  158. package/dist/VtxStatisticsColumn__demos.b2be3e4b.async.js +0 -1
  159. package/dist/VtxTimePicker__demos.ced305a6.async.js +0 -1
  160. package/dist/VtxTreeSelect__demos.daab9057.async.js +0 -1
  161. package/dist/VtxTree__demos.15550a80.async.js +0 -1
  162. package/dist/VtxUpload__demos.794c746a.async.js +0 -1
  163. package/dist/VtxWangEditor__demos.92b4daf1.async.js +0 -1
  164. package/dist/changelog/index.html +0 -17
  165. package/dist/components/index.html +0 -17
  166. package/dist/components/vtx-color-picker/index.html +0 -17
  167. package/dist/components/vtx-combogrid/index.html +0 -17
  168. package/dist/components/vtx-datagrid/index.html +0 -17
  169. package/dist/components/vtx-date-picker/index.html +0 -17
  170. package/dist/components/vtx-ellipsis-text/index.html +0 -17
  171. package/dist/components/vtx-export/index.html +0 -17
  172. package/dist/components/vtx-export-async/index.html +0 -17
  173. package/dist/components/vtx-form-layout/index.html +0 -17
  174. package/dist/components/vtx-image/index.html +0 -17
  175. package/dist/components/vtx-import/index.html +0 -17
  176. package/dist/components/vtx-import2/index.html +0 -17
  177. package/dist/components/vtx-input/index.html +0 -17
  178. package/dist/components/vtx-modal/index.html +0 -17
  179. package/dist/components/vtx-page-layout/index.html +0 -17
  180. package/dist/components/vtx-rps-frame/index.html +0 -17
  181. package/dist/components/vtx-scrollable-row/index.html +0 -17
  182. package/dist/components/vtx-search/index.html +0 -17
  183. package/dist/components/vtx-select/index.html +0 -17
  184. package/dist/components/vtx-signature/index.html +0 -17
  185. package/dist/components/vtx-split-pane/index.html +0 -17
  186. package/dist/components/vtx-statistics-column/index.html +0 -17
  187. package/dist/components/vtx-time-picker/index.html +0 -17
  188. package/dist/components/vtx-tree/index.html +0 -17
  189. package/dist/components/vtx-tree-select/index.html +0 -17
  190. package/dist/components/vtx-upload/index.html +0 -17
  191. package/dist/components/vtx-wang-editor/index.html +0 -17
  192. package/dist/demos.f6817f69.async.js +0 -1
  193. package/dist/docs/api-changes/index.html +0 -17
  194. package/dist/docs/index.html +0 -17
  195. package/dist/docs/migration-guide/index.html +0 -17
  196. package/dist/dumi__tmp-production__dumi__theme__ContextWrapper.aca58684.async.js +0 -1
  197. package/dist/favicon.ico +0 -0
  198. package/dist/icon.png +0 -0
  199. package/dist/index.html +0 -17
  200. package/dist/meta__site.2e323023.async.js +0 -5392
  201. package/dist/meta__site.51651769.chunk.css +0 -9
  202. package/dist/meta__vtx-search.5ddbd36b.async.js +0 -5
  203. package/dist/nm__dumi-theme-vortex-style__dist__layouts__DemoLayout__index.7cea644e.async.js +0 -1
  204. package/dist/nm__dumi-theme-vortex-style__dist__layouts__DocLayout__index.eec80432.chunk.css +0 -1
  205. package/dist/nm__dumi__dist__client__pages__404.0d35bb9e.async.js +0 -1
  206. package/dist/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css +0 -1
  207. package/dist/nm__dumi__dist__client__pages__Demo__index.578aa5c0.chunk.css +0 -1
  208. package/dist/nm__dumi__dist__client__pages__Demo__index.88d92ec7.async.js +0 -1
  209. package/dist/preload_helper.214f203a.js +0 -1
  210. package/dist/site__changelog.md.33be0665.chunk.css +0 -1
  211. package/dist/site__changelog.md.ca6f70d0.async.js +0 -1
  212. package/dist/site__components__index.md.1c0dd566.async.js +0 -1
  213. package/dist/site__components__index.md.33be0665.chunk.css +0 -1
  214. package/dist/site__components__vtx-color-picker__index.md.0b5f09f9.async.js +0 -1
  215. package/dist/site__components__vtx-color-picker__index.md.33be0665.chunk.css +0 -1
  216. package/dist/site__components__vtx-combogrid__index.md.33be0665.chunk.css +0 -1
  217. package/dist/site__components__vtx-combogrid__index.md.5c184a19.async.js +0 -19
  218. package/dist/site__components__vtx-datagrid__index.md.33be0665.chunk.css +0 -1
  219. package/dist/site__components__vtx-datagrid__index.md.3b6b11a0.async.js +0 -58
  220. package/dist/site__components__vtx-date-picker__index.md.33be0665.chunk.css +0 -1
  221. package/dist/site__components__vtx-date-picker__index.md.e498db68.async.js +0 -1
  222. package/dist/site__components__vtx-ellipsis-text__index.md.33be0665.chunk.css +0 -1
  223. package/dist/site__components__vtx-ellipsis-text__index.md.3df8b85b.async.js +0 -1
  224. package/dist/site__components__vtx-export-async__index.md.33be0665.chunk.css +0 -1
  225. package/dist/site__components__vtx-export-async__index.md.7ad10351.async.js +0 -50
  226. package/dist/site__components__vtx-export__index.md.33be0665.chunk.css +0 -1
  227. package/dist/site__components__vtx-export__index.md.ae512624.async.js +0 -6
  228. package/dist/site__components__vtx-form-layout__index.md.26ce0de4.async.js +0 -1
  229. package/dist/site__components__vtx-form-layout__index.md.33be0665.chunk.css +0 -1
  230. package/dist/site__components__vtx-image__index.md.33be0665.chunk.css +0 -1
  231. package/dist/site__components__vtx-image__index.md.51d7fede.async.js +0 -7
  232. package/dist/site__components__vtx-import2__index.md.33be0665.chunk.css +0 -1
  233. package/dist/site__components__vtx-import2__index.md.3d03da86.async.js +0 -22
  234. package/dist/site__components__vtx-import__index.md.2706afc2.async.js +0 -1
  235. package/dist/site__components__vtx-import__index.md.33be0665.chunk.css +0 -1
  236. package/dist/site__components__vtx-input__index.md.33be0665.chunk.css +0 -1
  237. package/dist/site__components__vtx-input__index.md.dbe2e571.async.js +0 -1
  238. package/dist/site__components__vtx-modal__index.md.33be0665.chunk.css +0 -1
  239. package/dist/site__components__vtx-modal__index.md.6a9b2eda.async.js +0 -9
  240. package/dist/site__components__vtx-page-layout__index.md.33be0665.chunk.css +0 -1
  241. package/dist/site__components__vtx-page-layout__index.md.46cefa9b.async.js +0 -1
  242. package/dist/site__components__vtx-rps-frame__index.md.0126d79c.async.js +0 -1
  243. package/dist/site__components__vtx-rps-frame__index.md.33be0665.chunk.css +0 -1
  244. package/dist/site__components__vtx-scrollable-row__index.md.33be0665.chunk.css +0 -1
  245. package/dist/site__components__vtx-scrollable-row__index.md.83c9c112.async.js +0 -1
  246. package/dist/site__components__vtx-search__index.md.33be0665.chunk.css +0 -1
  247. package/dist/site__components__vtx-search__index.md.a36329f4.async.js +0 -5
  248. package/dist/site__components__vtx-select__index.md.33be0665.chunk.css +0 -1
  249. package/dist/site__components__vtx-select__index.md.d4b9a187.async.js +0 -6
  250. package/dist/site__components__vtx-signature__index.md.33be0665.chunk.css +0 -1
  251. package/dist/site__components__vtx-signature__index.md.e502b176.async.js +0 -1
  252. package/dist/site__components__vtx-split-pane__index.md.33be0665.chunk.css +0 -1
  253. package/dist/site__components__vtx-split-pane__index.md.744d87da.async.js +0 -1
  254. package/dist/site__components__vtx-statistics-column__index.md.106749e3.async.js +0 -1
  255. package/dist/site__components__vtx-statistics-column__index.md.33be0665.chunk.css +0 -1
  256. package/dist/site__components__vtx-time-picker__index.md.33be0665.chunk.css +0 -1
  257. package/dist/site__components__vtx-time-picker__index.md.c9f4700c.async.js +0 -1
  258. package/dist/site__components__vtx-tree-select__index.md.33be0665.chunk.css +0 -1
  259. package/dist/site__components__vtx-tree-select__index.md.49b56c10.async.js +0 -1
  260. package/dist/site__components__vtx-tree__index.md.33be0665.chunk.css +0 -1
  261. package/dist/site__components__vtx-tree__index.md.4c124fad.async.js +0 -1
  262. package/dist/site__components__vtx-upload__index.md.33be0665.chunk.css +0 -1
  263. package/dist/site__components__vtx-upload__index.md.57969550.async.js +0 -6
  264. package/dist/site__components__vtx-wang-editor__index.md.33be0665.chunk.css +0 -1
  265. package/dist/site__components__vtx-wang-editor__index.md.b98b12a6.async.js +0 -7
  266. package/dist/site__docs__api-changes.md.33be0665.chunk.css +0 -1
  267. package/dist/site__docs__api-changes.md.aaa38736.async.js +0 -6
  268. package/dist/site__docs__index.md.33be0665.chunk.css +0 -1
  269. package/dist/site__docs__index.md.586150c4.async.js +0 -53
  270. package/dist/site__docs__migration-guide.md.02f5996d.async.js +0 -194
  271. package/dist/site__docs__migration-guide.md.33be0665.chunk.css +0 -1
  272. package/dist/site__index.md.33be0665.chunk.css +0 -1
  273. package/dist/site__index.md.634bf57a.async.js +0 -1
  274. package/dist/sitemap.xml +0 -1
  275. package/dist/umi.f49a7748.css +0 -1
  276. package/dist/umi.f610424c.js +0 -877
  277. package/dist/vtx-search__index.md.33be0665.chunk.css +0 -1
  278. package/dist/vtx-search__index.md.37a39d66.async.js +0 -5
  279. package/dist/~demos/:id/index.html +0 -17
  280. package/dist/~demos/site-components-vtx-date-picker-demo-demo1/index.html +0 -17
  281. package/dist/~demos/site-components-vtx-date-picker-demo-demo3/index.html +0 -17
  282. package/dist/~demos/vtxcolorpicker-demo-base/index.html +0 -17
  283. package/dist/~demos/vtxcolorpicker-demo-base-form/index.html +0 -17
  284. package/dist/~demos/vtxcombogrid-demo-demo1/index.html +0 -17
  285. package/dist/~demos/vtxcombogrid-demo-demo2/index.html +0 -17
  286. package/dist/~demos/vtxcombogrid-demo-demo3/index.html +0 -17
  287. package/dist/~demos/vtxcombogrid-demo-demo4/index.html +0 -17
  288. package/dist/~demos/vtxcombogrid-demo-demo5/index.html +0 -17
  289. package/dist/~demos/vtxdatagrid-demo-demo1/index.html +0 -17
  290. package/dist/~demos/vtxdatagrid-demo-demo10/index.html +0 -17
  291. package/dist/~demos/vtxdatagrid-demo-demo2/index.html +0 -17
  292. package/dist/~demos/vtxdatagrid-demo-demo3/index.html +0 -17
  293. package/dist/~demos/vtxdatagrid-demo-demo4/index.html +0 -17
  294. package/dist/~demos/vtxdatagrid-demo-demo5/index.html +0 -17
  295. package/dist/~demos/vtxdatagrid-demo-demo6/index.html +0 -17
  296. package/dist/~demos/vtxdatagrid-demo-demo7/index.html +0 -17
  297. package/dist/~demos/vtxdatagrid-demo-demo8/index.html +0 -17
  298. package/dist/~demos/vtxdatagrid-demo-demo9/index.html +0 -17
  299. package/dist/~demos/vtxellipsistext-demo-demo1/index.html +0 -17
  300. package/dist/~demos/vtxexport-demo-demo1/index.html +0 -17
  301. package/dist/~demos/vtxexportasync-demo-demo1/index.html +0 -17
  302. package/dist/~demos/vtxformlayout-demo-demo1/index.html +0 -17
  303. package/dist/~demos/vtxformlayout-demo-demo10/index.html +0 -17
  304. package/dist/~demos/vtxformlayout-demo-demo2/index.html +0 -17
  305. package/dist/~demos/vtxformlayout-demo-demo3/index.html +0 -17
  306. package/dist/~demos/vtxformlayout-demo-demo4/index.html +0 -17
  307. package/dist/~demos/vtxformlayout-demo-demo5/index.html +0 -17
  308. package/dist/~demos/vtxformlayout-demo-demo6/index.html +0 -17
  309. package/dist/~demos/vtxformlayout-demo-demo7/index.html +0 -17
  310. package/dist/~demos/vtxformlayout-demo-demo8/index.html +0 -17
  311. package/dist/~demos/vtxformlayout-demo-demo9/index.html +0 -17
  312. package/dist/~demos/vtximage-demo-demo1/index.html +0 -17
  313. package/dist/~demos/vtximage-demo-demo2/index.html +0 -17
  314. package/dist/~demos/vtximage-demo-demo3/index.html +0 -17
  315. package/dist/~demos/vtximage-demo-demo4/index.html +0 -17
  316. package/dist/~demos/vtximport-demo-base/index.html +0 -17
  317. package/dist/~demos/vtximport2-demo-base/index.html +0 -17
  318. package/dist/~demos/vtxinput-demo-demo1/index.html +0 -17
  319. package/dist/~demos/vtxinput-demo-demo2/index.html +0 -17
  320. package/dist/~demos/vtxinput-demo-demo3/index.html +0 -17
  321. package/dist/~demos/vtxmodal-demo-demo1/index.html +0 -17
  322. package/dist/~demos/vtxmodal-demo-demo2/index.html +0 -17
  323. package/dist/~demos/vtxmodal-demo-demo3/index.html +0 -17
  324. package/dist/~demos/vtxpagelayout-demo-demo1/index.html +0 -17
  325. package/dist/~demos/vtxpagelayout-demo-demo2/index.html +0 -17
  326. package/dist/~demos/vtxpagelayout-demo-demo3/index.html +0 -17
  327. package/dist/~demos/vtxpagelayout-demo-demo4/index.html +0 -17
  328. package/dist/~demos/vtxrpsframe-demo-base/index.html +0 -17
  329. package/dist/~demos/vtxscrollablerow-demo-demo/index.html +0 -17
  330. package/dist/~demos/vtxsearch-demo-demo1/index.html +0 -17
  331. package/dist/~demos/vtxsearch-demo-demo2/index.html +0 -17
  332. package/dist/~demos/vtxsearch-demo-demo3/index.html +0 -17
  333. package/dist/~demos/vtxsearch-demo-demo4/index.html +0 -17
  334. package/dist/~demos/vtxselect-demo-base/index.html +0 -17
  335. package/dist/~demos/vtxselect-demo-base-multiple/index.html +0 -17
  336. package/dist/~demos/vtxsignature-demo-demo/index.html +0 -17
  337. package/dist/~demos/vtxsignature-demo-demo1/index.html +0 -17
  338. package/dist/~demos/vtxsplitpane-demo-demo1/index.html +0 -17
  339. package/dist/~demos/vtxsplitpane-demo-demo2/index.html +0 -17
  340. package/dist/~demos/vtxsplitpane-demo-demo3/index.html +0 -17
  341. package/dist/~demos/vtxsplitpane-demo-demo4/index.html +0 -17
  342. package/dist/~demos/vtxstatisticscolumn-demo-demo1/index.html +0 -17
  343. package/dist/~demos/vtxstatisticscolumn-demo-demo2/index.html +0 -17
  344. package/dist/~demos/vtxstatisticscolumn-demo-demo3/index.html +0 -17
  345. package/dist/~demos/vtxtimepicker-demo-base/index.html +0 -17
  346. package/dist/~demos/vtxtree-demo-demo1/index.html +0 -17
  347. package/dist/~demos/vtxtree-demo-demo2/index.html +0 -17
  348. package/dist/~demos/vtxtree-demo-demo3/index.html +0 -17
  349. package/dist/~demos/vtxtreeselect-demo-demo1/index.html +0 -17
  350. package/dist/~demos/vtxtreeselect-demo-demo2/index.html +0 -17
  351. package/dist/~demos/vtxtreeselect-demo-demo3/index.html +0 -17
  352. package/dist/~demos/vtxupload-demo-demo1/index.html +0 -17
  353. package/dist/~demos/vtxupload-demo-demo2/index.html +0 -17
  354. package/dist/~demos/vtxupload-demo-demo3/index.html +0 -17
  355. package/dist/~demos/vtxwangeditor-demo-demo1/index.html +0 -17
  356. package/es/utils/hooks/useFetchData/index.js +0 -82
  357. package/lib/utils/hooks/useFetchData/index.js +0 -89
@@ -0,0 +1,30 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
8
+ import classnames from 'classnames';
9
+ import React, { useContext } from 'react';
10
+ import { Descriptions } from 'antd';
11
+ import { useStyle } from "./style";
12
+ import { VtxProvider } from "../vtx-provider";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ function VtxDescriptions(props) {
15
+ var _useContext = useContext(VtxProvider),
16
+ getPrefixCls = _useContext.getPrefixCls;
17
+ var prefixCls = getPrefixCls('descriptions', props.prefixCls);
18
+ var _useStyle = useStyle(prefixCls),
19
+ wrapSSR = _useStyle.wrapSSR,
20
+ hashId = _useStyle.hashId;
21
+ var rest = Object.assign({}, (_objectDestructuringEmpty(props), props));
22
+ return wrapSSR( /*#__PURE__*/_jsx(Descriptions, _objectSpread({
23
+ classNames: {
24
+ root: classnames(hashId, prefixCls)
25
+ }
26
+ }, rest)));
27
+ }
28
+ VtxDescriptions.propTypes = {};
29
+ VtxDescriptions.defaultProps = {};
30
+ export default VtxDescriptions;
@@ -0,0 +1,3 @@
1
+ import VtxDescriptions from "./Descriptions";
2
+ export default VtxDescriptions;
3
+ export { VtxDescriptions };
@@ -0,0 +1,19 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { useStyle as useAntdStyle } from "../../vtx-provider";
8
+ var genStyle = function genStyle(token) {
9
+ var componentCls = token.componentCls;
10
+ return _defineProperty({}, componentCls, {});
11
+ };
12
+ export function useStyle(prefixCls) {
13
+ return useAntdStyle('VtxDescriptions', function (token) {
14
+ var _token = _objectSpread(_objectSpread({}, token), {}, {
15
+ componentCls: ".".concat(prefixCls)
16
+ });
17
+ return [genStyle(_token)];
18
+ });
19
+ }
@@ -19,6 +19,11 @@ function VtxEllipsisText(props) {
19
19
  tooltip = _props$tooltip === void 0 ? {} : _props$tooltip,
20
20
  className = props.className,
21
21
  style = props.style;
22
+
23
+ // 边界检查
24
+ if (!text) {
25
+ return null;
26
+ }
22
27
  var _useContext = useContext(ConfigProvider.ConfigContext),
23
28
  getPrefixCls = _useContext.getPrefixCls;
24
29
  var prefixCls = getPrefixCls('vtx-ellipsis-text');
@@ -26,7 +31,7 @@ function VtxEllipsisText(props) {
26
31
  wrapSSR = _useStyle.wrapSSR,
27
32
  hashId = _useStyle.hashId;
28
33
  var textStyle = {};
29
- if (lineClamp > 2) {
34
+ if (lineClamp >= 2) {
30
35
  textStyle['WebkitLineClamp'] = lineClamp;
31
36
  }
32
37
  return wrapSSR( /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
@@ -16,13 +16,15 @@ import PropTypes from 'prop-types';
16
16
  import axios from 'axios';
17
17
  import qs from 'querystring';
18
18
  import getToken from "../utils/getToken";
19
- import { DownOutlined, ExportOutlined } from '@ant-design/icons';
20
- import { getSignature } from '@vtx/utils';
19
+ import { ExportOutlined } from '@ant-design/icons';
20
+ import downloadFile from '@vtx/utils/lib/downloadFile';
21
+ import getSignature from '@vtx/utils/lib/getSignature';
21
22
  import { isObject } from "../utils";
22
23
  import { useStyle } from "./style/index";
23
24
  import { ConfigProvider, message, Spin, Dropdown, Menu, Button } from 'antd';
24
25
  import classnames from 'classnames';
25
26
  import { useIntl } from "../vtx-provider";
27
+ import VtxIcon from "../vtx-icon";
26
28
  import { jsx as _jsx } from "react/jsx-runtime";
27
29
  import { Fragment as _Fragment } from "react/jsx-runtime";
28
30
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -102,31 +104,25 @@ var VtxExport = function VtxExport(props) {
102
104
  spinning: true,
103
105
  className: classnames(prefixCls, hashId, 'vtx-spin')
104
106
  }), div);
107
+ var status = false;
105
108
  document.body.appendChild(div);
106
- requestToResponse(postData).then(function (res) {
107
- var status = false;
108
- // 文件存在
109
- if (res.headers['content-disposition']) {
110
- var contentDisposition = res.headers['content-disposition'];
111
- var filename;
112
- if (contentDisposition.indexOf('filename*=') > -1) {
113
- filename = decodeURI(contentDisposition.split('filename*=')[1].replace("utf-8'zh_cn'", ''));
114
- } else {
115
- filename = decodeURI(contentDisposition.split('filename=')[1]);
109
+ downloadFile(downloadURL, {
110
+ data: postData,
111
+ extraHeader: headers,
112
+ success: function success() {
113
+ status = true;
114
+ },
115
+ fail: function fail() {
116
+ status = false;
117
+ message.error('导出失败');
118
+ },
119
+ finally: function _finally() {
120
+ document.body.removeChild(div);
121
+ if (afterExport && typeof afterExport === 'function') {
122
+ afterExport(status);
116
123
  }
117
- if ('download' in document.createElement('a')) {
118
- download(res.data, filename);
119
- status = true;
120
- } else {
121
- message.warning(intl.getMessage('fallback.browserNotSupported', '浏览器不支持'));
122
- }
123
- }
124
- // 关闭loading,执行回调
125
- document.body.removeChild(div);
126
- if (afterExport && typeof afterExport === 'function') {
127
- afterExport(status);
128
124
  }
129
- });
125
+ }, 'blob');
130
126
  }
131
127
  /* 下载并 兼容IE */
132
128
  function download(content, filename) {
@@ -177,7 +173,10 @@ var VtxExport = function VtxExport(props) {
177
173
  trigger: ['click'],
178
174
  children: /*#__PURE__*/_jsxs(Button, {
179
175
  icon: /*#__PURE__*/_jsx(ExportOutlined, {}),
180
- children: [exportText, " ", /*#__PURE__*/_jsx(DownOutlined, {})]
176
+ children: [exportText, " ", /*#__PURE__*/_jsx(VtxIcon, {
177
+ type: "downOutlined",
178
+ fileType: "svg"
179
+ })]
181
180
  })
182
181
  }));
183
182
  };
@@ -10,11 +10,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useEffect, forwardRef, useContext, useMemo } from 'react';
13
+ import React, { useEffect, forwardRef, useContext, useMemo, useRef } from 'react';
14
14
  import { ExportOutlined } from '@ant-design/icons';
15
15
  import PropTypes from 'prop-types';
16
16
  import { useSetState } from 'ahooks';
17
- import { Button, Form, Input, message, Modal, Radio, ConfigProvider } from 'antd';
17
+ import { Button, Form, message, Modal, Radio, ConfigProvider } from 'antd';
18
18
  import dayjs from 'dayjs';
19
19
  import { postData } from "./util";
20
20
  import History from "./History";
@@ -23,9 +23,11 @@ import { useStyle } from "./style/index";
23
23
  import classnames from 'classnames';
24
24
  import { useIntl } from "../vtx-provider";
25
25
  import VtxModal from "../vtx-modal";
26
+ import VtxInput from "../vtx-input";
27
+ import { SpecialCharacters } from "../utils/filterSpecialCharacters";
26
28
  import { jsx as _jsx } from "react/jsx-runtime";
27
29
  import { jsxs as _jsxs } from "react/jsx-runtime";
28
- var timer = null;
30
+ var Includes = ['\\\\', '\\/', ':', '*', '?', '"', '<', '>', '|'];
29
31
  var VtxExportAsync = function VtxExportAsync(props) {
30
32
  var intl = useIntl();
31
33
  var _useContext = useContext(ConfigProvider.ConfigContext),
@@ -34,6 +36,7 @@ var VtxExportAsync = function VtxExportAsync(props) {
34
36
  var _useStyle = useStyle(prefixCls),
35
37
  wrapSSR = _useStyle.wrapSSR,
36
38
  hashId = _useStyle.hashId;
39
+ var timerRef = useRef(null);
37
40
  var uniqueKey = props.uniqueKey,
38
41
  _props$title = props.title,
39
42
  title = _props$title === void 0 ? '' : _props$title,
@@ -160,9 +163,9 @@ var VtxExportAsync = function VtxExportAsync(props) {
160
163
  });
161
164
  }, [state.visible]);
162
165
  function close() {
163
- if (timer) {
164
- clearInterval(timer);
165
- timer = null;
166
+ if (timerRef.current) {
167
+ clearInterval(timerRef.current);
168
+ timerRef.current = null;
166
169
  }
167
170
  form.resetFields();
168
171
  setState({
@@ -172,6 +175,15 @@ var VtxExportAsync = function VtxExportAsync(props) {
172
175
  timer: null
173
176
  });
174
177
  }
178
+
179
+ // 组件卸载时也要清理
180
+ useEffect(function () {
181
+ return function () {
182
+ if (timerRef.current) {
183
+ clearInterval(timerRef.current);
184
+ }
185
+ };
186
+ }, []);
175
187
  function showHistory() {
176
188
  setState({
177
189
  showHistoryModal: true
@@ -253,6 +265,8 @@ var VtxExportAsync = function VtxExportAsync(props) {
253
265
  } else {
254
266
  message.error((res === null || res === void 0 ? void 0 : res.msg) || "".concat(intl.getMessage('export.exportText', '导出')).concat(intl.getMessage('export.failure', '失败')));
255
267
  }
268
+ }).catch(function (err) {
269
+ message.error('导出失败:' + (err.message || '网络错误'));
256
270
  });
257
271
  }
258
272
  });
@@ -313,8 +327,14 @@ var VtxExportAsync = function VtxExportAsync(props) {
313
327
  required: true,
314
328
  message: TextEnum.requireFieldMsgText
315
329
  }],
316
- children: /*#__PURE__*/_jsx(Input, {
317
- placeholder: TextEnum.placeholderFileName
330
+ children: /*#__PURE__*/_jsx(VtxInput, {
331
+ placeholder: TextEnum.placeholderFileName,
332
+ specialCharactersFilter: {
333
+ include: Includes,
334
+ exclude: SpecialCharacters.filter(function (v) {
335
+ return !Includes.includes(v);
336
+ })
337
+ }
318
338
  })
319
339
  }), /*#__PURE__*/_jsx(Form.Item, {
320
340
  label: TextEnum.fieldTypeText,
@@ -8,7 +8,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
9
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import React, { useEffect, useState, useContext } from 'react';
11
+ import React, { useEffect, useState, useContext, useMemo } from 'react';
12
12
  import PropTypes from 'prop-types';
13
13
  import classnames from 'classnames';
14
14
  import { Card, ConfigProvider } from 'antd';
@@ -22,17 +22,17 @@ function VtxCard(props) {
22
22
  _props$expand = props.expand,
23
23
  expand = _props$expand === void 0 ? true : _props$expand,
24
24
  extra = props.extra,
25
- onExpandChange = props.onExpandChange;
25
+ onExpandChange = props.onExpandChange,
26
+ children = props.children;
26
27
  var _useState = useState(expand),
27
28
  _useState2 = _slicedToArray(_useState, 2),
28
29
  visible = _useState2[0],
29
30
  setVisible = _useState2[1];
30
- var style = {};
31
- if (visible) {
32
- style = {
31
+ var iconStyle = useMemo(function () {
32
+ return visible ? {
33
33
  transform: 'rotate(90deg)'
34
- };
35
- }
34
+ } : {};
35
+ }, [visible]);
36
36
  useEffect(function () {
37
37
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
38
38
  onExpandChange && onExpandChange(visible);
@@ -50,8 +50,8 @@ function VtxCard(props) {
50
50
  },
51
51
  children: extra
52
52
  }) : /*#__PURE__*/_jsx(RightOutlined, {
53
- className: "".concat(prefixCls, "-expand-icon\""),
54
- style: style,
53
+ className: "".concat(prefixCls, "-expand-icon"),
54
+ style: iconStyle,
55
55
  onClick: function onClick() {
56
56
  return setVisible(function (pre) {
57
57
  return !pre;
@@ -60,7 +60,7 @@ function VtxCard(props) {
60
60
  }),
61
61
  children: /*#__PURE__*/_jsx("div", {
62
62
  className: classnames("".concat(prefixCls, "-content"), _defineProperty({}, "".concat(prefixCls, "-content-hide"), !visible)),
63
- children: props.children
63
+ children: children
64
64
  })
65
65
  });
66
66
  }
@@ -13,7 +13,7 @@ function VtxDivider(props) {
13
13
  var prefixCls = getPrefixCls('', 'vtx-form-layout-divider');
14
14
  var size = props.size;
15
15
  return /*#__PURE__*/_jsx(Divider, {
16
- className: classnames(prefixCls, _defineProperty({}, "".concat(prefixCls, "--small'"), size === 'small'))
16
+ className: classnames(prefixCls, _defineProperty({}, "".concat(prefixCls, "--small"), size === 'small'))
17
17
  });
18
18
  }
19
19
  VtxDivider.propTypes = {
@@ -1,4 +1,4 @@
1
- import React, { useContext } from 'react';
1
+ import React, { useContext, useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { ConfigProvider, Collapse } from 'antd';
4
4
  import { CaretRightOutlined } from '@ant-design/icons';
@@ -8,18 +8,29 @@ function Pane(props) {
8
8
  var _useContext = useContext(ConfigProvider.ConfigContext),
9
9
  getPrefixCls = _useContext.getPrefixCls;
10
10
  var prefixCls = getPrefixCls('', 'vtx-form-layout-pane');
11
- var title = props.title;
12
- var items = [{
13
- key: '1',
14
- label: /*#__PURE__*/_jsx("div", {
15
- className: "".concat(prefixCls, "-title"),
16
- children: title
17
- }),
18
- children: /*#__PURE__*/_jsx("div", {
11
+ var title = props.title,
12
+ children = props.children;
13
+
14
+ // 无标题时直接渲染内容
15
+ if (!title) {
16
+ return /*#__PURE__*/_jsx("div", {
19
17
  className: "".concat(prefixCls, "-content"),
20
- children: props.children
21
- })
22
- }];
18
+ children: children
19
+ });
20
+ }
21
+ var items = useMemo(function () {
22
+ return [{
23
+ key: '1',
24
+ label: /*#__PURE__*/_jsx("div", {
25
+ className: "".concat(prefixCls, "-title"),
26
+ children: title
27
+ }),
28
+ children: /*#__PURE__*/_jsx("div", {
29
+ className: "".concat(prefixCls, "-content"),
30
+ children: children
31
+ })
32
+ }];
33
+ }, [title, children, prefixCls]);
23
34
  return /*#__PURE__*/_jsx(Collapse, {
24
35
  className: prefixCls,
25
36
  bordered: false,
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import { borderRadius } from 'polished';
8
7
  import { useStyle as useAntdStyle } from "../../vtx-provider";
9
8
  var genVtxFormLayoutStyle = function genVtxFormLayoutStyle(token) {
10
9
  var _componentCls;
@@ -10,6 +10,31 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
10
10
  import { lazy, memo, Suspense, useMemo } from 'react';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
13
+ var iconComponents = {
14
+ // 核心:添加你需要的所有图标, 动态导入有的组件会失败
15
+ alignRightOutlined: /*#__PURE__*/lazy(function () {
16
+ return import("./svg/alignRightOutlined.js");
17
+ }),
18
+ columnHeightOutlined: /*#__PURE__*/lazy(function () {
19
+ return import("./svg/columnHeightOutlined.js");
20
+ }),
21
+ downOutlined: /*#__PURE__*/lazy(function () {
22
+ return import("./svg/downOutlined.js");
23
+ }),
24
+ fullscreen: /*#__PURE__*/lazy(function () {
25
+ return import("./svg/fullscreen.js");
26
+ }),
27
+ redoOutlined: /*#__PURE__*/lazy(function () {
28
+ return import("./svg/redoOutlined.js");
29
+ }),
30
+ rightOutlined: /*#__PURE__*/lazy(function () {
31
+ return import("./svg/rightOutlined.js");
32
+ }),
33
+ settingOutlined: /*#__PURE__*/lazy(function () {
34
+ return import("./svg/settingOutlined.js");
35
+ })
36
+ // 新增其他图标...
37
+ };
13
38
  var VtxIcon = /*#__PURE__*/memo(function (_ref) {
14
39
  var type = _ref.type,
15
40
  _ref$size = _ref.size,
@@ -27,12 +52,24 @@ var VtxIcon = /*#__PURE__*/memo(function (_ref) {
27
52
  if (!type) {
28
53
  return null;
29
54
  }
55
+ // const SvgComponent = useMemo(() => {
56
+ // // 动态导入并缓存结果
57
+ // return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
58
+ // }, [type]);
59
+
30
60
  var SvgComponent = useMemo(function () {
31
- // 动态导入并缓存结果
32
- return /*#__PURE__*/lazy(function () {
33
- return import( /* @vite-ignore */"./svg/".concat(type, ".js"));
61
+ // 兜底:找不到对应图标时,返回一个空组件(避免报错)
62
+ return iconComponents[type] || /*#__PURE__*/lazy(function () {
63
+ return Promise.resolve({
64
+ default: function _default() {
65
+ return /*#__PURE__*/_jsx("svg", {
66
+ width: width,
67
+ height: height
68
+ });
69
+ }
70
+ });
34
71
  });
35
- }, [type]);
72
+ }, [type, width, height]);
36
73
 
37
74
  // 默认返回空元素
38
75
  if (fileType == 'svg') {
@@ -22,15 +22,12 @@ var VIEWER = 'viewer';
22
22
  // 多张
23
23
  var GALLERY = 'gallery';
24
24
  function checkMode(x) {
25
- var mode = '';
26
- if (isObject(x)) {
27
- mode = VIEWER;
28
- }
29
25
  if (Array.isArray(x)) {
30
26
  var len = x.length;
31
- mode = len == 0 ? '' : len == 1 ? VIEWER : GALLERY;
27
+ if (len === 0) return null;
28
+ return len === 1 ? VIEWER : GALLERY;
32
29
  }
33
- return mode;
30
+ return isObject(x) ? VIEWER : null;
34
31
  }
35
32
  export default function Preview(props) {
36
33
  var _useState = useState(),
@@ -87,6 +84,9 @@ export default function Preview(props) {
87
84
  setContainer(container);
88
85
  setViewer(viewer);
89
86
  return function () {
87
+ if (container) {
88
+ container.innerHTML = '';
89
+ }
90
90
  viewer && viewer.destroy();
91
91
  };
92
92
  }, []);
@@ -96,6 +96,7 @@ export default function Preview(props) {
96
96
  container.innerHTML = '';
97
97
  }
98
98
  var mode = checkMode(photo);
99
+ if (!mode) return null;
99
100
  var newIndex = index;
100
101
  // 单张
101
102
  if (mode === VIEWER) {
@@ -126,6 +127,10 @@ export default function Preview(props) {
126
127
  }
127
128
  viewer.update();
128
129
  viewer.view(newIndex);
130
+ } else {
131
+ if (container) {
132
+ container.innerHTML = '';
133
+ }
129
134
  }
130
135
  }, [visible]);
131
136
  return /*#__PURE__*/_jsx(_Fragment, {});