@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.
- package/es/index.js +3 -1
- package/es/utils/filterSpecialCharacters.js +47 -46
- package/es/utils/index.js +1 -2
- package/es/vtx-color-picker/index.js +50 -39
- package/es/vtx-combogrid/Combogrid.js +11 -6
- package/es/vtx-combogrid/index.js +1 -1
- package/es/vtx-combogrid/style/index.js +4 -4
- package/es/vtx-datagrid/Store/Provide.js +6 -5
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +8 -3
- package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/es/vtx-datagrid/ToolBar/index.js +2 -2
- package/es/vtx-datagrid/index.js +26 -14
- package/es/vtx-datagrid/style/index.js +22 -7
- package/es/vtx-descriptions/Descriptions.js +30 -0
- package/es/vtx-descriptions/index.js +3 -0
- package/es/vtx-descriptions/style/index.js +19 -0
- package/es/vtx-ellipsis-text/index.js +6 -1
- package/es/vtx-export/index.js +24 -25
- package/es/vtx-export-async/index.js +28 -8
- package/es/vtx-form-layout/Card.js +10 -10
- package/es/vtx-form-layout/Divider.js +1 -1
- package/es/vtx-form-layout/Pane.js +23 -12
- package/es/vtx-form-layout/style/index.js +0 -1
- package/es/vtx-icon/index.js +41 -4
- package/es/vtx-image/Preview.js +11 -6
- package/es/vtx-import/index.js +78 -37
- package/es/vtx-import/result.js +2 -1
- package/es/vtx-import/style/index.js +11 -1
- package/es/vtx-import2/index.js +4 -2
- package/es/vtx-import2/style/index.js +1 -1
- package/es/vtx-input/TextArea/index.js +11 -6
- package/es/vtx-modal/style/index.js +5 -3
- package/es/vtx-page-layout/Content.js +1 -1
- package/es/vtx-page-layout/TabLayout.js +1 -7
- package/es/vtx-page-layout/TableLayout.js +14 -4
- package/es/vtx-page-layout/TableWrap.js +3 -2
- package/es/vtx-page-layout/TreeLayout.js +2 -8
- package/es/vtx-page-layout/container.js +6 -5
- package/es/vtx-provider/index.js +11 -4
- package/es/vtx-provider/locale/en_US.js +10 -2
- package/es/vtx-provider/locale/zh_CN.js +20 -2
- package/es/vtx-scrollable-row/index.js +38 -28
- package/es/vtx-search/index.js +5 -4
- package/es/vtx-search/style/index.js +2 -1
- package/es/vtx-select/index.js +25 -11
- package/es/vtx-signature/index.js +5 -4
- package/es/vtx-signature/style/index.js +1 -1
- package/es/vtx-split-pane/SplitPane.js +34 -24
- package/es/vtx-split-pane/style/index.js +7 -112
- package/es/vtx-transfer/Transfer.js +16 -233
- package/es/vtx-transfer/style/index.js +5 -28
- package/es/vtx-transfer-select/TransferSelect.js +143 -0
- package/es/vtx-transfer-select/index.js +3 -0
- package/es/vtx-transfer-select/style/index.js +19 -0
- package/es/vtx-tree/index.js +104 -40
- package/es/vtx-tree-select/index.js +55 -92
- package/es/vtx-tree-select/style/index.js +4 -2
- package/es/vtx-upload/FilePreview.js +2 -1
- package/es/vtx-wang-editor/index.js +278 -108
- package/es/vtx-wang-editor/wangEditorUtil.js +59 -9
- package/lib/index.js +28 -4
- package/lib/utils/filterSpecialCharacters.js +48 -46
- package/lib/utils/index.js +0 -7
- package/lib/vtx-color-picker/index.js +50 -39
- package/lib/vtx-combogrid/Combogrid.js +11 -6
- package/lib/vtx-combogrid/index.js +1 -1
- package/lib/vtx-combogrid/style/index.js +4 -4
- package/lib/vtx-datagrid/Store/Provide.js +21 -19
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +8 -4
- package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/lib/vtx-datagrid/ToolBar/index.js +2 -2
- package/lib/vtx-datagrid/index.js +27 -14
- package/lib/vtx-datagrid/style/index.js +22 -7
- package/lib/vtx-descriptions/Descriptions.js +39 -0
- package/lib/vtx-descriptions/index.js +15 -0
- package/lib/vtx-descriptions/style/index.js +25 -0
- package/lib/vtx-ellipsis-text/index.js +6 -1
- package/lib/vtx-export/index.js +25 -26
- package/lib/vtx-export-async/index.js +26 -6
- package/lib/vtx-form-layout/Card.js +9 -9
- package/lib/vtx-form-layout/Divider.js +1 -1
- package/lib/vtx-form-layout/Pane.js +22 -11
- package/lib/vtx-form-layout/style/index.js +0 -1
- package/lib/vtx-icon/index.js +59 -14
- package/lib/vtx-image/Preview.js +11 -6
- package/lib/vtx-import/index.js +77 -36
- package/lib/vtx-import/result.js +2 -1
- package/lib/vtx-import/style/index.js +11 -1
- package/lib/vtx-import2/index.js +4 -2
- package/lib/vtx-import2/style/index.js +1 -1
- package/lib/vtx-input/TextArea/index.js +11 -6
- package/lib/vtx-modal/style/index.js +5 -3
- package/lib/vtx-page-layout/Content.js +1 -1
- package/lib/vtx-page-layout/TabLayout.js +3 -9
- package/lib/vtx-page-layout/TableLayout.js +14 -4
- package/lib/vtx-page-layout/TableWrap.js +3 -2
- package/lib/vtx-page-layout/TreeLayout.js +4 -10
- package/lib/vtx-page-layout/container.js +6 -5
- package/lib/vtx-provider/index.js +11 -4
- package/lib/vtx-provider/locale/en_US.js +10 -2
- package/lib/vtx-provider/locale/zh_CN.js +20 -2
- package/lib/vtx-scrollable-row/index.js +38 -28
- package/lib/vtx-search/index.js +5 -4
- package/lib/vtx-search/style/index.js +2 -1
- package/lib/vtx-select/index.js +25 -11
- package/lib/vtx-signature/index.js +4 -3
- package/lib/vtx-signature/style/index.js +1 -1
- package/lib/vtx-split-pane/SplitPane.js +32 -22
- package/lib/vtx-split-pane/style/index.js +7 -112
- package/lib/vtx-transfer/Transfer.js +15 -231
- package/lib/vtx-transfer/style/index.js +5 -28
- package/lib/vtx-transfer-select/TransferSelect.js +151 -0
- package/lib/vtx-transfer-select/index.js +15 -0
- package/lib/vtx-transfer-select/style/index.js +25 -0
- package/lib/vtx-tree/index.js +102 -38
- package/lib/vtx-tree-select/index.js +55 -92
- package/lib/vtx-tree-select/style/index.js +4 -2
- package/lib/vtx-upload/FilePreview.js +2 -1
- package/lib/vtx-wang-editor/index.js +277 -109
- package/lib/vtx-wang-editor/wangEditorUtil.js +59 -10
- package/package.json +60 -33
- package/dist/1077.66b69576.async.js +0 -1
- package/dist/1572.2b90c634.async.js +0 -1
- package/dist/1632.03c8f7ad.async.js +0 -2
- package/dist/2267.aeefe75c.async.js +0 -137
- package/dist/2791.54c703a9.async.js +0 -5
- package/dist/2952.348f2c3f.async.js +0 -654
- package/dist/3421.4387ba14.async.js +0 -1264
- package/dist/3500.29895123.async.js +0 -1
- package/dist/404.html +0 -17
- package/dist/4195.93b9d34d.async.js +0 -1
- package/dist/4680.bca43384.async.js +0 -1
- package/dist/7965.a57e8f9a.async.js +0 -1
- package/dist/8300.66a39b1b.async.js +0 -1
- package/dist/8982.8e38e68e.async.js +0 -1
- package/dist/9877.87ec0c28.async.js +0 -11
- package/dist/VtxColorPicker__demos.60d61929.async.js +0 -1
- package/dist/VtxCombogrid__demos.8c798bc7.async.js +0 -1
- package/dist/VtxDatagrid__demos.e07857d0.async.js +0 -1
- package/dist/VtxEllipsisText__demos.2e269d20.async.js +0 -1
- package/dist/VtxExportAsync__demos.13e3bb1c.async.js +0 -1
- package/dist/VtxExport__demos.1cce5217.async.js +0 -1
- package/dist/VtxFormLayout__demos.b8bb038a.async.js +0 -1
- package/dist/VtxImage__demos.774c697e.async.js +0 -1
- package/dist/VtxImport2__demos.8182b8d2.async.js +0 -1
- package/dist/VtxImport__demos.3865c4e9.async.js +0 -1
- package/dist/VtxInput__demos.5fd77ccb.async.js +0 -1
- package/dist/VtxModal__demos.e0aae505.async.js +0 -1
- package/dist/VtxPageLayout__demos.b1cd7624.async.js +0 -1
- package/dist/VtxRpsFrame__demos.07c3fb5e.async.js +0 -1
- package/dist/VtxScrollableRow__demos.eeb18c3c.async.js +0 -1
- package/dist/VtxSearch__demos.f6b048ae.async.js +0 -1
- package/dist/VtxSelect__demos.0e8f1c52.async.js +0 -1
- package/dist/VtxSignature__demos.d0c4bcac.async.js +0 -1
- package/dist/VtxSplitPane__demos.6dda4f09.async.js +0 -1
- package/dist/VtxStatisticsColumn__demos.b2be3e4b.async.js +0 -1
- package/dist/VtxTimePicker__demos.ced305a6.async.js +0 -1
- package/dist/VtxTreeSelect__demos.daab9057.async.js +0 -1
- package/dist/VtxTree__demos.15550a80.async.js +0 -1
- package/dist/VtxUpload__demos.794c746a.async.js +0 -1
- package/dist/VtxWangEditor__demos.92b4daf1.async.js +0 -1
- package/dist/changelog/index.html +0 -17
- package/dist/components/index.html +0 -17
- package/dist/components/vtx-color-picker/index.html +0 -17
- package/dist/components/vtx-combogrid/index.html +0 -17
- package/dist/components/vtx-datagrid/index.html +0 -17
- package/dist/components/vtx-date-picker/index.html +0 -17
- package/dist/components/vtx-ellipsis-text/index.html +0 -17
- package/dist/components/vtx-export/index.html +0 -17
- package/dist/components/vtx-export-async/index.html +0 -17
- package/dist/components/vtx-form-layout/index.html +0 -17
- package/dist/components/vtx-image/index.html +0 -17
- package/dist/components/vtx-import/index.html +0 -17
- package/dist/components/vtx-import2/index.html +0 -17
- package/dist/components/vtx-input/index.html +0 -17
- package/dist/components/vtx-modal/index.html +0 -17
- package/dist/components/vtx-page-layout/index.html +0 -17
- package/dist/components/vtx-rps-frame/index.html +0 -17
- package/dist/components/vtx-scrollable-row/index.html +0 -17
- package/dist/components/vtx-search/index.html +0 -17
- package/dist/components/vtx-select/index.html +0 -17
- package/dist/components/vtx-signature/index.html +0 -17
- package/dist/components/vtx-split-pane/index.html +0 -17
- package/dist/components/vtx-statistics-column/index.html +0 -17
- package/dist/components/vtx-time-picker/index.html +0 -17
- package/dist/components/vtx-tree/index.html +0 -17
- package/dist/components/vtx-tree-select/index.html +0 -17
- package/dist/components/vtx-upload/index.html +0 -17
- package/dist/components/vtx-wang-editor/index.html +0 -17
- package/dist/demos.f6817f69.async.js +0 -1
- package/dist/docs/api-changes/index.html +0 -17
- package/dist/docs/index.html +0 -17
- package/dist/docs/migration-guide/index.html +0 -17
- package/dist/dumi__tmp-production__dumi__theme__ContextWrapper.aca58684.async.js +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/icon.png +0 -0
- package/dist/index.html +0 -17
- package/dist/meta__site.2e323023.async.js +0 -5392
- package/dist/meta__site.51651769.chunk.css +0 -9
- package/dist/meta__vtx-search.5ddbd36b.async.js +0 -5
- package/dist/nm__dumi-theme-vortex-style__dist__layouts__DemoLayout__index.7cea644e.async.js +0 -1
- package/dist/nm__dumi-theme-vortex-style__dist__layouts__DocLayout__index.eec80432.chunk.css +0 -1
- package/dist/nm__dumi__dist__client__pages__404.0d35bb9e.async.js +0 -1
- package/dist/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css +0 -1
- package/dist/nm__dumi__dist__client__pages__Demo__index.578aa5c0.chunk.css +0 -1
- package/dist/nm__dumi__dist__client__pages__Demo__index.88d92ec7.async.js +0 -1
- package/dist/preload_helper.214f203a.js +0 -1
- package/dist/site__changelog.md.33be0665.chunk.css +0 -1
- package/dist/site__changelog.md.ca6f70d0.async.js +0 -1
- package/dist/site__components__index.md.1c0dd566.async.js +0 -1
- package/dist/site__components__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-color-picker__index.md.0b5f09f9.async.js +0 -1
- package/dist/site__components__vtx-color-picker__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-combogrid__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-combogrid__index.md.5c184a19.async.js +0 -19
- package/dist/site__components__vtx-datagrid__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-datagrid__index.md.3b6b11a0.async.js +0 -58
- package/dist/site__components__vtx-date-picker__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-date-picker__index.md.e498db68.async.js +0 -1
- package/dist/site__components__vtx-ellipsis-text__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-ellipsis-text__index.md.3df8b85b.async.js +0 -1
- package/dist/site__components__vtx-export-async__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-export-async__index.md.7ad10351.async.js +0 -50
- package/dist/site__components__vtx-export__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-export__index.md.ae512624.async.js +0 -6
- package/dist/site__components__vtx-form-layout__index.md.26ce0de4.async.js +0 -1
- package/dist/site__components__vtx-form-layout__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-image__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-image__index.md.51d7fede.async.js +0 -7
- package/dist/site__components__vtx-import2__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-import2__index.md.3d03da86.async.js +0 -22
- package/dist/site__components__vtx-import__index.md.2706afc2.async.js +0 -1
- package/dist/site__components__vtx-import__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-input__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-input__index.md.dbe2e571.async.js +0 -1
- package/dist/site__components__vtx-modal__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-modal__index.md.6a9b2eda.async.js +0 -9
- package/dist/site__components__vtx-page-layout__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-page-layout__index.md.46cefa9b.async.js +0 -1
- package/dist/site__components__vtx-rps-frame__index.md.0126d79c.async.js +0 -1
- package/dist/site__components__vtx-rps-frame__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-scrollable-row__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-scrollable-row__index.md.83c9c112.async.js +0 -1
- package/dist/site__components__vtx-search__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-search__index.md.a36329f4.async.js +0 -5
- package/dist/site__components__vtx-select__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-select__index.md.d4b9a187.async.js +0 -6
- package/dist/site__components__vtx-signature__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-signature__index.md.e502b176.async.js +0 -1
- package/dist/site__components__vtx-split-pane__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-split-pane__index.md.744d87da.async.js +0 -1
- package/dist/site__components__vtx-statistics-column__index.md.106749e3.async.js +0 -1
- package/dist/site__components__vtx-statistics-column__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-time-picker__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-time-picker__index.md.c9f4700c.async.js +0 -1
- package/dist/site__components__vtx-tree-select__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-tree-select__index.md.49b56c10.async.js +0 -1
- package/dist/site__components__vtx-tree__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-tree__index.md.4c124fad.async.js +0 -1
- package/dist/site__components__vtx-upload__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-upload__index.md.57969550.async.js +0 -6
- package/dist/site__components__vtx-wang-editor__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-wang-editor__index.md.b98b12a6.async.js +0 -7
- package/dist/site__docs__api-changes.md.33be0665.chunk.css +0 -1
- package/dist/site__docs__api-changes.md.aaa38736.async.js +0 -6
- package/dist/site__docs__index.md.33be0665.chunk.css +0 -1
- package/dist/site__docs__index.md.586150c4.async.js +0 -53
- package/dist/site__docs__migration-guide.md.02f5996d.async.js +0 -194
- package/dist/site__docs__migration-guide.md.33be0665.chunk.css +0 -1
- package/dist/site__index.md.33be0665.chunk.css +0 -1
- package/dist/site__index.md.634bf57a.async.js +0 -1
- package/dist/sitemap.xml +0 -1
- package/dist/umi.f49a7748.css +0 -1
- package/dist/umi.f610424c.js +0 -877
- package/dist/vtx-search__index.md.33be0665.chunk.css +0 -1
- package/dist/vtx-search__index.md.37a39d66.async.js +0 -5
- package/dist/~demos/:id/index.html +0 -17
- package/dist/~demos/site-components-vtx-date-picker-demo-demo1/index.html +0 -17
- package/dist/~demos/site-components-vtx-date-picker-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxcolorpicker-demo-base/index.html +0 -17
- package/dist/~demos/vtxcolorpicker-demo-base-form/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxcombogrid-demo-demo5/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo10/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo5/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo6/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo7/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo8/index.html +0 -17
- package/dist/~demos/vtxdatagrid-demo-demo9/index.html +0 -17
- package/dist/~demos/vtxellipsistext-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxexport-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxexportasync-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo10/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo5/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo6/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo7/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo8/index.html +0 -17
- package/dist/~demos/vtxformlayout-demo-demo9/index.html +0 -17
- package/dist/~demos/vtximage-demo-demo1/index.html +0 -17
- package/dist/~demos/vtximage-demo-demo2/index.html +0 -17
- package/dist/~demos/vtximage-demo-demo3/index.html +0 -17
- package/dist/~demos/vtximage-demo-demo4/index.html +0 -17
- package/dist/~demos/vtximport-demo-base/index.html +0 -17
- package/dist/~demos/vtximport2-demo-base/index.html +0 -17
- package/dist/~demos/vtxinput-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxinput-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxinput-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxmodal-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxmodal-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxmodal-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxpagelayout-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxrpsframe-demo-base/index.html +0 -17
- package/dist/~demos/vtxscrollablerow-demo-demo/index.html +0 -17
- package/dist/~demos/vtxsearch-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxsearch-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxsearch-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxsearch-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxselect-demo-base/index.html +0 -17
- package/dist/~demos/vtxselect-demo-base-multiple/index.html +0 -17
- package/dist/~demos/vtxsignature-demo-demo/index.html +0 -17
- package/dist/~demos/vtxsignature-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxsplitpane-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxsplitpane-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxsplitpane-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxsplitpane-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxstatisticscolumn-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxstatisticscolumn-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxstatisticscolumn-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxtimepicker-demo-base/index.html +0 -17
- package/dist/~demos/vtxtree-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxtree-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxtree-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxtreeselect-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxtreeselect-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxtreeselect-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxupload-demo-demo1/index.html +0 -17
- package/dist/~demos/vtxupload-demo-demo2/index.html +0 -17
- package/dist/~demos/vtxupload-demo-demo3/index.html +0 -17
- package/dist/~demos/vtxwangeditor-demo-demo1/index.html +0 -17
- package/es/utils/hooks/useFetchData/index.js +0 -82
- package/lib/utils/hooks/useFetchData/index.js +0 -89
package/es/vtx-import/index.js
CHANGED
|
@@ -11,7 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
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
13
|
import React, { useRef, useEffect, useContext } from 'react';
|
|
14
|
-
import {
|
|
14
|
+
import { message, Button } from 'antd';
|
|
15
15
|
import PropTypes from 'prop-types';
|
|
16
16
|
import useSet from "../utils/useSet";
|
|
17
17
|
import VtxImportResult from "./result";
|
|
@@ -19,9 +19,9 @@ import getToken from "../utils/getToken";
|
|
|
19
19
|
var token = getToken();
|
|
20
20
|
import md5 from 'md5';
|
|
21
21
|
import { getVtxToken, getSignature } from '@vtx/utils';
|
|
22
|
-
import classnames from 'classnames';
|
|
23
22
|
import { useStyle } from "./style/index";
|
|
24
23
|
import { VtxProvider, useIntl } from "../vtx-provider";
|
|
24
|
+
import VtxModal from "../vtx-modal";
|
|
25
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
26
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
function VtxImport(props) {
|
|
@@ -32,14 +32,19 @@ function VtxImport(props) {
|
|
|
32
32
|
var _useStyle = useStyle(prefixCls),
|
|
33
33
|
wrapSSR = _useStyle.wrapSSR,
|
|
34
34
|
hashId = _useStyle.hashId;
|
|
35
|
+
|
|
36
|
+
// 用 useRef 管理 DOM 引用,而不是 state
|
|
37
|
+
var fileInputRef = useRef(null);
|
|
38
|
+
var iframeRef = useRef(null);
|
|
39
|
+
var formRef = useRef(null);
|
|
40
|
+
|
|
41
|
+
// 用于追踪当前 XHR 请求,方便取消
|
|
42
|
+
var xhrRef = useRef(null);
|
|
35
43
|
var indexRef = useRef(0);
|
|
36
44
|
var _useSet = useSet({
|
|
37
|
-
fileForm: null,
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
// 保存上传的文件
|
|
41
|
-
iframe: null,
|
|
42
|
-
// form表单提交之后跳转的
|
|
45
|
+
// fileForm: null, // form表单
|
|
46
|
+
// fileInput: null, // 保存上传的文件
|
|
47
|
+
// iframe: null, // form表单提交之后跳转的
|
|
43
48
|
useFormData: window.FormData ? true : false,
|
|
44
49
|
// 是否查看
|
|
45
50
|
uploading: false,
|
|
@@ -102,7 +107,7 @@ function VtxImport(props) {
|
|
|
102
107
|
data.append('chunkNo', i + 1);
|
|
103
108
|
data.append('chunkId', state.chunkId);
|
|
104
109
|
data.append('tenantId', getVtxToken('tenantId'));
|
|
105
|
-
data.append('file', new File([e],
|
|
110
|
+
data.append('file', new File([e], fileInputRef.current.files[0].name));
|
|
106
111
|
dataArr.push(data);
|
|
107
112
|
});
|
|
108
113
|
uploadAsync(dataArr);
|
|
@@ -112,6 +117,7 @@ function VtxImport(props) {
|
|
|
112
117
|
function uploadAsync(list) {
|
|
113
118
|
if (indexRef.current < list.length) {
|
|
114
119
|
var xhr = new XMLHttpRequest();
|
|
120
|
+
xhrRef.current = xhr;
|
|
115
121
|
xhr.onload = function () {
|
|
116
122
|
if (xhr.status === 200) {
|
|
117
123
|
setState({
|
|
@@ -135,15 +141,27 @@ function VtxImport(props) {
|
|
|
135
141
|
// 合并分片
|
|
136
142
|
function mergeFile() {
|
|
137
143
|
var xhr = new XMLHttpRequest();
|
|
144
|
+
xhrRef.current = xhr;
|
|
138
145
|
// 当上传完成时调用
|
|
139
146
|
xhr.onload = function () {
|
|
140
147
|
if (xhr.status === 200) {
|
|
141
|
-
var
|
|
142
|
-
|
|
148
|
+
var _res;
|
|
149
|
+
var res;
|
|
150
|
+
try {
|
|
151
|
+
res = JSON.parse(xhr.responseText);
|
|
152
|
+
} catch (e) {
|
|
153
|
+
message.error(intl.getMessage('import.error', '解析响应失败'));
|
|
154
|
+
setState({
|
|
155
|
+
uploading: false
|
|
156
|
+
});
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
if (((_res = res) === null || _res === void 0 ? void 0 : _res.result) == 0) {
|
|
143
160
|
message.success(intl.getMessage('import.success', '上传成功'));
|
|
144
161
|
chunkUpload(res.data);
|
|
145
162
|
} else {
|
|
146
|
-
|
|
163
|
+
var _res2;
|
|
164
|
+
message.error(((_res2 = res) === null || _res2 === void 0 ? void 0 : _res2.msg) || intl.getMessage('import.error', '上传失败'));
|
|
147
165
|
}
|
|
148
166
|
}
|
|
149
167
|
};
|
|
@@ -156,7 +174,7 @@ function VtxImport(props) {
|
|
|
156
174
|
data.append('chunkId', state.chunkId);
|
|
157
175
|
data.append('tenantId', getVtxToken('tenantId'));
|
|
158
176
|
data.append('chunkSize', state.chunks.length);
|
|
159
|
-
data.append('fileName',
|
|
177
|
+
data.append('fileName', fileInputRef.current.files[0].name);
|
|
160
178
|
xhr.send(data);
|
|
161
179
|
}
|
|
162
180
|
|
|
@@ -166,6 +184,7 @@ function VtxImport(props) {
|
|
|
166
184
|
var postData = props.postData || {};
|
|
167
185
|
if (state.useFormData) {
|
|
168
186
|
var request = new XMLHttpRequest();
|
|
187
|
+
xhrRef.current = request;
|
|
169
188
|
// 发送请求
|
|
170
189
|
request.open('POST', postUrl);
|
|
171
190
|
request.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
|
|
@@ -196,6 +215,7 @@ function VtxImport(props) {
|
|
|
196
215
|
var postData = props.postData || {};
|
|
197
216
|
if (state.useFormData) {
|
|
198
217
|
var request = new XMLHttpRequest();
|
|
218
|
+
xhrRef.current = request;
|
|
199
219
|
// 发送请求
|
|
200
220
|
request.open('POST', postUrl);
|
|
201
221
|
request.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
|
|
@@ -216,7 +236,7 @@ function VtxImport(props) {
|
|
|
216
236
|
};
|
|
217
237
|
//创建formdata对象
|
|
218
238
|
var fmd = new FormData();
|
|
219
|
-
fmd.append(state.fileKey,
|
|
239
|
+
fmd.append(state.fileKey, fileInputRef.current.files[0]);
|
|
220
240
|
request.send(fmd);
|
|
221
241
|
}
|
|
222
242
|
}
|
|
@@ -247,7 +267,9 @@ function VtxImport(props) {
|
|
|
247
267
|
return postArray.length > 0 ? "".concat(postUrl, "?").concat(postArray.join('&')) : postUrl;
|
|
248
268
|
};
|
|
249
269
|
var closeModal = function closeModal() {
|
|
250
|
-
|
|
270
|
+
if (fileInputRef.current) {
|
|
271
|
+
fileInputRef.current.value = '';
|
|
272
|
+
}
|
|
251
273
|
if (typeof props.close === 'function') {
|
|
252
274
|
props.close();
|
|
253
275
|
} else {
|
|
@@ -258,15 +280,24 @@ function VtxImport(props) {
|
|
|
258
280
|
};
|
|
259
281
|
// 上传之后的回调 - 展示报错信息
|
|
260
282
|
var uploadSuccess = function uploadSuccess(data) {
|
|
261
|
-
|
|
283
|
+
var _parseData;
|
|
284
|
+
if (fileInputRef.current) {
|
|
285
|
+
fileInputRef.current.value = '';
|
|
286
|
+
}
|
|
262
287
|
setState({
|
|
263
288
|
uploading: false
|
|
264
289
|
});
|
|
290
|
+
var parseData;
|
|
291
|
+
try {
|
|
292
|
+
parseData = JSON.parse(data);
|
|
293
|
+
} catch (e) {
|
|
294
|
+
message.error(intl.getMessage('import.error', '解析响应数据失败'));
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
265
297
|
if (typeof props.afterUpload === 'function') {
|
|
266
298
|
afterUpload(data);
|
|
267
299
|
}
|
|
268
|
-
|
|
269
|
-
if (Array.isArray(parseData === null || parseData === void 0 ? void 0 : parseData.data)) {
|
|
300
|
+
if (Array.isArray((_parseData = parseData) === null || _parseData === void 0 ? void 0 : _parseData.data)) {
|
|
270
301
|
setState({
|
|
271
302
|
resultVisible: true,
|
|
272
303
|
resultData: parseData.data.map(function (item, index) {
|
|
@@ -281,7 +312,8 @@ function VtxImport(props) {
|
|
|
281
312
|
} else {
|
|
282
313
|
// 新增其他错误提示
|
|
283
314
|
if (parseData.result !== 0) {
|
|
284
|
-
|
|
315
|
+
var _parseData2;
|
|
316
|
+
message.error(((_parseData2 = parseData) === null || _parseData2 === void 0 ? void 0 : _parseData2.msg) || intl.getMessage('import.success', '上传成功'));
|
|
285
317
|
}
|
|
286
318
|
}
|
|
287
319
|
};
|
|
@@ -306,22 +338,21 @@ function VtxImport(props) {
|
|
|
306
338
|
type: "primary",
|
|
307
339
|
loading: state.uploading,
|
|
308
340
|
onClick: function onClick() {
|
|
341
|
+
var _fileInputRef$current2;
|
|
309
342
|
if (typeof props.beforeUpload === 'function') {
|
|
310
|
-
var
|
|
343
|
+
var _fileInputRef$current;
|
|
344
|
+
var flag = beforeUpload((_fileInputRef$current = fileInputRef.current) === null || _fileInputRef$current === void 0 || (_fileInputRef$current = _fileInputRef$current.files) === null || _fileInputRef$current === void 0 ? void 0 : _fileInputRef$current[0]);
|
|
311
345
|
if (!flag) {
|
|
312
|
-
|
|
313
|
-
setState({
|
|
314
|
-
fileInput: null
|
|
315
|
-
});
|
|
346
|
+
fileInputRef.current.value = '';
|
|
316
347
|
return;
|
|
317
348
|
}
|
|
318
349
|
}
|
|
319
|
-
if (
|
|
350
|
+
if ((_fileInputRef$current2 = fileInputRef.current) !== null && _fileInputRef$current2 !== void 0 && _fileInputRef$current2.value) {
|
|
320
351
|
setState({
|
|
321
352
|
uploading: true
|
|
322
353
|
});
|
|
323
354
|
// 上传文件
|
|
324
|
-
checkFile(
|
|
355
|
+
checkFile(fileInputRef.current.files[0]);
|
|
325
356
|
// const postUrl = getPostURL();
|
|
326
357
|
// if (state.useFormData) {
|
|
327
358
|
// const request = new XMLHttpRequest();
|
|
@@ -350,7 +381,8 @@ function VtxImport(props) {
|
|
|
350
381
|
closeModal();
|
|
351
382
|
},
|
|
352
383
|
children: intl.getMessage('switch.close', '关闭')
|
|
353
|
-
}, "closeWindow")]
|
|
384
|
+
}, "closeWindow")],
|
|
385
|
+
width: 520
|
|
354
386
|
};
|
|
355
387
|
var resultProps = {
|
|
356
388
|
visible: state.resultVisible,
|
|
@@ -363,36 +395,45 @@ function VtxImport(props) {
|
|
|
363
395
|
},
|
|
364
396
|
modalWidth: state.modalWidth
|
|
365
397
|
};
|
|
398
|
+
|
|
399
|
+
// 组件卸载时清理
|
|
400
|
+
useEffect(function () {
|
|
401
|
+
return function () {
|
|
402
|
+
// 取消进行中的 XHR 请求
|
|
403
|
+
if (xhrRef.current) {
|
|
404
|
+
xhrRef.current.abort();
|
|
405
|
+
xhrRef.current = null;
|
|
406
|
+
}
|
|
407
|
+
// 清理文件输入
|
|
408
|
+
if (fileInputRef.current) {
|
|
409
|
+
fileInputRef.current.value = '';
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
}, []);
|
|
366
413
|
useEffect(function () {
|
|
367
414
|
if (state.chunkId) {
|
|
368
415
|
startUpload();
|
|
369
416
|
}
|
|
370
417
|
}, [state.chunkId]);
|
|
371
|
-
return wrapSSR( /*#__PURE__*/_jsxs(
|
|
418
|
+
return wrapSSR( /*#__PURE__*/_jsxs(VtxModal, _objectSpread(_objectSpread({}, modalProps), {}, {
|
|
372
419
|
children: [props.children, /*#__PURE__*/_jsx("form", {
|
|
373
420
|
encType: "multipart/form-data",
|
|
374
421
|
method: "post",
|
|
375
422
|
target: "tmp",
|
|
376
423
|
action: uploadURL,
|
|
377
|
-
ref:
|
|
378
|
-
if (dom) state.fileForm = dom;
|
|
379
|
-
},
|
|
424
|
+
ref: formRef,
|
|
380
425
|
children: /*#__PURE__*/_jsx("input", {
|
|
381
426
|
type: "file",
|
|
382
427
|
name: state.fileKey,
|
|
383
428
|
accept: state.accept,
|
|
384
|
-
ref:
|
|
385
|
-
if (dom) state.fileInput = dom;
|
|
386
|
-
}
|
|
429
|
+
ref: fileInputRef
|
|
387
430
|
})
|
|
388
431
|
}), /*#__PURE__*/_jsx("iframe", {
|
|
389
432
|
name: "tmp",
|
|
390
433
|
style: {
|
|
391
434
|
display: 'none'
|
|
392
435
|
},
|
|
393
|
-
ref:
|
|
394
|
-
if (dom) state.iframe = dom;
|
|
395
|
-
}
|
|
436
|
+
ref: iframeRef
|
|
396
437
|
}), state.resultVisible && /*#__PURE__*/_jsx(VtxImportResult, _objectSpread({}, resultProps))]
|
|
397
438
|
})));
|
|
398
439
|
}
|
package/es/vtx-import/result.js
CHANGED
|
@@ -16,6 +16,7 @@ import PropTypes from 'prop-types';
|
|
|
16
16
|
import useSet from "../utils/useSet";
|
|
17
17
|
import VtxDatagrid from "../vtx-datagrid";
|
|
18
18
|
import { useIntl } from "../vtx-provider";
|
|
19
|
+
import VtxModal from "../vtx-modal";
|
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
21
|
function VtxImportResult(props) {
|
|
21
22
|
var intl = useIntl();
|
|
@@ -58,7 +59,7 @@ function VtxImportResult(props) {
|
|
|
58
59
|
pagination: false,
|
|
59
60
|
autoFit: false
|
|
60
61
|
};
|
|
61
|
-
return /*#__PURE__*/_jsx(
|
|
62
|
+
return /*#__PURE__*/_jsx(VtxModal, _objectSpread(_objectSpread({}, modalProps), {}, {
|
|
62
63
|
children: /*#__PURE__*/_jsx("div", {
|
|
63
64
|
style: {
|
|
64
65
|
maxHeight: 600,
|
|
@@ -7,7 +7,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { useStyle as useAntdStyle } from "../../vtx-provider";
|
|
8
8
|
var genVtxImportStyle = function genVtxImportStyle(token) {
|
|
9
9
|
var componentCls = token.componentCls;
|
|
10
|
-
return _defineProperty({}, componentCls, {
|
|
10
|
+
return _defineProperty({}, componentCls, {
|
|
11
|
+
'.ant-modal-container': {
|
|
12
|
+
padding: 0,
|
|
13
|
+
'.ant-modal-header': {
|
|
14
|
+
padding: 20
|
|
15
|
+
},
|
|
16
|
+
'.ant-modal-body': {
|
|
17
|
+
padding: 20
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
11
21
|
};
|
|
12
22
|
export function useStyle(prefixCls) {
|
|
13
23
|
return useAntdStyle('VtxImport', function (token) {
|
package/es/vtx-import2/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { getVtxToken } from '@vtx/utils';
|
|
|
30
30
|
import classnames from 'classnames';
|
|
31
31
|
import { useStyle } from "./style/index";
|
|
32
32
|
import { VtxProvider, useIntl } from "../vtx-provider";
|
|
33
|
+
import VtxModal from "../vtx-modal";
|
|
33
34
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
35
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
36
|
function getFileName() {
|
|
@@ -215,7 +216,7 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
215
216
|
if (xhr.status === 200) {
|
|
216
217
|
var res = JSON.parse(xhr.responseText);
|
|
217
218
|
if ((res === null || res === void 0 ? void 0 : res.result) == 0) {
|
|
218
|
-
message.success('上传成功');
|
|
219
|
+
message.success(intl.getMessage('import.success', '上传成功'));
|
|
219
220
|
chunkUpload(res.data);
|
|
220
221
|
} else {
|
|
221
222
|
message.error((res === null || res === void 0 ? void 0 : res.msg) || intl.getMessage('import.error', '上传失败'));
|
|
@@ -247,6 +248,7 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
247
248
|
}
|
|
248
249
|
request.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
|
|
249
250
|
request.setRequestHeader('access_token', token ? "".concat(token) : '');
|
|
251
|
+
request.setRequestHeader('systemCode', getUrlParam('systemCode') ? getUrlParam('systemCode') : '');
|
|
250
252
|
// 添加操作日志
|
|
251
253
|
request.setRequestHeader('operation', encodeURIComponent(JSON.stringify({
|
|
252
254
|
menuId: sessionStorage.getItem('vtxmenuselectedKeys'),
|
|
@@ -388,7 +390,7 @@ var VtxImport2 = function VtxImport2(props) {
|
|
|
388
390
|
})]
|
|
389
391
|
})
|
|
390
392
|
};
|
|
391
|
-
return wrapSSR( /*#__PURE__*/_jsxs(
|
|
393
|
+
return wrapSSR( /*#__PURE__*/_jsxs(VtxModal, _objectSpread(_objectSpread({}, modelProps), {}, {
|
|
392
394
|
children: [status === 0 ? /*#__PURE__*/_jsx(Content, {
|
|
393
395
|
prefixCls: prefixCls,
|
|
394
396
|
fileList: fileList,
|
|
@@ -26,7 +26,7 @@ var genVtxImport2Style = function genVtxImport2Style(token) {
|
|
|
26
26
|
padding: '16px 16px 16px 48px',
|
|
27
27
|
color: token.colorPrimary,
|
|
28
28
|
fontSize: '14px',
|
|
29
|
-
backgroundColor: token.
|
|
29
|
+
backgroundColor: token.colorBgLayoutTable,
|
|
30
30
|
borderRadius: '4px'
|
|
31
31
|
}, "".concat(componentCls, "-download"), {
|
|
32
32
|
marginLeft: '16px'
|
|
@@ -45,12 +45,17 @@ var TextArea = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
45
45
|
}));
|
|
46
46
|
|
|
47
47
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
var wrapper = null;
|
|
49
|
+
if (showCount && 'value' in props) {
|
|
50
|
+
wrapper = function wrapper(element) {
|
|
51
|
+
return /*#__PURE__*/_jsx("div", {
|
|
52
|
+
className: classnames(prefixCls, hashId),
|
|
53
|
+
"data-count": "".concat(len, "/").concat(maxLength),
|
|
54
|
+
children: element
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return wrapSSR(wrapper ? wrapper(render) : render);
|
|
54
59
|
});
|
|
55
60
|
export default TextArea;
|
|
56
61
|
TextArea.propTypes = {
|
|
@@ -19,11 +19,13 @@ var genVtxModalStyle = function genVtxModalStyle(token) {
|
|
|
19
19
|
padding: 0
|
|
20
20
|
},
|
|
21
21
|
'.ant-modal-body': {
|
|
22
|
-
|
|
22
|
+
height: 'calc(100% - 108px)',
|
|
23
23
|
padding: '12px 20px 8px 20px',
|
|
24
|
-
overflowY: 'auto'
|
|
25
|
-
height: '100%'
|
|
24
|
+
overflowY: 'auto'
|
|
26
25
|
}
|
|
26
|
+
},
|
|
27
|
+
'.ant-modal-container': {
|
|
28
|
+
padding: 0
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
}, '&-title', _defineProperty(_defineProperty(_defineProperty({
|
|
@@ -19,7 +19,7 @@ function Content(props) {
|
|
|
19
19
|
height = props.height;
|
|
20
20
|
var contentClass = classnames(_defineProperty(_defineProperty(_defineProperty({}, 'vtx-page-content-absolute', !relative), 'vtx-page-content-relative', relative), 'vtx-page-content-scroll-y', scrollY), className);
|
|
21
21
|
var newStyle = style;
|
|
22
|
-
if (
|
|
22
|
+
if (height !== undefined) {
|
|
23
23
|
newStyle = _objectSpread(_objectSpread({}, newStyle), {}, {
|
|
24
24
|
height: height
|
|
25
25
|
});
|
|
@@ -1,9 +1,3 @@
|
|
|
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
1
|
import { ConfigProvider } from 'antd';
|
|
8
2
|
import classsnames from 'classnames';
|
|
9
3
|
import PropTypes from 'prop-types';
|
|
@@ -50,7 +44,7 @@ var Content = function Content(props) {
|
|
|
50
44
|
hashId = _useStyle2.hashId;
|
|
51
45
|
return wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
52
46
|
className: classsnames("".concat(prefix, "-tab-content"), className, hashId),
|
|
53
|
-
style:
|
|
47
|
+
style: style,
|
|
54
48
|
children: props.children
|
|
55
49
|
}));
|
|
56
50
|
};
|
|
@@ -124,15 +124,25 @@ Content.propTypes = {
|
|
|
124
124
|
*/
|
|
125
125
|
var Table = function Table(props) {
|
|
126
126
|
var className = props.className,
|
|
127
|
-
style = props.style
|
|
127
|
+
style = props.style,
|
|
128
|
+
children = props.children;
|
|
128
129
|
var _useContext3 = useContext(StoreCtx),
|
|
129
130
|
searchCollapseEvent$ = _useContext3.searchCollapseEvent$;
|
|
131
|
+
|
|
132
|
+
// 安全检查:如果不是有效的 React 元素,直接渲染不注入 props
|
|
133
|
+
if (! /*#__PURE__*/React.isValidElement(children)) {
|
|
134
|
+
return /*#__PURE__*/_jsx("div", {
|
|
135
|
+
className: classsnames('vtx-page-table-wrap', className),
|
|
136
|
+
style: style,
|
|
137
|
+
children: children
|
|
138
|
+
});
|
|
139
|
+
}
|
|
130
140
|
return /*#__PURE__*/_jsx("div", {
|
|
131
|
-
className: classsnames('vtx-page-table-wrap', className
|
|
141
|
+
className: classsnames('vtx-page-table-wrap', className),
|
|
132
142
|
style: style,
|
|
133
|
-
children: /*#__PURE__*/React.cloneElement(
|
|
143
|
+
children: /*#__PURE__*/React.cloneElement(children, {
|
|
134
144
|
searchCollapseEvent$: searchCollapseEvent$
|
|
135
|
-
})
|
|
145
|
+
})
|
|
136
146
|
});
|
|
137
147
|
};
|
|
138
148
|
Table.propTypes = {
|
|
@@ -12,7 +12,8 @@ function TableWrap(props) {
|
|
|
12
12
|
var relative = props.relative,
|
|
13
13
|
height = props.height,
|
|
14
14
|
style = props.style,
|
|
15
|
-
className = props.className
|
|
15
|
+
className = props.className,
|
|
16
|
+
children = props.children;
|
|
16
17
|
var tableClass = classnames(_defineProperty(_defineProperty({}, 'vtx-table-wrapper-absolute', !relative), 'vtx-table-wrapper-relative', relative), className);
|
|
17
18
|
var newStyle = style;
|
|
18
19
|
if (relative && 'height' in props) {
|
|
@@ -23,7 +24,7 @@ function TableWrap(props) {
|
|
|
23
24
|
return /*#__PURE__*/_jsx("div", {
|
|
24
25
|
className: tableClass,
|
|
25
26
|
style: newStyle,
|
|
26
|
-
children:
|
|
27
|
+
children: children
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
export default TableWrap;
|
|
@@ -1,9 +1,3 @@
|
|
|
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
1
|
import classsnames from 'classnames';
|
|
8
2
|
import PropTypes from 'prop-types';
|
|
9
3
|
import { useContext } from 'react';
|
|
@@ -49,7 +43,7 @@ var Content = function Content(props) {
|
|
|
49
43
|
hashId = _useStyle2.hashId;
|
|
50
44
|
return wrapSSR( /*#__PURE__*/_jsx("div", {
|
|
51
45
|
className: classsnames("".concat(prefix, "-tree-content"), className, hashId),
|
|
52
|
-
style:
|
|
46
|
+
style: style,
|
|
53
47
|
children: props.children
|
|
54
48
|
}));
|
|
55
49
|
};
|
|
@@ -62,7 +56,7 @@ var Tree = function Tree(props) {
|
|
|
62
56
|
var className = props.className,
|
|
63
57
|
style = props.style;
|
|
64
58
|
return /*#__PURE__*/_jsx("div", {
|
|
65
|
-
className: classsnames('vtx-page-tree-wrap', className
|
|
59
|
+
className: classsnames('vtx-page-tree-wrap', className),
|
|
66
60
|
style: style,
|
|
67
61
|
children: props.children
|
|
68
62
|
});
|
|
@@ -44,11 +44,12 @@ function Container() {
|
|
|
44
44
|
className = _this$props.className,
|
|
45
45
|
top = _this$props.top,
|
|
46
46
|
space = _this$props.space;
|
|
47
|
-
var wrapClass = classnames(_defineProperty({}, componentClass,
|
|
48
|
-
var newStyle = _objectSpread({
|
|
49
|
-
top: top
|
|
47
|
+
var wrapClass = classnames(_defineProperty({}, componentClass, !!componentClass), className);
|
|
48
|
+
var newStyle = _objectSpread(_objectSpread(_objectSpread({}, top !== undefined && {
|
|
49
|
+
top: top
|
|
50
|
+
}), space !== undefined && {
|
|
50
51
|
padding: space
|
|
51
|
-
}, style);
|
|
52
|
+
}), style);
|
|
52
53
|
var newProps = {
|
|
53
54
|
className: wrapClass,
|
|
54
55
|
style: newStyle
|
|
@@ -59,7 +60,7 @@ function Container() {
|
|
|
59
60
|
return HOC;
|
|
60
61
|
}(React.Component), _defineProperty(_class, "displayName", "HOC(".concat(getDisplayName(WrappedComponend), ")")), _defineProperty(_class, "propTypes", {
|
|
61
62
|
top: PropTypes.number,
|
|
62
|
-
space: PropTypes.number
|
|
63
|
+
space: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
63
64
|
style: PropTypes.object,
|
|
64
65
|
className: PropTypes.string
|
|
65
66
|
}), _class;
|
package/es/vtx-provider/index.js
CHANGED
|
@@ -143,6 +143,7 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
|
|
|
143
143
|
var _proProvide$intl;
|
|
144
144
|
var localeName = locale === null || locale === void 0 ? void 0 : locale.locale;
|
|
145
145
|
var key = findIntlKeyByAntdLocaleKey(localeName);
|
|
146
|
+
|
|
146
147
|
// antd 的 key 存在的时候以 antd 的为主
|
|
147
148
|
var resolvedIntl = intl !== null && intl !== void 0 ? intl : localeName && ((_proProvide$intl = proProvide.intl) === null || _proProvide$intl === void 0 ? void 0 : _proProvide$intl.locale) === 'default' ? intlMap[key] : proProvide.intl || intlMap[key];
|
|
148
149
|
return _objectSpread(_objectSpread({}, proProvide), {}, {
|
|
@@ -236,7 +237,7 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
|
|
|
236
237
|
* @returns
|
|
237
238
|
*/
|
|
238
239
|
export var VtxConfigProvider = function VtxConfigProvider(props) {
|
|
239
|
-
var _theme$components;
|
|
240
|
+
var _theme$components, _theme$components2;
|
|
240
241
|
var propsTheme = props.theme,
|
|
241
242
|
propsLocale = props.locale,
|
|
242
243
|
needDeps = props.needDeps,
|
|
@@ -263,18 +264,24 @@ export var VtxConfigProvider = function VtxConfigProvider(props) {
|
|
|
263
264
|
borderRadius: 8,
|
|
264
265
|
borderRadiusLG: 12,
|
|
265
266
|
borderRadiusSM: 4
|
|
266
|
-
}, dark ? {
|
|
267
|
+
}, dark ? {
|
|
268
|
+
colorBgLayoutTable: '#111'
|
|
269
|
+
} : _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
267
270
|
colorPrimary: '#3A6DFF',
|
|
268
271
|
colorText: '#29343D',
|
|
269
272
|
colorTextSecondary: '#78829D',
|
|
270
273
|
colorBorder: '#DCDFE6',
|
|
271
274
|
colorTextPlaceholder: '#BFC3CB',
|
|
272
275
|
colorFillAlter: '#F5F7FA'
|
|
273
|
-
}, "colorFillAlter", '#F5F7FA'), "colorTextPlaceholder", '#BFC3CB'), "colorFillAlterSolid", '#F5F7FA'), "colorBgLayout", '#FAFAFA')), theme.token);
|
|
276
|
+
}, "colorFillAlter", '#F5F7FA'), "colorTextPlaceholder", '#BFC3CB'), "colorFillAlterSolid", '#F5F7FA'), "colorBgLayout", '#F0F2F5'), "colorBgLayoutTable", '#FAFAFA')), theme.token);
|
|
274
277
|
theme.components = _objectSpread(_objectSpread({}, theme.components), {}, {
|
|
275
278
|
Table: _objectSpread({
|
|
276
279
|
headerBorderRadius: 0
|
|
277
|
-
}, (_theme$components = theme.components) === null || _theme$components === void 0 ? void 0 : _theme$components.Table)
|
|
280
|
+
}, (_theme$components = theme.components) === null || _theme$components === void 0 ? void 0 : _theme$components.Table),
|
|
281
|
+
Modal: _objectSpread({
|
|
282
|
+
contentPadding: 0,
|
|
283
|
+
bodyPadding: 0
|
|
284
|
+
}, (_theme$components2 = theme.components) === null || _theme$components2 === void 0 ? void 0 : _theme$components2.Modal)
|
|
278
285
|
});
|
|
279
286
|
|
|
280
287
|
// 自动注入 antd 的配置
|
|
@@ -42,6 +42,7 @@ export default {
|
|
|
42
42
|
noFixedTitle: 'Not Fixed',
|
|
43
43
|
reset: 'Reset',
|
|
44
44
|
columnDisplay: 'Column Display',
|
|
45
|
+
columnAll: 'All',
|
|
45
46
|
columnSetting: 'Table Settings',
|
|
46
47
|
fullScreen: 'Full Screen',
|
|
47
48
|
exitFullScreen: 'Exit Full Screen',
|
|
@@ -50,7 +51,12 @@ export default {
|
|
|
50
51
|
densityDefault: 'Default',
|
|
51
52
|
densityLarger: 'Larger',
|
|
52
53
|
densityMiddle: 'Middle',
|
|
53
|
-
densitySmall: 'Compact'
|
|
54
|
+
densitySmall: 'Compact',
|
|
55
|
+
messageWarningOneText: 'Please select at least one column to save',
|
|
56
|
+
messageSuccessText: 'Operation successful',
|
|
57
|
+
striped: 'Striped',
|
|
58
|
+
border: 'Border',
|
|
59
|
+
headerBackground: 'Header Background'
|
|
54
60
|
},
|
|
55
61
|
stepsForm: {
|
|
56
62
|
next: 'Next',
|
|
@@ -142,7 +148,9 @@ export default {
|
|
|
142
148
|
delete: 'Delete',
|
|
143
149
|
add: 'Add',
|
|
144
150
|
import: 'Import',
|
|
145
|
-
export: 'Export'
|
|
151
|
+
export: 'Export',
|
|
152
|
+
queryResults: 'Query results',
|
|
153
|
+
deleteConfirm: 'Are you sure you want to delete'
|
|
146
154
|
},
|
|
147
155
|
select: {
|
|
148
156
|
selectAll: 'Select All',
|
|
@@ -53,7 +53,10 @@ export default {
|
|
|
53
53
|
densityMiddle: '中等',
|
|
54
54
|
densitySmall: '紧凑',
|
|
55
55
|
messageWarningOneText: '至少勾选一列保存',
|
|
56
|
-
messageSuccessText: '操作成功'
|
|
56
|
+
messageSuccessText: '操作成功',
|
|
57
|
+
striped: '斑马纹',
|
|
58
|
+
border: '边框',
|
|
59
|
+
headerBackground: '表头背景'
|
|
57
60
|
},
|
|
58
61
|
stepsForm: {
|
|
59
62
|
next: '下一步',
|
|
@@ -144,7 +147,9 @@ export default {
|
|
|
144
147
|
delete: '删除',
|
|
145
148
|
add: '新增',
|
|
146
149
|
import: '导入',
|
|
147
|
-
export: '导出'
|
|
150
|
+
export: '导出',
|
|
151
|
+
queryResults: '查询结果',
|
|
152
|
+
deleteConfirm: '是否确认删除'
|
|
148
153
|
},
|
|
149
154
|
select: {
|
|
150
155
|
selectAll: '全选',
|
|
@@ -179,5 +184,18 @@ export default {
|
|
|
179
184
|
imageInsertionFailed: '插入图片失败',
|
|
180
185
|
videoInsertionFailed: '插入视频失败',
|
|
181
186
|
attachmentInsertionFailed: '插入附件失败'
|
|
187
|
+
},
|
|
188
|
+
colorPicker: {
|
|
189
|
+
primary: '主要',
|
|
190
|
+
// 主色调
|
|
191
|
+
danger: '红色',
|
|
192
|
+
// 危险/错误
|
|
193
|
+
success: '绿色',
|
|
194
|
+
// 成功
|
|
195
|
+
info: '青色',
|
|
196
|
+
// 信息/提示
|
|
197
|
+
basic: '基础颜色',
|
|
198
|
+
// 基础色板
|
|
199
|
+
chart: '图表颜色' // 图表专用色
|
|
182
200
|
}
|
|
183
201
|
};
|