@vtx/components 3.1.15 → 3.1.17
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/README.md +19 -19
- package/lib/_util/filterSpecialCharacters.js +60 -49
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +0 -3
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getUrlParam.js +0 -6
- 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 +1 -10
- 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 +14 -32
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/index.js +0 -25
- 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 +5 -21
- 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-color-picker/style/index.less +12 -12
- package/lib/vtx-combogrid/Combogrid.js +34 -74
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +20 -45
- 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-combogrid/style/index.less +29 -29
- package/lib/vtx-datagrid/Alert.js +3 -11
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +19 -44
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +2 -13
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +77 -140
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +5 -35
- 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.css +1 -0
- package/lib/vtx-datagrid/style/index.js +0 -10
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/style/index.less +1 -0
- package/lib/vtx-date-picker/QdatePicker.js +16 -46
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +6 -47
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +0 -5
- 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 +5 -23
- 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 +6 -20
- 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 +35 -67
- 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/style/index.less +6 -6
- package/lib/vtx-form-layout/Card.js +5 -26
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +0 -8
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +8 -30
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +2 -7
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +0 -6
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +0 -2
- 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 +8 -22
- 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-image/Image.js +56 -92
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +20 -51
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +11 -40
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +0 -6
- 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-image/style/index.less +63 -63
- package/lib/vtx-import/index.js +37 -72
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +7 -24
- 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 +0 -6
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +4 -25
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +0 -4
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +3 -9
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +0 -4
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +34 -74
- 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.js +0 -3
- 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 +6 -22
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +11 -37
- 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 +4 -16
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +1 -6
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +32 -72
- 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-modal/style/index.less +95 -95
- package/lib/vtx-page-layout/Basic.js +4 -8
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +7 -19
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +2 -10
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +25 -55
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +3 -15
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +4 -34
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +0 -8
- 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 +21 -44
- 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-rps-frame/style/index.less +8 -8
- package/lib/vtx-scrollable-row/index.js +21 -57
- 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 +0 -21
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +6 -12
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +43 -94
- 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/style/index.less +83 -83
- package/lib/vtx-search-map-input/index.js +56 -72
- 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 +20 -65
- 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 +14 -28
- 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 +2 -14
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +9 -29
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +43 -98
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +0 -4
- 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 +1 -7
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +5 -22
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +5 -22
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +0 -2
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +0 -16
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/css.js.map +1 -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 +3 -16
- 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 +9 -28
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +67 -137
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +0 -5
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +0 -5
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-upload/style/index.less +61 -61
- package/lib/vtx-ztree/index.js +51 -103
- 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 +43 -99
- 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 +74 -74
- package/package.json +123 -123
- package/CHANGELOG.md +0 -1137
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# @vtx/components
|
|
2
|
-
|
|
3
|
-
> 公司 PC 端基础组件库
|
|
4
|
-
|
|
5
|
-
## 安装
|
|
6
|
-
|
|
7
|
-
```shell
|
|
8
|
-
$ yarn add @vtx/components -S
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 使用
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
import { VtxDatePicker } from '@vtx/components';
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Doc
|
|
18
|
-
|
|
19
|
-
[在线示例文档](http://front-end.pages.cloudhw.cn:8000/react-components/)
|
|
1
|
+
# @vtx/components
|
|
2
|
+
|
|
3
|
+
> 公司 PC 端基础组件库
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
$ yarn add @vtx/components -S
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 使用
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import { VtxDatePicker } from '@vtx/components';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Doc
|
|
18
|
+
|
|
19
|
+
[在线示例文档](http://front-end.pages.cloudhw.cn:8000/react-components/)
|
|
@@ -4,76 +4,87 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = filterSpecialCharacters;
|
|
7
|
-
|
|
8
7
|
var _lodash = _interopRequireDefault(require("lodash.difference"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
-
|
|
14
10
|
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."); }
|
|
15
|
-
|
|
16
11
|
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); }
|
|
17
|
-
|
|
18
12
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
|
-
|
|
20
13
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
-
|
|
22
14
|
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; }
|
|
23
|
-
|
|
24
15
|
function isNotEmpty(value) {
|
|
25
16
|
return Array.isArray(value) && value.length > 0;
|
|
26
17
|
}
|
|
27
|
-
/**
|
|
28
|
-
* 过滤特殊字符
|
|
29
|
-
* @param {String} value 值
|
|
30
|
-
* @param {Object} option
|
|
31
|
-
* @param {Array} [option.include] 新增
|
|
32
|
-
* @param {Array} [option.exclude] 排除
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
18
|
|
|
19
|
+
/**
|
|
20
|
+
* 过滤特殊字符
|
|
21
|
+
* @param {String} value 值
|
|
22
|
+
* @param {Object} option
|
|
23
|
+
* @param {Array} [option.include] 新增
|
|
24
|
+
* @param {Array} [option.exclude] 排除
|
|
25
|
+
*/
|
|
36
26
|
function filterSpecialCharacters(value) {
|
|
37
27
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
_ref$include = _ref.include,
|
|
29
|
+
include = _ref$include === void 0 ? [] : _ref$include,
|
|
30
|
+
_ref$exclude = _ref.exclude,
|
|
31
|
+
exclude = _ref$exclude === void 0 ? [] : _ref$exclude;
|
|
43
32
|
// 特殊符号,- _ 排除
|
|
44
|
-
var specialCharacter = [
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
|
|
48
|
-
'
|
|
49
|
-
|
|
50
|
-
'
|
|
51
|
-
|
|
52
|
-
'
|
|
53
|
-
|
|
54
|
-
'
|
|
55
|
-
|
|
56
|
-
'
|
|
57
|
-
|
|
58
|
-
'
|
|
59
|
-
|
|
60
|
-
'
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
'
|
|
65
|
-
|
|
66
|
-
'
|
|
67
|
-
|
|
33
|
+
var specialCharacter = [
|
|
34
|
+
// 小括号
|
|
35
|
+
'(', ')', '(', ')',
|
|
36
|
+
// 中括号
|
|
37
|
+
'\\[', '\\]', '[', ']',
|
|
38
|
+
// 大括号
|
|
39
|
+
'{', '}', '{', '}',
|
|
40
|
+
// 方头括号
|
|
41
|
+
'【', '】',
|
|
42
|
+
// 尖括号
|
|
43
|
+
'<', '>',
|
|
44
|
+
// 书名号
|
|
45
|
+
'《', '》',
|
|
46
|
+
// 斜杠
|
|
47
|
+
'/',
|
|
48
|
+
// 反斜杠
|
|
49
|
+
'\\\\',
|
|
50
|
+
// 逗号
|
|
51
|
+
',', ',',
|
|
52
|
+
// 句号
|
|
53
|
+
'.', '。',
|
|
54
|
+
// 冒号
|
|
55
|
+
':', ':',
|
|
56
|
+
// 分号
|
|
57
|
+
';', ';',
|
|
58
|
+
// 顿号
|
|
59
|
+
'、',
|
|
60
|
+
// 破折号
|
|
61
|
+
'——',
|
|
62
|
+
// 感叹号
|
|
63
|
+
'!', '!',
|
|
64
|
+
// 问号
|
|
65
|
+
'?', '?',
|
|
66
|
+
// 加减等于
|
|
67
|
+
'+', '=',
|
|
68
|
+
// 单引号
|
|
69
|
+
"'", '‘', '’',
|
|
70
|
+
// 双引号
|
|
71
|
+
'"', '“', '”',
|
|
72
|
+
// 金钱
|
|
73
|
+
'$', '¥',
|
|
74
|
+
// 百分号
|
|
75
|
+
'%', '%',
|
|
76
|
+
// 其它
|
|
77
|
+
'@', '#', '`', '~', '*', '^', '……', '|', '&'];
|
|
78
|
+
|
|
79
|
+
// 新增
|
|
68
80
|
if (isNotEmpty(include)) {
|
|
69
81
|
specialCharacter = Array.from(new Set([].concat(_toConsumableArray(specialCharacter), _toConsumableArray(include))));
|
|
70
|
-
}
|
|
71
|
-
|
|
82
|
+
}
|
|
72
83
|
|
|
84
|
+
// 移除
|
|
73
85
|
if (isNotEmpty(exclude)) {
|
|
74
86
|
specialCharacter = (0, _lodash["default"])(specialCharacter, exclude);
|
|
75
87
|
}
|
|
76
|
-
|
|
77
88
|
return value.replace(new RegExp("[".concat(specialCharacter.join(''), "]"), 'g'), '');
|
|
78
89
|
}
|
|
79
90
|
//# sourceMappingURL=filterSpecialCharacters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterSpecialCharacters.js","names":["isNotEmpty","value","Array","isArray","length","filterSpecialCharacters","include","exclude","specialCharacter","from","Set","difference","replace","RegExp","join"],"sources":["_util/filterSpecialCharacters.js"],"sourcesContent":["import difference from 'lodash.difference';\
|
|
1
|
+
{"version":3,"file":"filterSpecialCharacters.js","names":["isNotEmpty","value","Array","isArray","length","filterSpecialCharacters","include","exclude","specialCharacter","from","Set","difference","replace","RegExp","join"],"sources":["_util/filterSpecialCharacters.js"],"sourcesContent":["import difference from 'lodash.difference';\n\nfunction isNotEmpty(value) {\n return Array.isArray(value) && value.length > 0;\n}\n\n/**\n * 过滤特殊字符\n * @param {String} value 值\n * @param {Object} option\n * @param {Array} [option.include] 新增\n * @param {Array} [option.exclude] 排除\n */\nexport default function filterSpecialCharacters(value, { include = [], exclude = [] } = {}) {\n // 特殊符号,- _ 排除\n let specialCharacter = [\n // 小括号\n '(',\n ')',\n '(',\n ')',\n // 中括号\n '\\\\[',\n '\\\\]',\n '[',\n ']',\n // 大括号\n '{',\n '}',\n '{',\n '}',\n // 方头括号\n '【',\n '】',\n // 尖括号\n '<',\n '>',\n // 书名号\n '《',\n '》',\n // 斜杠\n '/',\n // 反斜杠\n '\\\\\\\\',\n // 逗号\n ',',\n ',',\n // 句号\n '.',\n '。',\n // 冒号\n ':',\n ':',\n // 分号\n ';',\n ';',\n // 顿号\n '、',\n // 破折号\n '——',\n // 感叹号\n '!',\n '!',\n // 问号\n '?',\n '?',\n // 加减等于\n '+',\n '=',\n // 单引号\n \"'\",\n '‘',\n '’',\n // 双引号\n '\"',\n '“',\n '”',\n // 金钱\n '$',\n '¥',\n // 百分号\n '%',\n '%',\n // 其它\n '@',\n '#',\n '`',\n '~',\n '*',\n '^',\n '……',\n '|',\n '&',\n ];\n\n // 新增\n if (isNotEmpty(include)) {\n specialCharacter = Array.from(new Set([...specialCharacter, ...include]));\n }\n\n // 移除\n if (isNotEmpty(exclude)) {\n specialCharacter = difference(specialCharacter, exclude);\n }\n\n return value.replace(new RegExp(`[${specialCharacter.join('')}]`, 'g'), '');\n}\n"],"mappings":";;;;;;AAAA;AAA2C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAE3C,SAASA,UAAU,CAACC,KAAK,EAAE;EACvB,OAAOC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,uBAAuB,CAACJ,KAAK,EAAuC;EAAA,+EAAJ,CAAC,CAAC;IAAA,oBAAjCK,OAAO;IAAPA,OAAO,6BAAG,EAAE;IAAA,oBAAEC,OAAO;IAAPA,OAAO,6BAAG,EAAE;EAC/E;EACA,IAAIC,gBAAgB,GAAG;EACnB;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,KAAK,EACL,KAAK,EACL,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG;EACH;EACA,MAAM;EACN;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG;EACH;EACA,IAAI;EACJ;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,CACN;;EAED;EACA,IAAIR,UAAU,CAACM,OAAO,CAAC,EAAE;IACrBE,gBAAgB,GAAGN,KAAK,CAACO,IAAI,CAAC,IAAIC,GAAG,8BAAKF,gBAAgB,sBAAKF,OAAO,GAAE,CAAC;EAC7E;;EAEA;EACA,IAAIN,UAAU,CAACO,OAAO,CAAC,EAAE;IACrBC,gBAAgB,GAAG,IAAAG,kBAAU,EAACH,gBAAgB,EAAED,OAAO,CAAC;EAC5D;EAEA,OAAON,KAAK,CAACW,OAAO,CAAC,IAAIC,MAAM,YAAKL,gBAAgB,CAACM,IAAI,CAAC,EAAE,CAAC,QAAK,GAAG,CAAC,EAAE,EAAE,CAAC;AAC/E"}
|
|
@@ -4,14 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = getComponentProps;
|
|
7
|
-
|
|
8
7
|
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); }
|
|
9
|
-
|
|
10
8
|
function getComponentProps(prop) {
|
|
11
9
|
if (prop && _typeof(prop) === 'object') {
|
|
12
10
|
return prop;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
return {};
|
|
16
13
|
}
|
|
17
14
|
//# sourceMappingURL=getComponentProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getComponentProps.js","names":["getComponentProps","prop"],"sources":["_util/getComponentProps.js"],"sourcesContent":["export default function getComponentProps(prop) {\
|
|
1
|
+
{"version":3,"file":"getComponentProps.js","names":["getComponentProps","prop"],"sources":["_util/getComponentProps.js"],"sourcesContent":["export default function getComponentProps(prop) {\n if (prop && typeof prop === 'object') {\n return prop;\n }\n return {};\n}\n"],"mappings":";;;;;;;AAAe,SAASA,iBAAiB,CAACC,IAAI,EAAE;EAC5C,IAAIA,IAAI,IAAI,QAAOA,IAAI,MAAK,QAAQ,EAAE;IAClC,OAAOA,IAAI;EACf;EACA,OAAO,CAAC,CAAC;AACb"}
|
package/lib/_util/getUrlParam.js
CHANGED
|
@@ -4,19 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _querystring = _interopRequireDefault(require("querystring"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
var getUrlParam = function getUrlParam(key) {
|
|
13
10
|
var href = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href;
|
|
14
|
-
|
|
15
11
|
var params = _querystring["default"].parse(href.split('?')[1]);
|
|
16
|
-
|
|
17
12
|
return key ? params[key] : params;
|
|
18
13
|
};
|
|
19
|
-
|
|
20
14
|
var _default = getUrlParam;
|
|
21
15
|
exports["default"] = _default;
|
|
22
16
|
//# sourceMappingURL=getUrlParam.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUrlParam.js","names":["getUrlParam","key","href","window","location","params","qs","parse","split"],"sources":["_util/getUrlParam.js"],"sourcesContent":["import qs from 'querystring';\
|
|
1
|
+
{"version":3,"file":"getUrlParam.js","names":["getUrlParam","key","href","window","location","params","qs","parse","split"],"sources":["_util/getUrlParam.js"],"sourcesContent":["import qs from 'querystring';\n\nconst getUrlParam = (key, href = window.location.href) => {\n const params = qs.parse(href.split('?')[1]);\n return key ? params[key] : params;\n};\n\nexport default getUrlParam;\n"],"mappings":";;;;;;AAAA;AAA6B;AAE7B,IAAMA,WAAW,GAAG,SAAdA,WAAW,CAAIC,GAAG,EAAkC;EAAA,IAAhCC,IAAI,uEAAGC,MAAM,CAACC,QAAQ,CAACF,IAAI;EACjD,IAAMG,MAAM,GAAGC,uBAAE,CAACC,KAAK,CAACL,IAAI,CAACM,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;EAC3C,OAAOP,GAAG,GAAGI,MAAM,CAACJ,GAAG,CAAC,GAAGI,MAAM;AACrC,CAAC;AAAC,eAEaL,WAAW;AAAA"}
|
package/lib/_util/isFunction.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isFunction.js","names":["isFunction","fn","Object","prototype","toString","call"],"sources":["_util/isFunction.js"],"sourcesContent":["export default function isFunction(fn) {\
|
|
1
|
+
{"version":3,"file":"isFunction.js","names":["isFunction","fn","Object","prototype","toString","call"],"sources":["_util/isFunction.js"],"sourcesContent":["export default function isFunction(fn) {\n return Object.prototype.toString.call(fn) === '[object Function]';\n}\n"],"mappings":";;;;;;AAAe,SAASA,UAAU,CAACC,EAAE,EAAE;EACnC,OAAOC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ,EAAE,CAAC,KAAK,mBAAmB;AACrE"}
|
package/lib/_util/isObject.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isObject.js","names":["isObject","x","Object","prototype","toString","call"],"sources":["_util/isObject.js"],"sourcesContent":["export default function isObject(x) {\
|
|
1
|
+
{"version":3,"file":"isObject.js","names":["isObject","x","Object","prototype","toString","call"],"sources":["_util/isObject.js"],"sourcesContent":["export default function isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}\n"],"mappings":";;;;;;AAAe,SAASA,QAAQ,CAACC,CAAC,EAAE;EAChC,OAAOC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ,CAAC,CAAC,KAAK,iBAAiB;AAClE"}
|
package/lib/_util/useColSize.js
CHANGED
|
@@ -4,25 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _useSize = _interopRequireDefault(require("ahooks/lib/useSize"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
var COL_SIZE = {
|
|
13
10
|
lg: 'lg',
|
|
14
11
|
md: 'md',
|
|
15
12
|
sm: 'sm'
|
|
16
13
|
};
|
|
17
|
-
|
|
18
14
|
var _default = function _default(ref) {
|
|
19
15
|
var dom = (ref === null || ref === void 0 ? void 0 : ref.current) || document.querySelector('body');
|
|
20
|
-
|
|
21
16
|
var _ref = (0, _useSize["default"])(dom) || {},
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
width = _ref.width;
|
|
24
18
|
var size = COL_SIZE.lg;
|
|
25
|
-
|
|
26
19
|
if (width >= 1370) {
|
|
27
20
|
size = COL_SIZE.lg;
|
|
28
21
|
} else if (width >= 992) {
|
|
@@ -30,9 +23,7 @@ var _default = function _default(ref) {
|
|
|
30
23
|
} else {
|
|
31
24
|
size = COL_SIZE.sm;
|
|
32
25
|
}
|
|
33
|
-
|
|
34
26
|
return size;
|
|
35
27
|
};
|
|
36
|
-
|
|
37
28
|
exports["default"] = _default;
|
|
38
29
|
//# sourceMappingURL=useColSize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColSize.js","names":["COL_SIZE","lg","md","sm","ref","dom","current","document","querySelector","useSize","width","size"],"sources":["_util/useColSize.js"],"sourcesContent":["import useSize from 'ahooks/lib/useSize';\
|
|
1
|
+
{"version":3,"file":"useColSize.js","names":["COL_SIZE","lg","md","sm","ref","dom","current","document","querySelector","useSize","width","size"],"sources":["_util/useColSize.js"],"sourcesContent":["import useSize from 'ahooks/lib/useSize';\n\nconst COL_SIZE = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n};\n\nexport default ref => {\n const dom = ref?.current || document.querySelector('body');\n const { width } = useSize(dom) || {};\n let size = COL_SIZE.lg;\n if (width >= 1370) {\n size = COL_SIZE.lg;\n } else if (width >= 992) {\n size = COL_SIZE.md;\n } else {\n size = COL_SIZE.sm;\n }\n return size;\n};\n"],"mappings":";;;;;;AAAA;AAAyC;AAEzC,IAAMA,QAAQ,GAAG;EACbC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE;AACR,CAAC;AAAC,eAEa,kBAAAC,GAAG,EAAI;EAClB,IAAMC,GAAG,GAAG,CAAAD,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEE,OAAO,KAAIC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC;EAC1D,WAAkB,IAAAC,mBAAO,EAACJ,GAAG,CAAC,IAAI,CAAC,CAAC;IAA5BK,KAAK,QAALA,KAAK;EACb,IAAIC,IAAI,GAAGX,QAAQ,CAACC,EAAE;EACtB,IAAIS,KAAK,IAAI,IAAI,EAAE;IACfC,IAAI,GAAGX,QAAQ,CAACC,EAAE;EACtB,CAAC,MAAM,IAAIS,KAAK,IAAI,GAAG,EAAE;IACrBC,IAAI,GAAGX,QAAQ,CAACE,EAAE;EACtB,CAAC,MAAM;IACHS,IAAI,GAAGX,QAAQ,CAACG,EAAE;EACtB;EACA,OAAOQ,IAAI;AACf,CAAC;AAAA"}
|
package/lib/_util/useInterval.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = useInterval;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
function useInterval(callback, delay) {
|
|
11
9
|
(0, _react.useEffect)(function () {
|
|
12
10
|
if (delay !== null) {
|
|
@@ -15,7 +13,6 @@ function useInterval(callback, delay) {
|
|
|
15
13
|
return clearInterval(id);
|
|
16
14
|
};
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
return undefined;
|
|
20
17
|
}, [callback, delay]);
|
|
21
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInterval.js","names":["useInterval","callback","delay","useEffect","id","setInterval","clearInterval","undefined"],"sources":["_util/useInterval.js"],"sourcesContent":["import { useEffect } from 'react';\
|
|
1
|
+
{"version":3,"file":"useInterval.js","names":["useInterval","callback","delay","useEffect","id","setInterval","clearInterval","undefined"],"sources":["_util/useInterval.js"],"sourcesContent":["import { useEffect } from 'react';\n\nexport default function useInterval(callback, delay) {\n useEffect(() => {\n if (delay !== null) {\n let id = setInterval(callback, delay);\n return () => clearInterval(id);\n }\n return undefined;\n }, [callback, delay]);\n}\n"],"mappings":";;;;;;AAAA;AAEe,SAASA,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAE;EACjD,IAAAC,gBAAS,EAAC,YAAM;IACZ,IAAID,KAAK,KAAK,IAAI,EAAE;MAChB,IAAIE,EAAE,GAAGC,WAAW,CAACJ,QAAQ,EAAEC,KAAK,CAAC;MACrC,OAAO;QAAA,OAAMI,aAAa,CAACF,EAAE,CAAC;MAAA;IAClC;IACA,OAAOG,SAAS;EACpB,CAAC,EAAE,CAACN,QAAQ,EAAEC,KAAK,CAAC,CAAC;AACzB"}
|
package/lib/_util/useSet.js
CHANGED
|
@@ -4,57 +4,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
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; }
|
|
11
|
-
|
|
12
9
|
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; }
|
|
13
|
-
|
|
14
10
|
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; }
|
|
15
|
-
|
|
16
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
-
|
|
18
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."); }
|
|
19
|
-
|
|
20
13
|
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); }
|
|
21
|
-
|
|
22
14
|
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; }
|
|
23
|
-
|
|
24
15
|
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; }
|
|
25
|
-
|
|
26
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
-
|
|
28
17
|
// 类似于class component的setState
|
|
29
18
|
var useSet = function useSet(initState) {
|
|
30
19
|
var _useReducer = (0, _react.useReducer)(function (state, newState) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (typeof newState === 'function') {
|
|
34
|
-
action = action(state);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (newState.action && newState.payload) {
|
|
38
|
-
action = newState.payload;
|
|
39
|
-
|
|
40
|
-
if (typeof action === 'function') {
|
|
20
|
+
var action = newState;
|
|
21
|
+
if (typeof newState === 'function') {
|
|
41
22
|
action = action(state);
|
|
42
23
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
24
|
+
if (newState.action && newState.payload) {
|
|
25
|
+
action = newState.payload;
|
|
26
|
+
if (typeof action === 'function') {
|
|
27
|
+
action = action(state);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
var result = _objectSpread(_objectSpread({}, state), action);
|
|
31
|
+
return result;
|
|
32
|
+
}, initState),
|
|
33
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
34
|
+
state = _useReducer2[0],
|
|
35
|
+
setState = _useReducer2[1];
|
|
53
36
|
return [state, function (state) {
|
|
54
37
|
setState(state);
|
|
55
38
|
}];
|
|
56
39
|
};
|
|
57
|
-
|
|
58
40
|
var _default = useSet;
|
|
59
41
|
exports["default"] = _default;
|
|
60
42
|
//# sourceMappingURL=useSet.js.map
|
package/lib/_util/useSet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSet.js","names":["useSet","initState","useReducer","state","newState","action","payload","result","setState"],"sources":["_util/useSet.js"],"sourcesContent":["import { useReducer } from 'react';\
|
|
1
|
+
{"version":3,"file":"useSet.js","names":["useSet","initState","useReducer","state","newState","action","payload","result","setState"],"sources":["_util/useSet.js"],"sourcesContent":["import { useReducer } from 'react';\n\n// 类似于class component的setState\nconst useSet = initState => {\n const [state, setState] = useReducer((state, newState) => {\n let action = newState;\n if (typeof newState === 'function') {\n action = action(state);\n }\n if (newState.action && newState.payload) {\n action = newState.payload;\n if (typeof action === 'function') {\n action = action(state);\n }\n }\n const result = { ...state, ...action };\n return result;\n }, initState);\n return [\n state,\n state => {\n setState(state);\n },\n ];\n};\n\nexport default useSet;\n"],"mappings":";;;;;;AAAA;AAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEnC;AACA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAGC,SAAS,EAAI;EACxB,kBAA0B,IAAAC,iBAAU,EAAC,UAACC,KAAK,EAAEC,QAAQ,EAAK;MACtD,IAAIC,MAAM,GAAGD,QAAQ;MACrB,IAAI,OAAOA,QAAQ,KAAK,UAAU,EAAE;QAChCC,MAAM,GAAGA,MAAM,CAACF,KAAK,CAAC;MAC1B;MACA,IAAIC,QAAQ,CAACC,MAAM,IAAID,QAAQ,CAACE,OAAO,EAAE;QACrCD,MAAM,GAAGD,QAAQ,CAACE,OAAO;QACzB,IAAI,OAAOD,MAAM,KAAK,UAAU,EAAE;UAC9BA,MAAM,GAAGA,MAAM,CAACF,KAAK,CAAC;QAC1B;MACJ;MACA,IAAMI,MAAM,mCAAQJ,KAAK,GAAKE,MAAM,CAAE;MACtC,OAAOE,MAAM;IACjB,CAAC,EAAEN,SAAS,CAAC;IAAA;IAbNE,KAAK;IAAEK,QAAQ;EActB,OAAO,CACHL,KAAK,EACL,UAAAA,KAAK,EAAI;IACLK,QAAQ,CAACL,KAAK,CAAC;EACnB,CAAC,CACJ;AACL,CAAC;AAAC,eAEaH,MAAM;AAAA"}
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":["globalCfg","window","VtxPublicServiceAddress","ztreeServer"],"sources":["config.js"],"sourcesContent":["const globalCfg = window.VtxPublicServiceAddress || {};\
|
|
1
|
+
{"version":3,"file":"config.js","names":["globalCfg","window","VtxPublicServiceAddress","ztreeServer"],"sources":["config.js"],"sourcesContent":["const globalCfg = window.VtxPublicServiceAddress || {};\n\nexport default {\n // ztree文件地址\n ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree',\n};\n"],"mappings":";;;;;;AAAA,IAAMA,SAAS,GAAGC,MAAM,CAACC,uBAAuB,IAAI,CAAC,CAAC;AAAC,eAExC;EACX;EACAC,WAAW,EAAEH,SAAS,CAACG,WAAW,GAAGH,SAAS,CAACG,WAAW,GAAG;AACjE,CAAC;AAAA"}
|
package/lib/index.js
CHANGED
|
@@ -147,54 +147,29 @@ Object.defineProperty(exports, "VtxZtreeSelect", {
|
|
|
147
147
|
return _vtxZtreeSelect["default"];
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
|
-
|
|
151
150
|
var _vtxFormLayout = _interopRequireDefault(require("./vtx-form-layout"));
|
|
152
|
-
|
|
153
151
|
var _vtxPageLayout = _interopRequireDefault(require("./vtx-page-layout"));
|
|
154
|
-
|
|
155
152
|
var _vtxSearch = _interopRequireDefault(require("./vtx-search"));
|
|
156
|
-
|
|
157
153
|
var _vtxColorPicker = _interopRequireDefault(require("./vtx-color-picker"));
|
|
158
|
-
|
|
159
154
|
var _vtxCombogrid = _interopRequireDefault(require("./vtx-combogrid"));
|
|
160
|
-
|
|
161
155
|
var _vtxDatePicker = _interopRequireDefault(require("./vtx-date-picker"));
|
|
162
|
-
|
|
163
156
|
var _vtxEditor = _interopRequireDefault(require("./vtx-editor"));
|
|
164
|
-
|
|
165
157
|
var _vtxExport = _interopRequireDefault(require("./vtx-export"));
|
|
166
|
-
|
|
167
158
|
var _vtxImport = _interopRequireDefault(require("./vtx-import"));
|
|
168
|
-
|
|
169
159
|
var _vtxImport2 = _interopRequireDefault(require("./vtx-import2"));
|
|
170
|
-
|
|
171
160
|
var _vtxSearchMapInput = _interopRequireDefault(require("./vtx-search-map-input"));
|
|
172
|
-
|
|
173
161
|
var _vtxSelect = _interopRequireDefault(require("./vtx-select"));
|
|
174
|
-
|
|
175
162
|
var _vtxInput = _interopRequireDefault(require("./vtx-input"));
|
|
176
|
-
|
|
177
163
|
var _vtxTimePicker = _interopRequireDefault(require("./vtx-time-picker"));
|
|
178
|
-
|
|
179
164
|
var _vtxUpload = _interopRequireDefault(require("./vtx-upload"));
|
|
180
|
-
|
|
181
165
|
var _vtxZtreeSelect = _interopRequireDefault(require("./vtx-ztree-select"));
|
|
182
|
-
|
|
183
166
|
var _vtxDatagrid = _interopRequireDefault(require("./vtx-datagrid"));
|
|
184
|
-
|
|
185
167
|
var _vtxEllipsisText = _interopRequireDefault(require("./vtx-ellipsis-text"));
|
|
186
|
-
|
|
187
168
|
var _vtxImage = _interopRequireDefault(require("./vtx-image"));
|
|
188
|
-
|
|
189
169
|
var _vtxRpsFrame = _interopRequireDefault(require("./vtx-rps-frame"));
|
|
190
|
-
|
|
191
170
|
var _vtxStatisticsColumn = _interopRequireDefault(require("./vtx-statistics-column"));
|
|
192
|
-
|
|
193
171
|
var _vtxZtree = _interopRequireDefault(require("./vtx-ztree"));
|
|
194
|
-
|
|
195
172
|
var _vtxSplitPane = _interopRequireDefault(require("./vtx-split-pane"));
|
|
196
|
-
|
|
197
173
|
var _vtxModal = _interopRequireDefault(require("./vtx-modal"));
|
|
198
|
-
|
|
199
174
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
200
175
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["index.js"],"sourcesContent":["// layout\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["index.js"],"sourcesContent":["// layout\nexport { default as VtxFormLayout } from './vtx-form-layout';\nexport { default as VtxPageLayout } from './vtx-page-layout';\nexport { default as VtxSearch } from './vtx-search';\n\n// data entry\nexport { default as VtxColorPicker } from './vtx-color-picker';\nexport { default as VtxCombogrid } from './vtx-combogrid';\nexport { default as VtxDatePicker } from './vtx-date-picker';\nexport { default as VtxEditor } from './vtx-editor';\nexport { default as VtxExport } from './vtx-export';\nexport { default as VtxImport } from './vtx-import';\nexport { default as VtxImport2 } from './vtx-import2';\nexport { default as VtxSearchMapInput } from './vtx-search-map-input';\nexport { default as VtxSelect } from './vtx-select';\nexport { default as VtxInput } from './vtx-input';\nexport { default as VtxTimePicker } from './vtx-time-picker';\nexport { default as VtxUpload } from './vtx-upload';\nexport { default as VtxZtreeSelect } from './vtx-ztree-select';\n\n// data display\nexport { default as VtxDatagrid } from './vtx-datagrid';\nexport { default as VtxEllipsisText } from './vtx-ellipsis-text';\nexport { default as VtxImage } from './vtx-image';\nexport { default as VtxRpsFrame } from './vtx-rps-frame';\nexport { default as VtxStatisticsColumn } from './vtx-statistics-column';\nexport { default as VtxZtree } from './vtx-ztree';\nexport { default as VtxSplitPane } from './vtx-split-pane';\n\n// feedback\nexport { default as VtxModal } from './vtx-modal';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAkD"}
|
package/lib/style/index.less
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import './themes/index';
|
|
2
|
-
// @import './core/index';
|
|
1
|
+
@import './themes/index';
|
|
2
|
+
// @import './core/index';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import './default.less';
|
|
1
|
+
@import './default.less';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
@import './default.less';
|
|
4
|
-
|
|
5
|
-
// ScrollBar
|
|
6
|
-
@webkit-scrollbar-thumb-color: #434343;
|
|
7
|
-
@webkit-scrollbar-color: @body-background;
|
|
8
|
-
@statistics-text-color: rgba(255, 255, 255, 0.65);
|
|
9
|
-
@table-row-odd: @body-background;
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
@import './default.less';
|
|
4
|
+
|
|
5
|
+
// ScrollBar
|
|
6
|
+
@webkit-scrollbar-thumb-color: #434343;
|
|
7
|
+
@webkit-scrollbar-color: @body-background;
|
|
8
|
+
@statistics-text-color: rgba(255, 255, 255, 0.65);
|
|
9
|
+
@table-row-odd: @body-background;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@webkit-scrollbar-width: 8px;
|
|
2
|
-
@webkit-scrollbar-height: 8px;
|
|
3
|
-
@webkit-scrollbar-color: hsla(0, 0%, 80%, 0.08);
|
|
4
|
-
@webkit-scrollbar-thumb-color: rgba(0, 0, 0, 0.05);
|
|
5
|
-
@webkit-scrollbar-thumb-radius: 4px;
|
|
6
|
-
@statistics-text-color: rgba(0, 0, 0, 0.65);
|
|
7
|
-
@table-row-odd: '#f6f6f6';
|
|
1
|
+
@webkit-scrollbar-width: 8px;
|
|
2
|
+
@webkit-scrollbar-height: 8px;
|
|
3
|
+
@webkit-scrollbar-color: hsla(0, 0%, 80%, 0.08);
|
|
4
|
+
@webkit-scrollbar-thumb-color: rgba(0, 0, 0, 0.05);
|
|
5
|
+
@webkit-scrollbar-thumb-radius: 4px;
|
|
6
|
+
@statistics-text-color: rgba(0, 0, 0, 0.65);
|
|
7
|
+
@table-row-odd: '#f6f6f6';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import './@{root-entry-name}.less';
|
|
1
|
+
@import './@{root-entry-name}.less';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@webkit-scrollbar-width: 8px;
|
|
2
|
-
@webkit-scrollbar-height: 8px;
|
|
3
|
-
@webkit-scrollbar-color: hsla(0, 0%, 80%, 0.08);
|
|
4
|
-
@webkit-scrollbar-thumb-color: rgba(0, 0, 0, 0.05);
|
|
5
|
-
@webkit-scrollbar-thumb-radius: 4px;
|
|
1
|
+
@webkit-scrollbar-width: 8px;
|
|
2
|
+
@webkit-scrollbar-height: 8px;
|
|
3
|
+
@webkit-scrollbar-color: hsla(0, 0%, 80%, 0.08);
|
|
4
|
+
@webkit-scrollbar-thumb-color: rgba(0, 0, 0, 0.05);
|
|
5
|
+
@webkit-scrollbar-thumb-radius: 4px;
|