@vtx/components 4.0.0-beta.1 → 4.0.0-beta.10
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 +0 -1
- package/es/utils/filterSpecialCharacters.js +47 -46
- package/es/vtx-color-picker/index.js +50 -39
- package/es/vtx-combogrid/Combogrid.js +11 -6
- package/es/vtx-combogrid/style/index.js +4 -4
- package/es/vtx-datagrid/Store/Provide.js +5 -4
- 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 +15 -11
- package/es/vtx-datagrid/style/index.js +2 -2
- package/es/vtx-ellipsis-text/index.js +6 -1
- package/es/vtx-export/index.js +5 -0
- 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-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 +12 -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-tree/index.js +80 -34
- package/es/vtx-tree-select/index.js +4 -0
- 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 +0 -12
- package/lib/utils/filterSpecialCharacters.js +48 -46
- package/lib/vtx-color-picker/index.js +50 -39
- package/lib/vtx-combogrid/Combogrid.js +11 -6
- package/lib/vtx-combogrid/style/index.js +4 -4
- package/lib/vtx-datagrid/Store/Provide.js +5 -4
- 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 +16 -11
- package/lib/vtx-datagrid/style/index.js +2 -2
- package/lib/vtx-ellipsis-text/index.js +6 -1
- package/lib/vtx-export/index.js +5 -0
- 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-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 +12 -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-tree/index.js +78 -32
- package/lib/vtx-tree-select/index.js +4 -0
- 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 +58 -32
- 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/vtx-transfer/Transfer.js +0 -247
- package/es/vtx-transfer/index.js +0 -3
- package/es/vtx-transfer/style/index.js +0 -42
- package/lib/vtx-transfer/Transfer.js +0 -255
- package/lib/vtx-transfer/index.js +0 -15
- package/lib/vtx-transfer/style/index.js +0 -48
|
@@ -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
|
|
31
|
-
|
|
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:
|
|
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:
|
|
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
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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:
|
|
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;
|
package/es/vtx-image/Preview.js
CHANGED
|
@@ -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
|
-
|
|
27
|
+
if (len === 0) return null;
|
|
28
|
+
return len === 1 ? VIEWER : GALLERY;
|
|
32
29
|
}
|
|
33
|
-
return
|
|
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, {});
|
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,
|
|
@@ -4,10 +4,21 @@ 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 { padding } from 'polished';
|
|
7
8
|
import { useStyle as useAntdStyle } from "../../vtx-provider";
|
|
8
9
|
var genVtxImportStyle = function genVtxImportStyle(token) {
|
|
9
10
|
var componentCls = token.componentCls;
|
|
10
|
-
return _defineProperty({}, componentCls, {
|
|
11
|
+
return _defineProperty({}, componentCls, {
|
|
12
|
+
'.ant-modal-container': {
|
|
13
|
+
padding: 0,
|
|
14
|
+
'.ant-modal-header': {
|
|
15
|
+
padding: 20
|
|
16
|
+
},
|
|
17
|
+
'.ant-modal-body': {
|
|
18
|
+
padding: 20
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
11
22
|
};
|
|
12
23
|
export function useStyle(prefixCls) {
|
|
13
24
|
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;
|