@vtx/components 3.1.97 → 3.1.99
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/filterSpecialCharacters.js +44 -55
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +4 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getToken.js +15 -7
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +8 -1
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +1 -0
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +1 -0
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useColSize.js +12 -2
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js +3 -0
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +39 -23
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js +2 -1
- package/lib/config.js.map +1 -1
- package/lib/index.js +29 -0
- package/lib/index.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 +28 -11
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +2 -0
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +2 -0
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js +86 -46
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +58 -32
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +7 -0
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +7 -0
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/Alert.js +14 -5
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +76 -37
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +15 -3
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +186 -115
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +38 -7
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +10 -0
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js +10 -0
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-date-picker/QdatePicker.js +51 -21
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +65 -24
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +7 -1
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +1 -0
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +1 -0
- 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 +28 -9
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +1 -0
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +1 -0
- 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 +27 -14
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js +1 -0
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js +1 -0
- 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 +69 -36
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +5 -0
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +5 -0
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-export-async/History.js +100 -59
- package/lib/vtx-export-async/History.js.map +1 -1
- package/lib/vtx-export-async/index.js +105 -64
- package/lib/vtx-export-async/index.js.map +1 -1
- package/lib/vtx-export-async/style/css.js.map +1 -1
- package/lib/vtx-export-async/style/index.js.map +1 -1
- package/lib/vtx-export-async/util.js +13 -2
- package/lib/vtx-export-async/util.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +33 -11
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +11 -5
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +34 -12
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +9 -3
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +8 -1
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +4 -1
- package/lib/vtx-form-layout/context.js.map +1 -1
- package/lib/vtx-form-layout/demo/Modal.less +43 -43
- package/lib/vtx-form-layout/index.js +24 -9
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +7 -0
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +7 -0
- 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 +113 -73
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +59 -30
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +47 -17
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +11 -4
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +1 -0
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.js +1 -0
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-import/index.js +78 -45
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +28 -10
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +3 -0
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +3 -0
- 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 +8 -1
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +33 -11
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +6 -1
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +14 -7
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +6 -1
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +107 -51
- package/lib/vtx-import2/index.js.map +1 -1
- package/lib/vtx-import2/style/css.js +3 -0
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.js +3 -0
- 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 +27 -10
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +45 -20
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +1 -0
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +1 -0
- package/lib/vtx-input/style/index.js.map +1 -1
- package/lib/vtx-input/style/index.less +24 -24
- package/lib/vtx-input/useLength.js +20 -7
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +8 -2
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +82 -49
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +1 -0
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +1 -0
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-page-layout/Basic.js +8 -3
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +26 -15
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +12 -3
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +60 -30
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +22 -11
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +51 -23
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +10 -1
- package/lib/vtx-page-layout/index.js.map +1 -1
- package/lib/vtx-page-layout/style/css.js.map +1 -1
- package/lib/vtx-page-layout/style/index.js.map +1 -1
- package/lib/vtx-page-layout/style/index.less +138 -138
- package/lib/vtx-rps-frame/index.js +57 -37
- package/lib/vtx-rps-frame/index.js.map +1 -1
- package/lib/vtx-rps-frame/style/css.js.map +1 -1
- package/lib/vtx-rps-frame/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/index.js +64 -30
- 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 +26 -7
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +14 -7
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +106 -61
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +4 -0
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +4 -0
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search-map-input/index.js +93 -58
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +2 -0
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +2 -0
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +91 -39
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +8 -0
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +8 -0
- 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 +33 -18
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +2 -0
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +2 -0
- package/lib/vtx-signature/style/index.js.map +1 -1
- package/lib/vtx-signature/style/index.less +33 -33
- package/lib/vtx-split-pane/Pane.js +22 -11
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +39 -19
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +107 -51
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +6 -1
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +3 -0
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +3 -0
- 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/Back.js +9 -2
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +30 -14
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +30 -14
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +4 -1
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +18 -1
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/css.js +1 -0
- package/lib/vtx-statistics-column/style/css.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.js +1 -0
- package/lib/vtx-statistics-column/style/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.less +59 -59
- package/lib/vtx-time-picker/index.js +18 -4
- 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-tree/index.js +114 -49
- package/lib/vtx-tree/index.js.map +1 -1
- package/lib/vtx-tree/style/css.js +2 -0
- package/lib/vtx-tree/style/css.js.map +1 -1
- package/lib/vtx-tree/style/index.js +2 -0
- package/lib/vtx-tree/style/index.js.map +1 -1
- package/lib/vtx-tree/utils.js +27 -6
- package/lib/vtx-tree/utils.js.map +1 -1
- package/lib/vtx-tree-select/index.js +71 -27
- package/lib/vtx-tree-select/index.js.map +1 -1
- package/lib/vtx-tree-select/style/css.js +3 -0
- package/lib/vtx-tree-select/style/css.js.map +1 -1
- package/lib/vtx-tree-select/style/index.js +3 -0
- package/lib/vtx-tree-select/style/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +33 -15
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +156 -79
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +6 -0
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +6 -0
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-upload/style/index.less +61 -61
- package/lib/vtx-wang-editor/index.js +116 -74
- package/lib/vtx-wang-editor/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/css.js +1 -0
- package/lib/vtx-wang-editor/style/css.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.js +1 -0
- 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 +136 -75
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +119 -69
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +1 -0
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +1 -0
- 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 +143 -74
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +3 -0
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +3 -0
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.less +109 -109
- package/package.json +121 -121
|
@@ -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,45 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
10
14
|
var _input = _interopRequireDefault(require("antd/lib/input"));
|
|
15
|
+
|
|
11
16
|
var _useLength = _interopRequireDefault(require("./useLength"));
|
|
17
|
+
|
|
12
18
|
var _excluded = ["maxLength", "showCount", "placeholder"];
|
|
19
|
+
|
|
13
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
-
|
|
15
|
-
function
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
16
26
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
|
+
|
|
17
28
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
+
|
|
18
30
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
+
|
|
19
32
|
var TextArea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
20
33
|
var _props$maxLength = props.maxLength,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
maxLength = _props$maxLength === void 0 ? 200 : _props$maxLength,
|
|
35
|
+
_props$showCount = props.showCount,
|
|
36
|
+
showCount = _props$showCount === void 0 ? true : _props$showCount,
|
|
37
|
+
_props$placeholder = props.placeholder,
|
|
38
|
+
placeholder = _props$placeholder === void 0 ? '请输入' : _props$placeholder,
|
|
39
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
40
|
+
|
|
27
41
|
var len = (0, _useLength["default"])(props.value, {
|
|
28
42
|
showCount: showCount
|
|
29
43
|
});
|
|
44
|
+
|
|
30
45
|
var render = /*#__PURE__*/_react["default"].createElement(_input["default"].TextArea, _extends({
|
|
31
46
|
placeholder: placeholder,
|
|
32
47
|
maxLength: maxLength
|
|
33
48
|
}, rest, {
|
|
34
49
|
ref: ref
|
|
35
50
|
}));
|
|
51
|
+
|
|
36
52
|
showCount && 'value' in props && (render = /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
53
|
className: "vtx-input-textarea",
|
|
38
54
|
"data-count": "".concat(len, "/").concat(maxLength)
|
|
39
55
|
}, render));
|
|
40
56
|
return render;
|
|
41
57
|
});
|
|
42
|
-
var _default =
|
|
58
|
+
var _default = TextArea;
|
|
59
|
+
exports["default"] = _default;
|
|
43
60
|
TextArea.propTypes = {
|
|
44
61
|
maxLength: _propTypes["default"].number,
|
|
45
62
|
value: _propTypes["default"].string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","names":["
|
|
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"}
|
package/lib/vtx-input/index.js
CHANGED
|
@@ -1,46 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
10
14
|
var _input = _interopRequireDefault(require("antd/lib/input"));
|
|
15
|
+
|
|
11
16
|
var _lodash = _interopRequireDefault(require("lodash.clonedeep"));
|
|
17
|
+
|
|
12
18
|
var _TextArea = _interopRequireDefault(require("./TextArea"));
|
|
19
|
+
|
|
13
20
|
var _useLength = _interopRequireDefault(require("./useLength"));
|
|
21
|
+
|
|
14
22
|
var _getComponentProps = _interopRequireDefault(require("../_util/getComponentProps"));
|
|
23
|
+
|
|
15
24
|
var _filterSpecialCharacters = _interopRequireDefault(require("../_util/filterSpecialCharacters"));
|
|
25
|
+
|
|
16
26
|
var _excluded = ["showCount", "maxLength", "specialCharactersFilter", "trim", "onChange", "onBlur", "placeholder"];
|
|
27
|
+
|
|
17
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
|
-
|
|
19
|
-
function
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
20
34
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
35
|
+
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
+
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
|
+
|
|
40
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
|
+
|
|
26
42
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
43
|
+
|
|
27
44
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
45
|
+
|
|
28
46
|
var VtxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
47
|
var showCount = props.showCount,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
48
|
+
_props$maxLength = props.maxLength,
|
|
49
|
+
maxLength = _props$maxLength === void 0 ? 32 : _props$maxLength,
|
|
50
|
+
_props$specialCharact = props.specialCharactersFilter,
|
|
51
|
+
specialCharactersFilter = _props$specialCharact === void 0 ? true : _props$specialCharact,
|
|
52
|
+
_props$trim = props.trim,
|
|
53
|
+
trim = _props$trim === void 0 ? true : _props$trim,
|
|
54
|
+
onChange = props.onChange,
|
|
55
|
+
_onBlur = props.onBlur,
|
|
56
|
+
_props$placeholder = props.placeholder,
|
|
57
|
+
placeholder = _props$placeholder === void 0 ? '请输入' : _props$placeholder,
|
|
58
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
59
|
+
|
|
41
60
|
var len = (0, _useLength["default"])(props.value, {
|
|
42
61
|
showCount: showCount
|
|
43
62
|
});
|
|
63
|
+
|
|
44
64
|
var newProps = _objectSpread({
|
|
45
65
|
ref: ref,
|
|
46
66
|
maxLength: maxLength,
|
|
@@ -48,18 +68,22 @@ var VtxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
48
68
|
onBlur: function onBlur(e) {
|
|
49
69
|
var value = e.target.value;
|
|
50
70
|
var $e = e;
|
|
71
|
+
|
|
51
72
|
if (trim) {
|
|
52
73
|
value = value.trim();
|
|
53
74
|
}
|
|
75
|
+
|
|
54
76
|
if (specialCharactersFilter && value) {
|
|
55
77
|
$e = (0, _lodash["default"])(e);
|
|
56
78
|
$e.target.value = (0, _filterSpecialCharacters["default"])(value, (0, _getComponentProps["default"])(specialCharactersFilter));
|
|
57
79
|
onChange && onChange($e);
|
|
58
80
|
}
|
|
81
|
+
|
|
59
82
|
_onBlur && _onBlur($e);
|
|
60
83
|
},
|
|
61
84
|
onChange: onChange
|
|
62
85
|
}, rest);
|
|
86
|
+
|
|
63
87
|
showCount && 'value' in props && (newProps = _objectSpread({
|
|
64
88
|
suffix: "".concat(len, "/").concat(maxLength)
|
|
65
89
|
}, newProps));
|
|
@@ -81,5 +105,6 @@ VtxInput.Search = _input["default"].Search;
|
|
|
81
105
|
VtxInput.Group = _input["default"].Group;
|
|
82
106
|
VtxInput.Password = _input["default"].Password;
|
|
83
107
|
VtxInput.TextArea = _TextArea["default"];
|
|
84
|
-
var _default =
|
|
108
|
+
var _default = VtxInput;
|
|
109
|
+
exports["default"] = _default;
|
|
85
110
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
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;EACxC,IACIC,SADJ,GASIF,KATJ,CACIE,SADJ;EAAA,uBASIF,KATJ,CAEIG,SAFJ;EAAA,IAEIA,SAFJ,iCAEgB,EAFhB;EAAA,4BASIH,KATJ,CAGII,uBAHJ;EAAA,IAGIA,uBAHJ,sCAG8B,IAH9B;EAAA,kBASIJ,KATJ,CAIIK,IAJJ;EAAA,IAIIA,IAJJ,4BAIW,IAJX;EAAA,IAKIC,QALJ,GASIN,KATJ,CAKIM,QALJ;EAAA,IAMIC,OANJ,GASIP,KATJ,CAMIO,MANJ;EAAA,yBASIP,KATJ,CAOIQ,WAPJ;EAAA,IAOIA,WAPJ,mCAOkB,KAPlB;EAAA,IAQOC,IARP,4BASIT,KATJ;;EAWA,IAAMU,GAAG,GAAG,IAAAC,qBAAA,EAAUX,KAAK,CAACY,KAAhB,EAAuB;IAAEV,SAAS,EAATA;EAAF,CAAvB,CAAZ;;EAEA,IAAIW,QAAQ;IACRZ,GAAG,EAAHA,GADQ;IAERE,SAAS,EAATA,SAFQ;IAGRK,WAAW,EAAXA,WAHQ;IAIRD,MAJQ,kBAIDO,CAJC,EAIE;MACN,IAAIF,KAAK,GAAGE,CAAC,CAACC,MAAF,CAASH,KAArB;MACA,IAAII,EAAE,GAAGF,CAAT;;MACA,IAAIT,IAAJ,EAAU;QACNO,KAAK,GAAGA,KAAK,CAACP,IAAN,EAAR;MACH;;MACD,IAAID,uBAAuB,IAAIQ,KAA/B,EAAsC;QAClCI,EAAE,GAAG,IAAAC,kBAAA,EAAUH,CAAV,CAAL;QACAE,EAAE,CAACD,MAAH,CAAUH,KAAV,GAAkB,IAAAM,mCAAA,EACdN,KADc,EAEd,IAAAO,6BAAA,EAAkBf,uBAAlB,CAFc,CAAlB;QAIAE,QAAQ,IAAIA,QAAQ,CAACU,EAAD,CAApB;MACH;;MACDT,OAAM,IAAIA,OAAM,CAACS,EAAD,CAAhB;IACH,CAnBO;IAoBRV,QAAQ,EAARA;EApBQ,GAqBLG,IArBK,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":[
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
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,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
|
+
}
|
|
@@ -4,25 +4,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = require("react");
|
|
9
|
+
|
|
8
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
|
|
9
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
|
|
10
14
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
-
|
|
12
|
-
function
|
|
15
|
+
|
|
16
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
|
+
|
|
18
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
19
|
+
|
|
13
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
+
|
|
14
22
|
var useLength = function useLength() {
|
|
15
23
|
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
24
|
+
|
|
16
25
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
17
|
-
|
|
26
|
+
showCount = _ref.showCount;
|
|
27
|
+
|
|
18
28
|
var _useState = (0, _react.useState)(0),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
len = _useState2[0],
|
|
31
|
+
setLen = _useState2[1];
|
|
32
|
+
|
|
22
33
|
(0, _react.useEffect)(function () {
|
|
23
34
|
showCount && setLen(String(val !== null && val !== void 0 ? val : '').length);
|
|
24
35
|
}, [val]);
|
|
25
36
|
return len;
|
|
26
37
|
};
|
|
27
|
-
|
|
38
|
+
|
|
39
|
+
var _default = useLength;
|
|
40
|
+
exports["default"] = _default;
|
|
28
41
|
//# sourceMappingURL=useLength.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLength.js","names":["
|
|
1
|
+
{"version":3,"file":"useLength.js","names":["useLength","val","showCount","useState","len","setLen","useEffect","String","length"],"sources":["vtx-input/useLength.js"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nconst useLength = (val = '', { showCount } = {}) => {\n const [len, setLen] = useState(0);\n useEffect(() => {\n showCount && setLen(String(val ?? '').length);\n }, [val]);\n return len;\n};\n\nexport default useLength;\n"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAkC;EAAA,IAAjCC,GAAiC,uEAA3B,EAA2B;;EAAA,+EAAP,EAAO;EAAA,IAArBC,SAAqB,QAArBA,SAAqB;;EAChD,gBAAsB,IAAAC,eAAA,EAAS,CAAT,CAAtB;EAAA;EAAA,IAAOC,GAAP;EAAA,IAAYC,MAAZ;;EACA,IAAAC,gBAAA,EAAU,YAAM;IACZJ,SAAS,IAAIG,MAAM,CAACE,MAAM,CAACN,GAAD,aAACA,GAAD,cAACA,GAAD,GAAQ,EAAR,CAAN,CAAkBO,MAAnB,CAAnB;EACH,CAFD,EAEG,CAACP,GAAD,CAFH;EAGA,OAAOG,GAAP;AACH,CAND;;eAQeJ,S"}
|