@vtx/components 3.1.148 → 3.1.150
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 +49 -60
- 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 +16 -8
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +9 -2
- 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 +13 -3
- 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 +42 -26
- 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 +30 -1
- 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 +33 -14
- 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 +96 -55
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +66 -41
- 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 +15 -6
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/CheckboxList.js +71 -35
- package/lib/vtx-datagrid/CheckboxList.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +105 -58
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +18 -6
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +217 -138
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +46 -15
- 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 +58 -28
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +77 -35
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +8 -2
- 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 +32 -13
- 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 +29 -16
- 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 +73 -38
- 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/ColumnsSelect.js +23 -11
- package/lib/vtx-export-async/ColumnsSelect.js.map +1 -1
- package/lib/vtx-export-async/History.js +117 -75
- package/lib/vtx-export-async/History.js.map +1 -1
- package/lib/vtx-export-async/index.js +116 -72
- 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 +21 -9
- package/lib/vtx-export-async/util.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +39 -17
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +12 -6
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +58 -18
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +10 -4
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +9 -2
- 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 +25 -10
- 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 +220 -220
- package/lib/vtx-image/Image.js +117 -77
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +63 -34
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +54 -24
- 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 +143 -91
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +33 -15
- 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 +9 -2
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +38 -16
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +7 -2
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +15 -8
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +7 -2
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +176 -91
- 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 +31 -14
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +49 -24
- 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 +23 -10
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +9 -3
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +85 -52
- 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 +9 -4
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +27 -16
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +13 -4
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +64 -34
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +23 -12
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +61 -32
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +11 -2
- 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 +58 -38
- 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 +68 -34
- 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 +27 -8
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +15 -8
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +112 -67
- 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 +98 -63
- 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 +99 -47
- 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 +34 -19
- 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 +23 -12
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +41 -21
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +111 -55
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +7 -2
- 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 +11 -4
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +32 -16
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +31 -15
- 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 +19 -2
- 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 +22 -8
- 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 +153 -83
- 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 +31 -10
- package/lib/vtx-tree/utils.js.map +1 -1
- package/lib/vtx-tree-select/index.js +81 -37
- package/lib/vtx-tree-select/index.js.map +1 -1
- package/lib/vtx-tree-select/style/css.js +4 -0
- package/lib/vtx-tree-select/style/css.js.map +1 -1
- package/lib/vtx-tree-select/style/index.js +4 -0
- package/lib/vtx-tree-select/style/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +35 -17
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +167 -90
- 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 +126 -84
- 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 +141 -80
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +138 -77
- 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 +159 -91
- 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 +122 -122
|
@@ -4,18 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = filterSpecialCharacters;
|
|
7
|
+
|
|
7
8
|
var _lodash = _interopRequireDefault(require("lodash.difference"));
|
|
8
|
-
|
|
9
|
-
function
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
+
|
|
10
14
|
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."); }
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
+
|
|
16
|
+
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
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
|
+
|
|
20
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
+
|
|
22
|
+
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
|
+
|
|
15
24
|
function isNotEmpty(value) {
|
|
16
25
|
return Array.isArray(value) && value.length > 0;
|
|
17
26
|
}
|
|
18
|
-
|
|
19
27
|
/**
|
|
20
28
|
* 过滤特殊字符
|
|
21
29
|
* @param {String} value 值
|
|
@@ -23,68 +31,49 @@ function isNotEmpty(value) {
|
|
|
23
31
|
* @param {Array} [option.include] 新增
|
|
24
32
|
* @param {Array} [option.exclude] 排除
|
|
25
33
|
*/
|
|
34
|
+
|
|
35
|
+
|
|
26
36
|
function filterSpecialCharacters(value) {
|
|
27
37
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
_ref$include = _ref.include,
|
|
39
|
+
include = _ref$include === void 0 ? [] : _ref$include,
|
|
40
|
+
_ref$exclude = _ref.exclude,
|
|
41
|
+
exclude = _ref$exclude === void 0 ? [] : _ref$exclude;
|
|
42
|
+
|
|
32
43
|
// 特殊符号,- _ 排除
|
|
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
|
-
// 新增
|
|
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
|
+
|
|
80
68
|
if (isNotEmpty(include)) {
|
|
81
69
|
specialCharacter = Array.from(new Set([].concat(_toConsumableArray(specialCharacter), _toConsumableArray(include))));
|
|
82
|
-
}
|
|
70
|
+
} // 移除
|
|
71
|
+
|
|
83
72
|
|
|
84
|
-
// 移除
|
|
85
73
|
if (isNotEmpty(exclude)) {
|
|
86
74
|
specialCharacter = (0, _lodash["default"])(specialCharacter, exclude);
|
|
87
75
|
}
|
|
76
|
+
|
|
88
77
|
return value.replace(new RegExp("[".concat(specialCharacter.join(''), "]"), 'g'), '');
|
|
89
78
|
}
|
|
90
79
|
//# sourceMappingURL=filterSpecialCharacters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterSpecialCharacters.js","names":["
|
|
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;;;;;;;;;;;;;;;;AAEA,SAASA,UAAT,CAAoBC,KAApB,EAA2B;EACvB,OAAOC,KAAK,CAACC,OAAN,CAAcF,KAAd,KAAwBA,KAAK,CAACG,MAAN,GAAe,CAA9C;AACH;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACe,SAASC,uBAAT,CAAiCJ,KAAjC,EAA6E;EAAA,+EAAJ,EAAI;EAAA,wBAAnCK,OAAmC;EAAA,IAAnCA,OAAmC,6BAAzB,EAAyB;EAAA,wBAArBC,OAAqB;EAAA,IAArBA,OAAqB,6BAAX,EAAW;;EACxF;EACA,IAAIC,gBAAgB,GAAG,CACnB;EACA,GAFmB,EAGnB,GAHmB,EAInB,GAJmB,EAKnB,GALmB,EAMnB;EACA,KAPmB,EAQnB,KARmB,EASnB,GATmB,EAUnB,GAVmB,EAWnB;EACA,GAZmB,EAanB,GAbmB,EAcnB,GAdmB,EAenB,GAfmB,EAgBnB;EACA,GAjBmB,EAkBnB,GAlBmB,EAmBnB;EACA,GApBmB,EAqBnB,GArBmB,EAsBnB;EACA,GAvBmB,EAwBnB,GAxBmB,EAyBnB;EACA,GA1BmB,EA2BnB;EACA,MA5BmB,EA6BnB;EACA,GA9BmB,EA+BnB,GA/BmB,EAgCnB;EACA,GAjCmB,EAkCnB,GAlCmB,EAmCnB;EACA,GApCmB,EAqCnB,GArCmB,EAsCnB;EACA,GAvCmB,EAwCnB,GAxCmB,EAyCnB;EACA,GA1CmB,EA2CnB;EACA,IA5CmB,EA6CnB;EACA,GA9CmB,EA+CnB,GA/CmB,EAgDnB;EACA,GAjDmB,EAkDnB,GAlDmB,EAmDnB;EACA,GApDmB,EAqDnB,GArDmB,EAsDnB;EACA,GAvDmB,EAwDnB,GAxDmB,EAyDnB,GAzDmB,EA0DnB;EACA,GA3DmB,EA4DnB,GA5DmB,EA6DnB,GA7DmB,EA8DnB;EACA,GA/DmB,EAgEnB,GAhEmB,EAiEnB;EACA,GAlEmB,EAmEnB,GAnEmB,EAoEnB;EACA,GArEmB,EAsEnB,GAtEmB,EAuEnB,GAvEmB,EAwEnB,GAxEmB,EAyEnB,GAzEmB,EA0EnB,GA1EmB,EA2EnB,IA3EmB,EA4EnB,GA5EmB,EA6EnB,GA7EmB,CAAvB,CAFwF,CAkFxF;;EACA,IAAIR,UAAU,CAACM,OAAD,CAAd,EAAyB;IACrBE,gBAAgB,GAAGN,KAAK,CAACO,IAAN,CAAW,IAAIC,GAAJ,8BAAYF,gBAAZ,sBAAiCF,OAAjC,GAAX,CAAnB;EACH,CArFuF,CAuFxF;;;EACA,IAAIN,UAAU,CAACO,OAAD,CAAd,EAAyB;IACrBC,gBAAgB,GAAG,IAAAG,kBAAA,EAAWH,gBAAX,EAA6BD,OAA7B,CAAnB;EACH;;EAED,OAAON,KAAK,CAACW,OAAN,CAAc,IAAIC,MAAJ,YAAeL,gBAAgB,CAACM,IAAjB,CAAsB,EAAtB,CAAf,QAA6C,GAA7C,CAAd,EAAiE,EAAjE,CAAP;AACH"}
|
|
@@ -4,11 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = getComponentProps;
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
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
|
+
|
|
8
10
|
function getComponentProps(prop) {
|
|
9
11
|
if (prop && _typeof(prop) === 'object') {
|
|
10
12
|
return prop;
|
|
11
13
|
}
|
|
14
|
+
|
|
12
15
|
return {};
|
|
13
16
|
}
|
|
14
17
|
//# sourceMappingURL=getComponentProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getComponentProps.js","names":["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,iBAAT,CAA2BC,IAA3B,EAAiC;EAC5C,IAAIA,IAAI,IAAI,QAAOA,IAAP,MAAgB,QAA5B,EAAsC;IAClC,OAAOA,IAAP;EACH;;EACD,OAAO,EAAP;AACH"}
|
package/lib/_util/getToken.js
CHANGED
|
@@ -4,30 +4,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _getUrlParam = _interopRequireDefault(require("@vtx/utils/lib/getUrlParam"));
|
|
8
|
-
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
15
18
|
var getSystemInfo = function getSystemInfo(key) {
|
|
16
19
|
var systemInfo = localStorage.getItem('systemInfo');
|
|
17
20
|
var system = {};
|
|
21
|
+
|
|
18
22
|
if (systemInfo) {
|
|
19
23
|
system = JSON.parse(decodeURIComponent(decodeURIComponent(systemInfo)));
|
|
20
24
|
system = _objectSpread(_objectSpread({}, system), {}, {
|
|
21
25
|
access_token: system.token
|
|
22
26
|
});
|
|
23
27
|
}
|
|
28
|
+
|
|
24
29
|
if (key) {
|
|
25
30
|
return system[key];
|
|
26
31
|
}
|
|
27
32
|
};
|
|
33
|
+
|
|
28
34
|
var getToken = function getToken() {
|
|
29
35
|
var token = getSystemInfo('token') || getSystemInfo('access_token') || localStorage.getItem('token') || localStorage.getItem('access_token') || sessionStorage.getItem('token') || sessionStorage.getItem('access_token') || (0, _getUrlParam["default"])('token') || (0, _getUrlParam["default"])('access_token');
|
|
30
36
|
return token;
|
|
31
37
|
};
|
|
32
|
-
|
|
38
|
+
|
|
39
|
+
var _default = getToken;
|
|
40
|
+
exports["default"] = _default;
|
|
33
41
|
//# sourceMappingURL=getToken.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getToken.js","names":["
|
|
1
|
+
{"version":3,"file":"getToken.js","names":["getSystemInfo","key","systemInfo","localStorage","getItem","system","JSON","parse","decodeURIComponent","access_token","token","getToken","sessionStorage","getUrlParam"],"sources":["_util/getToken.js"],"sourcesContent":["import getUrlParam from '@vtx/utils/lib/getUrlParam';\r\nconst getSystemInfo = key => {\r\n const systemInfo = localStorage.getItem('systemInfo');\r\n let system = {};\r\n if (systemInfo) {\r\n system = JSON.parse(decodeURIComponent(decodeURIComponent(systemInfo)));\r\n system = {\r\n ...system,\r\n access_token: system.token,\r\n };\r\n }\r\n if (key) {\r\n return system[key];\r\n }\r\n};\r\n\r\nconst getToken = () => {\r\n const token =\r\n getSystemInfo('token') ||\r\n getSystemInfo('access_token') ||\r\n localStorage.getItem('token') ||\r\n localStorage.getItem('access_token') ||\r\n sessionStorage.getItem('token') ||\r\n sessionStorage.getItem('access_token') ||\r\n getUrlParam('token') ||\r\n getUrlParam('access_token');\r\n return token;\r\n};\r\n\r\nexport default getToken;\r\n"],"mappings":";;;;;;;AAAA;;;;;;;;;;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,GAAG,EAAI;EACzB,IAAMC,UAAU,GAAGC,YAAY,CAACC,OAAb,CAAqB,YAArB,CAAnB;EACA,IAAIC,MAAM,GAAG,EAAb;;EACA,IAAIH,UAAJ,EAAgB;IACZG,MAAM,GAAGC,IAAI,CAACC,KAAL,CAAWC,kBAAkB,CAACA,kBAAkB,CAACN,UAAD,CAAnB,CAA7B,CAAT;IACAG,MAAM,mCACCA,MADD;MAEFI,YAAY,EAAEJ,MAAM,CAACK;IAFnB,EAAN;EAIH;;EACD,IAAIT,GAAJ,EAAS;IACL,OAAOI,MAAM,CAACJ,GAAD,CAAb;EACH;AACJ,CAbD;;AAeA,IAAMU,QAAQ,GAAG,SAAXA,QAAW,GAAM;EACnB,IAAMD,KAAK,GACPV,aAAa,CAAC,OAAD,CAAb,IACAA,aAAa,CAAC,cAAD,CADb,IAEAG,YAAY,CAACC,OAAb,CAAqB,OAArB,CAFA,IAGAD,YAAY,CAACC,OAAb,CAAqB,cAArB,CAHA,IAIAQ,cAAc,CAACR,OAAf,CAAuB,OAAvB,CAJA,IAKAQ,cAAc,CAACR,OAAf,CAAuB,cAAvB,CALA,IAMA,IAAAS,uBAAA,EAAY,OAAZ,CANA,IAOA,IAAAA,uBAAA,EAAY,cAAZ,CARJ;EASA,OAAOH,KAAP;AACH,CAXD;;eAaeC,Q"}
|
package/lib/_util/getUrlParam.js
CHANGED
|
@@ -4,12 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _querystring = _interopRequireDefault(require("querystring"));
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
9
12
|
var getUrlParam = function getUrlParam(key) {
|
|
10
13
|
var href = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href;
|
|
14
|
+
|
|
11
15
|
var params = _querystring["default"].parse(href.split('?')[1]);
|
|
16
|
+
|
|
12
17
|
return key ? params[key] : params;
|
|
13
18
|
};
|
|
14
|
-
|
|
19
|
+
|
|
20
|
+
var _default = getUrlParam;
|
|
21
|
+
exports["default"] = _default;
|
|
15
22
|
//# sourceMappingURL=getUrlParam.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUrlParam.js","names":["
|
|
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;;;;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAc,CAACC,GAAD,EAAsC;EAAA,IAAhCC,IAAgC,uEAAzBC,MAAM,CAACC,QAAP,CAAgBF,IAAS;;EACtD,IAAMG,MAAM,GAAGC,uBAAA,CAAGC,KAAH,CAASL,IAAI,CAACM,KAAL,CAAW,GAAX,EAAgB,CAAhB,CAAT,CAAf;;EACA,OAAOP,GAAG,GAAGI,MAAM,CAACJ,GAAD,CAAT,GAAiBI,MAA3B;AACH,CAHD;;eAKeL,W"}
|
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) {\n return Object.prototype.toString.call(fn) === '[object Function]';\n}\n"],"mappings":"
|
|
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,UAAT,CAAoBC,EAApB,EAAwB;EACnC,OAAOC,MAAM,CAACC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BJ,EAA/B,MAAuC,mBAA9C;AACH"}
|
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) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}\n"],"mappings":"
|
|
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,QAAT,CAAkBC,CAAlB,EAAqB;EAChC,OAAOC,MAAM,CAACC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BJ,CAA/B,MAAsC,iBAA7C;AACH"}
|
package/lib/_util/useColSize.js
CHANGED
|
@@ -4,18 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _useSize = _interopRequireDefault(require("ahooks/lib/useSize"));
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
9
12
|
var COL_SIZE = {
|
|
10
13
|
lg: 'lg',
|
|
11
14
|
md: 'md',
|
|
12
15
|
sm: 'sm'
|
|
13
16
|
};
|
|
14
|
-
|
|
17
|
+
|
|
18
|
+
var _default = function _default(ref) {
|
|
15
19
|
var dom = (ref === null || ref === void 0 ? void 0 : ref.current) || document.querySelector('body');
|
|
20
|
+
|
|
16
21
|
var _ref = (0, _useSize["default"])(dom) || {},
|
|
17
|
-
|
|
22
|
+
width = _ref.width;
|
|
23
|
+
|
|
18
24
|
var size = COL_SIZE.lg;
|
|
25
|
+
|
|
19
26
|
if (width >= 1370) {
|
|
20
27
|
size = COL_SIZE.lg;
|
|
21
28
|
} else if (width >= 992) {
|
|
@@ -23,6 +30,9 @@ var _default = exports["default"] = function _default(ref) {
|
|
|
23
30
|
} else {
|
|
24
31
|
size = COL_SIZE.sm;
|
|
25
32
|
}
|
|
33
|
+
|
|
26
34
|
return size;
|
|
27
35
|
};
|
|
36
|
+
|
|
37
|
+
exports["default"] = _default;
|
|
28
38
|
//# sourceMappingURL=useColSize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColSize.js","names":["
|
|
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;;;;AAEA,IAAMA,QAAQ,GAAG;EACbC,EAAE,EAAE,IADS;EAEbC,EAAE,EAAE,IAFS;EAGbC,EAAE,EAAE;AAHS,CAAjB;;eAMe,kBAAAC,GAAG,EAAI;EAClB,IAAMC,GAAG,GAAG,CAAAD,GAAG,SAAH,IAAAA,GAAG,WAAH,YAAAA,GAAG,CAAEE,OAAL,KAAgBC,QAAQ,CAACC,aAAT,CAAuB,MAAvB,CAA5B;;EACA,WAAkB,IAAAC,mBAAA,EAAQJ,GAAR,KAAgB,EAAlC;EAAA,IAAQK,KAAR,QAAQA,KAAR;;EACA,IAAIC,IAAI,GAAGX,QAAQ,CAACC,EAApB;;EACA,IAAIS,KAAK,IAAI,IAAb,EAAmB;IACfC,IAAI,GAAGX,QAAQ,CAACC,EAAhB;EACH,CAFD,MAEO,IAAIS,KAAK,IAAI,GAAb,EAAkB;IACrBC,IAAI,GAAGX,QAAQ,CAACE,EAAhB;EACH,CAFM,MAEA;IACHS,IAAI,GAAGX,QAAQ,CAACG,EAAhB;EACH;;EACD,OAAOQ,IAAP;AACH,C"}
|
package/lib/_util/useInterval.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = useInterval;
|
|
7
|
+
|
|
7
8
|
var _react = require("react");
|
|
9
|
+
|
|
8
10
|
function useInterval(callback, delay) {
|
|
9
11
|
(0, _react.useEffect)(function () {
|
|
10
12
|
if (delay !== null) {
|
|
@@ -13,6 +15,7 @@ function useInterval(callback, delay) {
|
|
|
13
15
|
return clearInterval(id);
|
|
14
16
|
};
|
|
15
17
|
}
|
|
18
|
+
|
|
16
19
|
return undefined;
|
|
17
20
|
}, [callback, delay]);
|
|
18
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInterval.js","names":["
|
|
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,WAAT,CAAqBC,QAArB,EAA+BC,KAA/B,EAAsC;EACjD,IAAAC,gBAAA,EAAU,YAAM;IACZ,IAAID,KAAK,KAAK,IAAd,EAAoB;MAChB,IAAIE,EAAE,GAAGC,WAAW,CAACJ,QAAD,EAAWC,KAAX,CAApB;MACA,OAAO;QAAA,OAAMI,aAAa,CAACF,EAAD,CAAnB;MAAA,CAAP;IACH;;IACD,OAAOG,SAAP;EACH,CAND,EAMG,CAACN,QAAD,EAAWC,KAAX,CANH;AAOH"}
|
package/lib/_util/useSet.js
CHANGED
|
@@ -1,44 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
9
|
+
|
|
10
|
+
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
|
+
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
|
+
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
|
|
15
18
|
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."); }
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
function
|
|
19
|
+
|
|
20
|
+
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
|
+
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
|
+
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
|
|
20
28
|
// 类似于class component的setState
|
|
21
29
|
var useSet = function useSet(initState) {
|
|
22
30
|
var _useReducer = (0, _react.useReducer)(function (state, newState) {
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
var action = newState;
|
|
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') {
|
|
25
41
|
action = action(state);
|
|
26
42
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
state = _useReducer2[0],
|
|
38
|
-
setState = _useReducer2[1];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
var result = _objectSpread(_objectSpread({}, state), action);
|
|
46
|
+
|
|
47
|
+
return result;
|
|
48
|
+
}, initState),
|
|
49
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
50
|
+
state = _useReducer2[0],
|
|
51
|
+
setState = _useReducer2[1];
|
|
52
|
+
|
|
39
53
|
return [state, function (state) {
|
|
40
54
|
setState(state);
|
|
41
55
|
}];
|
|
42
56
|
};
|
|
43
|
-
|
|
57
|
+
|
|
58
|
+
var _default = useSet;
|
|
59
|
+
exports["default"] = _default;
|
|
44
60
|
//# sourceMappingURL=useSet.js.map
|
package/lib/_util/useSet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSet.js","names":["
|
|
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;;;;;;;;;;;;;;;;;;;;AAEA;AACA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,SAAS,EAAI;EACxB,kBAA0B,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,QAAR,EAAqB;IACtD,IAAIC,MAAM,GAAGD,QAAb;;IACA,IAAI,OAAOA,QAAP,KAAoB,UAAxB,EAAoC;MAChCC,MAAM,GAAGA,MAAM,CAACF,KAAD,CAAf;IACH;;IACD,IAAIC,QAAQ,CAACC,MAAT,IAAmBD,QAAQ,CAACE,OAAhC,EAAyC;MACrCD,MAAM,GAAGD,QAAQ,CAACE,OAAlB;;MACA,IAAI,OAAOD,MAAP,KAAkB,UAAtB,EAAkC;QAC9BA,MAAM,GAAGA,MAAM,CAACF,KAAD,CAAf;MACH;IACJ;;IACD,IAAMI,MAAM,mCAAQJ,KAAR,GAAkBE,MAAlB,CAAZ;;IACA,OAAOE,MAAP;EACH,CAbyB,EAavBN,SAbuB,CAA1B;EAAA;EAAA,IAAOE,KAAP;EAAA,IAAcK,QAAd;;EAcA,OAAO,CACHL,KADG,EAEH,UAAAA,KAAK,EAAI;IACLK,QAAQ,CAACL,KAAD,CAAR;EACH,CAJE,CAAP;AAMH,CArBD;;eAuBeH,M"}
|
package/lib/config.js
CHANGED
|
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var globalCfg = window.VtxPublicServiceAddress || {};
|
|
8
|
-
var _default =
|
|
8
|
+
var _default = {
|
|
9
9
|
// ztree文件地址
|
|
10
10
|
ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree'
|
|
11
11
|
};
|
|
12
|
+
exports["default"] = _default;
|
|
12
13
|
//# sourceMappingURL=config.js.map
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":["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,uBAAP,IAAkC,EAApD;eAEe;EACX;EACAC,WAAW,EAAEH,SAAS,CAACG,WAAV,GAAwBH,SAAS,CAACG,WAAlC,GAAgD;AAFlD,C"}
|