@vtx/components 4.0.0-beta.88 → 4.0.0-beta.89
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/README.md +19 -19
- package/es/utils/components/LabelIconTip/index.js +7 -7
- package/es/utils/conversionMomentValue/index.js +25 -25
- package/es/utils/filterSpecialCharacters.js +6 -6
- package/es/utils/genCopyable/index.js +6 -6
- package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/es/utils/hooks/useDebounceFn/index.js +4 -4
- package/es/utils/hooks/useDebounceValue/index.js +6 -6
- package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/es/utils/hooks/useLatest/index.js +2 -2
- package/es/utils/hooks/useRefCallback/index.js +5 -5
- package/es/utils/isBrowser/index.js +7 -7
- package/es/utils/isUrl/index.js +4 -4
- package/es/utils/merge/index.js +4 -4
- package/es/utils/nanoid/index.js +4 -4
- package/es/utils/omitBoolean/index.js +4 -4
- package/es/utils/parseValueToMoment/index.js +4 -4
- package/es/utils/proFieldParsingText/index.js +10 -10
- package/es/utils/transformKeySubmitValue/index.js +57 -57
- package/es/utils/useEditableArray/index.js +46 -46
- package/es/utils/useEditableMap/index.js +22 -22
- package/es/utils/useMediaQuery/index.js +5 -5
- package/es/vtx-datagrid/Store/Provide.js +7 -7
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
- package/es/vtx-datagrid/index.js +4 -5
- package/es/vtx-datagrid/style/index.less +242 -242
- package/es/vtx-date-picker/style/index.less +39 -39
- package/es/vtx-export/index.js +8 -8
- package/es/vtx-form-layout/style/index.js +4 -6
- package/es/vtx-icon/index.js1 +90 -90
- package/es/vtx-modal/index.js +2 -2
- package/es/vtx-page-layout/Basic.js +2 -2
- package/es/vtx-page-layout/TabLayout.js +6 -6
- package/es/vtx-page-layout/TableLayout.js +10 -10
- package/es/vtx-page-layout/TreeLayout.js +6 -6
- package/es/vtx-page-layout/container.js +2 -2
- package/es/vtx-provider/index.js +30 -30
- package/es/vtx-provider/intl.js +9 -9
- package/es/vtx-provider/useStyle/index.js +17 -17
- package/es/vtx-select/index.js +9 -10
- package/es/vtx-tree-select/index.js +8 -13
- package/es/vtx-wang-editor/style/index.less +12 -12
- package/lib/utils/components/LabelIconTip/index.js +7 -7
- package/lib/utils/conversionMomentValue/index.js +25 -25
- package/lib/utils/filterSpecialCharacters.js +6 -6
- package/lib/utils/genCopyable/index.js +6 -6
- package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/lib/utils/hooks/useDebounceFn/index.js +4 -4
- package/lib/utils/hooks/useDebounceValue/index.js +6 -6
- package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/lib/utils/hooks/useLatest/index.js +2 -2
- package/lib/utils/hooks/useRefCallback/index.js +5 -5
- package/lib/utils/isBrowser/index.js +7 -7
- package/lib/utils/isUrl/index.js +4 -4
- package/lib/utils/merge/index.js +4 -4
- package/lib/utils/nanoid/index.js +4 -4
- package/lib/utils/omitBoolean/index.js +4 -4
- package/lib/utils/parseValueToMoment/index.js +4 -4
- package/lib/utils/proFieldParsingText/index.js +10 -10
- package/lib/utils/transformKeySubmitValue/index.js +57 -57
- package/lib/utils/useEditableArray/index.js +46 -46
- package/lib/utils/useEditableMap/index.js +22 -22
- package/lib/utils/useMediaQuery/index.js +5 -5
- package/lib/vtx-datagrid/Store/Provide.js +10 -10
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
- package/lib/vtx-datagrid/index.js +4 -5
- package/lib/vtx-datagrid/style/index.less +242 -242
- package/lib/vtx-date-picker/style/index.less +39 -39
- package/lib/vtx-export/index.js +8 -8
- package/lib/vtx-form-layout/style/index.js +4 -6
- package/lib/vtx-icon/index.js1 +90 -90
- package/lib/vtx-modal/index.js +2 -2
- package/lib/vtx-page-layout/Basic.js +2 -2
- package/lib/vtx-page-layout/TabLayout.js +6 -6
- package/lib/vtx-page-layout/TableLayout.js +10 -10
- package/lib/vtx-page-layout/TreeLayout.js +6 -6
- package/lib/vtx-page-layout/container.js +2 -2
- package/lib/vtx-provider/index.js +30 -30
- package/lib/vtx-provider/intl.js +9 -9
- package/lib/vtx-provider/useStyle/index.js +17 -17
- package/lib/vtx-select/index.js +9 -10
- package/lib/vtx-tree-select/index.js +10 -13
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/package.json +239 -239
- package/dist/27.7e3a5587.async.js +0 -11
- package/dist/404.html +0 -17
- package/dist/4217.9f9c8f33.async.js +0 -1
- package/dist/4571.1f5588f5.async.js +0 -5
- package/dist/8238.a223befe.async.js +0 -688
- package/dist/8552.83c22540.async.js +0 -1265
- package/dist/9260.21c26210.async.js +0 -137
- package/dist/VtxColorPicker__demos.c3e03ab4.async.js +0 -1
- package/dist/VtxCombogrid__demos.81dd3d19.async.js +0 -1
- package/dist/VtxDatagrid__demos.bb6d2937.async.js +0 -1
- package/dist/VtxDescriptions__demos.c1d10744.async.js +0 -1
- package/dist/VtxEllipsisText__demos.f56d2a6b.async.js +0 -1
- package/dist/VtxExportAsync__demos.8bd5e7fc.async.js +0 -1
- package/dist/VtxExport__demos.f0c12996.async.js +0 -1
- package/dist/VtxFormLayout__demos.cbc5ebda.async.js +0 -1
- package/dist/VtxImage__demos.1c568ce3.async.js +0 -1
- package/dist/VtxImport2__demos.dd7cfbcf.async.js +0 -1
- package/dist/VtxImport__demos.1403a7a8.async.js +0 -1
- package/dist/VtxInput__demos.d1aeb2ca.async.js +0 -1
- package/dist/VtxModal__demos.c18d608e.async.js +0 -1
- package/dist/VtxPageLayout__demos.d223bf3b.async.js +0 -1
- package/dist/VtxRpsFrame__demos.3f951d24.async.js +0 -1
- package/dist/VtxScrollableRow__demos.a4859102.async.js +0 -1
- package/dist/VtxSearch__demos.7faa294b.async.js +0 -1
- package/dist/VtxSelect__demos.d6eb6d2b.async.js +0 -1
- package/dist/VtxSignature__demos.6abe7992.async.js +0 -1
- package/dist/VtxSplitPane__demos.2d21bf24.async.js +0 -1
- package/dist/VtxStatisticsColumn__demos.c466441f.async.js +0 -1
- package/dist/VtxTimePicker__demos.51ecd5f0.async.js +0 -1
- package/dist/VtxTransferSelect__demos.1e97ae79.async.js +0 -1
- package/dist/VtxTransfer__demos.18ba60b0.async.js +0 -1
- package/dist/VtxTreeSelect__demos.8ae23eb7.async.js +0 -1
- package/dist/VtxTree__demos.1ae9263d.async.js +0 -1
- package/dist/VtxUpload__demos.f8ac6088.async.js +0 -1
- package/dist/VtxWangEditor__demos.4c7f9743.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-descriptions/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-transfer/index.html +0 -17
- package/dist/components/vtx-transfer-select/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.d31d47d3.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.9bd1f529.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.77f4ce5c.async.js +0 -24576
- package/dist/meta__site.cb4ba864.chunk.css +0 -9
- package/dist/meta__vtx-search.1cffc39e.async.js +0 -5
- package/dist/nm__dumi-theme-vortex-style__dist__layouts__DemoLayout__index.d38bb511.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.02c0a12e.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.ce4c974c.async.js +0 -1
- package/dist/preload_helper.91c86d97.js +0 -1
- package/dist/site__changelog.md.2004f9af.async.js +0 -1
- package/dist/site__changelog.md.33be0665.chunk.css +0 -1
- package/dist/site__components__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__index.md.4b208bce.async.js +0 -1
- package/dist/site__components__vtx-color-picker__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-color-picker__index.md.8cde38ad.async.js +0 -1
- package/dist/site__components__vtx-combogrid__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-combogrid__index.md.3a276575.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.6b8af1e9.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.79fe2a74.async.js +0 -1
- package/dist/site__components__vtx-descriptions__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-descriptions__index.md.581f585c.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.d6064e54.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.c235ace9.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.54504e6f.async.js +0 -6
- package/dist/site__components__vtx-form-layout__index.md.1f1785cf.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.68cd709b.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.533d4e74.async.js +0 -22
- package/dist/site__components__vtx-import__index.md.2cb1513e.async.js +0 -17
- 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.5403e1e4.async.js +0 -1
- package/dist/site__components__vtx-modal__index.md.0f8af11e.async.js +0 -9
- package/dist/site__components__vtx-modal__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-page-layout__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-page-layout__index.md.e4956ee7.async.js +0 -1
- package/dist/site__components__vtx-rps-frame__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-rps-frame__index.md.c80279df.async.js +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.df93edc6.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.d011bdaa.async.js +0 -17
- package/dist/site__components__vtx-select__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-select__index.md.de66c747.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.b8b1093d.async.js +0 -1
- package/dist/site__components__vtx-split-pane__index.md.2163de9a.async.js +0 -1
- package/dist/site__components__vtx-split-pane__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-statistics-column__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-statistics-column__index.md.543d917f.async.js +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.a1ef3b11.async.js +0 -1
- package/dist/site__components__vtx-transfer-select__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-transfer-select__index.md.df61e6d2.async.js +0 -1
- package/dist/site__components__vtx-transfer__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-transfer__index.md.e17f6962.async.js +0 -1
- package/dist/site__components__vtx-tree-select__index.md.2ee8c02c.async.js +0 -1
- package/dist/site__components__vtx-tree-select__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-tree__index.md.33be0665.chunk.css +0 -1
- package/dist/site__components__vtx-tree__index.md.9bd6ff74.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.5a7d3eda.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.9eb84586.async.js +0 -7
- package/dist/site__docs__api-changes.md.33be0665.chunk.css +0 -1
- package/dist/site__docs__api-changes.md.42dee6c8.async.js +0 -6
- package/dist/site__docs__index.md.33be0665.chunk.css +0 -1
- package/dist/site__docs__index.md.8e7c64da.async.js +0 -53
- package/dist/site__docs__migration-guide.md.33be0665.chunk.css +0 -1
- package/dist/site__docs__migration-guide.md.fe82d57e.async.js +0 -194
- package/dist/site__index.md.33be0665.chunk.css +0 -1
- package/dist/site__index.md.54cae2e4.async.js +0 -1
- package/dist/sitemap.xml +0 -1
- package/dist/umi.4db41586.css +0 -1
- package/dist/umi.e0925664.js +0 -879
- package/dist/vtx-search__index.md.33be0665.chunk.css +0 -1
- package/dist/vtx-search__index.md.a29f26ea.async.js +0 -5
- 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/vtxdescriptions-demo-base/index.html +0 -17
- package/dist/~demos/vtxdescriptions-demo-border/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/vtxpagelayout-demo-demo5/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/vtxtransfer-demo-base/index.html +0 -17
- package/dist/~demos/vtxtransferselect-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/vtxtreeselect-demo-demo4/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/vtxupload-demo-demo4/index.html +0 -17
- package/dist/~demos/vtxwangeditor-demo-demo1/index.html +0 -17
package/lib/vtx-icon/index.js1
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { lazy, memo, Suspense, useMemo } from 'react';
|
|
2
|
-
import AlignRightOutlined from './svg/alignRightOutlined.js';
|
|
3
|
-
import ColumnHeightOutlined from './svg/columnHeightOutlined.js';
|
|
4
|
-
import DownOutlined from './svg/downOutlined.js';
|
|
5
|
-
import Fullscreen from './svg/fullscreen.js';
|
|
6
|
-
import RedoOutlined from './svg/redoOutlined.js';
|
|
7
|
-
import RightOutlined from './svg/rightOutlined.js';
|
|
8
|
-
import SettingOutlined from './svg/settingOutlined.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const iconComponents = {
|
|
12
|
-
alignRightOutlined: AlignRightOutlined,
|
|
13
|
-
columnHeightOutlined: ColumnHeightOutlined,
|
|
14
|
-
downOutlined: DownOutlined,
|
|
15
|
-
fullscreen: Fullscreen,
|
|
16
|
-
redoOutlined: RedoOutlined,
|
|
17
|
-
rightOutlined: RightOutlined,
|
|
18
|
-
settingOutlined: SettingOutlined,
|
|
19
|
-
// 低频图标如果确实需要,可以再考虑 lazy
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// const iconComponents = {
|
|
23
|
-
// // 核心:添加你需要的所有图标, 动态导入有的组件会失败
|
|
24
|
-
// alignRightOutlined: lazy(() => import('./svg/alignRightOutlined.js')),
|
|
25
|
-
// columnHeightOutlined: lazy(() => import('./svg/columnHeightOutlined.js')),
|
|
26
|
-
// downOutlined: lazy(() => import('./svg/downOutlined.js')),
|
|
27
|
-
// fullscreen: lazy(() => import('./svg/fullscreen.js')),
|
|
28
|
-
// redoOutlined: lazy(() => import('./svg/redoOutlined.js')),
|
|
29
|
-
// rightOutlined: lazy(() => import('./svg/rightOutlined.js')),
|
|
30
|
-
// settingOutlined: lazy(() => import('./svg/settingOutlined.js')),
|
|
31
|
-
// // 新增其他图标...
|
|
32
|
-
// };
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const VtxIcon = memo(({
|
|
36
|
-
type,
|
|
37
|
-
size = 16,
|
|
38
|
-
className = '',
|
|
39
|
-
style = {},
|
|
40
|
-
color,
|
|
41
|
-
fileType = 'webp',
|
|
42
|
-
...props
|
|
43
|
-
}) => {
|
|
44
|
-
const width = props.width || size;
|
|
45
|
-
const height = props.height || size;
|
|
46
|
-
if (!type) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
// const SvgComponent = useMemo(() => {
|
|
50
|
-
// // 动态导入并缓存结果
|
|
51
|
-
// return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
|
|
52
|
-
// }, [type]);
|
|
53
|
-
|
|
54
|
-
const SvgComponent = useMemo(() => {
|
|
55
|
-
// 兜底:找不到对应图标时,返回一个空组件(避免报错)
|
|
56
|
-
return iconComponents[type] || lazy(() => Promise.resolve({ default: () => <svg width={width} height={height} /> }));
|
|
57
|
-
}, [type, width, height]);
|
|
58
|
-
|
|
59
|
-
// 默认返回空元素
|
|
60
|
-
if (fileType == 'svg') {
|
|
61
|
-
try {
|
|
62
|
-
// const SvgComponent = lazy(() => import(`./svg/${type}.js`));
|
|
63
|
-
return (
|
|
64
|
-
<Suspense fallback={<div style={{ width, height, ...style }} />}>
|
|
65
|
-
<SvgComponent
|
|
66
|
-
className={className}
|
|
67
|
-
style={{ width, height, ...style }}
|
|
68
|
-
fill={color}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
</Suspense>
|
|
72
|
-
);
|
|
73
|
-
} catch (error) {
|
|
74
|
-
// 如果动态导入失败,返回空的 SVG 元素
|
|
75
|
-
return (
|
|
76
|
-
<svg width={width} height={height} style={style} className={className} {...props} />
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
return (
|
|
81
|
-
// <img
|
|
82
|
-
// src={require(`./assets/${type}.${fileType}`)}
|
|
83
|
-
// style={{ width, height, ...style }}
|
|
84
|
-
// />
|
|
85
|
-
<></>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
export { VtxIcon }
|
|
90
|
-
export default VtxIcon;
|
|
1
|
+
import { lazy, memo, Suspense, useMemo } from 'react';
|
|
2
|
+
import AlignRightOutlined from './svg/alignRightOutlined.js';
|
|
3
|
+
import ColumnHeightOutlined from './svg/columnHeightOutlined.js';
|
|
4
|
+
import DownOutlined from './svg/downOutlined.js';
|
|
5
|
+
import Fullscreen from './svg/fullscreen.js';
|
|
6
|
+
import RedoOutlined from './svg/redoOutlined.js';
|
|
7
|
+
import RightOutlined from './svg/rightOutlined.js';
|
|
8
|
+
import SettingOutlined from './svg/settingOutlined.js';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const iconComponents = {
|
|
12
|
+
alignRightOutlined: AlignRightOutlined,
|
|
13
|
+
columnHeightOutlined: ColumnHeightOutlined,
|
|
14
|
+
downOutlined: DownOutlined,
|
|
15
|
+
fullscreen: Fullscreen,
|
|
16
|
+
redoOutlined: RedoOutlined,
|
|
17
|
+
rightOutlined: RightOutlined,
|
|
18
|
+
settingOutlined: SettingOutlined,
|
|
19
|
+
// 低频图标如果确实需要,可以再考虑 lazy
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// const iconComponents = {
|
|
23
|
+
// // 核心:添加你需要的所有图标, 动态导入有的组件会失败
|
|
24
|
+
// alignRightOutlined: lazy(() => import('./svg/alignRightOutlined.js')),
|
|
25
|
+
// columnHeightOutlined: lazy(() => import('./svg/columnHeightOutlined.js')),
|
|
26
|
+
// downOutlined: lazy(() => import('./svg/downOutlined.js')),
|
|
27
|
+
// fullscreen: lazy(() => import('./svg/fullscreen.js')),
|
|
28
|
+
// redoOutlined: lazy(() => import('./svg/redoOutlined.js')),
|
|
29
|
+
// rightOutlined: lazy(() => import('./svg/rightOutlined.js')),
|
|
30
|
+
// settingOutlined: lazy(() => import('./svg/settingOutlined.js')),
|
|
31
|
+
// // 新增其他图标...
|
|
32
|
+
// };
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
const VtxIcon = memo(({
|
|
36
|
+
type,
|
|
37
|
+
size = 16,
|
|
38
|
+
className = '',
|
|
39
|
+
style = {},
|
|
40
|
+
color,
|
|
41
|
+
fileType = 'webp',
|
|
42
|
+
...props
|
|
43
|
+
}) => {
|
|
44
|
+
const width = props.width || size;
|
|
45
|
+
const height = props.height || size;
|
|
46
|
+
if (!type) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
// const SvgComponent = useMemo(() => {
|
|
50
|
+
// // 动态导入并缓存结果
|
|
51
|
+
// return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
|
|
52
|
+
// }, [type]);
|
|
53
|
+
|
|
54
|
+
const SvgComponent = useMemo(() => {
|
|
55
|
+
// 兜底:找不到对应图标时,返回一个空组件(避免报错)
|
|
56
|
+
return iconComponents[type] || lazy(() => Promise.resolve({ default: () => <svg width={width} height={height} /> }));
|
|
57
|
+
}, [type, width, height]);
|
|
58
|
+
|
|
59
|
+
// 默认返回空元素
|
|
60
|
+
if (fileType == 'svg') {
|
|
61
|
+
try {
|
|
62
|
+
// const SvgComponent = lazy(() => import(`./svg/${type}.js`));
|
|
63
|
+
return (
|
|
64
|
+
<Suspense fallback={<div style={{ width, height, ...style }} />}>
|
|
65
|
+
<SvgComponent
|
|
66
|
+
className={className}
|
|
67
|
+
style={{ width, height, ...style }}
|
|
68
|
+
fill={color}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
</Suspense>
|
|
72
|
+
);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
// 如果动态导入失败,返回空的 SVG 元素
|
|
75
|
+
return (
|
|
76
|
+
<svg width={width} height={height} style={style} className={className} {...props} />
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
return (
|
|
81
|
+
// <img
|
|
82
|
+
// src={require(`./assets/${type}.${fileType}`)}
|
|
83
|
+
// style={{ width, height, ...style }}
|
|
84
|
+
// />
|
|
85
|
+
<></>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export { VtxIcon }
|
|
90
|
+
export default VtxIcon;
|
package/lib/vtx-modal/index.js
CHANGED
|
@@ -10,8 +10,8 @@ var _style = require("./style");
|
|
|
10
10
|
var _vtxProvider = require("../vtx-provider");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
/**
|
|
14
|
-
* 基础布局
|
|
13
|
+
/**
|
|
14
|
+
* 基础布局
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
function Basic(props) {
|
|
@@ -12,9 +12,9 @@ var _style = require("./style");
|
|
|
12
12
|
var _vtxProvider = require("../vtx-provider");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
/**
|
|
16
|
-
* 页面
|
|
17
|
-
* @param {*} props
|
|
15
|
+
/**
|
|
16
|
+
* 页面
|
|
17
|
+
* @param {*} props
|
|
18
18
|
*/var Page = function Page(props) {
|
|
19
19
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
20
20
|
getPrefixCls = _useContext.getPrefixCls;
|
|
@@ -34,9 +34,9 @@ Page.propTypes = {
|
|
|
34
34
|
children: _propTypes.default.node
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* 内容
|
|
39
|
-
* @param {*} props
|
|
37
|
+
/**
|
|
38
|
+
* 内容
|
|
39
|
+
* @param {*} props
|
|
40
40
|
*/
|
|
41
41
|
var Content = function Content(props) {
|
|
42
42
|
var className = props.className,
|
|
@@ -33,9 +33,9 @@ var pagePaddingTop = 20;
|
|
|
33
33
|
var searchMarginBottom = 20;
|
|
34
34
|
|
|
35
35
|
// eslint-disable-next-line valid-jsdoc
|
|
36
|
-
/**
|
|
37
|
-
* 页面
|
|
38
|
-
* @param {*} props
|
|
36
|
+
/**
|
|
37
|
+
* 页面
|
|
38
|
+
* @param {*} props
|
|
39
39
|
*/
|
|
40
40
|
var Page = function Page(props) {
|
|
41
41
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
@@ -83,17 +83,17 @@ Page.propTypes = {
|
|
|
83
83
|
onSearchCollapse: _propTypes.default.func
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
/**
|
|
87
|
-
* 搜索
|
|
86
|
+
/**
|
|
87
|
+
* 搜索
|
|
88
88
|
*/
|
|
89
89
|
var Search = (0, _container.default)({
|
|
90
90
|
componentClass: 'vtx-page-table-search'
|
|
91
91
|
})(_Basic.default);
|
|
92
92
|
|
|
93
93
|
// eslint-disable-next-line valid-jsdoc
|
|
94
|
-
/**
|
|
95
|
-
* 内容
|
|
96
|
-
* @param {*} props
|
|
94
|
+
/**
|
|
95
|
+
* 内容
|
|
96
|
+
* @param {*} props
|
|
97
97
|
*/
|
|
98
98
|
var Content = function Content(props) {
|
|
99
99
|
var className = props.className,
|
|
@@ -128,8 +128,8 @@ Content.propTypes = {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
// eslint-disable-next-line valid-jsdoc
|
|
131
|
-
/**
|
|
132
|
-
* 表格布局
|
|
131
|
+
/**
|
|
132
|
+
* 表格布局
|
|
133
133
|
*/
|
|
134
134
|
var Table = function Table(props) {
|
|
135
135
|
var className = props.className,
|
|
@@ -11,9 +11,9 @@ var _style = require("./style");
|
|
|
11
11
|
var _vtxProvider = require("../vtx-provider");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
/**
|
|
15
|
-
* 页面
|
|
16
|
-
* @param {*} props
|
|
14
|
+
/**
|
|
15
|
+
* 页面
|
|
16
|
+
* @param {*} props
|
|
17
17
|
*/var Page = function Page(props) {
|
|
18
18
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
19
19
|
getPrefixCls = _useContext.getPrefixCls;
|
|
@@ -33,9 +33,9 @@ Page.propTypes = {
|
|
|
33
33
|
children: _propTypes.default.node
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* 内容
|
|
38
|
-
* @param {*} props
|
|
36
|
+
/**
|
|
37
|
+
* 内容
|
|
38
|
+
* @param {*} props
|
|
39
39
|
*/
|
|
40
40
|
var Content = function Content(props) {
|
|
41
41
|
var className = props.className,
|
|
@@ -24,8 +24,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
24
24
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
25
|
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; }
|
|
26
26
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
27
|
-
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); } /**
|
|
28
|
-
* 高阶组件
|
|
27
|
+
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); } /**
|
|
28
|
+
* 高阶组件
|
|
29
29
|
*/
|
|
30
30
|
function getDisplayName(WrappedComponend) {
|
|
31
31
|
return WrappedComponend.displayName || WrappedComponend.name || 'Component';
|
|
@@ -82,11 +82,11 @@ var omitUndefined = function omitUndefined(obj) {
|
|
|
82
82
|
return newObj;
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
/**
|
|
86
|
-
* 用于判断当前是否需要开启哈希(Hash)模式。
|
|
87
|
-
* 首先也会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
|
|
88
|
-
* 如果是,则返回 false。否则,直接返回 true 表示需要打开。
|
|
89
|
-
* @returns
|
|
85
|
+
/**
|
|
86
|
+
* 用于判断当前是否需要开启哈希(Hash)模式。
|
|
87
|
+
* 首先也会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
|
|
88
|
+
* 如果是,则返回 false。否则,直接返回 true 表示需要打开。
|
|
89
|
+
* @returns
|
|
90
90
|
*/
|
|
91
91
|
var isNeedOpenHash = exports.isNeedOpenHash = function isNeedOpenHash() {
|
|
92
92
|
var _process$env$NODE_ENV, _process$env$NODE_ENV2;
|
|
@@ -121,10 +121,10 @@ var VtxConfigContext = exports.VtxConfigContext = /*#__PURE__*/_react.default.cr
|
|
|
121
121
|
});
|
|
122
122
|
var ConfigConsumer = exports.ConfigConsumer = VtxConfigContext.Consumer;
|
|
123
123
|
|
|
124
|
-
/**
|
|
125
|
-
* 组件解除挂载后清空一下 cache
|
|
126
|
-
* @date 2022-11-28
|
|
127
|
-
* @returns null
|
|
124
|
+
/**
|
|
125
|
+
* 组件解除挂载后清空一下 cache
|
|
126
|
+
* @date 2022-11-28
|
|
127
|
+
* @returns null
|
|
128
128
|
*/
|
|
129
129
|
var CacheClean = function CacheClean() {
|
|
130
130
|
var _useSWRConfig = (0, _swr.useSWRConfig)(),
|
|
@@ -137,10 +137,10 @@ var CacheClean = function CacheClean() {
|
|
|
137
137
|
return null;
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
/**
|
|
141
|
-
* 用于配置 Pro 的组件,分装之后会简单一些
|
|
142
|
-
* @param props
|
|
143
|
-
* @returns
|
|
140
|
+
/**
|
|
141
|
+
* 用于配置 Pro 的组件,分装之后会简单一些
|
|
142
|
+
* @param props
|
|
143
|
+
* @returns
|
|
144
144
|
*/
|
|
145
145
|
var ConfigProviderContainer = function ConfigProviderContainer(props) {
|
|
146
146
|
var _antdTheme$useToken;
|
|
@@ -159,17 +159,17 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
|
|
|
159
159
|
var tokenContext = (_antdTheme$useToken = _antd.theme.useToken) === null || _antdTheme$useToken === void 0 ? void 0 : _antdTheme$useToken.call(_antd.theme);
|
|
160
160
|
var proProvide = (0, _react.useContext)(VtxConfigContext);
|
|
161
161
|
|
|
162
|
-
/**
|
|
163
|
-
* pro 的 类
|
|
164
|
-
* @type {string}
|
|
165
|
-
* @example .ant-pro
|
|
162
|
+
/**
|
|
163
|
+
* pro 的 类
|
|
164
|
+
* @type {string}
|
|
165
|
+
* @example .ant-pro
|
|
166
166
|
*/
|
|
167
167
|
|
|
168
168
|
var vtxComponentsCls = prefixCls ? ".".concat(prefixCls) : ".vtx";
|
|
169
169
|
var antCls = '.' + getPrefixCls();
|
|
170
170
|
var salt = "".concat(vtxComponentsCls);
|
|
171
|
-
/**
|
|
172
|
-
* 合并一下token,不然导致嵌套 token 失效
|
|
171
|
+
/**
|
|
172
|
+
* 合并一下token,不然导致嵌套 token 失效
|
|
173
173
|
*/
|
|
174
174
|
var proLayoutTokenMerge = (0, _react.useMemo)(function () {
|
|
175
175
|
return (0, _layoutToken.getLayoutDesignToken)(propsToken || {}, tokenContext.token);
|
|
@@ -266,10 +266,10 @@ var ConfigProviderContainer = function ConfigProviderContainer(props) {
|
|
|
266
266
|
});
|
|
267
267
|
};
|
|
268
268
|
|
|
269
|
-
/**
|
|
270
|
-
* 用于配置 一些全局性的东西
|
|
271
|
-
* @param props
|
|
272
|
-
* @returns
|
|
269
|
+
/**
|
|
270
|
+
* 用于配置 一些全局性的东西
|
|
271
|
+
* @param props
|
|
272
|
+
* @returns
|
|
273
273
|
*/
|
|
274
274
|
var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(props) {
|
|
275
275
|
var _theme$components, _theme$components2;
|
|
@@ -334,13 +334,13 @@ var VtxConfigProvider = exports.VtxConfigProvider = function VtxConfigProvider(p
|
|
|
334
334
|
}));
|
|
335
335
|
};
|
|
336
336
|
|
|
337
|
-
/**
|
|
338
|
-
* It returns the intl object from the context if it exists, otherwise it returns the intl object for
|
|
339
|
-
* 获取国际化的方法
|
|
340
|
-
* @param locale
|
|
341
|
-
* @param localeMap
|
|
342
|
-
* the current locale
|
|
343
|
-
* @returns The return value of the function is the intl object.
|
|
337
|
+
/**
|
|
338
|
+
* It returns the intl object from the context if it exists, otherwise it returns the intl object for
|
|
339
|
+
* 获取国际化的方法
|
|
340
|
+
* @param locale
|
|
341
|
+
* @param localeMap
|
|
342
|
+
* the current locale
|
|
343
|
+
* @returns The return value of the function is the intl object.
|
|
344
344
|
*/
|
|
345
345
|
function useIntl() {
|
|
346
346
|
var _useContext3 = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext),
|
package/lib/vtx-provider/intl.js
CHANGED
|
@@ -39,11 +39,11 @@ var _zh_CN = _interopRequireDefault(require("./locale/zh_CN"));
|
|
|
39
39
|
var _zh_HK = _interopRequireDefault(require("./locale/zh_HK"));
|
|
40
40
|
var _zh_TW = _interopRequireDefault(require("./locale/zh_TW"));
|
|
41
41
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
42
|
-
/**
|
|
43
|
-
* 创建一个国际化的操作函数
|
|
44
|
-
*
|
|
45
|
-
* @param locale
|
|
46
|
-
* @param localeMap
|
|
42
|
+
/**
|
|
43
|
+
* 创建一个国际化的操作函数
|
|
44
|
+
*
|
|
45
|
+
* @param locale
|
|
46
|
+
* @param localeMap
|
|
47
47
|
*/
|
|
48
48
|
var createIntl = exports.createIntl = function createIntl(locale, localeMap) {
|
|
49
49
|
return {
|
|
@@ -131,10 +131,10 @@ var intlMap = exports.intlMap = {
|
|
|
131
131
|
};
|
|
132
132
|
var intlMapKeys = exports.intlMapKeys = Object.keys(intlMap);
|
|
133
133
|
|
|
134
|
-
/**
|
|
135
|
-
* 根据 antd 的 key 来找到的 locale 插件的 key
|
|
136
|
-
*
|
|
137
|
-
* @param localeKey
|
|
134
|
+
/**
|
|
135
|
+
* 根据 antd 的 key 来找到的 locale 插件的 key
|
|
136
|
+
*
|
|
137
|
+
* @param localeKey
|
|
138
138
|
*/
|
|
139
139
|
var findIntlKeyByAntdLocaleKey = exports.findIntlKeyByAntdLocaleKey = function findIntlKeyByAntdLocaleKey(localeKey) {
|
|
140
140
|
var localeName = (localeKey || 'zh-CN').toLocaleLowerCase();
|
|
@@ -16,23 +16,23 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
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; }
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
18
18
|
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); }
|
|
19
|
-
/**
|
|
20
|
-
* 把一个颜色设置一下透明度
|
|
21
|
-
* @example (#fff, 0.5) => rgba(255, 255, 255, 0.5)
|
|
22
|
-
* @param baseColor {string}
|
|
23
|
-
* @param alpha {0-1}
|
|
24
|
-
* @returns rgba {string}
|
|
19
|
+
/**
|
|
20
|
+
* 把一个颜色设置一下透明度
|
|
21
|
+
* @example (#fff, 0.5) => rgba(255, 255, 255, 0.5)
|
|
22
|
+
* @param baseColor {string}
|
|
23
|
+
* @param alpha {0-1}
|
|
24
|
+
* @returns rgba {string}
|
|
25
25
|
*/
|
|
26
26
|
var setAlpha = exports.setAlpha = function setAlpha(baseColor, alpha) {
|
|
27
27
|
return new _tinycolor.TinyColor(baseColor).setAlpha(alpha).toRgbString();
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
/**
|
|
31
|
-
* 把一个颜色修改一些明度
|
|
32
|
-
* @example (#000, 50) => #808080
|
|
33
|
-
* @param baseColor {string}
|
|
34
|
-
* @param brightness {0-100}
|
|
35
|
-
* @returns hexColor {string}
|
|
30
|
+
/**
|
|
31
|
+
* 把一个颜色修改一些明度
|
|
32
|
+
* @example (#000, 50) => #808080
|
|
33
|
+
* @param baseColor {string}
|
|
34
|
+
* @param brightness {0-100}
|
|
35
|
+
* @returns hexColor {string}
|
|
36
36
|
*/
|
|
37
37
|
var lighten = exports.lighten = function lighten(baseColor, brightness) {
|
|
38
38
|
var instance = new _tinycolor.TinyColor(baseColor);
|
|
@@ -67,11 +67,11 @@ var operationUnit = exports.operationUnit = function operationUnit(token) {
|
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
/**
|
|
71
|
-
* 封装了一下 antd 的 useStyle
|
|
72
|
-
* @param componentName {string} 组件的名字
|
|
73
|
-
* @param styleFn {GenerateStyle} 生成样式的函数
|
|
74
|
-
* @returns UseStyleResult
|
|
70
|
+
/**
|
|
71
|
+
* 封装了一下 antd 的 useStyle
|
|
72
|
+
* @param componentName {string} 组件的名字
|
|
73
|
+
* @param styleFn {GenerateStyle} 生成样式的函数
|
|
74
|
+
* @returns UseStyleResult
|
|
75
75
|
*/
|
|
76
76
|
function useStyle(componentName, styleFn) {
|
|
77
77
|
var _token$vtxComponentsC;
|
package/lib/vtx-select/index.js
CHANGED
|
@@ -115,25 +115,24 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
}, [mode]);
|
|
118
|
-
|
|
119
|
-
// Merge object-style `options` into React elements so they can be used
|
|
120
|
-
// interchangeably with <VtxSelect.Option /> children.
|
|
121
|
-
var mergedChildren = _react.default.Children.toArray(props.children);
|
|
118
|
+
var mergedChildren = Array.isArray(props.children) ? props.children : _react.default.Children.toArray(props.children);
|
|
122
119
|
var optionsAsElements = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.map(function (v) {
|
|
120
|
+
var _v$key;
|
|
123
121
|
return /*#__PURE__*/_react.default.isValidElement(v) ? v : /*#__PURE__*/_react.default.createElement(_antd.Select.Option, {
|
|
124
|
-
key: v.value,
|
|
122
|
+
key: (_v$key = v.key) !== null && _v$key !== void 0 ? _v$key : v.value,
|
|
125
123
|
value: v.value,
|
|
126
124
|
label: v.label
|
|
127
125
|
});
|
|
128
126
|
})) || [];
|
|
129
127
|
var normalizeChild = function normalizeChild(child) {
|
|
128
|
+
var _ref;
|
|
130
129
|
if (! /*#__PURE__*/_react.default.isValidElement(child)) return child;
|
|
131
130
|
var _child$props = child.props,
|
|
132
131
|
key = _child$props.key,
|
|
133
132
|
value = _child$props.value,
|
|
134
133
|
label = _child$props.children,
|
|
135
134
|
rest = _objectWithoutProperties(_child$props, _excluded2);
|
|
136
|
-
var optionValue = value !== null && value !== void 0 ? value : key;
|
|
135
|
+
var optionValue = (_ref = value !== null && value !== void 0 ? value : key) !== null && _ref !== void 0 ? _ref : child.key;
|
|
137
136
|
return /*#__PURE__*/_react.default.cloneElement(child, _objectSpread(_objectSpread({}, rest), {}, {
|
|
138
137
|
key: key,
|
|
139
138
|
value: optionValue
|
|
@@ -141,14 +140,14 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
141
140
|
};
|
|
142
141
|
var finalChildren = [].concat(_toConsumableArray(optionsAsElements), _toConsumableArray(mergedChildren.map(normalizeChild)));
|
|
143
142
|
var getOptionValue = function getOptionValue(item) {
|
|
144
|
-
var
|
|
143
|
+
var _ref2, _itemProps$value;
|
|
145
144
|
var itemProps = (item === null || item === void 0 ? void 0 : item.props) || {};
|
|
146
|
-
return (
|
|
145
|
+
return (_ref2 = (_itemProps$value = itemProps.value) !== null && _itemProps$value !== void 0 ? _itemProps$value : item.value) !== null && _ref2 !== void 0 ? _ref2 : item.key;
|
|
147
146
|
};
|
|
148
147
|
var getOptionLabel = function getOptionLabel(item) {
|
|
149
|
-
var
|
|
148
|
+
var _ref3, _itemProps$children;
|
|
150
149
|
var itemProps = (item === null || item === void 0 ? void 0 : item.props) || {};
|
|
151
|
-
return (
|
|
150
|
+
return (_ref3 = (_itemProps$children = itemProps.children) !== null && _itemProps$children !== void 0 ? _itemProps$children : itemProps.label) !== null && _ref3 !== void 0 ? _ref3 : item.label;
|
|
152
151
|
};
|
|
153
152
|
var getSelectedValue = function getSelectedValue(item) {
|
|
154
153
|
if ((0, _utils.isObject)(item)) {
|
|
@@ -5,19 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.VtxTreeSelect = void 0;
|
|
8
|
-
var _icons = require("@ant-design/icons");
|
|
9
|
-
var _ahooks = require("ahooks");
|
|
10
8
|
var _antd = require("antd");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _icons = require("@ant-design/icons");
|
|
11
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
13
|
var _pull = _interopRequireDefault(require("lodash-es/pull"));
|
|
13
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var _react = require("react");
|
|
15
|
-
var _vtxIcon = _interopRequireDefault(require("../vtx-icon"));
|
|
16
|
-
var _vtxProvider = require("../vtx-provider");
|
|
17
14
|
var _index = require("./style/index");
|
|
15
|
+
var _ahooks = require("ahooks");
|
|
16
|
+
var _vtxProvider = require("../vtx-provider");
|
|
18
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
18
|
var _excluded = ["multiple", "treeData", "placeholder", "treeCheckable", "disabled", "style", "fieldNames", "onChange", "labelInValue"];
|
|
20
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
22
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
22
23
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
24
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -46,9 +47,9 @@ var VtxTreeSelect = exports.VtxTreeSelect = function VtxTreeSelect(_ref) {
|
|
|
46
47
|
style = _ref.style,
|
|
47
48
|
_ref$fieldNames = _ref.fieldNames,
|
|
48
49
|
fieldNames = _ref$fieldNames === void 0 ? {
|
|
49
|
-
label:
|
|
50
|
-
value:
|
|
51
|
-
key:
|
|
50
|
+
label: "title",
|
|
51
|
+
value: "value",
|
|
52
|
+
key: "value",
|
|
52
53
|
children: 'children'
|
|
53
54
|
} : _ref$fieldNames,
|
|
54
55
|
onChange = _ref.onChange,
|
|
@@ -194,10 +195,6 @@ var VtxTreeSelect = exports.VtxTreeSelect = function VtxTreeSelect(_ref) {
|
|
|
194
195
|
showLeafIcon: false
|
|
195
196
|
},
|
|
196
197
|
switcherIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.DownOutlined, {}),
|
|
197
|
-
suffixIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vtxIcon.default, {
|
|
198
|
-
type: "downOutlined",
|
|
199
|
-
fileType: "svg"
|
|
200
|
-
}),
|
|
201
198
|
multiple: multiple,
|
|
202
199
|
treeCheckable: treeCheckable,
|
|
203
200
|
className: (0, _classnames.default)("".concat(prefixCls, " ").concat(props.prefixCls), hashId),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.vtx-wang-editor {
|
|
4
|
-
border: @border-width-base @border-style-base @border-color-base;
|
|
5
|
-
&.w-e-full-screen-container {
|
|
6
|
-
z-index: 999999;
|
|
7
|
-
}
|
|
8
|
-
&-content {
|
|
9
|
-
height: 350px;
|
|
10
|
-
border-top: @border-width-base @border-style-base @border-color-base;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
.vtx-wang-editor {
|
|
4
|
+
border: @border-width-base @border-style-base @border-color-base;
|
|
5
|
+
&.w-e-full-screen-container {
|
|
6
|
+
z-index: 999999;
|
|
7
|
+
}
|
|
8
|
+
&-content {
|
|
9
|
+
height: 350px;
|
|
10
|
+
border-top: @border-width-base @border-style-base @border-color-base;
|
|
11
|
+
}
|
|
12
|
+
}
|