@vtx/components 3.1.58 → 3.1.59
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/lib/_util/useColSize.js.map +1 -1
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js.map +1 -1
- package/lib/vtx-date-picker/style/index.less +39 -39
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js.map +1 -1
- package/lib/vtx-editor/style/index.less +8 -8
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.less +13 -13
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/demo/Modal.less +43 -43
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-form-layout/style/index.less +216 -216
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js.map +1 -1
- package/lib/vtx-import/style/index.less +8 -8
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.js.map +1 -1
- package/lib/vtx-import2/style/index.less +102 -102
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js.map +1 -1
- package/lib/vtx-input/style/index.less +24 -24
- package/lib/vtx-modal/index.js +26 -34
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.css +14 -1
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-modal/style/index.less +101 -95
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +10 -10
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/style/index.less +138 -138
- package/lib/vtx-scrollable-row/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/css.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.less +113 -113
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js.map +1 -1
- package/lib/vtx-select/style/index.less +68 -68
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js.map +1 -1
- package/lib/vtx-signature/style/index.less +33 -33
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +4 -4
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js.map +1 -1
- package/lib/vtx-split-pane/style/index.less +76 -76
- package/lib/vtx-statistics-column/style/index.less +59 -59
- package/lib/vtx-time-picker/index.js.map +1 -1
- package/lib/vtx-time-picker/style/css.js.map +1 -1
- package/lib/vtx-time-picker/style/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-upload/style/index.less +61 -61
- package/lib/vtx-wang-editor/style/css.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +2 -2
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js.map +1 -1
- package/lib/vtx-ztree/style/index.less +45 -45
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.less +107 -107
- package/package.json +126 -126
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportResult.js","names":["ImportResult","result","errorFile","errorURL","errorDownloadName","count","token","TextEnum","url","color","fontSize","resultSuccessText","resultInfoTotalText","resultInfoDataText","resultFailText","resultFailReasonDownText","propTypes","PropTypes","bool","string","any"],"sources":["vtx-import2/ImportResult.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { CheckCircleFilled, CloseCircleFilled } from '@ant-design/icons';\n\nconst ImportResult = ({ result, errorFile, errorURL, errorDownloadName, count, token, TextEnum }) => {\n const url =\n errorURL &&\n errorFile &&\n `${errorURL}?fileName=${errorFile}&downloadName=${errorDownloadName || ''}&token=${token}`;\n return (\n <div className=\"vtx-import2-result-warp\">\n {result ? (\n <>\n <CheckCircleFilled style={{ color: '#52C41A', fontSize: '80px' }} />\n <span className=\"vtx-import2-result\">{TextEnum.resultSuccessText}</span>\n {count !== null && (\n <span className=\"vtx-import2-result-success-tips\">\n {TextEnum.resultInfoTotalText}{count}{TextEnum.resultInfoDataText}\n </span>\n )}\n </>\n ) : (\n <>\n <CloseCircleFilled style={{ color: '#ff4d4f', fontSize: '80px' }} />\n <span className=\"vtx-import2-result\">{TextEnum.resultFailText}</span>\n {url && (\n <a className=\"vtx-import2-result-error-tips\" href={url}>\n {TextEnum.resultFailReasonDownText}\n </a>\n )}\n </>\n )}\n </div>\n );\n};\n\nImportResult.propTypes = {\n result: PropTypes.bool,\n errorURL: PropTypes.string,\n token: PropTypes.string,\n errorFile: PropTypes.string,\n errorDownloadName: PropT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,MAAM,EAAEgB,qBAAA,CAAUC,IADG;EAErBf,QAAQ,EAAEc,qBAAA,CAAUE,MAFC;EAGrBb,KAAK,EAAEW,qBAAA,CAAUE,MAHI;EAIrBjB,SAAS,EAAEe,qBAAA,CAAUE,MAJA;EAKrBf,iBAAiB,EAAEa,qBAAA,CAAUE,MALR;EAMrBd,KAAK,EAAEY,qBAAA,CAAUG;AANI,CAAzB;eASepB,Y"}
|
|
1
|
+
{"version":3,"file":"ImportResult.js","names":["ImportResult","result","errorFile","errorURL","errorDownloadName","count","token","TextEnum","url","color","fontSize","resultSuccessText","resultInfoTotalText","resultInfoDataText","resultFailText","resultFailReasonDownText","propTypes","PropTypes","bool","string","any"],"sources":["vtx-import2/ImportResult.jsx"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { CheckCircleFilled, CloseCircleFilled } from '@ant-design/icons';\r\n\r\nconst ImportResult = ({ result, errorFile, errorURL, errorDownloadName, count, token, TextEnum }) => {\r\n const url =\r\n errorURL &&\r\n errorFile &&\r\n `${errorURL}?fileName=${errorFile}&downloadName=${errorDownloadName || ''}&token=${token}`;\r\n return (\r\n <div className=\"vtx-import2-result-warp\">\r\n {result ? (\r\n <>\r\n <CheckCircleFilled style={{ color: '#52C41A', fontSize: '80px' }} />\r\n <span className=\"vtx-import2-result\">{TextEnum.resultSuccessText}</span>\r\n {count !== null && (\r\n <span className=\"vtx-import2-result-success-tips\">\r\n {TextEnum.resultInfoTotalText}{count}{TextEnum.resultInfoDataText}\r\n </span>\r\n )}\r\n </>\r\n ) : (\r\n <>\r\n <CloseCircleFilled style={{ color: '#ff4d4f', fontSize: '80px' }} />\r\n <span className=\"vtx-import2-result\">{TextEnum.resultFailText}</span>\r\n {url && (\r\n <a className=\"vtx-import2-result-error-tips\" href={url}>\r\n {TextEnum.resultFailReasonDownText}\r\n </a>\r\n )}\r\n </>\r\n )}\r\n </div>\r\n );\r\n};\r\n\r\nImportResult.propTypes = {\r\n result: PropTypes.bool,\r\n errorURL: PropTypes.string,\r\n token: PropTypes.string,\r\n errorFile: PropTypes.string,\r\n errorDownloadName: PropTypes.string,\r\n count: PropTypes.any,\r\n};\r\n\r\nexport default ImportResult;\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAAgF;EAAA,IAA7EC,MAA6E,QAA7EA,MAA6E;EAAA,IAArEC,SAAqE,QAArEA,SAAqE;EAAA,IAA1DC,QAA0D,QAA1DA,QAA0D;EAAA,IAAhDC,iBAAgD,QAAhDA,iBAAgD;EAAA,IAA7BC,KAA6B,QAA7BA,KAA6B;EAAA,IAAtBC,KAAsB,QAAtBA,KAAsB;EAAA,IAAfC,QAAe,QAAfA,QAAe;EACjG,IAAMC,GAAG,GACLL,QAAQ,IACRD,SADA,cAEGC,QAFH,uBAEwBD,SAFxB,2BAEkDE,iBAAiB,IAAI,EAFvE,oBAEmFE,KAFnF,CADJ;EAIA,oBACI;IAAK,SAAS,EAAC;EAAf,GACKL,MAAM,gBACH,+EACI,gCAAC,wBAAD;IAAmB,KAAK,EAAE;MAAEQ,KAAK,EAAE,SAAT;MAAoBC,QAAQ,EAAE;IAA9B;EAA1B,EADJ,eAEI;IAAM,SAAS,EAAC;EAAhB,GAAsCH,QAAQ,CAACI,iBAA/C,CAFJ,EAGKN,KAAK,KAAK,IAAV,iBACG;IAAM,SAAS,EAAC;EAAhB,GACKE,QAAQ,CAACK,mBADd,EACmCP,KADnC,EAC0CE,QAAQ,CAACM,kBADnD,CAJR,CADG,gBAWH,+EACI,gCAAC,wBAAD;IAAmB,KAAK,EAAE;MAAEJ,KAAK,EAAE,SAAT;MAAoBC,QAAQ,EAAE;IAA9B;EAA1B,EADJ,eAEI;IAAM,SAAS,EAAC;EAAhB,GAAsCH,QAAQ,CAACO,cAA/C,CAFJ,EAGKN,GAAG,iBACA;IAAG,SAAS,EAAC,+BAAb;IAA6C,IAAI,EAAEA;EAAnD,GACKD,QAAQ,CAACQ,wBADd,CAJR,CAZR,CADJ;AAyBH,CA9BD;;AAgCAf,YAAY,CAACgB,SAAb,GAAyB;EACrBf,MAAM,EAAEgB,qBAAA,CAAUC,IADG;EAErBf,QAAQ,EAAEc,qBAAA,CAAUE,MAFC;EAGrBb,KAAK,EAAEW,qBAAA,CAAUE,MAHI;EAIrBjB,SAAS,EAAEe,qBAAA,CAAUE,MAJA;EAKrBf,iBAAiB,EAAEa,qBAAA,CAAUE,MALR;EAMrBd,KAAK,EAAEY,qBAAA,CAAUG;AANI,CAAzB;eASepB,Y"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadSvg.js","names":["UploadSvg","flexShrink"],"sources":["vtx-import2/UploadSvg.jsx"],"sourcesContent":["import React from 'react';\n\nconst UploadSvg = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 48 48\"\n style={{ flexShrink: 0 }}\n >\n <defs></defs>\n <path\n className=\"a\"\n fill=\"#e9ecff\"\n d=\"M91.072,82.88m-24,0a24,24,0,1,0,24-24A24,24,0,0,0,67.072,82.88Z\"\n transform=\"translate(-67.072 -58.88)\"\n />\n <path\n className=\"b\"\n fill=\"#6c6cea\"\n d=\"M263.967,241.484H250.918a1.05,1.05,0,0,1-.718-.284l-2.972-2.784a1.045,1.045,0,0,0-.718-.284H240.8a3.593,3.593,0,0,0-3.592,3.593v21.5a3.593,3.593,0,0,0,3.592,3.593h23.163a3.593,3.593,0,0,0,3.592-3.593V245.079a3.59,3.59,0,0,0-3.589-3.6Zm-5.881,13.44a1.952,1.952,0,0,1-2.764.049l-.893-.861v5.465a1.956,1.956,0,1,1-3.911,0V254l-.869.817a1.955,1.955,0,1,1-2.68-2.847l4.146-3.9a1.953,1.953,0,0,1,2.7.016l4.223,4.074a1.951,1.951,0,0,1,.052,2.765Z\"\n transform=\"translate(-228.184 -228.623)\"\n />\n <path\n className=\"c\"\n fill=\"#757bf2\"\n d=\"M267.558,245.08a3.593,3.593,0,0,0-3.592-3.593H250.918a1.05,1.05,0,0,1-.718-.284l-2.972-2.787a1.045,1.045,0,0,0-.718-.284H240.8a3.593,3.593,0,0,0-3.592,3.593v21.5a3.593,3.593,0,0,0,3.592,3.593h10.7a24.089,24.089,0,0,0,16.05-18.307V245.08Zm-9.473,9.845a1.953,1.953,0,0,1-2.764.049l-.893-.861v5.465a1.956,1.956,0,1,1-3.911,0V254l-.869.817a1.955,1.955,0,1,1-2.68-2.847l4.146-3.9a1.953,1.953,0,0,1,2.7.016l4.223,4.074a1.951,1.951,0,0,1,.052,2.765Z\"\n transform=\"translate(-228.184 -228.623)\"\n />\n <path\n className=\"d\"\n fill=\"#8486f8\"\n d=\"M250.841,241.464a1.044,1.044,0,0,1-.714-.282l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.571,3.571v17.662l.147,0a23.808,23.808,0,0,0,13.088-3.9v-1.562l-.864.812a1.943,1.943,0,1,1-2.664-2.83l4.123-3.881a1.942,1.942,0,0,1,2.681.016l2.371,2.287a23.835,23.835,0,0,0,4.416-8.851h-9.666Z\"\n transform=\"translate(-228.121 -228.561)\"\n />\n <path\n className=\"e\"\n fill=\"#8d92f8\"\n d=\"M250.442,241.382a1.072,1.072,0,0,1-.315-.2l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.571,3.571v8.477a23.93,23.93,0,0,0,13.232-8.8Z\"\n transform=\"translate(-228.139 -228.577)\"\n />\n </svg>\n );\n};\n\nexport default UploadSvg;\n"],"mappings":";;;;;;;AAAA;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EACpB,oBACI;IACI,KAAK,EAAC,4BADV;IAEI,KAAK,EAAC,IAFV;IAGI,MAAM,EAAC,IAHX;IAII,OAAO,EAAC,WAJZ;IAKI,KAAK,EAAE;MAAEC,UAAU,EAAE;IAAd;EALX,gBAOI,6CAPJ,eAQI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,iEAHN;IAII,SAAS,EAAC;EAJd,EARJ,eAcI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,ybAHN;IAII,SAAS,EAAC;EAJd,EAdJ,eAoBI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,4bAHN;IAII,SAAS,EAAC;EAJd,EApBJ,eA0BI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,mTAHN;IAII,SAAS,EAAC;EAJd,EA1BJ,eAgCI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,8JAHN;IAII,SAAS,EAAC;EAJd,EAhCJ,CADJ;AAyCH,CA1CD;;eA4CeD,S"}
|
|
1
|
+
{"version":3,"file":"UploadSvg.js","names":["UploadSvg","flexShrink"],"sources":["vtx-import2/UploadSvg.jsx"],"sourcesContent":["import React from 'react';\r\n\r\nconst UploadSvg = () => {\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"48\"\r\n height=\"48\"\r\n viewBox=\"0 0 48 48\"\r\n style={{ flexShrink: 0 }}\r\n >\r\n <defs></defs>\r\n <path\r\n className=\"a\"\r\n fill=\"#e9ecff\"\r\n d=\"M91.072,82.88m-24,0a24,24,0,1,0,24-24A24,24,0,0,0,67.072,82.88Z\"\r\n transform=\"translate(-67.072 -58.88)\"\r\n />\r\n <path\r\n className=\"b\"\r\n fill=\"#6c6cea\"\r\n d=\"M263.967,241.484H250.918a1.05,1.05,0,0,1-.718-.284l-2.972-2.784a1.045,1.045,0,0,0-.718-.284H240.8a3.593,3.593,0,0,0-3.592,3.593v21.5a3.593,3.593,0,0,0,3.592,3.593h23.163a3.593,3.593,0,0,0,3.592-3.593V245.079a3.59,3.59,0,0,0-3.589-3.6Zm-5.881,13.44a1.952,1.952,0,0,1-2.764.049l-.893-.861v5.465a1.956,1.956,0,1,1-3.911,0V254l-.869.817a1.955,1.955,0,1,1-2.68-2.847l4.146-3.9a1.953,1.953,0,0,1,2.7.016l4.223,4.074a1.951,1.951,0,0,1,.052,2.765Z\"\r\n transform=\"translate(-228.184 -228.623)\"\r\n />\r\n <path\r\n className=\"c\"\r\n fill=\"#757bf2\"\r\n d=\"M267.558,245.08a3.593,3.593,0,0,0-3.592-3.593H250.918a1.05,1.05,0,0,1-.718-.284l-2.972-2.787a1.045,1.045,0,0,0-.718-.284H240.8a3.593,3.593,0,0,0-3.592,3.593v21.5a3.593,3.593,0,0,0,3.592,3.593h10.7a24.089,24.089,0,0,0,16.05-18.307V245.08Zm-9.473,9.845a1.953,1.953,0,0,1-2.764.049l-.893-.861v5.465a1.956,1.956,0,1,1-3.911,0V254l-.869.817a1.955,1.955,0,1,1-2.68-2.847l4.146-3.9a1.953,1.953,0,0,1,2.7.016l4.223,4.074a1.951,1.951,0,0,1,.052,2.765Z\"\r\n transform=\"translate(-228.184 -228.623)\"\r\n />\r\n <path\r\n className=\"d\"\r\n fill=\"#8486f8\"\r\n d=\"M250.841,241.464a1.044,1.044,0,0,1-.714-.282l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.571,3.571v17.662l.147,0a23.808,23.808,0,0,0,13.088-3.9v-1.562l-.864.812a1.943,1.943,0,1,1-2.664-2.83l4.123-3.881a1.942,1.942,0,0,1,2.681.016l2.371,2.287a23.835,23.835,0,0,0,4.416-8.851h-9.666Z\"\r\n transform=\"translate(-228.121 -228.561)\"\r\n />\r\n <path\r\n className=\"e\"\r\n fill=\"#8d92f8\"\r\n d=\"M250.442,241.382a1.072,1.072,0,0,1-.315-.2l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.571,3.571v8.477a23.93,23.93,0,0,0,13.232-8.8Z\"\r\n transform=\"translate(-228.139 -228.577)\"\r\n />\r\n </svg>\r\n );\r\n};\r\n\r\nexport default UploadSvg;\r\n"],"mappings":";;;;;;;AAAA;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EACpB,oBACI;IACI,KAAK,EAAC,4BADV;IAEI,KAAK,EAAC,IAFV;IAGI,MAAM,EAAC,IAHX;IAII,OAAO,EAAC,WAJZ;IAKI,KAAK,EAAE;MAAEC,UAAU,EAAE;IAAd;EALX,gBAOI,6CAPJ,eAQI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,iEAHN;IAII,SAAS,EAAC;EAJd,EARJ,eAcI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,ybAHN;IAII,SAAS,EAAC;EAJd,EAdJ,eAoBI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,4bAHN;IAII,SAAS,EAAC;EAJd,EApBJ,eA0BI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,mTAHN;IAII,SAAS,EAAC;EAJd,EA1BJ,eAgCI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,8JAHN;IAII,SAAS,EAAC;EAJd,EAhCJ,CADJ;AAyCH,CA1CD;;eA4CeD,S"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport 'antd/lib/button/style';\nimport 'antd/lib/message/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\r\nimport 'antd/lib/button/style';\r\nimport 'antd/lib/message/style';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport 'antd/lib/button/style';\nimport 'antd/lib/message/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\r\nimport 'antd/lib/button/style';\r\nimport 'antd/lib/message/style';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
-
@prefix-cls: vtx-datagrid;
|
|
3
|
-
|
|
4
|
-
.@{prefix-cls} when(@theme=default) {
|
|
5
|
-
&-modal {
|
|
6
|
-
background-color: '#f8f8f8';
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
.vtx-import2-modal-header-title {
|
|
10
|
-
color: @text-color;
|
|
11
|
-
.vtx-import2-modal-header-text {
|
|
12
|
-
font-weight: 400;
|
|
13
|
-
}
|
|
14
|
-
.vtx-import2-modal-header-subtitle {
|
|
15
|
-
font-weight: 700;
|
|
16
|
-
&::before {
|
|
17
|
-
margin: 0 4px;
|
|
18
|
-
font-weight: 400;
|
|
19
|
-
content: '>';
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.vtx-import2-content-box {
|
|
25
|
-
position: relative;
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
height: 80px;
|
|
29
|
-
padding: 16px 16px 16px 48px;
|
|
30
|
-
color: @primary-color;
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
background-color: #f5f5f5;
|
|
33
|
-
border-radius: 4px;
|
|
34
|
-
.vtx-import2-download {
|
|
35
|
-
margin-left: 16px;
|
|
36
|
-
}
|
|
37
|
-
.vtx-import2-file-list {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
justify-content: space-between;
|
|
41
|
-
width: 100%;
|
|
42
|
-
margin-left: 16px;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
white-space: nowrap;
|
|
45
|
-
text-overflow: ellipsis;
|
|
46
|
-
.vtx-import2-text {
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
}
|
|
49
|
-
.vtx-import2-file-item {
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
justify-content: space-between;
|
|
53
|
-
color: fade(@black, 65%);
|
|
54
|
-
.vtx-import2-file-name {
|
|
55
|
-
overflow: hidden;
|
|
56
|
-
white-space: nowrap;
|
|
57
|
-
text-overflow: ellipsis;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
&:first-child {
|
|
62
|
-
margin-bottom: 20px;
|
|
63
|
-
}
|
|
64
|
-
.vtx-import2-content-mark {
|
|
65
|
-
position: absolute;
|
|
66
|
-
top: 0;
|
|
67
|
-
left: 0;
|
|
68
|
-
display: flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
width: 28px;
|
|
72
|
-
height: 22px;
|
|
73
|
-
color: @text-color-inverse;
|
|
74
|
-
background-color: @primary-color;
|
|
75
|
-
border: 1px solid @primary-color;
|
|
76
|
-
border-radius: 4px 0;
|
|
77
|
-
opacity: 0.6;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.vtx-import2-result-warp {
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-direction: column;
|
|
84
|
-
align-items: center;
|
|
85
|
-
padding: 12px 0;
|
|
86
|
-
.vtx-import2-result {
|
|
87
|
-
margin-top: 20px;
|
|
88
|
-
margin-bottom: 12px;
|
|
89
|
-
color: fade(@black, 85%);
|
|
90
|
-
font-weight: 700;
|
|
91
|
-
font-size: 24px;
|
|
92
|
-
}
|
|
93
|
-
.vtx-import2-result-success-tips {
|
|
94
|
-
color: fade(@black, 45%);
|
|
95
|
-
font-size: 14px;
|
|
96
|
-
}
|
|
97
|
-
.vtx-import2-result-error-tips {
|
|
98
|
-
color: @primary-color;
|
|
99
|
-
font-size: 14px;
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
@prefix-cls: vtx-datagrid;
|
|
3
|
+
|
|
4
|
+
.@{prefix-cls} when(@theme=default) {
|
|
5
|
+
&-modal {
|
|
6
|
+
background-color: '#f8f8f8';
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
.vtx-import2-modal-header-title {
|
|
10
|
+
color: @text-color;
|
|
11
|
+
.vtx-import2-modal-header-text {
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
}
|
|
14
|
+
.vtx-import2-modal-header-subtitle {
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
&::before {
|
|
17
|
+
margin: 0 4px;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
content: '>';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.vtx-import2-content-box {
|
|
25
|
+
position: relative;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
height: 80px;
|
|
29
|
+
padding: 16px 16px 16px 48px;
|
|
30
|
+
color: @primary-color;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
background-color: #f5f5f5;
|
|
33
|
+
border-radius: 4px;
|
|
34
|
+
.vtx-import2-download {
|
|
35
|
+
margin-left: 16px;
|
|
36
|
+
}
|
|
37
|
+
.vtx-import2-file-list {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
width: 100%;
|
|
42
|
+
margin-left: 16px;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
.vtx-import2-text {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
.vtx-import2-file-item {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
color: fade(@black, 65%);
|
|
54
|
+
.vtx-import2-file-name {
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
text-overflow: ellipsis;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
&:first-child {
|
|
62
|
+
margin-bottom: 20px;
|
|
63
|
+
}
|
|
64
|
+
.vtx-import2-content-mark {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
width: 28px;
|
|
72
|
+
height: 22px;
|
|
73
|
+
color: @text-color-inverse;
|
|
74
|
+
background-color: @primary-color;
|
|
75
|
+
border: 1px solid @primary-color;
|
|
76
|
+
border-radius: 4px 0;
|
|
77
|
+
opacity: 0.6;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.vtx-import2-result-warp {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
align-items: center;
|
|
85
|
+
padding: 12px 0;
|
|
86
|
+
.vtx-import2-result {
|
|
87
|
+
margin-top: 20px;
|
|
88
|
+
margin-bottom: 12px;
|
|
89
|
+
color: fade(@black, 85%);
|
|
90
|
+
font-weight: 700;
|
|
91
|
+
font-size: 24px;
|
|
92
|
+
}
|
|
93
|
+
.vtx-import2-result-success-tips {
|
|
94
|
+
color: fade(@black, 45%);
|
|
95
|
+
font-size: 14px;
|
|
96
|
+
}
|
|
97
|
+
.vtx-import2-result-error-tips {
|
|
98
|
+
color: @primary-color;
|
|
99
|
+
font-size: 14px;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","names":["TextArea","forwardRef","props","ref","maxLength","showCount","placeholder","rest","len","useLength","value","render","propTypes","PropTypes","number","string","bool"],"sources":["vtx-input/TextArea.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'antd/lib/input';\nimport useLength from './useLength';\n\nconst TextArea = forwardRef((props, ref) => {\n const { maxLength = 200, showCount = true, placeholder = '请输入', ...rest } = props;\n const len = useLength(props.value, { showCount });\n\n let render = (\n <Input.TextArea placeholder={placeholder} maxLength={maxLength} {...rest} ref={ref} />\n );\n\n showCount &&\n 'value' in props &&\n (render = (\n <div className=\"vtx-input-textarea\" data-count={`${len}/${maxLength}`}>\n {render}\n </div>\n ));\n return render;\n});\n\nexport default TextArea;\n\nTextArea.propTypes = {\n maxLength: PropTypes.number,\n value: PropTypes.string,\n showCount: PropTypes.bool,\n placeholder: PropTypes.string,\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACxC,uBAA4ED,KAA5E,CAAQE,SAAR;EAAA,IAAQA,SAAR,iCAAoB,GAApB;EAAA,uBAA4EF,KAA5E,CAAyBG,SAAzB;EAAA,IAAyBA,SAAzB,iCAAqC,IAArC;EAAA,yBAA4EH,KAA5E,CAA2CI,WAA3C;EAAA,IAA2CA,WAA3C,mCAAyD,KAAzD;EAAA,IAAmEC,IAAnE,4BAA4EL,KAA5E;;EACA,IAAMM,GAAG,GAAG,IAAAC,qBAAA,EAAUP,KAAK,CAACQ,KAAhB,EAAuB;IAAEL,SAAS,EAATA;EAAF,CAAvB,CAAZ;;EAEA,IAAIM,MAAM,gBACN,gCAAC,iBAAD,CAAO,QAAP;IAAgB,WAAW,EAAEL,WAA7B;IAA0C,SAAS,EAAEF;EAArD,GAAoEG,IAApE;IAA0E,GAAG,EAAEJ;EAA/E,GADJ;;EAIAE,SAAS,IACL,WAAWH,KADf,KAEKS,MAAM,gBACH;IAAK,SAAS,EAAC,oBAAf;IAAoC,wBAAeH,GAAf,cAAsBJ,SAAtB;EAApC,GACKO,MADL,CAHR;EAOA,OAAOA,MAAP;AACH,CAhBgB,CAAjB;eAkBeX,Q;;AAEfA,QAAQ,CAACY,SAAT,GAAqB;EACjBR,SAAS,EAAES,qBAAA,CAAUC,MADJ;EAEjBJ,KAAK,EAAEG,qBAAA,CAAUE,MAFA;EAGjBV,SAAS,EAAEQ,qBAAA,CAAUG,IAHJ;EAIjBV,WAAW,EAAEO,qBAAA,CAAUE;AAJN,CAArB"}
|
|
1
|
+
{"version":3,"file":"TextArea.js","names":["TextArea","forwardRef","props","ref","maxLength","showCount","placeholder","rest","len","useLength","value","render","propTypes","PropTypes","number","string","bool"],"sources":["vtx-input/TextArea.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Input from 'antd/lib/input';\r\nimport useLength from './useLength';\r\n\r\nconst TextArea = forwardRef((props, ref) => {\r\n const { maxLength = 200, showCount = true, placeholder = '请输入', ...rest } = props;\r\n const len = useLength(props.value, { showCount });\r\n\r\n let render = (\r\n <Input.TextArea placeholder={placeholder} maxLength={maxLength} {...rest} ref={ref} />\r\n );\r\n\r\n showCount &&\r\n 'value' in props &&\r\n (render = (\r\n <div className=\"vtx-input-textarea\" data-count={`${len}/${maxLength}`}>\r\n {render}\r\n </div>\r\n ));\r\n return render;\r\n});\r\n\r\nexport default TextArea;\r\n\r\nTextArea.propTypes = {\r\n maxLength: PropTypes.number,\r\n value: PropTypes.string,\r\n showCount: PropTypes.bool,\r\n placeholder: PropTypes.string,\r\n};\r\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACxC,uBAA4ED,KAA5E,CAAQE,SAAR;EAAA,IAAQA,SAAR,iCAAoB,GAApB;EAAA,uBAA4EF,KAA5E,CAAyBG,SAAzB;EAAA,IAAyBA,SAAzB,iCAAqC,IAArC;EAAA,yBAA4EH,KAA5E,CAA2CI,WAA3C;EAAA,IAA2CA,WAA3C,mCAAyD,KAAzD;EAAA,IAAmEC,IAAnE,4BAA4EL,KAA5E;;EACA,IAAMM,GAAG,GAAG,IAAAC,qBAAA,EAAUP,KAAK,CAACQ,KAAhB,EAAuB;IAAEL,SAAS,EAATA;EAAF,CAAvB,CAAZ;;EAEA,IAAIM,MAAM,gBACN,gCAAC,iBAAD,CAAO,QAAP;IAAgB,WAAW,EAAEL,WAA7B;IAA0C,SAAS,EAAEF;EAArD,GAAoEG,IAApE;IAA0E,GAAG,EAAEJ;EAA/E,GADJ;;EAIAE,SAAS,IACL,WAAWH,KADf,KAEKS,MAAM,gBACH;IAAK,SAAS,EAAC,oBAAf;IAAoC,wBAAeH,GAAf,cAAsBJ,SAAtB;EAApC,GACKO,MADL,CAHR;EAOA,OAAOA,MAAP;AACH,CAhBgB,CAAjB;eAkBeX,Q;;AAEfA,QAAQ,CAACY,SAAT,GAAqB;EACjBR,SAAS,EAAES,qBAAA,CAAUC,MADJ;EAEjBJ,KAAK,EAAEG,qBAAA,CAAUE,MAFA;EAGjBV,SAAS,EAAEQ,qBAAA,CAAUG,IAHJ;EAIjBV,WAAW,EAAEO,qBAAA,CAAUE;AAJN,CAArB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["VtxInput","forwardRef","props","ref","showCount","maxLength","specialCharactersFilter","trim","onChange","onBlur","placeholder","rest","len","useLength","value","newProps","e","target","$e","cloneDeep","filterSpecialCharacters","getComponentProps","suffix","propTypes","PropTypes","number","string","bool","func","oneOfType","object","Search","Input","Group","Password","TextArea"],"sources":["vtx-input/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'antd/lib/input';\nimport cloneDeep from 'lodash.clonedeep';\nimport TextArea from './TextArea';\nimport useLength from './useLength';\nimport getComponentProps from '../_util/getComponentProps';\nimport filterSpecialCharacters from '../_util/filterSpecialCharacters';\n\nconst VtxInput = forwardRef((props, ref) => {\n const {\n showCount,\n maxLength = 32,\n specialCharactersFilter = true,\n trim = true,\n onChange,\n onBlur,\n placeholder = '请输入',\n ...rest\n } = props;\n\n const len = useLength(props.value, { showCount });\n\n let newProps = {\n ref,\n maxLength,\n placeholder,\n onBlur(e) {\n let value = e.target.value;\n let $e = e;\n if (trim) {\n value = value.trim();\n }\n if (specialCharactersFilter && value) {\n $e = cloneDeep(e);\n $e.target.value = filterSpecialCharacters(\n value,\n getComponentProps(specialCharactersFilter),\n );\n onChange && onChange($e);\n }\n onBlur && onBlur($e);\n },\n onChange,\n ...rest,\n };\n\n showCount &&\n 'value' in props &&\n (newProps = {\n suffix: `${len}/${maxLength}`,\n ...newProps,\n });\n\n return <Input {...newProps} autoComplete=\"off\" />;\n});\n\nVtxInput.propTypes = {\n maxLength: PropTypes.number,\n value: PropTypes.string,\n showCount: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n placeholder: PropTypes.string,\n trim: PropTypes.bool,\n specialCharactersFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n};\n\nVtxInput.Search = Input.Search;\nVtxInput.Group = Input.Group;\nVtxInput.Password = Input.Password;\nVtxInput.TextArea = TextArea;\n\nexport default VtxInput;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,GAAR,EAAgB;EAC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BAP,SAAS,IACL,WAAWF,KADf,KAEKa,QAAQ;IACLO,MAAM,YAAKV,GAAL,cAAYP,SAAZ;EADD,GAEFU,QAFE,CAFb;EAOA,oBAAO,gCAAC,iBAAD,eAAWA,QAAX;IAAqB,YAAY,EAAC;EAAlC,GAAP;AACH,CA9CgB,CAAjB;AAgDAf,QAAQ,CAACuB,SAAT,GAAqB;EACjBlB,SAAS,EAAEmB,qBAAA,CAAUC,MADJ;EAEjBX,KAAK,EAAEU,qBAAA,CAAUE,MAFA;EAGjBtB,SAAS,EAAEoB,qBAAA,CAAUG,IAHJ;EAIjBnB,QAAQ,EAAEgB,qBAAA,CAAUI,IAJH;EAKjBnB,MAAM,EAAEe,qBAAA,CAAUI,IALD;EAMjBlB,WAAW,EAAEc,qBAAA,CAAUE,MANN;EAOjBnB,IAAI,EAAEiB,qBAAA,CAAUG,IAPC;EAQjBrB,uBAAuB,EAAEkB,qBAAA,CAAUK,SAAV,CAAoB,CAACL,qBAAA,CAAUG,IAAX,EAAiBH,qBAAA,CAAUM,MAA3B,CAApB;AARR,CAArB;AAWA9B,QAAQ,CAAC+B,MAAT,GAAkBC,iBAAA,CAAMD,MAAxB;AACA/B,QAAQ,CAACiC,KAAT,GAAiBD,iBAAA,CAAMC,KAAvB;AACAjC,QAAQ,CAACkC,QAAT,GAAoBF,iBAAA,CAAME,QAA1B;AACAlC,QAAQ,CAACmC,QAAT,GAAoBA,oBAApB;eAEenC,Q"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["VtxInput","forwardRef","props","ref","showCount","maxLength","specialCharactersFilter","trim","onChange","onBlur","placeholder","rest","len","useLength","value","newProps","e","target","$e","cloneDeep","filterSpecialCharacters","getComponentProps","suffix","propTypes","PropTypes","number","string","bool","func","oneOfType","object","Search","Input","Group","Password","TextArea"],"sources":["vtx-input/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Input from 'antd/lib/input';\r\nimport cloneDeep from 'lodash.clonedeep';\r\nimport TextArea from './TextArea';\r\nimport useLength from './useLength';\r\nimport getComponentProps from '../_util/getComponentProps';\r\nimport filterSpecialCharacters from '../_util/filterSpecialCharacters';\r\n\r\nconst VtxInput = forwardRef((props, ref) => {\r\n const {\r\n showCount,\r\n maxLength = 32,\r\n specialCharactersFilter = true,\r\n trim = true,\r\n onChange,\r\n onBlur,\r\n placeholder = '请输入',\r\n ...rest\r\n } = props;\r\n\r\n const len = useLength(props.value, { showCount });\r\n\r\n let newProps = {\r\n ref,\r\n maxLength,\r\n placeholder,\r\n onBlur(e) {\r\n let value = e.target.value;\r\n let $e = e;\r\n if (trim) {\r\n value = value.trim();\r\n }\r\n if (specialCharactersFilter && value) {\r\n $e = cloneDeep(e);\r\n $e.target.value = filterSpecialCharacters(\r\n value,\r\n getComponentProps(specialCharactersFilter),\r\n );\r\n onChange && onChange($e);\r\n }\r\n onBlur && onBlur($e);\r\n },\r\n onChange,\r\n ...rest,\r\n };\r\n\r\n showCount &&\r\n 'value' in props &&\r\n (newProps = {\r\n suffix: `${len}/${maxLength}`,\r\n ...newProps,\r\n });\r\n\r\n return <Input {...newProps} autoComplete=\"off\" />;\r\n});\r\n\r\nVtxInput.propTypes = {\r\n maxLength: PropTypes.number,\r\n value: PropTypes.string,\r\n showCount: PropTypes.bool,\r\n onChange: PropTypes.func,\r\n onBlur: PropTypes.func,\r\n placeholder: PropTypes.string,\r\n trim: PropTypes.bool,\r\n specialCharactersFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\r\n};\r\n\r\nVtxInput.Search = Input.Search;\r\nVtxInput.Group = Input.Group;\r\nVtxInput.Password = Input.Password;\r\nVtxInput.TextArea = TextArea;\r\n\r\nexport default VtxInput;\r\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,G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K,CAAZ;;EAwBAP,SAAS,IACL,WAAWF,KADf,KAEKa,QAAQ;IACLO,MAAM,YAAKV,GAAL,cAAYP,SAAZ;EADD,GAEFU,QAFE,CAFb;EAOA,oBAAO,gCAAC,iBAAD,eAAWA,QAAX;IAAqB,YAAY,EAAC;EAAlC,GAAP;AACH,CA9CgB,CAAjB;AAgDAf,QAAQ,CAACuB,SAAT,GAAqB;EACjBlB,SAAS,EAAEmB,qBAAA,CAAUC,MADJ;EAEjBX,KAAK,EAAEU,qBAAA,CAAUE,MAFA;EAGjBtB,SAAS,EAAEoB,qBAAA,CAAUG,IAHJ;EAIjBnB,QAAQ,EAAEgB,qBAAA,CAAUI,IAJH;EAKjBnB,MAAM,EAAEe,qBAAA,CAAUI,IALD;EAMjBlB,WAAW,EAAEc,qBAAA,CAAUE,MANN;EAOjBnB,IAAI,EAAEiB,qBAAA,CAAUG,IAPC;EAQjBrB,uBAAuB,EAAEkB,qBAAA,CAAUK,SAAV,CAAoB,CAACL,qBAAA,CAAUG,IAAX,EAAiBH,qBAAA,CAAUM,MAA3B,CAApB;AARR,CAArB;AAWA9B,QAAQ,CAAC+B,MAAT,GAAkBC,iBAAA,CAAMD,MAAxB;AACA/B,QAAQ,CAACiC,KAAT,GAAiBD,iBAAA,CAAMC,KAAvB;AACAjC,QAAQ,CAACkC,QAAT,GAAoBF,iBAAA,CAAME,QAA1B;AACAlC,QAAQ,CAACmC,QAAT,GAAoBA,oBAApB;eAEenC,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
.vtx-input-textarea {
|
|
4
|
-
position: relative;
|
|
5
|
-
&::after {
|
|
6
|
-
position: absolute;
|
|
7
|
-
right: 12px;
|
|
8
|
-
bottom: 8px;
|
|
9
|
-
color: @text-color-secondary;
|
|
10
|
-
line-height: @line-height-base;
|
|
11
|
-
white-space: nowrap;
|
|
12
|
-
content: attr(data-count);
|
|
13
|
-
pointer-events: none;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
.ant-input {
|
|
17
|
-
resize: none;
|
|
18
|
-
}
|
|
19
|
-
.ant-input-affix-wrapper .ant-input-suffix {
|
|
20
|
-
color: @text-color-secondary;
|
|
21
|
-
}
|
|
22
|
-
.ant-input-affix-wrapper .ant-input:not(:last-child) {
|
|
23
|
-
padding-right: 48px;
|
|
24
|
-
}
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
.vtx-input-textarea {
|
|
4
|
+
position: relative;
|
|
5
|
+
&::after {
|
|
6
|
+
position: absolute;
|
|
7
|
+
right: 12px;
|
|
8
|
+
bottom: 8px;
|
|
9
|
+
color: @text-color-secondary;
|
|
10
|
+
line-height: @line-height-base;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
content: attr(data-count);
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.ant-input {
|
|
17
|
+
resize: none;
|
|
18
|
+
}
|
|
19
|
+
.ant-input-affix-wrapper .ant-input-suffix {
|
|
20
|
+
color: @text-color-secondary;
|
|
21
|
+
}
|
|
22
|
+
.ant-input-affix-wrapper .ant-input:not(:last-child) {
|
|
23
|
+
padding-right: 48px;
|
|
24
|
+
}
|
package/lib/vtx-modal/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _useUpdateEffect = _interopRequireDefault(require("ahooks/es/useUpdateEffect"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _useSetState3 = _interopRequireDefault(require("ahooks/es/useSetState"));
|
|
17
17
|
|
|
18
18
|
var _CloseOutlined = _interopRequireDefault(require("@ant-design/icons/CloseOutlined"));
|
|
19
19
|
|
|
@@ -59,24 +59,19 @@ var initDragArg = {
|
|
|
59
59
|
y_move: 0,
|
|
60
60
|
documentMouseMove: null,
|
|
61
61
|
documentMouseUp: null
|
|
62
|
-
}; // 全屏参数
|
|
63
|
-
|
|
64
|
-
var initFullScreen = {
|
|
65
|
-
isFull: false,
|
|
66
|
-
className: ''
|
|
67
62
|
};
|
|
68
63
|
|
|
69
64
|
function VtxModal(props) {
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
var _useState = (0, _react.useState)(!!props.defaultIsFull),
|
|
66
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
67
|
+
isFull = _useState2[0],
|
|
68
|
+
setIsFull = _useState2[1]; // 是否是全屏状态
|
|
74
69
|
|
|
75
70
|
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
dragArg =
|
|
79
|
-
setDragArg =
|
|
71
|
+
var _useSetState = (0, _useSetState3["default"])(initDragArg),
|
|
72
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
73
|
+
dragArg = _useSetState2[0],
|
|
74
|
+
setDragArg = _useSetState2[1]; // 拖动配置
|
|
80
75
|
|
|
81
76
|
|
|
82
77
|
var classId = (0, _react.useRef)(new Date().getTime() + Math.random());
|
|
@@ -98,7 +93,7 @@ function VtxModal(props) {
|
|
|
98
93
|
var el = document.getElementsByClassName('ant-modal-body')[0];
|
|
99
94
|
var option = {
|
|
100
95
|
height: window.getComputedStyle(el).height,
|
|
101
|
-
isFull:
|
|
96
|
+
isFull: isFull
|
|
102
97
|
};
|
|
103
98
|
onModalResize(option);
|
|
104
99
|
}
|
|
@@ -106,7 +101,7 @@ function VtxModal(props) {
|
|
|
106
101
|
return function () {
|
|
107
102
|
return clearTimeout(timer);
|
|
108
103
|
};
|
|
109
|
-
}, [
|
|
104
|
+
}, [isFull]); // 拖拽
|
|
110
105
|
|
|
111
106
|
(0, _react.useEffect)(function () {
|
|
112
107
|
if (props.visible && moveable) {
|
|
@@ -125,11 +120,16 @@ function VtxModal(props) {
|
|
|
125
120
|
};
|
|
126
121
|
}
|
|
127
122
|
});
|
|
123
|
+
(0, _react.useEffect)(function () {
|
|
124
|
+
if (props.visible) {
|
|
125
|
+
setIsFull(!!props.defaultIsFull);
|
|
126
|
+
}
|
|
127
|
+
}, [props.visible]);
|
|
128
128
|
|
|
129
129
|
var startDrag = function startDrag(e) {
|
|
130
130
|
e.preventDefault(); // 全屏模式下禁止拖拽
|
|
131
131
|
|
|
132
|
-
if (!
|
|
132
|
+
if (!isFull) {
|
|
133
133
|
setDragArg({
|
|
134
134
|
documentMouseUp: document.onmouseup,
|
|
135
135
|
documentMouseMove: document.onmousemove,
|
|
@@ -159,7 +159,7 @@ function VtxModal(props) {
|
|
|
159
159
|
props.onCancel(); // TODO 关闭弹框会闪一下,待解决
|
|
160
160
|
|
|
161
161
|
setDragArg(initDragArg);
|
|
162
|
-
|
|
162
|
+
setIsFull(false);
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
165
|
/*
|
|
@@ -169,7 +169,7 @@ function VtxModal(props) {
|
|
|
169
169
|
|
|
170
170
|
title = function renderTitle() {
|
|
171
171
|
if (typeof title == 'string' && title.indexOf('>') > -1) {
|
|
172
|
-
var _titles = title.split(
|
|
172
|
+
var _titles = title.split('>');
|
|
173
173
|
|
|
174
174
|
title = /*#__PURE__*/_react["default"].createElement(_Title["default"], {
|
|
175
175
|
text: _titles[0].trim(),
|
|
@@ -188,18 +188,9 @@ function VtxModal(props) {
|
|
|
188
188
|
className: "vtx-modal-maximizeIcon"
|
|
189
189
|
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
190
190
|
onClick: function onClick() {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
if (!fullScreen.isFull) {
|
|
194
|
-
fullScreenClass = 'vtx-modal-maxClass';
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
setFullScreen({
|
|
198
|
-
isFull: !fullScreen.isFull,
|
|
199
|
-
className: fullScreenClass
|
|
200
|
-
});
|
|
191
|
+
setIsFull(!isFull);
|
|
201
192
|
}
|
|
202
|
-
},
|
|
193
|
+
}, isFull ? /*#__PURE__*/_react["default"].createElement(_FullscreenExitOutlined["default"], null) : /*#__PURE__*/_react["default"].createElement(_FullscreenOutlined["default"], null))) : null, closable ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
203
194
|
className: "vtx-modal-close"
|
|
204
195
|
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
205
196
|
onClick: onCancel
|
|
@@ -210,7 +201,7 @@ function VtxModal(props) {
|
|
|
210
201
|
/* 限制最大高度 */
|
|
211
202
|
|
|
212
203
|
|
|
213
|
-
if (!
|
|
204
|
+
if (!isFull) {
|
|
214
205
|
bodyStyle = _objectSpread({
|
|
215
206
|
maxHeight: "".concat(window.innerHeight * 0.7, "px")
|
|
216
207
|
}, bodyStyle);
|
|
@@ -227,10 +218,10 @@ function VtxModal(props) {
|
|
|
227
218
|
}, props), {}, {
|
|
228
219
|
closable: false,
|
|
229
220
|
title: title,
|
|
230
|
-
wrapClassName: (0, _classnames["default"])('vtx-modal', wrapClassName,
|
|
221
|
+
wrapClassName: (0, _classnames["default"])('vtx-modal', wrapClassName, isFull ? 'vtx-modal-maxClass' : '', classId.current),
|
|
231
222
|
bodyStyle: bodyStyle,
|
|
232
223
|
onCancel: onCancel,
|
|
233
|
-
style: _objectSpread(_objectSpread({}, props.style),
|
|
224
|
+
style: _objectSpread(_objectSpread({}, props.style), isFull ? {} : transformStyle)
|
|
234
225
|
});
|
|
235
226
|
|
|
236
227
|
return /*#__PURE__*/_react["default"].createElement(_modal["default"], newProps, props.children);
|
|
@@ -252,7 +243,8 @@ VtxModal.propTypes = {
|
|
|
252
243
|
onCancel: _propTypes["default"].func,
|
|
253
244
|
bodyStyle: _propTypes["default"].object,
|
|
254
245
|
style: _propTypes["default"].object,
|
|
255
|
-
children: _propTypes["default"].node
|
|
246
|
+
children: _propTypes["default"].node,
|
|
247
|
+
defaultIsFull: _propTypes["default"].bool
|
|
256
248
|
};
|
|
257
249
|
VtxModal.Title = _Title["default"];
|
|
258
250
|
var size = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["initDragArg","init_x","init_y","x_move","y_move","documentMouseMove","documentMouseUp","initFullScreen","isFull","className","VtxModal","props","useSetState","fullScreen","setFullScreen","dragArg","setDragArg","classId","useRef","Date","getTime","Math","random","wrapClassName","closable","title","maximize","onModalResize","moveable","useUpdateEffect","timer","setTimeout","el","document","getElementsByClassName","option","height","window","getComputedStyle","clearTimeout","useEffect","visible","modalHead","current","style","cursor","onmousedown","startDrag","e","preventDefault","onmouseup","onmousemove","clientX","clientY","prev","onCancel","renderTitle","indexOf","_titles","split","trim","paddingRight","fullScreenClass","bodyStyle","maxHeight","innerHeight","transformStyle","transform","newProps","maskClosable","destroyOnClose","width","classnames","children","info","Modal","success","error","warning","confirm","propTypes","PropTypes","bool","string","oneOfType","element","func","object","node","Title","size","xsmall","small","middle","large"],"sources":["vtx-modal/index.jsx"],"sourcesContent":["/*\n * @Author: chenxinyu\n * @Date: 2021-03-24 21:47:52\n * @LastEditors: your name\n * @LastEditTime: 2022-01-15 22:13:58\n * @Description: 对话框组件\n * @FilePath: \\react-components\\components\\vtx-modal\\index.jsx\n */\nimport React, { useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport useUpdateEffect from 'ahooks/es/useUpdateEffect';\nimport useSetState from 'ahooks/es/useSetState';\nimport CloseOutlined from '@ant-design/icons/CloseOutlined';\nimport FullscreenExitOutlined from '@ant-design/icons/FullscreenExitOutlined';\nimport FullscreenOutlined from '@ant-design/icons/FullscreenOutlined';\nimport classnames from 'classnames';\nimport Modal from 'antd/lib/modal';\nimport Title from './Title';\n\n// 对话框位置初始参数\nconst initDragArg = {\n init_x: 0,\n init_y: 0,\n x_move: 0,\n y_move: 0,\n documentMouseMove: null,\n documentMouseUp: null,\n};\n\n// 全屏参数\nconst initFullScreen = {\n isFull: false,\n className: '',\n};\n\nfunction VtxModal(props) {\n const [fullScreen, setFullScreen] = useSetState(initFullScreen); // 是否是全屏状态\n const [dragArg, setDragArg] = useSetState(initDragArg); // 拖动配置\n const classId = useRef(new Date().getTime() + Math.random());\n\n let {\n wrapClassName = '',\n closable = true, // 是否显示右上角关闭按钮\n title = '', // 对话框title\n maximize = false, // 是否显示对话框全屏按钮\n onModalResize, // 对话框全屏回调\n moveable = false, // 对话框是否允许拖动\n } = props;\n\n // 监听对话框大小变化回调(忽略首次执行)\n useUpdateEffect(() => {\n const timer = setTimeout(() => {\n if (onModalResize && typeof onModalResize === 'function') {\n const el = document.getElementsByClassName('ant-modal-body')[0];\n const option = {\n height: window.getComputedStyle(el).height,\n isFull: fullScreen.isFull,\n };\n onModalResize(option);\n }\n }, 100);\n return () => clearTimeout(timer);\n }, [fullScreen.isFull]);\n\n // 拖拽\n useEffect(() => {\n if (props.visible && moveable) {\n const timer = setTimeout(() => {\n const modalHead = document\n .getElementsByClassName(classId.current)?.[0]\n ?.getElementsByClassName('ant-modal-header')?.[0];\n if (modalHead) {\n modalHead.style.cursor = 'move';\n modalHead.onmousedown = startDrag;\n }\n }, 200);\n return () => clearTimeout(timer);\n }\n });\n\n const startDrag = e => {\n e.preventDefault();\n // 全屏模式下禁止拖拽\n if (!fullScreen.isFull) {\n setDragArg({\n documentMouseUp: document.onmouseup,\n documentMouseMove: document.onmousemove,\n init_x: e.clientX - dragArg.x_move,\n init_y: e.clientY - dragArg.y_move,\n });\n document.onmousemove = e => {\n setDragArg(prev => ({\n x_move: e.clientX - prev.init_x,\n y_move: e.clientY - prev.init_y,\n }));\n };\n document.onmouseup = () => {\n document.onmousemove = dragArg.documentMouseMove;\n document.onmouseup = dragArg.documentMouseUp;\n };\n }\n };\n\n // 关闭对话框,初始化位置\n const onCancel = () => {\n if (props.onCancel && typeof props.onCancel === 'function') {\n props.onCancel();\n // TODO 关闭弹框会闪一下,待解决\n setDragArg(initDragArg);\n setFullScreen(initFullScreen);\n }\n };\n\n /*\n *重写title,加入对话框全屏功能\n */\n title = (function renderTitle() {\n if(typeof(title) == 'string' && title.indexOf('>')>-1){\n let _titles = title.split(\">\");\n title = <Title text={_titles[0].trim()} subtitle={_titles[1].trim()}/>\n }\n return (\n <div className=\"vtx-modal-title\" style={{ paddingRight: closable ? '32px' : '0px' }}>\n <div className=\"vtx-modal-title_name\">{title}</div>\n {maximize ? (\n <div className=\"vtx-modal-maximizeIcon\">\n <p\n onClick={() => {\n let fullScreenClass = '';\n if (!fullScreen.isFull) {\n fullScreenClass = 'vtx-modal-maxClass';\n }\n setFullScreen({\n isFull: !fullScreen.isFull,\n className: fullScreenClass,\n });\n }}\n >\n {fullScreen.isFull ? (\n <FullscreenExitOutlined />\n ) : (\n <FullscreenOutlined />\n )}\n </p>\n </div>\n ) : null}\n {closable ? (\n <div className=\"vtx-modal-close\">\n <p onClick={onCancel}>\n {/* <Icon type=\"close\" /> */}\n <CloseOutlined />\n </p>\n </div>\n ) : (\n ''\n )}\n </div>\n );\n })();\n\n let bodyStyle = {\n ...props.bodyStyle,\n };\n\n /* 限制最大高度 */\n if (!fullScreen.isFull) {\n bodyStyle = {\n maxHeight: `${window.innerHeight * 0.7}px`,\n ...bodyStyle,\n };\n }\n\n const transformStyle = {\n transform: `translate(${dragArg.x_move}px,${dragArg.y_move}px)`,\n };\n\n const newProps = {\n maskClosable: false,\n destroyOnClose: true,\n width: 700,\n ...props,\n closable: false,\n title,\n wrapClassName: classnames(\n 'vtx-modal',\n wrapClassName,\n fullScreen.className,\n classId.current,\n ),\n bodyStyle,\n onCancel,\n style: {\n ...props.style,\n ...(fullScreen.isFull ? {} : transformStyle),\n },\n };\n\n return <Modal {...newProps}>{props.children}</Modal>;\n}\n\nVtxModal.info = Modal.info;\nVtxModal.success = Modal.success;\nVtxModal.error = Modal.error;\nVtxModal.warning = Modal.warning;\nVtxModal.confirm = Modal.confirm;\n\nVtxModal.propTypes = {\n visible: PropTypes.bool,\n wrapClassName: PropTypes.string,\n closable: PropTypes.bool,\n title: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n maximize: PropTypes.bool,\n onModalResize: PropTypes.func,\n moveable: PropTypes.bool,\n onCancel: PropTypes.func,\n bodyStyle: PropTypes.object,\n style: PropTypes.object,\n children: PropTypes.node,\n};\n\nVtxModal.Title = Title;\n\nconst size = {\n xsmall: 392,\n small: 500,\n middle: 744,\n large: 1096,\n};\n\nVtxModal.size = size;\n\nexport default VtxModal;\n"],"mappings":";;;;;;;;;AAQA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA,IAAMA,WAAW,GAAG;EAChBC,MAAM,EAAE,CADQ;EAEhBC,MAAM,EAAE,CAFQ;EAGhBC,MAAM,EAAE,CAHQ;EAIhBC,MAAM,EAAE,CAJQ;EAKhBC,iBAAiB,EAAE,IALH;EAMhBC,eAAe,EAAE;AAND,CAApB,C,CASA;;AACA,IAAMC,cAAc,GAAG;EACnBC,MAAM,EAAE,KADW;EAEnBC,SAAS,EAAE;AAFQ,CAAvB;;AAKA,SAASC,QAAT,CAAkBC,KAAlB,EAAyB;EACrB,mBAAoC,IAAAC,wBAAA,EAAYL,cAAZ,CAApC;EAAA;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State","defaultIsFull","isFull","setIsFull","useSetState","dragArg","setDragArg","classId","useRef","Date","getTime","Math","random","wrapClassName","closable","title","maximize","onModalResize","moveable","useUpdateEffect","timer","setTimeout","el","document","getElementsByClassName","option","height","window","getComputedStyle","clearTimeout","useEffect","visible","modalHead","current","style","cursor","onmousedown","startDrag","e","preventDefault","onmouseup","onmousemove","clientX","clientY","prev","onCancel","renderTitle","indexOf","_titles","split","trim","paddingRight","bodyStyle","maxHeight","innerHeight","transformStyle","transform","newProps","maskClosable","destroyOnClose","width","classnames","children","info","Modal","success","error","warning","confirm","propTypes","PropTypes","bool","string","oneOfType","element","func","object","node","Title","size","xsmall","small","middle","large"],"sources":["vtx-modal/index.jsx"],"sourcesContent":["/*\n * @Author: chenxinyu\n * @Date: 2021-03-24 21:47:52\n * @LastEditors: your name\n * @LastEditTime: 2022-01-15 22:13:58\n * @Description: 对话框组件\n * @FilePath: \\react-components\\components\\vtx-modal\\index.jsx\n */\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport useUpdateEffect from 'ahooks/es/useUpdateEffect';\nimport useSetState from 'ahooks/es/useSetState';\nimport CloseOutlined from '@ant-design/icons/CloseOutlined';\nimport FullscreenExitOutlined from '@ant-design/icons/FullscreenExitOutlined';\nimport FullscreenOutlined from '@ant-design/icons/FullscreenOutlined';\nimport classnames from 'classnames';\nimport Modal from 'antd/lib/modal';\nimport Title from './Title';\n\n// 对话框位置初始参数\nconst initDragArg = {\n init_x: 0,\n init_y: 0,\n x_move: 0,\n y_move: 0,\n documentMouseMove: null,\n documentMouseUp: null,\n};\n\nfunction VtxModal(props) {\n const [isFull, setIsFull] = useState(!!props.defaultIsFull); // 是否是全屏状态\n const [dragArg, setDragArg] = useSetState(initDragArg); // 拖动配置\n const classId = useRef(new Date().getTime() + Math.random());\n\n let {\n wrapClassName = '',\n closable = true, // 是否显示右上角关闭按钮\n title = '', // 对话框title\n maximize = false, // 是否显示对话框全屏按钮\n onModalResize, // 对话框全屏回调\n moveable = false, // 对话框是否允许拖动\n } = props;\n\n // 监听对话框大小变化回调(忽略首次执行)\n useUpdateEffect(() => {\n const timer = setTimeout(() => {\n if (onModalResize && typeof onModalResize === 'function') {\n const el = document.getElementsByClassName('ant-modal-body')[0];\n const option = {\n height: window.getComputedStyle(el).height,\n isFull,\n };\n onModalResize(option);\n }\n }, 100);\n return () => clearTimeout(timer);\n }, [isFull]);\n\n // 拖拽\n useEffect(() => {\n if (props.visible && moveable) {\n const timer = setTimeout(() => {\n const modalHead = document\n .getElementsByClassName(classId.current)?.[0]\n ?.getElementsByClassName('ant-modal-header')?.[0];\n if (modalHead) {\n modalHead.style.cursor = 'move';\n modalHead.onmousedown = startDrag;\n }\n }, 200);\n return () => clearTimeout(timer);\n }\n });\n\n useEffect(() => {\n if (props.visible) {\n setIsFull(!!props.defaultIsFull);\n }\n }, [props.visible]);\n\n const startDrag = e => {\n e.preventDefault();\n // 全屏模式下禁止拖拽\n if (!isFull) {\n setDragArg({\n documentMouseUp: document.onmouseup,\n documentMouseMove: document.onmousemove,\n init_x: e.clientX - dragArg.x_move,\n init_y: e.clientY - dragArg.y_move,\n });\n document.onmousemove = e => {\n setDragArg(prev => ({\n x_move: e.clientX - prev.init_x,\n y_move: e.clientY - prev.init_y,\n }));\n };\n document.onmouseup = () => {\n document.onmousemove = dragArg.documentMouseMove;\n document.onmouseup = dragArg.documentMouseUp;\n };\n }\n };\n\n // 关闭对话框,初始化位置\n const onCancel = () => {\n if (props.onCancel && typeof props.onCancel === 'function') {\n props.onCancel();\n // TODO 关闭弹框会闪一下,待解决\n setDragArg(initDragArg);\n setIsFull(false);\n }\n };\n\n /*\n *重写title,加入对话框全屏功能\n */\n title = (function renderTitle() {\n if (typeof title == 'string' && title.indexOf('>') > -1) {\n let _titles = title.split('>');\n title = <Title text={_titles[0].trim()} subtitle={_titles[1].trim()} />;\n }\n return (\n <div className=\"vtx-modal-title\" style={{ paddingRight: closable ? '32px' : '0px' }}>\n <div className=\"vtx-modal-title_name\">{title}</div>\n {maximize ? (\n <div className=\"vtx-modal-maximizeIcon\">\n <p\n onClick={() => {\n setIsFull(!isFull);\n }}\n >\n {isFull ? <FullscreenExitOutlined /> : <FullscreenOutlined />}\n </p>\n </div>\n ) : null}\n {closable ? (\n <div className=\"vtx-modal-close\">\n <p onClick={onCancel}>\n {/* <Icon type=\"close\" /> */}\n <CloseOutlined />\n </p>\n </div>\n ) : (\n ''\n )}\n </div>\n );\n })();\n\n let bodyStyle = {\n ...props.bodyStyle,\n };\n\n /* 限制最大高度 */\n if (!isFull) {\n bodyStyle = {\n maxHeight: `${window.innerHeight * 0.7}px`,\n ...bodyStyle,\n };\n }\n\n const transformStyle = {\n transform: `translate(${dragArg.x_move}px,${dragArg.y_move}px)`,\n };\n\n const newProps = {\n maskClosable: false,\n destroyOnClose: true,\n width: 700,\n ...props,\n closable: false,\n title,\n wrapClassName: classnames(\n 'vtx-modal',\n wrapClassName,\n isFull ? 'vtx-modal-maxClass' : '',\n classId.current,\n ),\n bodyStyle,\n onCancel,\n style: {\n ...props.style,\n ...(isFull ? {} : transformStyle),\n },\n };\n\n return <Modal {...newProps}>{props.children}</Modal>;\n}\n\nVtxModal.info = Modal.info;\nVtxModal.success = Modal.success;\nVtxModal.error = Modal.error;\nVtxModal.warning = Modal.warning;\nVtxModal.confirm = Modal.confirm;\n\nVtxModal.propTypes = {\n visible: PropTypes.bool,\n wrapClassName: PropTypes.string,\n closable: PropTypes.bool,\n title: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n maximize: PropTypes.bool,\n onModalResize: PropTypes.func,\n moveable: PropTypes.bool,\n onCancel: PropTypes.func,\n bodyStyle: PropTypes.object,\n style: PropTypes.object,\n children: PropTypes.node,\n defaultIsFull: PropTypes.bool,\n};\n\nVtxModal.Title = Title;\n\nconst size = {\n xsmall: 392,\n small: 500,\n middle: 744,\n large: 1096,\n};\n\nVtxModal.size = size;\n\nexport default VtxModal;\n"],"mappings":";;;;;;;;;AAQA;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YjB5E,aAAa,EAAEqE,qBAAA,CAAUC;AAZR,CAArB;AAeAzE,QAAQ,CAACgF,KAAT,GAAiBA,iBAAjB;AAEA,IAAMC,IAAI,GAAG;EACTC,MAAM,EAAE,GADC;EAETC,KAAK,EAAE,GAFE;EAGTC,MAAM,EAAE,GAHC;EAITC,KAAK,EAAE;AAJE,CAAb;AAOArF,QAAQ,CAACiF,IAAT,GAAgBA,IAAhB;eAEejF,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-modal/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-modal/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA"}
|
|
@@ -6,8 +6,21 @@
|
|
|
6
6
|
padding-bottom: 0 !important;
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
}
|
|
9
|
+
.vtx-modal-maxClass .ant-modal .ant-modal-content {
|
|
10
|
+
display: -webkit-box;
|
|
11
|
+
display: -ms-flexbox;
|
|
12
|
+
display: flex;
|
|
13
|
+
-webkit-box-orient: vertical;
|
|
14
|
+
-webkit-box-direction: normal;
|
|
15
|
+
-ms-flex-direction: column;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
}
|
|
9
18
|
.vtx-modal-maxClass .ant-modal-body {
|
|
10
|
-
|
|
19
|
+
-webkit-box-flex: 1;
|
|
20
|
+
-ms-flex: 1;
|
|
21
|
+
flex: 1;
|
|
22
|
+
min-height: 0;
|
|
23
|
+
max-height: initial !important;
|
|
11
24
|
}
|
|
12
25
|
.vtx-modal .ant-modal {
|
|
13
26
|
top: 10%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-modal/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-modal/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\r\nimport './index.less';\r\n"],"mappings":";;AAAA;;AACA"}
|