@vtx/components 3.1.61 → 3.1.63
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 +18 -12
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/index.js +10 -8
- package/lib/vtx-datagrid/index.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/Image.js +40 -7
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/style/index.css +37 -6
- package/lib/vtx-image/style/index.less +24 -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 +2 -2
- 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.js.map +1 -1
- package/lib/vtx-modal/style/index.less +101 -101
- 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":"index.js","names":["initDragArg","init_x","init_y","x_move","y_move","documentMouseMove","documentMouseUp","VtxModal","props","useState","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;;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;;AASA,SAASC,QAAT,CAAkBC,KAAlB,EAAyB;EACrB,gBAA4B,IAAAC,eAAA,EAAS,CAAC,CAACD,KAAK,CAACE,aAAjB,CAA5B;EAAA;EAAA,IAAOC,MAAP;EAAA,IAAeC,SAAf,iBADqB,CACwC;;;EAC7D,mBAA8B,IAAAC,wBAAA,EAAYb,WAAZ,CAA9B;EAAA;EAAA,IAAOc,OAAP;EAAA,IAAgBC,UAAhB,oBAFqB,CAEmC;;;EACxD,IAAMC,OAAO,GAAG,IAAAC,aAAA,EAAO,IAAIC,IAAJ,GAAWC,OAAX,KAAuBC,IAAI,CAACC,MAAL,EAA9B,C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,EAAEuC,qBAAA,CAAUC,IADF;EAEjB1D,aAAa,EAAEyD,qBAAA,CAAUE,MAFR;EAGjB1D,QAAQ,EAAEwD,qBAAA,CAAUC,IAHH;EAIjBxD,KAAK,EAAEuD,qBAAA,CAAUG,SAAV,CAAoB,CAACH,qBAAA,CAAUI,OAAX,EAAoBJ,qBAAA,CAAUE,MAA9B,CAApB,CAJU;EAKjBxD,QAAQ,EAAEsD,qBAAA,CAAUC,IALH;EAMjBtD,aAAa,EAAEqD,qBAAA,CAAUK,IANR;EAOjBzD,QAAQ,EAAEoD,qBAAA,CAAUC,IAPH;EAQjB1B,QAAQ,EAAEyB,qBAAA,CAAUK,IARH;EASjBvB,SAAS,EAAEkB,qBAAA,CAAUM,MATJ;EAUjB1C,KAAK,EAAEoC,qBAAA,CAAUM,MAVA;EAWjBd,QAAQ,EAAEQ,qBAAA,CAAUO,IAXH;EAYjB5E,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
|
+
{"version":3,"file":"index.js","names":["initDragArg","init_x","init_y","x_move","y_move","documentMouseMove","documentMouseUp","VtxModal","props","useState","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":["/*\r\n * @Author: chenxinyu\r\n * @Date: 2021-03-24 21:47:52\r\n * @LastEditors: your name\r\n * @LastEditTime: 2022-01-15 22:13:58\r\n * @Description: 对话框组件\r\n * @FilePath: \\react-components\\components\\vtx-modal\\index.jsx\r\n */\r\nimport React, { useEffect, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport useUpdateEffect from 'ahooks/es/useUpdateEffect';\r\nimport useSetState from 'ahooks/es/useSetState';\r\nimport CloseOutlined from '@ant-design/icons/CloseOutlined';\r\nimport FullscreenExitOutlined from '@ant-design/icons/FullscreenExitOutlined';\r\nimport FullscreenOutlined from '@ant-design/icons/FullscreenOutlined';\r\nimport classnames from 'classnames';\r\nimport Modal from 'antd/lib/modal';\r\nimport Title from './Title';\r\n\r\n// 对话框位置初始参数\r\nconst initDragArg = {\r\n init_x: 0,\r\n init_y: 0,\r\n x_move: 0,\r\n y_move: 0,\r\n documentMouseMove: null,\r\n documentMouseUp: null,\r\n};\r\n\r\nfunction VtxModal(props) {\r\n const [isFull, setIsFull] = useState(!!props.defaultIsFull); // 是否是全屏状态\r\n const [dragArg, setDragArg] = useSetState(initDragArg); // 拖动配置\r\n const classId = useRef(new Date().getTime() + Math.random());\r\n\r\n let {\r\n wrapClassName = '',\r\n closable = true, // 是否显示右上角关闭按钮\r\n title = '', // 对话框title\r\n maximize = false, // 是否显示对话框全屏按钮\r\n onModalResize, // 对话框全屏回调\r\n moveable = false, // 对话框是否允许拖动\r\n } = props;\r\n\r\n // 监听对话框大小变化回调(忽略首次执行)\r\n useUpdateEffect(() => {\r\n const timer = setTimeout(() => {\r\n if (onModalResize && typeof onModalResize === 'function') {\r\n const el = document.getElementsByClassName('ant-modal-body')[0];\r\n const option = {\r\n height: window.getComputedStyle(el).height,\r\n isFull,\r\n };\r\n onModalResize(option);\r\n }\r\n }, 100);\r\n return () => clearTimeout(timer);\r\n }, [isFull]);\r\n\r\n // 拖拽\r\n useEffect(() => {\r\n if (props.visible && moveable) {\r\n const timer = setTimeout(() => {\r\n const modalHead = document\r\n .getElementsByClassName(classId.current)?.[0]\r\n ?.getElementsByClassName('ant-modal-header')?.[0];\r\n if (modalHead) {\r\n modalHead.style.cursor = 'move';\r\n modalHead.onmousedown = startDrag;\r\n }\r\n }, 200);\r\n return () => clearTimeout(timer);\r\n }\r\n });\r\n\r\n useEffect(() => {\r\n if (props.visible) {\r\n setIsFull(!!props.defaultIsFull);\r\n }\r\n }, [props.visible]);\r\n\r\n const startDrag = e => {\r\n e.preventDefault();\r\n // 全屏模式下禁止拖拽\r\n if (!isFull) {\r\n setDragArg({\r\n documentMouseUp: document.onmouseup,\r\n documentMouseMove: document.onmousemove,\r\n init_x: e.clientX - dragArg.x_move,\r\n init_y: e.clientY - dragArg.y_move,\r\n });\r\n document.onmousemove = e => {\r\n setDragArg(prev => ({\r\n x_move: e.clientX - prev.init_x,\r\n y_move: e.clientY - prev.init_y,\r\n }));\r\n };\r\n document.onmouseup = () => {\r\n document.onmousemove = dragArg.documentMouseMove;\r\n document.onmouseup = dragArg.documentMouseUp;\r\n };\r\n }\r\n };\r\n\r\n // 关闭对话框,初始化位置\r\n const onCancel = () => {\r\n if (props.onCancel && typeof props.onCancel === 'function') {\r\n props.onCancel();\r\n // TODO 关闭弹框会闪一下,待解决\r\n setDragArg(initDragArg);\r\n setIsFull(false);\r\n }\r\n };\r\n\r\n /*\r\n *重写title,加入对话框全屏功能\r\n */\r\n title = (function renderTitle() {\r\n if (typeof title == 'string' && title.indexOf('>') > -1) {\r\n let _titles = title.split('>');\r\n title = <Title text={_titles[0].trim()} subtitle={_titles[1].trim()} />;\r\n }\r\n return (\r\n <div className=\"vtx-modal-title\" style={{ paddingRight: closable ? '32px' : '0px' }}>\r\n <div className=\"vtx-modal-title_name\">{title}</div>\r\n {maximize ? (\r\n <div className=\"vtx-modal-maximizeIcon\">\r\n <p\r\n onClick={() => {\r\n setIsFull(!isFull);\r\n }}\r\n >\r\n {isFull ? <FullscreenExitOutlined /> : <FullscreenOutlined />}\r\n </p>\r\n </div>\r\n ) : null}\r\n {closable ? (\r\n <div className=\"vtx-modal-close\">\r\n <p onClick={onCancel}>\r\n {/* <Icon type=\"close\" /> */}\r\n <CloseOutlined />\r\n </p>\r\n </div>\r\n ) : (\r\n ''\r\n )}\r\n </div>\r\n );\r\n })();\r\n\r\n let bodyStyle = {\r\n ...props.bodyStyle,\r\n };\r\n\r\n /* 限制最大高度 */\r\n if (!isFull) {\r\n bodyStyle = {\r\n maxHeight: `${window.innerHeight * 0.7}px`,\r\n ...bodyStyle,\r\n };\r\n }\r\n\r\n const transformStyle = {\r\n transform: `translate(${dragArg.x_move}px,${dragArg.y_move}px)`,\r\n };\r\n\r\n const newProps = {\r\n maskClosable: false,\r\n destroyOnClose: true,\r\n width: 700,\r\n ...props,\r\n closable: false,\r\n title,\r\n wrapClassName: classnames(\r\n 'vtx-modal',\r\n wrapClassName,\r\n isFull ? 'vtx-modal-maxClass' : '',\r\n classId.current,\r\n ),\r\n bodyStyle,\r\n onCancel,\r\n style: {\r\n ...props.style,\r\n ...(isFull ? {} : transformStyle),\r\n },\r\n };\r\n\r\n return <Modal {...newProps}>{props.children}</Modal>;\r\n}\r\n\r\nVtxModal.info = Modal.info;\r\nVtxModal.success = Modal.success;\r\nVtxModal.error = Modal.error;\r\nVtxModal.warning = Modal.warning;\r\nVtxModal.confirm = Modal.confirm;\r\n\r\nVtxModal.propTypes = {\r\n visible: PropTypes.bool,\r\n wrapClassName: PropTypes.string,\r\n closable: PropTypes.bool,\r\n title: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\r\n maximize: PropTypes.bool,\r\n onModalResize: PropTypes.func,\r\n moveable: PropTypes.bool,\r\n onCancel: PropTypes.func,\r\n bodyStyle: PropTypes.object,\r\n style: PropTypes.object,\r\n children: PropTypes.node,\r\n defaultIsFull: PropTypes.bool,\r\n};\r\n\r\nVtxModal.Title = Title;\r\n\r\nconst size = {\r\n xsmall: 392,\r\n small: 500,\r\n middle: 744,\r\n large: 1096,\r\n};\r\n\r\nVtxModal.size = size;\r\n\r\nexport default VtxModal;\r\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;;AASA,SAASC,QAAT,CAAkBC,KAAlB,EAAyB;EACrB,gBAA4B,IAAAC,eAAA,EAAS,CAAC,CAACD,KAAK,CAACE,aAAjB,CAA5B;EAAA;EAAA,IAAOC,MAAP;EAAA,IAAeC,SAAf,iBADqB,CACwC;;;EAC7D,mBAA8B,IAAAC,wBAAA,EAAYb,WAAZ,CAA9B;EAAA;EAAA,IAAOc,OAAP;EAAA,IAAgBC,UAAhB,oBAFqB,CAEmC;;;EACxD,IAAMC,OAAO,GAAG,IAAAC,aAAA,EAAO,IAAIC,IAAJ,GAAWC,OAAX,KAAuBC,IAAI,CAACC,MAAL,EAA9B,CAAhB;EAEA,2BAOIb,KAPJ,CACIc,aADJ;EAAA,IACIA,aADJ,qCACoB,EADpB;EAAA,sBAOId,KAPJ,CAEIe,QAFJ;EAAA,IAEIA,QAFJ,gCAEe,IAFf;EAAA,mBAOIf,KAPJ,CAGIgB,KAHJ;EAAA,IAGIA,KAHJ,6BAGY,EAHZ;EAAA,sBAOIhB,KAPJ,CAIIiB,QAJJ;EAAA,IAIIA,QAJJ,gCAIe,KAJf;EAAA,IAKIC,aALJ,GAOIlB,KAPJ,CAKIkB,aALJ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OjBzD,QAAQ,EAAEoD,qBAAA,CAAUC,IAPH;EAQjB1B,QAAQ,EAAEyB,qBAAA,CAAUK,IARH;EASjBvB,SAAS,EAAEkB,qBAAA,CAAUM,MATJ;EAUjB1C,KAAK,EAAEoC,qBAAA,CAAUM,MAVA;EAWjBd,QAAQ,EAAEQ,qBAAA,CAAUO,IAXH;EAYjB5E,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';\
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-modal/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\
|
|
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,101 +1,101 @@
|
|
|
1
|
-
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
.vtx-modal-maxClass {
|
|
4
|
-
.ant-modal {
|
|
5
|
-
top: 0 !important;
|
|
6
|
-
left: 0 !important;
|
|
7
|
-
width: 100% !important;
|
|
8
|
-
height: 100% !important;
|
|
9
|
-
padding-bottom: 0 !important;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
.ant-modal-content {
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
.ant-modal-body {
|
|
17
|
-
flex: 1;
|
|
18
|
-
min-height: 0;
|
|
19
|
-
max-height: initial !important;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
.vtx-modal {
|
|
23
|
-
.ant-modal {
|
|
24
|
-
top: 10%;
|
|
25
|
-
padding-bottom: 0;
|
|
26
|
-
.ant-modal-content {
|
|
27
|
-
height: 100%;
|
|
28
|
-
.ant-modal-body {
|
|
29
|
-
max-height: e('calc(100% - 108px)');
|
|
30
|
-
padding: 20px 24px;
|
|
31
|
-
overflow: auto;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
.vtx-modal-title {
|
|
36
|
-
position: relative;
|
|
37
|
-
width: 100%;
|
|
38
|
-
.vtx-modal-title_name {
|
|
39
|
-
width: 100%;
|
|
40
|
-
color: @text-color;
|
|
41
|
-
}
|
|
42
|
-
.vtx-modal-close,
|
|
43
|
-
.vtx-modal-maximizeIcon {
|
|
44
|
-
position: absolute;
|
|
45
|
-
top: -13px;
|
|
46
|
-
right: -16px;
|
|
47
|
-
p {
|
|
48
|
-
position: absolute;
|
|
49
|
-
top: 0;
|
|
50
|
-
right: 0;
|
|
51
|
-
z-index: 10;
|
|
52
|
-
display: inline-block;
|
|
53
|
-
width: 36px;
|
|
54
|
-
height: 48px;
|
|
55
|
-
color: @text-color-secondary;
|
|
56
|
-
font-weight: 700;
|
|
57
|
-
line-height: 48px;
|
|
58
|
-
text-align: center;
|
|
59
|
-
text-decoration: none;
|
|
60
|
-
background: transparent;
|
|
61
|
-
border: 0;
|
|
62
|
-
outline: 0;
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
-webkit-transition: color 0.3s ease;
|
|
65
|
-
transition: color 0.3s ease;
|
|
66
|
-
&:hover {
|
|
67
|
-
color: @icon-color-hover;
|
|
68
|
-
text-decoration: none;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
.vtx-modal-maximizeIcon {
|
|
73
|
-
right: 20px;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.vtx-modal-header-title {
|
|
79
|
-
.vtx-modal-header-text {
|
|
80
|
-
font-weight: 400;
|
|
81
|
-
}
|
|
82
|
-
.vtx-modal-header-text when(@theme=dark) {
|
|
83
|
-
color: @text-color;
|
|
84
|
-
}
|
|
85
|
-
.vtx-modal-header-text when(@theme=default) {
|
|
86
|
-
color: fade(@black, 65%);
|
|
87
|
-
}
|
|
88
|
-
.vtx-modal-header-text + .vtx-modal-header-subtitle {
|
|
89
|
-
&::before {
|
|
90
|
-
margin: 0 4px;
|
|
91
|
-
font-weight: 400;
|
|
92
|
-
content: '>';
|
|
93
|
-
}
|
|
94
|
-
&::before when(@theme=dark) {
|
|
95
|
-
color: @text-color;
|
|
96
|
-
}
|
|
97
|
-
&::before when(@theme=default) {
|
|
98
|
-
color: fade(@black, 65%);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
.vtx-modal-maxClass {
|
|
4
|
+
.ant-modal {
|
|
5
|
+
top: 0 !important;
|
|
6
|
+
left: 0 !important;
|
|
7
|
+
width: 100% !important;
|
|
8
|
+
height: 100% !important;
|
|
9
|
+
padding-bottom: 0 !important;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
.ant-modal-content {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.ant-modal-body {
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-height: 0;
|
|
19
|
+
max-height: initial !important;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.vtx-modal {
|
|
23
|
+
.ant-modal {
|
|
24
|
+
top: 10%;
|
|
25
|
+
padding-bottom: 0;
|
|
26
|
+
.ant-modal-content {
|
|
27
|
+
height: 100%;
|
|
28
|
+
.ant-modal-body {
|
|
29
|
+
max-height: e('calc(100% - 108px)');
|
|
30
|
+
padding: 20px 24px;
|
|
31
|
+
overflow: auto;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
.vtx-modal-title {
|
|
36
|
+
position: relative;
|
|
37
|
+
width: 100%;
|
|
38
|
+
.vtx-modal-title_name {
|
|
39
|
+
width: 100%;
|
|
40
|
+
color: @text-color;
|
|
41
|
+
}
|
|
42
|
+
.vtx-modal-close,
|
|
43
|
+
.vtx-modal-maximizeIcon {
|
|
44
|
+
position: absolute;
|
|
45
|
+
top: -13px;
|
|
46
|
+
right: -16px;
|
|
47
|
+
p {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
z-index: 10;
|
|
52
|
+
display: inline-block;
|
|
53
|
+
width: 36px;
|
|
54
|
+
height: 48px;
|
|
55
|
+
color: @text-color-secondary;
|
|
56
|
+
font-weight: 700;
|
|
57
|
+
line-height: 48px;
|
|
58
|
+
text-align: center;
|
|
59
|
+
text-decoration: none;
|
|
60
|
+
background: transparent;
|
|
61
|
+
border: 0;
|
|
62
|
+
outline: 0;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
-webkit-transition: color 0.3s ease;
|
|
65
|
+
transition: color 0.3s ease;
|
|
66
|
+
&:hover {
|
|
67
|
+
color: @icon-color-hover;
|
|
68
|
+
text-decoration: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
.vtx-modal-maximizeIcon {
|
|
73
|
+
right: 20px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.vtx-modal-header-title {
|
|
79
|
+
.vtx-modal-header-text {
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
}
|
|
82
|
+
.vtx-modal-header-text when(@theme=dark) {
|
|
83
|
+
color: @text-color;
|
|
84
|
+
}
|
|
85
|
+
.vtx-modal-header-text when(@theme=default) {
|
|
86
|
+
color: fade(@black, 65%);
|
|
87
|
+
}
|
|
88
|
+
.vtx-modal-header-text + .vtx-modal-header-subtitle {
|
|
89
|
+
&::before {
|
|
90
|
+
margin: 0 4px;
|
|
91
|
+
font-weight: 400;
|
|
92
|
+
content: '>';
|
|
93
|
+
}
|
|
94
|
+
&::before when(@theme=dark) {
|
|
95
|
+
color: @text-color;
|
|
96
|
+
}
|
|
97
|
+
&::before when(@theme=default) {
|
|
98
|
+
color: fade(@black, 65%);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","names":["Content","props","id","className","style","relative","scrollY","height","contentClass","classnames","newStyle","children","propTypes","PropTypes","string","object","bool","oneOfType","number","node"],"sources":["vtx-page-layout/Content.jsx"],"sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"file":"Content.js","names":["Content","props","id","className","style","relative","scrollY","height","contentClass","classnames","newStyle","children","propTypes","PropTypes","string","object","bool","oneOfType","number","node"],"sources":["vtx-page-layout/Content.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nfunction Content(props) {\n const { id, className, style, relative = false, scrollY = false, height } = props;\n\n const contentClass = classnames(\n {\n ['vtx-content-absolute']: !relative,\n ['vtx-content-relative']: relative,\n ['vtx-content-scroll-y']: scrollY,\n },\n className,\n );\n\n let newStyle = style;\n if ('height' in props) {\n newStyle = {\n ...newStyle,\n height: height,\n };\n }\n\n return (\n <div id={id} style={newStyle} className={contentClass}>\n {props.children}\n </div>\n );\n}\n\nexport default Content;\n\nContent.propTypes = {\n id: PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n relative: PropTypes.bool,\n scrollY: PropTypes.bool,\n height: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BAAA,CAAUC,MAAX,EAAmBD,qBAAA,CAAUK,MAA7B,CAApB,CANQ;EAOhBP,QAAQ,EAAEE,qBAAA,CAAUM;AAPJ,CAApB"}
|
|
@@ -48,9 +48,9 @@ exports.StoreCtx = StoreCtx;
|
|
|
48
48
|
var pagePaddingTop = 16;
|
|
49
49
|
var searchMarginBottom = 16; // eslint-disable-next-line valid-jsdoc
|
|
50
50
|
|
|
51
|
-
/**
|
|
52
|
-
* 页面
|
|
53
|
-
* @param {*} props
|
|
51
|
+
/**
|
|
52
|
+
* 页面
|
|
53
|
+
* @param {*} props
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
var Page = function Page(props) {
|
|
@@ -84,17 +84,17 @@ Page.propTypes = {
|
|
|
84
84
|
children: _propTypes["default"].node,
|
|
85
85
|
onSearchCollapse: _propTypes["default"].func
|
|
86
86
|
};
|
|
87
|
-
/**
|
|
88
|
-
* 搜索
|
|
87
|
+
/**
|
|
88
|
+
* 搜索
|
|
89
89
|
*/
|
|
90
90
|
|
|
91
91
|
var Search = (0, _container["default"])({
|
|
92
92
|
componentClass: 'vtx-table-search'
|
|
93
93
|
})(_Basic["default"]); // eslint-disable-next-line valid-jsdoc
|
|
94
94
|
|
|
95
|
-
/**
|
|
96
|
-
* 内容
|
|
97
|
-
* @param {*} props
|
|
95
|
+
/**
|
|
96
|
+
* 内容
|
|
97
|
+
* @param {*} props
|
|
98
98
|
*/
|
|
99
99
|
|
|
100
100
|
var Content = function Content(props) {
|
|
@@ -121,8 +121,8 @@ Content.propTypes = {
|
|
|
121
121
|
plusTop: _propTypes["default"].number
|
|
122
122
|
}; // eslint-disable-next-line valid-jsdoc
|
|
123
123
|
|
|
124
|
-
/**
|
|
125
|
-
* 表格布局
|
|
124
|
+
/**
|
|
125
|
+
* 表格布局
|
|
126
126
|
*/
|
|
127
127
|
|
|
128
128
|
var Table = function Table(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableLayout.js","names":["StoreCtx","createContext","pagePaddingTop","searchMarginBottom","Page","props","useState","searchHeight","setSearchHeight","onSearchCollapse","searchCollapseEvent$","useEventEmitter","store","onCollapse","height","emit","classsnames","className","style","children","propTypes","PropTypes","object","string","node","func","Search","container","componentClass","Basic","Content","plusTop","useContext","top","number","Table","React","cloneElement","Card"],"sources":["vtx-page-layout/TableLayout.jsx"],"sourcesContent":["import React, { useState, useContext } from 'react';\
|
|
1
|
+
{"version":3,"file":"TableLayout.js","names":["StoreCtx","createContext","pagePaddingTop","searchMarginBottom","Page","props","useState","searchHeight","setSearchHeight","onSearchCollapse","searchCollapseEvent$","useEventEmitter","store","onCollapse","height","emit","classsnames","className","style","children","propTypes","PropTypes","object","string","node","func","Search","container","componentClass","Basic","Content","plusTop","useContext","top","number","Table","React","cloneElement","Card"],"sources":["vtx-page-layout/TableLayout.jsx"],"sourcesContent":["import React, { useState, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classsnames from 'classnames';\nimport { createContext } from 'react';\nimport useEventEmitter from 'ahooks/es/useEventEmitter';\nimport container from './container';\nimport Basic from './Basic';\nexport const StoreCtx = createContext({});\n\nconst pagePaddingTop = 16;\nconst searchMarginBottom = 16;\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 页面\n * @param {*} props\n */\nconst Page = props => {\n const [searchHeight, setSearchHeight] = useState(64);\n const { onSearchCollapse } = props;\n const searchCollapseEvent$ = useEventEmitter();\n const store = {\n searchHeight,\n searchCollapseEvent$,\n onCollapse(height) {\n setSearchHeight(height);\n onSearchCollapse && onSearchCollapse(height);\n searchCollapseEvent$.emit();\n },\n };\n return (\n <StoreCtx.Provider value={store}>\n <div className={classsnames('vtx-page--table', props.className)} style={props.style}>\n {props.children}\n </div>\n </StoreCtx.Provider>\n );\n};\n\nPage.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n onSearchCollapse: PropTypes.func,\n};\n\n/**\n * 搜索\n */\nconst Search = container({ componentClass: 'vtx-table-search' })(Basic);\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 内容\n * @param {*} props\n */\nconst Content = props => {\n const { className, style, plusTop=0 } = props;\n const { searchHeight } = useContext(StoreCtx);\n return (\n <div\n className={classsnames('vtx-table-content', className)}\n style={{\n top: pagePaddingTop + searchMarginBottom + searchHeight + plusTop,\n ...style,\n }}\n >\n {props.children}\n </div>\n );\n};\n\nContent.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n plusTop: PropTypes.number,\n};\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 表格布局\n */\nconst Table = props => {\n const { className, style } = props;\n const { searchCollapseEvent$ } = useContext(StoreCtx);\n\n return (\n <div className={classsnames('vtx-table-wrap', className)} style={style}>\n {React.cloneElement(props.children, {\n ...props.children.props,\n searchCollapseEvent$,\n })}\n </div>\n );\n};\n\nTable.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n};\n\nconst Card = props => {\n const { className, style } = props;\n\n return (\n <div style={style} className={classsnames('vtx-table-card', className)}>\n {props.children}\n </div>\n );\n};\n\nCard.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n};\n\nexport default { Page, Search, Content, Table: container()(Table), Card };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AACO,IAAMA,QAAQ,gBAAG,IAAAC,oBAAA,EAAc,EAAd,CAAjB;;AAEP,IAAMC,cAAc,GAAG,EAAvB;AACA,IAAMC,kBAAkB,GAAG,EAA3B,C,CAEA;;AACA;AACA;AACA;AACA;;AACA,IAAMC,IAAI,GAAG,SAAPA,IAAO,CAAAC,KAAK,EAAI;EAClB,gBAAwC,IAAAC,eAAA,EAAS,EAAT,CAAxC;EAAA;EAAA,IAAOC,YAAP;EAAA,IAAqBC,eAArB;;EACA,IAAQC,gBAAR,GAA6BJ,KAA7B,CAAQI,gBAAR;EACA,IA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,KAA7B,CAAmBa,KAAnB;EAEA,oBACI;IAAK,KAAK,EAAEA,KAAZ;IAAmB,SAAS,EAAE,IAAAF,sBAAA,EAAY,gBAAZ,EAA8BC,SAA9B;EAA9B,GACKZ,KAAK,CAACc,QADX,CADJ;AAKH,CARD;;AAUAmB,IAAI,CAAClB,SAAL,GAAiB;EACbF,KAAK,EAAEG,qBAAA,CAAUC,MADJ;EAEbL,SAAS,EAAEI,qBAAA,CAAUE,MAFR;EAGbJ,QAAQ,EAAEE,qBAAA,CAAUG;AAHP,CAAjB;eAMe;EAAEpB,IAAI,EAAJA,IAAF;EAAQsB,MAAM,EAANA,MAAR;EAAgBI,OAAO,EAAPA,OAAhB;EAAyBK,KAAK,EAAE,IAAAR,qBAAA,IAAYQ,KAAZ,CAAhC;EAAoDG,IAAI,EAAJA;AAApD,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableWrap.js","names":["TableWrap","props","relative","height","style","className","tableClass","classnames","newStyle","children","propTypes","PropTypes","object","string","bool","number","node"],"sources":["vtx-page-layout/TableWrap.jsx"],"sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"file":"TableWrap.js","names":["TableWrap","props","relative","height","style","className","tableClass","classnames","newStyle","children","propTypes","PropTypes","object","string","bool","number","node"],"sources":["vtx-page-layout/TableWrap.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nfunction TableWrap(props) {\n const { relative, height, style, className } = props;\n\n const tableClass = classnames(\n {\n ['vtx-table-wrapper-absolute']: !relative,\n ['vtx-table-wrapper-relative']: relative,\n },\n className,\n );\n\n let newStyle = style;\n if (relative && 'height' in props) {\n newStyle = {\n ...style,\n height: height,\n };\n }\n\n return (\n <div className={tableClass} style={newStyle}>\n {props.children}\n </div>\n );\n}\n\nexport default TableWrap;\n\nTableWrap.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n relative: PropTypes.bool,\n height: PropTypes.number,\n children: PropTypes.node,\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAEA,SAASA,SAAT,CAAmBC,KAAnB,EAA0B;EAAA;;EACtB,IAAQC,QAAR,GAA+CD,KAA/C,CAAQC,QAAR;EAAA,IAAkBC,MAAlB,GAA+CF,KAA/C,CAAkBE,MAAlB;EAAA,IAA0BC,KAA1B,GAA+CH,KAA/C,CAA0BG,KAA1B;EAAA,IAAiCC,SAAjC,GAA+CJ,KAA/C,CAAiCI,SAAjC;EAEA,IAAMC,UAAU,GAAG,IAAAC,uBAAA,kDAEV,4BAFU,EAEqB,CAACL,QAFtB,gCAGV,4BAHU,EAGqBA,QAHrB,iBAKfG,SALe,CAAnB;EAQA,IAAIG,QAAQ,GAAGJ,KAAf;;EACA,IAAIF,QAAQ,IAAI,YAAYD,KAA5B,EAAmC;IAC/BO,QAAQ,mCACDJ,KADC;MAEJD,MAAM,EAAEA;IAFJ,EAAR;EAIH;;EAED,oBACI;IAAK,SAAS,EAAEG,UAAhB;IAA4B,KAAK,EAAEE;EAAnC,GACKP,KAAK,CAACQ,QADX,CADJ;AAKH;;eAEcT,S;;AAEfA,SAAS,CAACU,SAAV,GAAsB;EAClBN,KAAK,EAAEO,qBAAA,CAAUC,MADC;EAElBP,SAAS,EAAEM,qBAAA,CAAUE,MAFH;EAGlBX,QAAQ,EAAES,qBAAA,CAAUG,IAHF;EAIlBX,MAAM,EAAEQ,qBAAA,CAAUI,MAJA;EAKlBN,QAAQ,EAAEE,qBAAA,CAAUK;AALF,CAAtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","names":["getDisplayName","WrappedComponend","displayName","name","Container","params","componentClass","HOCFactory","props","style","className","top","space","wrapClass","classnames","newStyle","padding","newProps","React","Component","PropTypes","number","string","object"],"sources":["vtx-page-layout/container.jsx"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"container.js","names":["getDisplayName","WrappedComponend","displayName","name","Container","params","componentClass","HOCFactory","props","style","className","top","space","wrapClass","classnames","newStyle","padding","newProps","React","Component","PropTypes","number","string","object"],"sources":["vtx-page-layout/container.jsx"],"sourcesContent":["/**\n * 高阶组件\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nfunction getDisplayName(WrappedComponend) {\n return WrappedComponend.displayName || WrappedComponend.name || 'Component';\n}\n\nfunction Container(params = {}) {\n const { componentClass } = params;\n\n return function HOCFactory(WrappedComponend) {\n return class HOC extends React.Component {\n static displayName = `HOC(${getDisplayName(WrappedComponend)})`;\n\n static propTypes = {\n top: PropTypes.number,\n space: PropTypes.number || PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n };\n\n render() {\n const { style, className, top, space } = this.props;\n\n const wrapClass = classnames(\n {\n [componentClass]: true,\n },\n className,\n );\n\n const newStyle = {\n top,\n padding: space,\n ...style,\n };\n\n const newProps = {\n className: wrapClass,\n style: newStyle,\n };\n return <WrappedComponend {...this.props} {...newProps} />;\n }\n };\n };\n}\n\nexport default Container;\n"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAASA,cAAT,CAAwBC,gBAAxB,EAA0C;EACtC,OAAOA,gBAAgB,CAACC,WAAjB,IAAgCD,gBAAgB,CAACE,IAAjD,IAAyD,WAAhE;AACH;;AAED,SAASC,SAAT,GAAgC;EAAA,IAAbC,MAAa,uEAAJ,EAAI;EAC5B,IAAQC,cAAR,GAA2BD,MAA3B,CAAQC,cAAR;EAEA,OAAO,SAASC,UAAT,CAAoBN,gBAApB,EAAsC;IAAA;;IACzC;MAAA;;MAAA;;MAAA;QAAA;;QAAA;MAAA;;MAAA;QAAA;QAAA,OAUI,kBAAS;UACL,kBAAyC,KAAKO,KAA9C;UAAA,IAAQC,KAAR,eAAQA,KAAR;UAAA,IAAeC,SAAf,eAAeA,SAAf;UAAA,IAA0BC,GAA1B,eAA0BA,GAA1B;UAAA,IAA+BC,K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