@vtx/components 3.1.155 → 3.1.157
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 +60 -49
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +1 -4
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getToken.js +8 -16
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +2 -9
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +0 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +0 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useColSize.js +3 -13
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js +0 -3
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +26 -42
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js +1 -2
- package/lib/config.js.map +1 -1
- package/lib/index.js +1 -30
- 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 +14 -33
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +0 -2
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +0 -2
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js +55 -96
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +41 -66
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +0 -7
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +0 -7
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/Alert.js +6 -15
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/CheckboxList.js +35 -71
- package/lib/vtx-datagrid/CheckboxList.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +58 -105
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +6 -18
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +138 -217
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +15 -46
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +0 -10
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js +0 -10
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-date-picker/QdatePicker.js +28 -58
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +35 -77
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +2 -8
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +0 -1
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +0 -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 +13 -32
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +0 -1
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +0 -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 +16 -29
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js +0 -1
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js +0 -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 +38 -73
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +0 -5
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +0 -5
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-export-async/ColumnsSelect.js +11 -23
- package/lib/vtx-export-async/ColumnsSelect.js.map +1 -1
- package/lib/vtx-export-async/History.js +75 -117
- package/lib/vtx-export-async/History.js.map +1 -1
- package/lib/vtx-export-async/index.js +72 -116
- 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 +9 -21
- package/lib/vtx-export-async/util.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +17 -39
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +6 -12
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +20 -43
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +4 -10
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +2 -9
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +1 -4
- 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 +10 -25
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +0 -7
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +0 -7
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-form-layout/style/index.less +220 -220
- package/lib/vtx-image/Image.js +77 -117
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +34 -63
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +24 -54
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +4 -11
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +0 -1
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-import/index.js +91 -143
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +15 -33
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +0 -3
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +0 -3
- 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 +2 -9
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +28 -41
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +2 -7
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +8 -15
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +2 -7
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +103 -179
- package/lib/vtx-import2/index.js.map +1 -1
- package/lib/vtx-import2/style/css.js +0 -3
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.css +2 -2
- package/lib/vtx-import2/style/index.js +0 -3
- package/lib/vtx-import2/style/index.js.map +1 -1
- package/lib/vtx-import2/style/index.less +2 -2
- package/lib/vtx-input/TextArea.js +14 -31
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +24 -49
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +0 -1
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +0 -1
- 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 +10 -23
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +3 -9
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +52 -85
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +0 -1
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +0 -1
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-page-layout/Basic.js +4 -9
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +16 -27
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +4 -13
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +34 -64
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +12 -23
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +32 -61
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +2 -11
- 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 +38 -58
- 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 +34 -68
- 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 +8 -27
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +8 -15
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +67 -112
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +0 -4
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +0 -4
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search-map-input/index.js +63 -98
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +0 -2
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +0 -2
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +47 -99
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +0 -8
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +0 -8
- 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 +19 -34
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +0 -2
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +0 -2
- 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 +12 -23
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +21 -41
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +55 -111
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +2 -7
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +0 -3
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +0 -3
- 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 +4 -11
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +16 -32
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +15 -31
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +1 -4
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +2 -19
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/css.js +0 -1
- package/lib/vtx-statistics-column/style/css.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.js +0 -1
- 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 +8 -22
- 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 +85 -155
- package/lib/vtx-tree/index.js.map +1 -1
- package/lib/vtx-tree/style/css.js +0 -2
- package/lib/vtx-tree/style/css.js.map +1 -1
- package/lib/vtx-tree/style/index.js +0 -2
- package/lib/vtx-tree/style/index.js.map +1 -1
- package/lib/vtx-tree/utils.js +10 -31
- package/lib/vtx-tree/utils.js.map +1 -1
- package/lib/vtx-tree-select/index.js +37 -81
- package/lib/vtx-tree-select/index.js.map +1 -1
- package/lib/vtx-tree-select/style/css.js +0 -4
- package/lib/vtx-tree-select/style/css.js.map +1 -1
- package/lib/vtx-tree-select/style/index.js +0 -4
- package/lib/vtx-tree-select/style/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +17 -35
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +90 -167
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +0 -6
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +0 -6
- 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 +84 -126
- package/lib/vtx-wang-editor/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/css.js +0 -1
- package/lib/vtx-wang-editor/style/css.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.js +0 -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 +80 -141
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +77 -138
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +0 -1
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +0 -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 +91 -159
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +0 -3
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +0 -3
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.less +109 -109
- package/package.json +122 -122
package/lib/vtx-search/VtxCol.js
CHANGED
|
@@ -4,34 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _col = _interopRequireDefault(require("antd/lib/col"));
|
|
13
|
-
|
|
14
10
|
var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
|
|
15
|
-
|
|
16
11
|
require("./style/index.less");
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
26
19
|
function VtxCol(props) {
|
|
27
20
|
var addStyle = function addStyle(d) {
|
|
28
21
|
var _d$props;
|
|
29
|
-
|
|
30
22
|
if (typeof d.type === 'function' && ((_d$props = d.props) === null || _d$props === void 0 ? void 0 : _d$props.attr) == 'row') {
|
|
31
23
|
return d;
|
|
32
24
|
} else {
|
|
33
25
|
var _d$props2, _d$props3, _d$props4, _d$props5;
|
|
34
|
-
|
|
35
26
|
if (((_d$props2 = d.props) === null || _d$props2 === void 0 ? void 0 : _d$props2['data-type']) === 'colon') {
|
|
36
27
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
28
|
className: "vtx-search-lists"
|
|
@@ -41,9 +32,7 @@ function VtxCol(props) {
|
|
|
41
32
|
className: "vtx-search-list"
|
|
42
33
|
}, d.props.children[1]));
|
|
43
34
|
}
|
|
44
|
-
|
|
45
35
|
var sty = {};
|
|
46
|
-
|
|
47
36
|
if (((_d$props3 = d.props) === null || _d$props3 === void 0 ? void 0 : _d$props3['data-type']) === 'fieldName') {
|
|
48
37
|
sty = _objectSpread(_objectSpread({}, sty), {}, {
|
|
49
38
|
padding: '8px 0px',
|
|
@@ -54,13 +43,11 @@ function VtxCol(props) {
|
|
|
54
43
|
cursor: 'default'
|
|
55
44
|
});
|
|
56
45
|
}
|
|
57
|
-
|
|
58
46
|
if (((_d$props4 = d.props) === null || _d$props4 === void 0 ? void 0 : _d$props4['data-type']) === 'bt') {
|
|
59
47
|
sty = _objectSpread(_objectSpread({}, sty), {}, {
|
|
60
48
|
padding: '8px 0px'
|
|
61
49
|
});
|
|
62
50
|
}
|
|
63
|
-
|
|
64
51
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
52
|
key: d,
|
|
66
53
|
style: _objectSpread({}, sty)
|
|
@@ -70,25 +57,19 @@ function VtxCol(props) {
|
|
|
70
57
|
}, d) : d);
|
|
71
58
|
}
|
|
72
59
|
};
|
|
73
|
-
|
|
74
60
|
var render = function render(d) {
|
|
75
61
|
if (d == '') return '';
|
|
76
|
-
|
|
77
62
|
if (!d.length) {
|
|
78
63
|
return addStyle(d);
|
|
79
64
|
}
|
|
80
|
-
|
|
81
65
|
return d.map(function (item) {
|
|
82
66
|
return addStyle(item);
|
|
83
67
|
});
|
|
84
68
|
};
|
|
85
|
-
|
|
86
69
|
return /*#__PURE__*/_react["default"].createElement(_col["default"], props, render(props.children));
|
|
87
70
|
}
|
|
88
|
-
|
|
89
71
|
VtxCol.propTypes = {
|
|
90
72
|
children: _propTypes["default"].node
|
|
91
73
|
};
|
|
92
|
-
var _default = VtxCol;
|
|
93
|
-
exports["default"] = _default;
|
|
74
|
+
var _default = exports["default"] = VtxCol;
|
|
94
75
|
//# sourceMappingURL=VtxCol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtxCol.js","names":["VtxCol","props","addStyle","d","type","attr","children","sty","padding","overflow","textOverflow","whiteSpace","textAlign","cursor","
|
|
1
|
+
{"version":3,"file":"VtxCol.js","names":["_react","_interopRequireDefault","require","_propTypes","_col","_tooltip","e","__esModule","_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","r","t","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","toPrimitive","call","TypeError","String","Number","VtxCol","props","addStyle","d","_d$props","type","attr","_d$props2","_d$props3","_d$props4","_d$props5","createElement","className","children","sty","padding","overflow","textOverflow","whiteSpace","textAlign","cursor","key","style","placement","title","render","map","item","propTypes","PropTypes","node","_default","exports"],"sources":["vtx-search/VtxCol.jsx"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Col from 'antd/lib/col';\r\nimport Tooltip from 'antd/lib/tooltip';\r\nimport './style/index.less';\r\n\r\nfunction VtxCol(props) {\r\n const addStyle = d => {\r\n if (typeof d.type === 'function' && d.props?.attr == 'row') {\r\n return d;\r\n } else {\r\n if (d.props?.['data-type'] === 'colon') {\r\n return (\r\n <div className=\"vtx-search-lists\">\r\n <div className=\"vtx-search-colon\">{d.props.children[0]}</div>\r\n <div className=\"vtx-search-list\">{d.props.children[1]}</div>\r\n </div>\r\n );\r\n }\r\n let sty = {};\r\n if (d.props?.['data-type'] === 'fieldName') {\r\n sty = {\r\n ...sty,\r\n padding: '8px 0px',\r\n overflow: 'hidden',\r\n textOverflow: 'ellipsis',\r\n whiteSpace: 'nowrap',\r\n textAlign: 'right',\r\n cursor: 'default',\r\n };\r\n }\r\n if (d.props?.['data-type'] === 'bt') {\r\n sty = {\r\n ...sty,\r\n padding: '8px 0px',\r\n };\r\n }\r\n return (\r\n <div key={d} style={{ ...sty }}>\r\n {d.props?.['data-type'] === 'fieldName' ? (\r\n <Tooltip placement=\"rightTop\" title={d.props.children}>\r\n {d}\r\n </Tooltip>\r\n ) : (\r\n d\r\n )}\r\n </div>\r\n );\r\n }\r\n };\r\n const render = d => {\r\n if (d == '') return '';\r\n if (!d.length) {\r\n return addStyle(d);\r\n }\r\n return d.map(item => {\r\n return addStyle(item);\r\n });\r\n };\r\n return <Col {...props}>{render(props.children)}</Col>;\r\n}\r\n\r\nVtxCol.propTypes = {\r\n children: PropTypes.node,\r\n};\r\nexport default VtxCol;\r\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,IAAA,GAAAH,sBAAA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SAAA,GAAAP,CAAC,CAACF,KAAK,cAAAS,SAAA,uBAAPA,SAAA,CAAU,WAAW,CAAC,MAAK,WAAW,gBACnCtD,MAAA,YAAAuD,aAAA,CAAClD,QAAA,WAAO;QAAC8D,SAAS,EAAC,UAAU;QAACC,KAAK,EAAErB,CAAC,CAACF,KAAK,CAACY;MAAS,GACjDV,CACI,CAAC,GAEVA,CAEH,CAAC;IAEd;EACJ,CAAC;EACD,IAAMsB,MAAM,GAAG,SAATA,MAAMA,CAAGtB,CAAC,EAAI;IAChB,IAAIA,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE;IACtB,IAAI,CAACA,CAAC,CAACpB,MAAM,EAAE;MACX,OAAOmB,QAAQ,CAACC,CAAC,CAAC;IACtB;IACA,OAAOA,CAAC,CAACuB,GAAG,CAAC,UAAAC,IAAI,EAAI;MACjB,OAAOzB,QAAQ,CAACyB,IAAI,CAAC;IACzB,CAAC,CAAC;EACN,CAAC;EACD,oBAAOvE,MAAA,YAAAuD,aAAA,CAACnD,IAAA,WAAG,EAAKyC,KAAK,EAAGwB,MAAM,CAACxB,KAAK,CAACY,QAAQ,CAAO,CAAC;AACzD;AAEAb,MAAM,CAAC4B,SAAS,GAAG;EACff,QAAQ,EAAEgB,qBAAS,CAACC;AACxB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cACahC,MAAM","ignoreList":[]}
|
package/lib/vtx-search/VtxRow.js
CHANGED
|
@@ -4,23 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _row = _interopRequireDefault(require("antd/lib/row"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
11
|
function VtxRow(props) {
|
|
17
12
|
var children = props.children,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
_props$gutter = props.gutter,
|
|
14
|
+
gutter = _props$gutter === void 0 ? 0 : _props$gutter,
|
|
15
|
+
type = props.type,
|
|
16
|
+
align = props.align,
|
|
17
|
+
justify = props.justify,
|
|
18
|
+
className = props.className;
|
|
24
19
|
var RowProps = {
|
|
25
20
|
gutter: gutter,
|
|
26
21
|
type: type,
|
|
@@ -30,7 +25,6 @@ function VtxRow(props) {
|
|
|
30
25
|
};
|
|
31
26
|
return /*#__PURE__*/_react["default"].createElement(_row["default"], RowProps, children);
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
VtxRow.propTypes = {
|
|
35
29
|
children: _propTypes["default"].node,
|
|
36
30
|
gutter: _propTypes["default"].number,
|
|
@@ -39,6 +33,5 @@ VtxRow.propTypes = {
|
|
|
39
33
|
justify: _propTypes["default"].number,
|
|
40
34
|
className: _propTypes["default"].string
|
|
41
35
|
};
|
|
42
|
-
var _default = VtxRow;
|
|
43
|
-
exports["default"] = _default;
|
|
36
|
+
var _default = exports["default"] = VtxRow;
|
|
44
37
|
//# sourceMappingURL=VtxRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VtxRow.js","names":["VtxRow","props","children","gutter","type","align","justify","className","RowProps","propTypes","PropTypes","node","number","string"],"sources":["vtx-search/VtxRow.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Row from 'antd/lib/row';\n\nfunction VtxRow(props) {\n const { children, gutter = 0, type, align, justify, className } = props;\n const RowProps = { gutter, type, align, justify, className };\n return <Row {...RowProps}>{children}</Row>;\n}\n\nVtxRow.propTypes = {\n children: PropTypes.node,\n gutter: PropTypes.number,\n type: PropTypes.string,\n align: PropTypes.number,\n justify: PropTypes.number,\n className: PropTypes.string,\n};\nexport default VtxRow;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"VtxRow.js","names":["_react","_interopRequireDefault","require","_propTypes","_row","e","__esModule","VtxRow","props","children","_props$gutter","gutter","type","align","justify","className","RowProps","createElement","propTypes","PropTypes","node","number","string","_default","exports"],"sources":["vtx-search/VtxRow.jsx"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Row from 'antd/lib/row';\r\n\r\nfunction VtxRow(props) {\r\n const { children, gutter = 0, type, align, justify, className } = props;\r\n const RowProps = { gutter, type, align, justify, className };\r\n return <Row {...RowProps}>{children}</Row>;\r\n}\r\n\r\nVtxRow.propTypes = {\r\n children: PropTypes.node,\r\n gutter: PropTypes.number,\r\n type: PropTypes.string,\r\n align: PropTypes.number,\r\n justify: PropTypes.number,\r\n className: PropTypes.string,\r\n};\r\nexport default VtxRow;\r\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA+B,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAE/B,SAASE,MAAMA,CAACC,KAAK,EAAE;EACnB,IAAQC,QAAQ,GAAkDD,KAAK,CAA/DC,QAAQ;IAAAC,aAAA,GAAkDF,KAAK,CAArDG,MAAM;IAANA,MAAM,GAAAD,aAAA,cAAG,CAAC,GAAAA,aAAA;IAAEE,IAAI,GAAgCJ,KAAK,CAAzCI,IAAI;IAAEC,KAAK,GAAyBL,KAAK,CAAnCK,KAAK;IAAEC,OAAO,GAAgBN,KAAK,CAA5BM,OAAO;IAAEC,SAAS,GAAKP,KAAK,CAAnBO,SAAS;EAC7D,IAAMC,QAAQ,GAAG;IAAEL,MAAM,EAANA,MAAM;IAAEC,IAAI,EAAJA,IAAI;IAAEC,KAAK,EAALA,KAAK;IAAEC,OAAO,EAAPA,OAAO;IAAEC,SAAS,EAATA;EAAU,CAAC;EAC5D,oBAAOf,MAAA,YAAAiB,aAAA,CAACb,IAAA,WAAG,EAAKY,QAAQ,EAAGP,QAAc,CAAC;AAC9C;AAEAF,MAAM,CAACW,SAAS,GAAG;EACfT,QAAQ,EAAEU,qBAAS,CAACC,IAAI;EACxBT,MAAM,EAAEQ,qBAAS,CAACE,MAAM;EACxBT,IAAI,EAAEO,qBAAS,CAACG,MAAM;EACtBT,KAAK,EAAEM,qBAAS,CAACE,MAAM;EACvBP,OAAO,EAAEK,qBAAS,CAACE,MAAM;EACzBN,SAAS,EAAEI,qBAAS,CAACG;AACzB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cACajB,MAAM","ignoreList":[]}
|
package/lib/vtx-search/index.js
CHANGED
|
@@ -1,126 +1,101 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _useSetState3 = _interopRequireDefault(require("ahooks/es/useSetState"));
|
|
13
|
-
|
|
14
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
-
|
|
18
12
|
var _button = _interopRequireDefault(require("antd/lib/button"));
|
|
19
|
-
|
|
20
13
|
var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
|
|
21
|
-
|
|
22
14
|
var _UpOutlined = _interopRequireDefault(require("@ant-design/icons/UpOutlined"));
|
|
23
|
-
|
|
24
15
|
var _DownOutlined = _interopRequireDefault(require("@ant-design/icons/DownOutlined"));
|
|
25
|
-
|
|
26
16
|
var _VtxRow = _interopRequireDefault(require("./VtxRow"));
|
|
27
|
-
|
|
28
17
|
var _VtxCol = _interopRequireDefault(require("./VtxCol"));
|
|
29
|
-
|
|
30
18
|
var _TableLayout = require("../vtx-page-layout/TableLayout");
|
|
31
|
-
|
|
32
19
|
var _useColSize = _interopRequireDefault(require("../_util/useColSize"));
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
47
|
-
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
23
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
28
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
48
29
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
49
|
-
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
53
|
-
|
|
54
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
55
|
-
|
|
30
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
31
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
32
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
56
33
|
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."); }
|
|
57
|
-
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
34
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
35
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
36
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
37
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /*
|
|
38
|
+
* @Author: chenxinyu
|
|
39
|
+
* @Date: 2021-03-24 21:47:52
|
|
40
|
+
* @LastEditors: your name
|
|
41
|
+
* @LastEditTime: 2022-03-22 16:19:00
|
|
42
|
+
* @Description: 查询布局组件
|
|
43
|
+
* @FilePath: \react-components\components\vtx-search\index.jsx
|
|
44
|
+
*/
|
|
66
45
|
function VtxSearch(props) {
|
|
67
46
|
//参数列表
|
|
68
47
|
var _props$layout = props.layout,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
48
|
+
layout = _props$layout === void 0 ? 'horizontal' : _props$layout,
|
|
49
|
+
_props$column = props.column,
|
|
50
|
+
column = _props$column === void 0 ? {
|
|
51
|
+
lg: 4,
|
|
52
|
+
md: 3,
|
|
53
|
+
sm: 2
|
|
54
|
+
} : _props$column,
|
|
55
|
+
_props$gridWeight = props.gridWeight,
|
|
56
|
+
gridWeight = _props$gridWeight === void 0 ? [] : _props$gridWeight,
|
|
57
|
+
_props$titles = props.titles,
|
|
58
|
+
titles = _props$titles === void 0 ? [] : _props$titles,
|
|
59
|
+
_props$labelWidth = props.labelWidth,
|
|
60
|
+
labelWidth = _props$labelWidth === void 0 ? 84 : _props$labelWidth,
|
|
61
|
+
wrapClassName = props.wrapClassName,
|
|
62
|
+
_props$isConfirmButto = props.isConfirmButton,
|
|
63
|
+
isConfirmButton = _props$isConfirmButto === void 0 ? true : _props$isConfirmButto,
|
|
64
|
+
_props$isClearButton = props.isClearButton,
|
|
65
|
+
isClearButton = _props$isClearButton === void 0 ? true : _props$isClearButton,
|
|
66
|
+
_props$isMoreButton = props.isMoreButton,
|
|
67
|
+
isMoreButton = _props$isMoreButton === void 0 ? true : _props$isMoreButton,
|
|
68
|
+
_props$confirmText = props.confirmText,
|
|
69
|
+
confirmText = _props$confirmText === void 0 ? '查询' : _props$confirmText,
|
|
70
|
+
_props$clearText = props.clearText,
|
|
71
|
+
clearText = _props$clearText === void 0 ? '重置' : _props$clearText,
|
|
72
|
+
onConfirm = props.onConfirm,
|
|
73
|
+
onClear = props.onClear,
|
|
74
|
+
renderButtons = props.renderButtons,
|
|
75
|
+
_props$showAll = props.showAll,
|
|
76
|
+
showAll = _props$showAll === void 0 ? false : _props$showAll,
|
|
77
|
+
onToggleShow = props.onToggleShow,
|
|
78
|
+
_props$customEnumText = props.customEnumText,
|
|
79
|
+
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText;
|
|
101
80
|
var vtxSearchRef = (0, _react.useRef)();
|
|
102
81
|
var size = (0, _useColSize["default"])(vtxSearchRef);
|
|
103
82
|
var realColumn = column[size];
|
|
104
|
-
|
|
105
83
|
var _useContext = (0, _react.useContext)(_TableLayout.StoreCtx),
|
|
106
|
-
|
|
107
|
-
|
|
84
|
+
onCollapse = _useContext.onCollapse;
|
|
108
85
|
var initStyle = {
|
|
109
86
|
height: layout === 'horizontal' ? 48 : 68
|
|
110
|
-
};
|
|
111
|
-
|
|
87
|
+
};
|
|
88
|
+
//初始化
|
|
112
89
|
var _useState = (0, _react.useState)(0),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
90
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
91
|
+
weightiness = _useState2[0],
|
|
92
|
+
setWeightiness = _useState2[1];
|
|
117
93
|
var _useSetState = (0, _useSetState3["default"])(initStyle),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
94
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
95
|
+
style = _useSetState2[0],
|
|
96
|
+
setStyle = _useSetState2[1];
|
|
122
97
|
var height = style.height,
|
|
123
|
-
|
|
98
|
+
boxStyle = style.boxStyle;
|
|
124
99
|
var ref = (0, _react.useRef)();
|
|
125
100
|
var newGridWeight = gridWeight.filter(function (item) {
|
|
126
101
|
return !!item;
|
|
@@ -142,7 +117,6 @@ function VtxSearch(props) {
|
|
|
142
117
|
});
|
|
143
118
|
var padding = 16;
|
|
144
119
|
setWeightiness(weightiness);
|
|
145
|
-
|
|
146
120
|
if (showAll) {
|
|
147
121
|
setStyle(weightiness > realColumn ? {
|
|
148
122
|
height: ref.current.clientHeight
|
|
@@ -150,39 +124,30 @@ function VtxSearch(props) {
|
|
|
150
124
|
onCollapse && onCollapse(ref.current.clientHeight + padding);
|
|
151
125
|
}
|
|
152
126
|
}, [gridWeight, realColumn]);
|
|
153
|
-
|
|
154
127
|
var isShowMore = function isShowMore() {
|
|
155
128
|
var padding = 16;
|
|
156
|
-
|
|
157
129
|
if (height > rowHeight) {
|
|
158
130
|
setStyle(initStyle);
|
|
159
|
-
|
|
160
131
|
if (onToggleShow && typeof onToggleShow === 'function') {
|
|
161
132
|
onToggleShow(rowHeight + padding);
|
|
162
133
|
}
|
|
163
|
-
|
|
164
134
|
onCollapse && onCollapse(rowHeight + padding);
|
|
165
135
|
} else {
|
|
166
136
|
setStyle({
|
|
167
137
|
height: ref.current.clientHeight
|
|
168
138
|
});
|
|
169
|
-
|
|
170
139
|
if (onToggleShow && typeof onToggleShow === 'function') {
|
|
171
140
|
onToggleShow(ref.current.clientHeight + padding);
|
|
172
141
|
}
|
|
173
|
-
|
|
174
142
|
onCollapse && onCollapse(ref.current.clientHeight + padding);
|
|
175
143
|
}
|
|
176
144
|
};
|
|
177
|
-
|
|
178
145
|
var analyzeChildren = function analyzeChildren(data) {
|
|
179
146
|
var cData = data;
|
|
180
147
|
if (!cData) return null;
|
|
181
|
-
|
|
182
148
|
if (typeof data == 'function') {
|
|
183
149
|
cData = data();
|
|
184
150
|
}
|
|
185
|
-
|
|
186
151
|
if (!cData.length) {
|
|
187
152
|
return render(cData, 0);
|
|
188
153
|
} else {
|
|
@@ -190,20 +155,16 @@ function VtxSearch(props) {
|
|
|
190
155
|
cData.forEach(function (item) {
|
|
191
156
|
if (typeof item == 'function') {
|
|
192
157
|
var ite = item();
|
|
193
|
-
|
|
194
158
|
if (Array.isArray(ite)) {
|
|
195
159
|
chData.push.apply(chData, _toConsumableArray(ite));
|
|
196
160
|
}
|
|
197
|
-
|
|
198
161
|
chData.push(ite);
|
|
199
162
|
return;
|
|
200
163
|
}
|
|
201
|
-
|
|
202
164
|
if (Array.isArray(item)) {
|
|
203
165
|
chData.push.apply(chData, _toConsumableArray(item));
|
|
204
166
|
return;
|
|
205
167
|
}
|
|
206
|
-
|
|
207
168
|
chData.push(item);
|
|
208
169
|
});
|
|
209
170
|
return chData.map(function (item, index) {
|
|
@@ -211,7 +172,6 @@ function VtxSearch(props) {
|
|
|
211
172
|
});
|
|
212
173
|
}
|
|
213
174
|
};
|
|
214
|
-
|
|
215
175
|
var layout_h = function layout_h(d, i) {
|
|
216
176
|
return /*#__PURE__*/_react["default"].createElement(_VtxRow["default"], {
|
|
217
177
|
gutter: 2,
|
|
@@ -234,7 +194,6 @@ function VtxSearch(props) {
|
|
|
234
194
|
className: "vtx-search-list"
|
|
235
195
|
}, d)));
|
|
236
196
|
};
|
|
237
|
-
|
|
238
197
|
var layout_v = function layout_v(d, i) {
|
|
239
198
|
return /*#__PURE__*/_react["default"].createElement(_VtxRow["default"], {
|
|
240
199
|
gutter: 2,
|
|
@@ -251,7 +210,6 @@ function VtxSearch(props) {
|
|
|
251
210
|
className: "vtx-search-list"
|
|
252
211
|
}, d)));
|
|
253
212
|
};
|
|
254
|
-
|
|
255
213
|
var render = function render(d, i) {
|
|
256
214
|
var gwt = newGridWeight[i];
|
|
257
215
|
return /*#__PURE__*/_react["default"].createElement(_VtxCol["default"], {
|
|
@@ -260,7 +218,6 @@ function VtxSearch(props) {
|
|
|
260
218
|
className: "a"
|
|
261
219
|
}, layout === 'horizontal' && layout_h(d, i), layout === 'vertical' && layout_v(d, i));
|
|
262
220
|
};
|
|
263
|
-
|
|
264
221
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
265
222
|
className: (0, _classnames["default"])('vtx-search', wrapClassName),
|
|
266
223
|
style: _objectSpread({
|
|
@@ -315,7 +272,6 @@ function VtxSearch(props) {
|
|
|
315
272
|
className: "vtx-search-more"
|
|
316
273
|
}, height > rowHeight ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (customEnumText === null || customEnumText === void 0 ? void 0 : customEnumText.collapseText) || "收起", /*#__PURE__*/_react["default"].createElement(_UpOutlined["default"], null)) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (customEnumText === null || customEnumText === void 0 ? void 0 : customEnumText.expandText) || "展开", /*#__PURE__*/_react["default"].createElement(_DownOutlined["default"], null)))))));
|
|
317
274
|
}
|
|
318
|
-
|
|
319
275
|
VtxSearch.propTypes = {
|
|
320
276
|
layout: _propTypes["default"].oneOf(['vertical', 'horizontal']),
|
|
321
277
|
column: _propTypes["default"].objectOf(_propTypes["default"].number),
|
|
@@ -336,6 +292,5 @@ VtxSearch.propTypes = {
|
|
|
336
292
|
onToggleShow: _propTypes["default"].func,
|
|
337
293
|
customEnumText: _propTypes["default"].object
|
|
338
294
|
};
|
|
339
|
-
var _default = VtxSearch;
|
|
340
|
-
exports["default"] = _default;
|
|
295
|
+
var _default = exports["default"] = VtxSearch;
|
|
341
296
|
//# sourceMappingURL=index.js.map
|