@vtx/components 3.1.47 → 3.1.50
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-combogrid/style/index.less +29 -29
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/index.js +12 -9
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +2 -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/index.js +8 -5
- package/lib/vtx-export/index.js.map +1 -1
- 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 +4 -3
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +6 -5
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +38 -9
- package/lib/vtx-import2/index.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-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-rps-frame/index.js +18 -8
- package/lib/vtx-rps-frame/index.js.map +1 -1
- 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/index.js +6 -3
- package/lib/vtx-search/index.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/style/index.less +83 -83
- 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 +85 -14
- 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 +99 -99
- package/package.json +126 -126
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
.vtx-demo-modal {
|
|
4
|
-
position: relative;
|
|
5
|
-
background-color: @component-background;
|
|
6
|
-
background-clip: padding-box;
|
|
7
|
-
border: 1px solid @border-color-base;
|
|
8
|
-
border-radius: 4px;
|
|
9
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 15%);
|
|
10
|
-
pointer-events: auto;
|
|
11
|
-
&-header {
|
|
12
|
-
padding: 16px 24px;
|
|
13
|
-
color: rgba(0, 0, 0, 0.65);
|
|
14
|
-
background: @component-background;
|
|
15
|
-
border-bottom: 1px solid @border-color-base;
|
|
16
|
-
border-radius: 4px 4px 0 0;
|
|
17
|
-
}
|
|
18
|
-
&-title {
|
|
19
|
-
margin: 0;
|
|
20
|
-
color: @text-color;
|
|
21
|
-
font-weight: 500;
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
line-height: 22px;
|
|
24
|
-
word-wrap: break-word;
|
|
25
|
-
}
|
|
26
|
-
&-body {
|
|
27
|
-
padding: 20px 24px;
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
line-height: 1.5;
|
|
30
|
-
word-wrap: break-word;
|
|
31
|
-
}
|
|
32
|
-
&-footer {
|
|
33
|
-
padding: 10px 16px;
|
|
34
|
-
text-align: right;
|
|
35
|
-
background: transparent;
|
|
36
|
-
border-top: 1px solid @border-color-base;
|
|
37
|
-
border-radius: 0 0 4px 4px;
|
|
38
|
-
button + button {
|
|
39
|
-
margin-bottom: 0;
|
|
40
|
-
margin-left: 8px;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
.vtx-demo-modal {
|
|
4
|
+
position: relative;
|
|
5
|
+
background-color: @component-background;
|
|
6
|
+
background-clip: padding-box;
|
|
7
|
+
border: 1px solid @border-color-base;
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 15%);
|
|
10
|
+
pointer-events: auto;
|
|
11
|
+
&-header {
|
|
12
|
+
padding: 16px 24px;
|
|
13
|
+
color: rgba(0, 0, 0, 0.65);
|
|
14
|
+
background: @component-background;
|
|
15
|
+
border-bottom: 1px solid @border-color-base;
|
|
16
|
+
border-radius: 4px 4px 0 0;
|
|
17
|
+
}
|
|
18
|
+
&-title {
|
|
19
|
+
margin: 0;
|
|
20
|
+
color: @text-color;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
line-height: 22px;
|
|
24
|
+
word-wrap: break-word;
|
|
25
|
+
}
|
|
26
|
+
&-body {
|
|
27
|
+
padding: 20px 24px;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
line-height: 1.5;
|
|
30
|
+
word-wrap: break-word;
|
|
31
|
+
}
|
|
32
|
+
&-footer {
|
|
33
|
+
padding: 10px 16px;
|
|
34
|
+
text-align: right;
|
|
35
|
+
background: transparent;
|
|
36
|
+
border-top: 1px solid @border-color-base;
|
|
37
|
+
border-radius: 0 0 4px 4px;
|
|
38
|
+
button + button {
|
|
39
|
+
margin-bottom: 0;
|
|
40
|
+
margin-left: 8px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["VtxFormLayout","props","cols","labelColSpan","mode","layout","card","skeleton","store","defaultSkeleton","loading","title","paragraph","width","rows","classnames","merge","children","propTypes","PropTypes","number","oneOf","node","bool","object","Row","FormItem","Card","Pane","Divider"],"sources":["vtx-form-layout/index.jsx"],"sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"file":"index.js","names":["VtxFormLayout","props","cols","labelColSpan","mode","layout","card","skeleton","store","defaultSkeleton","loading","title","paragraph","width","rows","classnames","merge","children","propTypes","PropTypes","number","oneOf","node","bool","object","Row","FormItem","Card","Pane","Divider"],"sources":["vtx-form-layout/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport merge from 'lodash.merge';\nimport Skeleton from 'antd/lib/skeleton';\nimport Row from './Row';\nimport FormItem from './FormItem';\nimport Card from './Card';\nimport Pane from './Pane';\nimport Divider from './Divider';\nimport { StoreCtx } from './context';\n\nfunction VtxFormLayout(props) {\n const { cols = 2, labelColSpan = 8, mode, layout = 'vertical', card, skeleton } = props;\n const store = {\n cols,\n labelColSpan,\n mode,\n layout,\n };\n const defaultSkeleton = {\n loading: false,\n title: false,\n paragraph: {\n width: '100%',\n rows: 4,\n },\n };\n return (\n <StoreCtx.Provider value={store}>\n <div\n className={classnames('vtx-form-layout', {\n 'vtx-form-layout-vertical': layout === 'vertical' && mode !== 'view',\n 'vtx-form-layout-view': mode === 'view',\n 'vtx-form-layout-has-card': card,\n })}\n >\n <Skeleton {...merge(defaultSkeleton, skeleton)}>{props.children}</Skeleton>\n </div>\n </StoreCtx.Provider>\n );\n}\n\nVtxFormLayout.propTypes = {\n cols: PropTypes.number,\n labelColSpan: PropTypes.number,\n mode: PropTypes.oneOf(['view']),\n layout: PropTypes.oneOf(['horizontal', 'vertical']),\n children: PropTypes.node,\n card: PropTypes.bool,\n skeleton: PropTypes.object,\n};\n\nVtxFormLayout.Row = Row;\nVtxFormLayout.FormItem = FormItem;\nVtxFormLayout.Card = Card;\nVtxFormLayout.Pane = Pane;\nVtxFormLayout.Divider = Divider;\n\nexport default VtxFormLayout;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;EAC1B,kBAAkFA,KAAlF,CAAQC,IAAR;EAAA,IAAQA,IAAR,4BAAe,CAAf;EAAA,0BAAkFD,KAAlF,CAAkBE,YAAlB;EAAA,IAAkBA,YAAlB,oCAAiC,CAAjC;EAAA,IAAoCC,IAApC,GAAkFH,KAAlF,CAAoCG,IAApC;EAAA,oBAAkFH,KAAlF,CAA0CI,MAA1C;EAAA,IAA0CA,MAA1C,8BAAmD,UAAnD;EAAA,IAA+DC,IAA/D,GAAkFL,KAAlF,CAA+DK,IAA/D;EAAA,IAAqEC,QAArE,GAAkFN,KAAlF,CAAqEM,QAArE;EACA,IAAMC,KAAK,GAAG;IACVN,IAAI,EAAJA,IADU;IAEVC,YAAY,EAAZA,YAFU;IAGVC,IAAI,EAAJA,IAHU;IAIVC,MAAM,EAANA;EAJU,CAAd;EAMA,IAAMI,eAAe,GAAG;IACpBC,OAAO,EAAE,KADW;IAEpBC,KAAK,EAAE,KAFa;IAGpBC,SAAS,EAAE;MACPC,KAAK,EAAE,MADA;MAEPC,IAAI,EAAE;IAFC;EAHS,CAAxB;EAQA,oBACI,gCAAC,iBAAD,CAAU,QAAV;IAAmB,KAAK,EAAEN;EAA1B,gBACI;IACI,SAAS,EAAE,IAAAO,sBAAA,EAAW,iBAAX,EAA8B;MACrC,4BAA4BV,MAAM,KAAK,UAAX,IAAyBD,IAAI,KAAK,MADzB;MAErC,wBAAwBA,IAAI,KAAK,MAFI;MAGrC,4BAA4BE;IAHS,CAA9B;EADf,gBAOI,gCAAC,oBAAD,EAAc,IAAAU,kBAAA,EAAMP,eAAN,EAAuBF,QAAvB,CAAd,EAAiDN,KAAK,CAACgB,QAAvD,CAPJ,CADJ,CADJ;AAaH;;AAEDjB,aAAa,CAACkB,SAAd,GAA0B;EACtBhB,IAAI,EAAEiB,qBAAA,CAAUC,MADM;EAEtBjB,YAAY,EAAEgB,qBAAA,CAAUC,MAFF;EAGtBhB,IAAI,EAAEe,qBAAA,CAAUE,KAAV,CAAgB,CAAC,MAAD,CAAhB,CAHgB;EAItBhB,MAAM,EAAEc,qBAAA,CAAUE,KAAV,CAAgB,CAAC,YAAD,EAAe,UAAf,CAAhB,CAJc;EAKtBJ,QAAQ,EAAEE,qBAAA,CAAUG,IALE;EAMtBhB,IAAI,EAAEa,qBAAA,CAAUI,IANM;EAOtBhB,QAAQ,EAAEY,qBAAA,CAAUK;AAPE,CAA1B;AAUAxB,aAAa,CAACyB,GAAd,GAAoBA,eAApB;AACAzB,aAAa,CAAC0B,QAAd,GAAyBA,oBAAzB;AACA1B,aAAa,CAAC2B,IAAd,GAAqBA,gBAArB;AACA3B,aAAa,CAAC4B,IAAd,GAAqBA,gBAArB;AACA5B,aAAa,CAAC6B,OAAd,GAAwBA,mBAAxB;eAEe7B,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-form-layout/style/index.js"],"sourcesContent":["import 'antd/lib/row/style';\
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-form-layout/style/index.js"],"sourcesContent":["import 'antd/lib/row/style';\nimport 'antd/lib/col/style';\nimport 'antd/lib/form/style';\nimport 'antd/lib/tooltip/style';\nimport 'antd/lib/card/style';\nimport 'antd/lib/divider/style';\nimport 'antd/lib/skeleton/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-form-layout/style/index.js"],"sourcesContent":["import 'antd/lib/row/style';\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-form-layout/style/index.js"],"sourcesContent":["import 'antd/lib/row/style';\nimport 'antd/lib/col/style';\nimport 'antd/lib/form/style';\nimport 'antd/lib/tooltip/style';\nimport 'antd/lib/card/style';\nimport 'antd/lib/divider/style';\nimport 'antd/lib/skeleton/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
|
|
@@ -1,216 +1,216 @@
|
|
|
1
|
-
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
@view-item-margin-bottom: 16px;
|
|
4
|
-
|
|
5
|
-
.vtx-form-layout {
|
|
6
|
-
position: relative;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-flow: row wrap;
|
|
9
|
-
width: 100%;
|
|
10
|
-
padding: 0 @padding-lg;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
.vtx-form-item {
|
|
13
|
-
.ant-form-item-label {
|
|
14
|
-
text-overflow: ellipsis;
|
|
15
|
-
label::after {
|
|
16
|
-
content: '';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
&-vertical {
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
.ant-form-item-row {
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
margin-bottom: 20px;
|
|
24
|
-
}
|
|
25
|
-
.ant-form-item-label,
|
|
26
|
-
.ant-form-item-control {
|
|
27
|
-
line-height: @line-height-base;
|
|
28
|
-
}
|
|
29
|
-
.ant-form-item-label {
|
|
30
|
-
margin-bottom: 8px;
|
|
31
|
-
padding: 0 !important;
|
|
32
|
-
white-space: initial;
|
|
33
|
-
text-align: left;
|
|
34
|
-
label {
|
|
35
|
-
height: auto;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
.ant-form-item-explain {
|
|
40
|
-
font-size: @font-size-sm;
|
|
41
|
-
}
|
|
42
|
-
&--inline {
|
|
43
|
-
flex: none;
|
|
44
|
-
flex-direction: row;
|
|
45
|
-
flex-wrap: nowrap;
|
|
46
|
-
margin-right: 16px;
|
|
47
|
-
margin-bottom: @view-item-margin-bottom !important;
|
|
48
|
-
row-gap: 0;
|
|
49
|
-
.ant-form-item-control-input {
|
|
50
|
-
min-height: auto;
|
|
51
|
-
}
|
|
52
|
-
.ant-form-item-label {
|
|
53
|
-
flex: none;
|
|
54
|
-
margin-bottom: 0;
|
|
55
|
-
& > label {
|
|
56
|
-
height: auto;
|
|
57
|
-
color: @text-color;
|
|
58
|
-
}
|
|
59
|
-
label::after {
|
|
60
|
-
content: ':';
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
&--view {
|
|
65
|
-
.ant-form-item-label,
|
|
66
|
-
.ant-form-item-control {
|
|
67
|
-
line-height: @line-height-base;
|
|
68
|
-
}
|
|
69
|
-
.ant-form-item-label {
|
|
70
|
-
& > label {
|
|
71
|
-
height: auto;
|
|
72
|
-
color: @text-color;
|
|
73
|
-
}
|
|
74
|
-
label::after {
|
|
75
|
-
content: ':';
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
.ant-form-item-control {
|
|
79
|
-
color: @text-color;
|
|
80
|
-
.ant-form-item-control-input {
|
|
81
|
-
min-height: auto;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
.vtx-form-item-col {
|
|
87
|
-
.ant-form-item {
|
|
88
|
-
margin-bottom: 20px;
|
|
89
|
-
}
|
|
90
|
-
.vtx-form-item--view {
|
|
91
|
-
margin-bottom: 0;
|
|
92
|
-
}
|
|
93
|
-
.ant-form-item-with-help {
|
|
94
|
-
margin-bottom: 0;
|
|
95
|
-
}
|
|
96
|
-
.ant-form-item-explain {
|
|
97
|
-
min-height: 20px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
.vtx-form-card {
|
|
101
|
-
position: relative;
|
|
102
|
-
width: 100%;
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
&-expand-icon {
|
|
105
|
-
color: fade(@text-color, 75%);
|
|
106
|
-
transition: transform 0.24s, -webkit-transform 0.24s;
|
|
107
|
-
}
|
|
108
|
-
.ant-card-body {
|
|
109
|
-
padding: 0;
|
|
110
|
-
}
|
|
111
|
-
.ant-card-head-wrapper,
|
|
112
|
-
.ant-card-head-title {
|
|
113
|
-
font-weight: bold;
|
|
114
|
-
line-height: 1;
|
|
115
|
-
}
|
|
116
|
-
&-content {
|
|
117
|
-
display: flex;
|
|
118
|
-
flex-flow: row wrap;
|
|
119
|
-
padding: 20px 24px;
|
|
120
|
-
padding-bottom: 0;
|
|
121
|
-
&::after {
|
|
122
|
-
clear: both;
|
|
123
|
-
}
|
|
124
|
-
&::before,
|
|
125
|
-
&::after {
|
|
126
|
-
display: table;
|
|
127
|
-
content: '';
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
&-content-hide {
|
|
131
|
-
display: none;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
.vtx-form-card + .vtx-form-card {
|
|
135
|
-
margin-top: 20px;
|
|
136
|
-
}
|
|
137
|
-
.vtx-form-pane {
|
|
138
|
-
position: relative;
|
|
139
|
-
box-sizing: border-box;
|
|
140
|
-
width: 100%;
|
|
141
|
-
&::after {
|
|
142
|
-
clear: both;
|
|
143
|
-
}
|
|
144
|
-
&::before,
|
|
145
|
-
&::after {
|
|
146
|
-
display: table;
|
|
147
|
-
content: '';
|
|
148
|
-
}
|
|
149
|
-
&-title {
|
|
150
|
-
margin-bottom: 16px;
|
|
151
|
-
overflow: hidden;
|
|
152
|
-
color: @text-color;
|
|
153
|
-
font-weight: 500;
|
|
154
|
-
line-height: @line-height-base;
|
|
155
|
-
list-style: none;
|
|
156
|
-
}
|
|
157
|
-
&-content {
|
|
158
|
-
display: flex;
|
|
159
|
-
flex-flow: row wrap;
|
|
160
|
-
&::after {
|
|
161
|
-
clear: both;
|
|
162
|
-
}
|
|
163
|
-
&::before,
|
|
164
|
-
&::after {
|
|
165
|
-
display: table;
|
|
166
|
-
content: '';
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
.vtx-form-divider {
|
|
171
|
-
margin: 0;
|
|
172
|
-
margin-bottom: 20px;
|
|
173
|
-
&--small {
|
|
174
|
-
margin-bottom: 16px;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
.vtx-form-tabs {
|
|
178
|
-
width: 100%;
|
|
179
|
-
.ant-tabs-bar {
|
|
180
|
-
padding-right: @padding-sm;
|
|
181
|
-
padding-left: @padding-sm;
|
|
182
|
-
border-bottom: none;
|
|
183
|
-
}
|
|
184
|
-
.ant-tabs-tab {
|
|
185
|
-
padding: 5px 0 10px 0;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
&-vertical {
|
|
189
|
-
padding: 0 @padding-sm;
|
|
190
|
-
.vtx-form-item-col {
|
|
191
|
-
padding-right: @padding-sm;
|
|
192
|
-
padding-left: @padding-sm;
|
|
193
|
-
}
|
|
194
|
-
.vtx-form-card-content {
|
|
195
|
-
padding: 20px @padding-sm;
|
|
196
|
-
padding-bottom: 0;
|
|
197
|
-
}
|
|
198
|
-
.vtx-form-pane-title {
|
|
199
|
-
padding: 0 @padding-sm;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
&-has-card {
|
|
203
|
-
padding: 0;
|
|
204
|
-
.vtx-form-tabs .ant-tabs-bar {
|
|
205
|
-
padding: 0 @padding-lg;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
&-view {
|
|
209
|
-
.vtx-form-item-col {
|
|
210
|
-
margin-bottom: @view-item-margin-bottom;
|
|
211
|
-
}
|
|
212
|
-
.vtx-form-divider {
|
|
213
|
-
margin-bottom: @view-item-margin-bottom;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
@view-item-margin-bottom: 16px;
|
|
4
|
+
|
|
5
|
+
.vtx-form-layout {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-flow: row wrap;
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding: 0 @padding-lg;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
.vtx-form-item {
|
|
13
|
+
.ant-form-item-label {
|
|
14
|
+
text-overflow: ellipsis;
|
|
15
|
+
label::after {
|
|
16
|
+
content: '';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
&-vertical {
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
.ant-form-item-row {
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
margin-bottom: 20px;
|
|
24
|
+
}
|
|
25
|
+
.ant-form-item-label,
|
|
26
|
+
.ant-form-item-control {
|
|
27
|
+
line-height: @line-height-base;
|
|
28
|
+
}
|
|
29
|
+
.ant-form-item-label {
|
|
30
|
+
margin-bottom: 8px;
|
|
31
|
+
padding: 0 !important;
|
|
32
|
+
white-space: initial;
|
|
33
|
+
text-align: left;
|
|
34
|
+
label {
|
|
35
|
+
height: auto;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.ant-form-item-explain {
|
|
40
|
+
font-size: @font-size-sm;
|
|
41
|
+
}
|
|
42
|
+
&--inline {
|
|
43
|
+
flex: none;
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
flex-wrap: nowrap;
|
|
46
|
+
margin-right: 16px;
|
|
47
|
+
margin-bottom: @view-item-margin-bottom !important;
|
|
48
|
+
row-gap: 0;
|
|
49
|
+
.ant-form-item-control-input {
|
|
50
|
+
min-height: auto;
|
|
51
|
+
}
|
|
52
|
+
.ant-form-item-label {
|
|
53
|
+
flex: none;
|
|
54
|
+
margin-bottom: 0;
|
|
55
|
+
& > label {
|
|
56
|
+
height: auto;
|
|
57
|
+
color: @text-color;
|
|
58
|
+
}
|
|
59
|
+
label::after {
|
|
60
|
+
content: ':';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
&--view {
|
|
65
|
+
.ant-form-item-label,
|
|
66
|
+
.ant-form-item-control {
|
|
67
|
+
line-height: @line-height-base;
|
|
68
|
+
}
|
|
69
|
+
.ant-form-item-label {
|
|
70
|
+
& > label {
|
|
71
|
+
height: auto;
|
|
72
|
+
color: @text-color;
|
|
73
|
+
}
|
|
74
|
+
label::after {
|
|
75
|
+
content: ':';
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.ant-form-item-control {
|
|
79
|
+
color: @text-color;
|
|
80
|
+
.ant-form-item-control-input {
|
|
81
|
+
min-height: auto;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
.vtx-form-item-col {
|
|
87
|
+
.ant-form-item {
|
|
88
|
+
margin-bottom: 20px;
|
|
89
|
+
}
|
|
90
|
+
.vtx-form-item--view {
|
|
91
|
+
margin-bottom: 0;
|
|
92
|
+
}
|
|
93
|
+
.ant-form-item-with-help {
|
|
94
|
+
margin-bottom: 0;
|
|
95
|
+
}
|
|
96
|
+
.ant-form-item-explain {
|
|
97
|
+
min-height: 20px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
.vtx-form-card {
|
|
101
|
+
position: relative;
|
|
102
|
+
width: 100%;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
&-expand-icon {
|
|
105
|
+
color: fade(@text-color, 75%);
|
|
106
|
+
transition: transform 0.24s, -webkit-transform 0.24s;
|
|
107
|
+
}
|
|
108
|
+
.ant-card-body {
|
|
109
|
+
padding: 0;
|
|
110
|
+
}
|
|
111
|
+
.ant-card-head-wrapper,
|
|
112
|
+
.ant-card-head-title {
|
|
113
|
+
font-weight: bold;
|
|
114
|
+
line-height: 1;
|
|
115
|
+
}
|
|
116
|
+
&-content {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-flow: row wrap;
|
|
119
|
+
padding: 20px 24px;
|
|
120
|
+
padding-bottom: 0;
|
|
121
|
+
&::after {
|
|
122
|
+
clear: both;
|
|
123
|
+
}
|
|
124
|
+
&::before,
|
|
125
|
+
&::after {
|
|
126
|
+
display: table;
|
|
127
|
+
content: '';
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
&-content-hide {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
.vtx-form-card + .vtx-form-card {
|
|
135
|
+
margin-top: 20px;
|
|
136
|
+
}
|
|
137
|
+
.vtx-form-pane {
|
|
138
|
+
position: relative;
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
width: 100%;
|
|
141
|
+
&::after {
|
|
142
|
+
clear: both;
|
|
143
|
+
}
|
|
144
|
+
&::before,
|
|
145
|
+
&::after {
|
|
146
|
+
display: table;
|
|
147
|
+
content: '';
|
|
148
|
+
}
|
|
149
|
+
&-title {
|
|
150
|
+
margin-bottom: 16px;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
color: @text-color;
|
|
153
|
+
font-weight: 500;
|
|
154
|
+
line-height: @line-height-base;
|
|
155
|
+
list-style: none;
|
|
156
|
+
}
|
|
157
|
+
&-content {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-flow: row wrap;
|
|
160
|
+
&::after {
|
|
161
|
+
clear: both;
|
|
162
|
+
}
|
|
163
|
+
&::before,
|
|
164
|
+
&::after {
|
|
165
|
+
display: table;
|
|
166
|
+
content: '';
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
.vtx-form-divider {
|
|
171
|
+
margin: 0;
|
|
172
|
+
margin-bottom: 20px;
|
|
173
|
+
&--small {
|
|
174
|
+
margin-bottom: 16px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
.vtx-form-tabs {
|
|
178
|
+
width: 100%;
|
|
179
|
+
.ant-tabs-bar {
|
|
180
|
+
padding-right: @padding-sm;
|
|
181
|
+
padding-left: @padding-sm;
|
|
182
|
+
border-bottom: none;
|
|
183
|
+
}
|
|
184
|
+
.ant-tabs-tab {
|
|
185
|
+
padding: 5px 0 10px 0;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
&-vertical {
|
|
189
|
+
padding: 0 @padding-sm;
|
|
190
|
+
.vtx-form-item-col {
|
|
191
|
+
padding-right: @padding-sm;
|
|
192
|
+
padding-left: @padding-sm;
|
|
193
|
+
}
|
|
194
|
+
.vtx-form-card-content {
|
|
195
|
+
padding: 20px @padding-sm;
|
|
196
|
+
padding-bottom: 0;
|
|
197
|
+
}
|
|
198
|
+
.vtx-form-pane-title {
|
|
199
|
+
padding: 0 @padding-sm;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
&-has-card {
|
|
203
|
+
padding: 0;
|
|
204
|
+
.vtx-form-tabs .ant-tabs-bar {
|
|
205
|
+
padding: 0 @padding-lg;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
&-view {
|
|
209
|
+
.vtx-form-item-col {
|
|
210
|
+
margin-bottom: @view-item-margin-bottom;
|
|
211
|
+
}
|
|
212
|
+
.vtx-form-divider {
|
|
213
|
+
margin-bottom: @view-item-margin-bottom;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.js","names":["VIEWER","GALLERY","checkMode","x","mode","isObject","Array","isArray","len","length","Preview","props","useState","container","setContainer","viewer","setViewer","photo","index","visible","onClose","onIndexChange","options","useEffect","viewerOption","button","navbar","title","toolbar","tooltip","movable","zoomable","rotatable","scalable","transition","document","createElement","Viewer","url","image","src","hidden","view","e","detail","destroy","childNodes","innerHTML","newIndex","alt","imgElem","appendChild","ulElem","map","item","liElem","update","propTypes","PropTypes","oneOfType","object","array","number","bool","func"],"sources":["vtx-image/Preview.jsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"Preview.js","names":["VIEWER","GALLERY","checkMode","x","mode","isObject","Array","isArray","len","length","Preview","props","useState","container","setContainer","viewer","setViewer","photo","index","visible","onClose","onIndexChange","options","useEffect","viewerOption","button","navbar","title","toolbar","tooltip","movable","zoomable","rotatable","scalable","transition","document","createElement","Viewer","url","image","src","hidden","view","e","detail","destroy","childNodes","innerHTML","newIndex","alt","imgElem","appendChild","ulElem","map","item","liElem","update","propTypes","PropTypes","oneOfType","object","array","number","bool","func"],"sources":["vtx-image/Preview.jsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport Viewer from 'viewerjs';\nimport PropTypes from 'prop-types';\n\nimport isObject from '../_util/isObject';\n\n// 单张\nconst VIEWER = 'viewer';\n// 多张\nconst GALLERY = 'gallery';\nfunction checkMode(x) {\n let mode = '';\n if (isObject(x)) {\n mode = VIEWER;\n }\n if (Array.isArray(x)) {\n const len = x.length;\n mode = len == 0 ? '' : len == 1 ? VIEWER : GALLERY;\n }\n return mode;\n}\n\nexport default function Preview(props) {\n const [container, setContainer] = useState();\n const [viewer, setViewer] = useState();\n const { photo, index, visible, onClose, onIndexChange, options } = props;\n\n // let container;\n useEffect(() => {\n const viewerOption = {\n button: true, // 显示右上角关闭按钮\n navbar: false, // 显示缩略图导航\n title: true, // 显示当前图片的标题(现实 alt 属性及图片尺寸)\n toolbar: true, // 是否显示工具栏\n tooltip: true, // 显示缩放百分比\n movable: true, // 图片是否可移动\n zoomable: true, // 图片是否可缩放\n rotatable: true, // 图片是否可旋转\n scalable: true, // 图片是否可翻转\n transition: true, // 使用 CSS3 过度\n ...options,\n };\n\n const container = document.createElement('div');\n const viewer = new Viewer(container, {\n url(image) {\n return image.src;\n },\n // 关闭后\n hidden() {\n onClose && onClose();\n },\n view(e) {\n onIndexChange && onIndexChange(e.detail.index);\n },\n ...viewerOption,\n });\n setContainer(container);\n setViewer(viewer);\n return () => {\n viewer && viewer.destroy();\n };\n }, []);\n\n useEffect(() => {\n if (visible) {\n if (container.childNodes.length > 0) {\n container.innerHTML = '';\n }\n const mode = checkMode(photo);\n let newIndex = index;\n // 单张\n if (mode === VIEWER) {\n newIndex = 0;\n const { src, alt } = isObject(photo) ? photo : photo[0];\n const imgElem = document.createElement('img');\n imgElem.src = src;\n imgElem.alt = alt;\n container.appendChild(imgElem);\n }\n // 多张\n if (mode === GALLERY) {\n const len = photo.length - 1;\n newIndex = index < 0 ? 0 : index;\n newIndex = index > len ? len : index;\n const ulElem = document.createElement('ul');\n photo.map(item => {\n const liElem = document.createElement('li');\n const imgElem = document.createElement('img');\n imgElem.src = item.src;\n imgElem.alt = item.alt;\n liElem.appendChild(imgElem);\n ulElem.appendChild(liElem);\n });\n container.appendChild(ulElem);\n }\n viewer.update();\n viewer.view(newIndex);\n }\n }, [visible]);\n\n return <></>;\n}\n\nPreview.propTypes = {\n photo: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n index: PropTypes.number,\n visible: PropTypes.bool,\n onClose: PropTypes.func,\n onIndexChange: PropTypes.func,\n options: PropTypes.object,\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA,IAAMA,MAAM,GAAG,QAAf,C,CACA;;AACA,IAAMC,OAAO,GAAG,SAAhB;;AACA,SAASC,SAAT,CAAmBC,CAAnB,EAAsB;EAClB,IAAIC,IAAI,GAAG,EAAX;;EACA,IAAI,IAAAC,oBAAA,EAASF,CAAT,CAAJ,EAAiB;IACbC,IAAI,GAAGJ,MAAP;EACH;;EACD,IAAIM,KAAK,CAACC,OAAN,CAAcJ,CAA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State","photo","setPhoto","current","setCurrent","visible","setVisible","onIndexChange","registerImage","src","alt","id","oldPhoto","newPhoto","index","findIndex","item","push","isPreviewGroup","setShowPreview","children","propTypes","PropTypes","node","func"],"sources":["vtx-image/PreviewGroup.jsx"],"sourcesContent":["import React, { useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"PreviewGroup.js","names":["context","React","createContext","Provider","PreviewGroup","props","useState","photo","setPhoto","current","setCurrent","visible","setVisible","onIndexChange","registerImage","src","alt","id","oldPhoto","newPhoto","index","findIndex","item","push","isPreviewGroup","setShowPreview","children","propTypes","PropTypes","node","func"],"sources":["vtx-image/PreviewGroup.jsx"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport Preview from './Preview';\n\nexport const context = React.createContext({});\nconst { Provider } = context;\n\nexport default function PreviewGroup(props) {\n const [photo, setPhoto] = useState([]);\n const [current, setCurrent] = useState(0);\n const [visible, setVisible] = useState(false);\n\n const { onIndexChange } = props;\n\n const registerImage = ({ src, alt, id }) => {\n setPhoto(oldPhoto => {\n const newPhoto = [...oldPhoto];\n const index = oldPhoto.findIndex(item => item.id === id);\n if (index < 0) {\n newPhoto.push({ src, alt, id });\n } else {\n newPhoto[index] = { src, alt, id };\n }\n return newPhoto;\n });\n };\n\n return (\n <Provider\n value={{\n isPreviewGroup: true,\n current,\n setCurrent,\n setShowPreview: setVisible,\n registerImage,\n }}\n >\n {props.children}\n <Preview\n visible={visible}\n index={photo.findIndex(item => item.id === current)}\n photo={photo}\n onClose={() => setVisible(false)}\n onIndexChange={onIndexChange}\n />\n </Provider>\n );\n}\n\nPreviewGroup.propTypes = {\n children: PropTypes.node,\n onIndexChange: PropTypes.func,\n};\n"],"mappings":";;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,OAAO,gBAAGC,iBAAA,CAAMC,aAAN,CAAoB,EAApB,CAAhB;;;AACP,IAAQC,QAAR,GAAqBH,OAArB,CAA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,UAJb;MAKHE,aAAa,EAAbA;IALG;EADX,GASKT,KAAK,CAACqB,QATX,eAUI,gCAAC,mBAAD;IACI,OAAO,EAAEf,OADb;IAEI,KAAK,EAAEJ,KAAK,CAACc,SAAN,CAAgB,UAAAC,IAAI;MAAA,OAAIA,IAAI,CAACL,EAAL,KAAYR,OAAhB;IAAA,CAApB,CAFX;IAGI,KAAK,EAAEF,KAHX;IAII,OAAO,EAAE;MAAA,OAAMK,UAAU,CAAC,KAAD,CAAhB;IAAA,CAJb;IAKI,aAAa,EAAEC;EALnB,EAVJ,CADJ;AAoBH;;AAEDT,YAAY,CAACuB,SAAb,GAAyB;EACrBD,QAAQ,EAAEE,qBAAA,CAAUC,IADC;EAErBhB,aAAa,EAAEe,qBAAA,CAAUE;AAFJ,CAAzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","names":["VtxImportResult","props","useSet","visible","dataSource","columns","modalWidth","state","modalProps","bodyStyle","backgroundColor","title","onCancel","hideVisible","width","maskClosable","footer","newTableProps","startIndex","size","headFootHeight","pagination","autoFit","maxHeight","overflow","propTypes","PropTypes","bool","array","number","func"],"sources":["vtx-import/result.jsx"],"sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"file":"result.js","names":["VtxImportResult","props","useSet","visible","dataSource","columns","modalWidth","state","modalProps","bodyStyle","backgroundColor","title","onCancel","hideVisible","width","maskClosable","footer","newTableProps","startIndex","size","headFootHeight","pagination","autoFit","maxHeight","overflow","propTypes","PropTypes","bool","array","number","func"],"sources":["vtx-import/result.jsx"],"sourcesContent":["import React from 'react';\nimport Modal from 'antd/lib/modal';\nimport Button from 'antd/lib/button';\nimport PropTypes from 'prop-types';\nimport useSet from '../_util/useSet';\nimport VtxDatagrid from '../vtx-datagrid';\n\nfunction VtxImportResult(props) {\n const [state] = useSet({\n visible: props.visible || false,\n dataSource: props.dataSource || [],\n columns: props.columns,\n modalWidth: props.modalWidth,\n });\n const modalProps = {\n bodyStyle: {\n backgroundColor: '#f8f8f8',\n },\n visible: state.visible,\n title: '导入结果',\n onCancel: () => {\n if (typeof props.hideVisible === 'function') {\n props.hideVisible();\n }\n },\n width: state.modalWidth,\n maskClosable: false,\n footer: [\n <Button\n key=\"closeWindow\"\n onClick={() => {\n if (typeof props.hideVisible === 'function') {\n props.hideVisible();\n }\n }}\n >\n 关闭\n </Button>,\n ],\n };\n const newTableProps = {\n columns: state.columns,\n dataSource: state.dataSource,\n startIndex: 1,\n size: 'small',\n headFootHeight: 50,\n pagination: false,\n autoFit: false,\n };\n return (\n <Modal {...modalProps}>\n <div style={{ maxHeight: 600, width: '100%', overflow: 'auto' }}>\n <VtxDatagrid toolbar={false} {...newTableProps} />\n </div>\n </Modal>\n );\n}\nVtxImportResult.propTypes = {\n visible: PropTypes.bool,\n dataSource: PropTypes.array,\n columns: PropTypes.array,\n modalWidth: PropTypes.number,\n hideVisible: PropTypes.func,\n};\nexport default VtxImportResult;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;AAEA,SAASA,eAAT,CAAyBC,KAAzB,EAAgC;EAC5B,cAAgB,IAAAC,mBAAA,EAAO;IACnBC,OAAO,EAAEF,KAAK,CAACE,OAAN,IAAiB,KADP;IAEnBC,UAAU,EAAEH,KAAK,CAACG,UAAN,IAAoB,EAFb;IAGnBC,OAAO,EAAEJ,KAAK,CAACI,OAHI;IAInBC,UAAU,EAAEL,KAAK,CAACK;EAJC,CAAP,CAAhB;EAAA;EAAA,IAAOC,KAAP;;EAMA,IAAMC,UAAU,GAAG;IACfC,SAAS,EAAE;MACPC,eAAe,EAAE;IADV,CADI;IAIfP,OAAO,EAAEI,KAAK,CAACJ,OAJA;IAKfQ,KAAK,EAAE,MALQ;IAMfC,QAAQ,EAAE,oBAAM;MACZ,IAAI,OAAOX,KAAK,CAACY,WAAb,KAA6B,UAAjC,EAA6C;QACzCZ,KAAK,CAACY,WAAN;MACH;IACJ,CAVc;IAWfC,KAAK,EAAEP,KAAK,CAACD,UAXE;IAYfS,YAAY,EAAE,KAZC;IAafC,MAAM,EAAE,cACJ,gCAAC,kBAAD;MACI,GAAG,EAAC,aADR;MAEI,OAAO,EAAE,mBAAM;QACX,IAAI,OAAOf,KAAK,CAACY,WAAb,KAA6B,UAAjC,EAA6C;UACzCZ,KAAK,CAACY,WAAN;QACH;MACJ;IANL,kBADI;EAbO,CAAnB;EA0BA,IAAMI,aAAa,GAAG;IAClBZ,OAAO,EAAEE,KAAK,CAACF,OADG;IAElBD,UAAU,EAAEG,KAAK,CAACH,UAFA;IAGlBc,UAAU,EAAE,CAHM;IAIlBC,IAAI,EAAE,OAJY;IAKlBC,cAAc,EAAE,EALE;IAMlBC,UAAU,EAAE,KANM;IAOlBC,OAAO,EAAE;EAPS,CAAtB;EASA,oBACI,gCAAC,iBAAD,EAAWd,UAAX,eACI;IAAK,KAAK,EAAE;MAAEe,SAAS,EAAE,GAAb;MAAkBT,KAAK,EAAE,MAAzB;MAAiCU,QAAQ,EAAE;IAA3C;EAAZ,gBACI,gCAAC,uBAAD;IAAa,OAAO,EAAE;EAAtB,GAAiCP,aAAjC,EADJ,CADJ,CADJ;AAOH;;AACDjB,eAAe,CAACyB,SAAhB,GAA4B;EACxBtB,OAAO,EAAEuB,qBAAA,CAAUC,IADK;EAExBvB,UAAU,EAAEsB,qBAAA,CAAUE,KAFE;EAGxBvB,OAAO,EAAEqB,qBAAA,CAAUE,KAHK;EAIxBtB,UAAU,EAAEoB,qBAAA,CAAUG,MAJE;EAKxBhB,WAAW,EAAEa,qBAAA,CAAUI;AALC,CAA5B;eAOe9B,e"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-import/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-import/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"}
|