@zykj2024/much-library 1.0.9 → 1.0.10-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/README.md +23 -23
  2. package/dist/McContainer/index.css +3 -2
  3. package/dist/McDateRange/index.d.ts +1 -1
  4. package/dist/McDateRange/index.js +1 -1
  5. package/dist/McLazyLoader/demo/basic.d.ts +2 -0
  6. package/dist/McLazyLoader/demo/basic.js +33 -0
  7. package/dist/McLazyLoader/demo/form.d.ts +2 -0
  8. package/dist/McLazyLoader/demo/form.js +38 -0
  9. package/dist/McLazyLoader/demo/has-root.d.ts +2 -0
  10. package/dist/McLazyLoader/demo/has-root.js +44 -0
  11. package/dist/McLazyLoader/index.d.ts +28 -0
  12. package/dist/McLazyLoader/index.js +69 -0
  13. package/dist/McProSelect/demo/async.d.ts +2 -0
  14. package/dist/McProSelect/demo/async.js +66 -0
  15. package/dist/McProSelect/demo/base.d.ts +2 -0
  16. package/dist/McProSelect/demo/base.js +29 -0
  17. package/dist/McProSelect/demo/exclusion-async-rename.d.ts +3 -0
  18. package/dist/McProSelect/demo/exclusion-async-rename.js +103 -0
  19. package/dist/McProSelect/demo/exclusion-rename.d.ts +3 -0
  20. package/dist/McProSelect/demo/exclusion-rename.js +74 -0
  21. package/dist/McProSelect/demo/exclusion.d.ts +3 -0
  22. package/dist/McProSelect/demo/exclusion.js +70 -0
  23. package/dist/McProSelect/demo/require.d.ts +2 -0
  24. package/dist/McProSelect/demo/require.js +82 -0
  25. package/dist/McProSelect/index.d.ts +35 -0
  26. package/dist/McProSelect/index.js +152 -0
  27. package/dist/McSelect/components/PanelSearchInput/index.css +6 -0
  28. package/dist/McSelect/components/PanelSearchInput/index.d.ts +12 -0
  29. package/dist/McSelect/components/PanelSearchInput/index.js +45 -0
  30. package/dist/McSelect/demo/exclusion.d.ts +3 -0
  31. package/dist/McSelect/demo/exclusion.js +64 -0
  32. package/dist/McSelect/demo/fetchOptions.js +1 -0
  33. package/dist/McSelect/index.d.ts +9 -2
  34. package/dist/McSelect/index.js +101 -15
  35. package/dist/McTag/demo/demo1.d.ts +2 -0
  36. package/dist/McTag/demo/demo1.js +18 -0
  37. package/dist/McTag/demo/demo2.d.ts +2 -0
  38. package/dist/McTag/demo/demo2.js +20 -0
  39. package/dist/McTag/demo/demo3.d.ts +2 -0
  40. package/dist/McTag/demo/demo3.js +19 -0
  41. package/dist/McTag/demo/demo4.d.ts +2 -0
  42. package/dist/McTag/demo/demo4.js +22 -0
  43. package/dist/McTag/index.d.ts +22 -0
  44. package/dist/McTag/index.js +59 -0
  45. package/dist/McThemeConfig/customToken.json +2 -1
  46. package/dist/McThemeConfig/demo/radio.js +39 -0
  47. package/dist/McThemeConfig/globalStyle.js +10 -4
  48. package/dist/McThemeConfig/themeToken.json +2 -2
  49. package/dist/Utils/index.d.ts +5 -4
  50. package/dist/Utils/index.js +6 -26
  51. package/dist/index.d.ts +5 -2
  52. package/dist/index.js +5 -2
  53. package/package.json +4 -2
@@ -3,13 +3,45 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
- var _excluded = ["style", "className", "label", "multiple", "changeOnHidden", "inexistent", "fetchOptions", "pageSize", "extra", "value", "onChange", "labelInValue", "options", "disabled", "maxTagCount", "onSearch", "onPopupScroll", "onBlur", "onDropdownVisibleChange"];
6
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
7
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
8
+ var _excluded = ["style", "className", "label", "multiple", "changeOnHidden", "inexistent", "fetchOptions", "pageSize", "extra", "value", "onChange", "labelInValue", "options", "disabled", "maxTagCount", "onSearch", "onPopupScroll", "onBlur", "onDropdownVisibleChange", "toFilterOptions", "searchInPanel", "pinSelectedOptions", "searchInPanelPlaceholder"];
7
9
  import { Empty, Popover, Select, Spin } from 'antd';
8
- import { Utils } from "./..";
10
+ import { debounce } from "../Utils";
9
11
  import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
12
+ import PanelSearchInput from "./components/PanelSearchInput";
10
13
  import "./index.css";
11
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { Fragment as _Fragment } from "react/jsx-runtime";
12
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ // 将已选的option置顶
18
+ var createPinedSelectedOptions = function createPinedSelectedOptions(options, selectedValues) {
19
+ if (!options || options.length === 0) return [];
20
+ if (!selectedValues || selectedValues.length === 0) return options;
21
+ var isLabelInValue = _typeof(selectedValues[0]) === 'object';
22
+ if (isLabelInValue) {
23
+ var unselectedOptions = options.filter(function (o) {
24
+ return !selectedValues.some(function (v) {
25
+ return v.value === o.value;
26
+ });
27
+ });
28
+ return [].concat(_toConsumableArray(selectedValues), _toConsumableArray(unselectedOptions));
29
+ } else {
30
+ var _options$filter;
31
+ // options中找不到的就不展示
32
+ var selectedOptions = selectedValues.map(function (v) {
33
+ return options.find(function (o) {
34
+ return o.value === v;
35
+ });
36
+ }).filter(function (o) {
37
+ return Boolean(o);
38
+ });
39
+ var _unselectedOptions = (_options$filter = options.filter(function (x) {
40
+ return !selectedValues.includes(x.value);
41
+ })) !== null && _options$filter !== void 0 ? _options$filter : [];
42
+ return [].concat(_toConsumableArray(selectedOptions), _toConsumableArray(_unselectedOptions));
43
+ }
44
+ };
13
45
  var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
14
46
  var style = props.style,
15
47
  className = props.className,
@@ -32,6 +64,12 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
32
64
  onPopupScroll = props.onPopupScroll,
33
65
  onBlur = props.onBlur,
34
66
  onDropdownVisibleChange = props.onDropdownVisibleChange,
67
+ toFilterOptions = props.toFilterOptions,
68
+ _props$searchInPanel = props.searchInPanel,
69
+ searchInPanel = _props$searchInPanel === void 0 ? false : _props$searchInPanel,
70
+ _props$pinSelectedOpt = props.pinSelectedOptions,
71
+ pinSelectedOptions = _props$pinSelectedOpt === void 0 ? false : _props$pinSelectedOpt,
72
+ searchInPanelPlaceholder = props.searchInPanelPlaceholder,
35
73
  rest = _objectWithoutProperties(props, _excluded);
36
74
  var _ref = typeof inexistent === 'boolean' ? {} : inexistent,
37
75
  _ref$inexistentText = _ref.inexistentText,
@@ -87,6 +125,19 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
87
125
  var _oldValue = useRef();
88
126
  var _changeOption = useRef();
89
127
  var _inexistent = useRef(false);
128
+ var panelSearchInputRef = useRef(null);
129
+ var useDefaultSearch = !(multiple && searchInPanel);
130
+ var optionWithPriority = useMemo(function () {
131
+ if (pinSelectedOptions && multiple) {
132
+ if (fetchOptions && !labelInValue) {
133
+ console.warn('远程搜索下,pinSelectedOptions只支持labelInValue模式,建议修改');
134
+ } else {
135
+ return createPinedSelectedOptions(selectOptions, selectValue);
136
+ }
137
+ }
138
+ return selectOptions;
139
+ }, [selectOptions, selectValue]);
140
+ var filteredOptions = toFilterOptions ? toFilterOptions(optionWithPriority) : optionWithPriority; // 只要有render就需要重新生成options
90
141
 
91
142
  // 监听值和备选项的变化(赋值备选项,执行不存在值的判断逻辑)
92
143
  useEffect(function () {
@@ -187,7 +238,7 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
187
238
  _yield$fetchOptions = _context.sent;
188
239
  data = _yield$fetchOptions.data;
189
240
  total = _yield$fetchOptions.total;
190
- newOptions = (_selectOptions.current || []).concat(data || []);
241
+ newOptions = (current === 1 ? [] : _selectOptions.current || []).concat(data || []);
191
242
  _maxPage.current = Math.ceil(total / pageSize) || 1;
192
243
  // 下拉列表滚动至最新数据的位置
193
244
  if (_listEl.current) {
@@ -209,12 +260,12 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
209
260
 
210
261
  // 搜索防抖函数
211
262
  var debounceSearcher = useMemo(function () {
212
- return Utils.debounce(loadOptions, 350);
263
+ return debounce(loadOptions, 350);
213
264
  }, [loadOptions]);
214
265
 
215
266
  // 文本框值变化时回调
216
267
  var search = function search(v) {
217
- var _v = v.trim();
268
+ var _v = (v === null || v === void 0 ? void 0 : v.trim()) || '';
218
269
  setSearchValue(_v);
219
270
  if (fetchOptions) {
220
271
  debounceSearcher(_v, 1);
@@ -231,7 +282,7 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
231
282
  _extra.current = extra;
232
283
  }, [extra, loadOptions]);
233
284
 
234
- // 滚动触底防抖函数
285
+ // 滚动触底防抖函数。注意需要pageSize要够大,否则不会触发滚动条滚动,也就不会翻页。建议用默认的20
235
286
  var debounceScrollor = useMemo(function () {
236
287
  var scroll = function scroll(e) {
237
288
  var start = e.target.scrollTop + e.target.offsetHeight;
@@ -241,7 +292,7 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
241
292
  loadOptions(searchValue, _current.current + 1);
242
293
  }
243
294
  };
244
- return Utils.debounce(scroll, 350);
295
+ return debounce(scroll, 350);
245
296
  }, [loadOptions, searchValue]);
246
297
 
247
298
  // 下拉列表滚动时的回调
@@ -254,13 +305,16 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
254
305
  }
255
306
  onPopupScroll === null || onPopupScroll === void 0 || onPopupScroll(e);
256
307
  };
308
+ var clearSearchData = function clearSearchData() {
309
+ setSearchValue('');
310
+ loadOptions('', 1);
311
+ };
257
312
 
258
313
  // 失去焦点时的回调(若为异步分页查询,需重置查询)
259
314
  var blur = function blur(e) {
260
315
  // 若当前文本框有值,则清空文本框并重置查询
261
- if (searchValue) {
262
- setSearchValue('');
263
- loadOptions('', 1);
316
+ if (useDefaultSearch && searchValue) {
317
+ clearSearchData();
264
318
  }
265
319
  onBlur === null || onBlur === void 0 || onBlur(e);
266
320
  };
@@ -277,8 +331,38 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
277
331
  }
278
332
  }
279
333
  }
334
+ // 新版搜索交互逻辑
335
+ if (!useDefaultSearch) {
336
+ if (open) {
337
+ var _panelSearchInputRef$;
338
+ (_panelSearchInputRef$ = panelSearchInputRef.current) === null || _panelSearchInputRef$ === void 0 || _panelSearchInputRef$.focus();
339
+ } else if (searchValue) {
340
+ // 避免界面抖动
341
+ setTimeout(clearSearchData, 200);
342
+ }
343
+ }
280
344
  onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 || onDropdownVisibleChange(open);
281
345
  };
346
+ var renderDropdownPanel = function renderDropdownPanel(menu) {
347
+ if (!multiple || !searchInPanel) {
348
+ return menu;
349
+ }
350
+ return /*#__PURE__*/_jsxs(_Fragment, {
351
+ children: [/*#__PURE__*/_jsx(PanelSearchInput, {
352
+ ref: panelSearchInputRef,
353
+ placeholder: searchInPanelPlaceholder,
354
+ searchValue: searchValue,
355
+ onSearch: search
356
+ }), menu, filteredOptions.length > 0 && fetching && /*#__PURE__*/_jsx("div", {
357
+ style: {
358
+ color: '#999',
359
+ fontSize: 12,
360
+ textAlign: 'center'
361
+ },
362
+ children: "\u52A0\u8F7D\u4E2D..."
363
+ })]
364
+ });
365
+ };
282
366
  return /*#__PURE__*/_jsxs("div", {
283
367
  style: _objectSpread({
284
368
  position: label ? 'relative' : 'static',
@@ -297,10 +381,11 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
297
381
  value: selectValue,
298
382
  onChange: change,
299
383
  labelInValue: labelInValue,
300
- options: selectOptions,
384
+ options: filteredOptions,
301
385
  disabled: disabled,
302
386
  placeholder: "\u8BF7\u9009\u62E9",
303
- showSearch: true,
387
+ showSearch: useDefaultSearch // 否则会和panel中的search冲突
388
+ ,
304
389
  optionFilterProp: "label",
305
390
  allowClear: true,
306
391
  maxTagCount: _maxTagCount,
@@ -330,8 +415,8 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
330
415
  });
331
416
  },
332
417
  filterOption: fetchOptions ? false : true,
333
- searchValue: searchValue,
334
- onSearch: search,
418
+ searchValue: useDefaultSearch ? searchValue : undefined,
419
+ onSearch: useDefaultSearch ? search : undefined,
335
420
  loading: fetching,
336
421
  notFoundContent: fetching ? /*#__PURE__*/_jsx(Spin, {
337
422
  size: "small"
@@ -340,7 +425,8 @@ var McSelect = /*#__PURE__*/forwardRef(function (props, ref) {
340
425
  }),
341
426
  onPopupScroll: popupScroll,
342
427
  onBlur: blur,
343
- onDropdownVisibleChange: dropdownVisibleChange
428
+ onDropdownVisibleChange: dropdownVisibleChange,
429
+ dropdownRender: renderDropdownPanel
344
430
  }, rest), {}, {
345
431
  mode: multiple ? 'multiple' : undefined,
346
432
  fieldNames: undefined
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * title: 设置本身宽度以支持ellipsis
3
+ * description: 在McTag上设置宽度,以支持ellipsis。同时支持复制
4
+ */
5
+ import McTag from "../index";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export default (function () {
8
+ var uri = '/recommend/page/123/page/123/page/123';
9
+ return /*#__PURE__*/_jsx(McTag, {
10
+ style: {
11
+ maxWidth: 150
12
+ },
13
+ ellipsis: true,
14
+ color: "blue",
15
+ copyable: true,
16
+ children: uri
17
+ });
18
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * title: 设置父组件宽度以支持ellipsis
3
+ * description: 在McTag上设置宽度,以支持ellipsis。同时支持复制
4
+ */
5
+ import McTag from "../index";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export default (function () {
8
+ var uri = '/recommend/page/123/page/123/page/123';
9
+ return /*#__PURE__*/_jsx("div", {
10
+ style: {
11
+ width: 200
12
+ },
13
+ children: /*#__PURE__*/_jsx(McTag, {
14
+ color: "blue",
15
+ copyable: true,
16
+ ellipsis: true,
17
+ children: uri
18
+ })
19
+ });
20
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * title: 支持复制
3
+ * description: 普通McTag模式也支持复制
4
+ */
5
+ import { ExclamationCircleOutlined } from 'much-icons';
6
+ import McTag from "../index";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export default (function () {
9
+ return /*#__PURE__*/_jsx(McTag, {
10
+ style: {
11
+ maxWidth: 150
12
+ },
13
+ ellipsis: true,
14
+ color: "warning",
15
+ icon: /*#__PURE__*/_jsx(ExclamationCircleOutlined, {}),
16
+ copyable: true,
17
+ children: "click me to copy"
18
+ });
19
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => import("react/jsx-runtime").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * title: 自定义ellipsis属性
3
+ */
4
+ import McTag from "../index";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export default (function () {
7
+ var uri = '/recommend/page/123/page/123/page/123';
8
+ return /*#__PURE__*/_jsx("div", {
9
+ style: {
10
+ width: 200
11
+ },
12
+ children: /*#__PURE__*/_jsx(McTag, {
13
+ color: "blue",
14
+ copyable: true,
15
+ ellipsis: {
16
+ tooltip: true,
17
+ suffix: '等'
18
+ },
19
+ children: uri
20
+ })
21
+ });
22
+ });
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import { TagProps } from 'antd';
3
+ import { EllipsisConfig } from 'antd/es/typography/Base';
4
+ interface McTagProps {
5
+ /**
6
+ * @description 为true时,使用默认行为,展示tooltip;为对象时,传递给Typography.Text的ellipsis属性
7
+ * @default undefined
8
+ */
9
+ ellipsis?: true | EllipsisConfig;
10
+ /**
11
+ * @description 是否可复制
12
+ * @default 默认为false
13
+ */
14
+ copyable?: boolean;
15
+ /**
16
+ * @description 省略模式时,设置文字样式。(一般用不上)
17
+ * @default undefined
18
+ */
19
+ ellipsisTextStyle?: React.CSSProperties;
20
+ }
21
+ declare const McTag: (props: TagProps & McTagProps) => import("react/jsx-runtime").JSX.Element;
22
+ export default McTag;
@@ -0,0 +1,59 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["ellipsis", "children", "copyable", "onClick", "ellipsisTextStyle"],
4
+ _excluded2 = ["style"];
5
+ import { message, Tag, Typography } from 'antd';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ var McTag = function McTag(props) {
8
+ var ellipsis = props.ellipsis,
9
+ children = props.children,
10
+ copyable = props.copyable,
11
+ _onClick = props.onClick,
12
+ ellipsisTextStyle = props.ellipsisTextStyle,
13
+ tagProps = _objectWithoutProperties(props, _excluded);
14
+ var useEllipsis = typeof children === 'string' && !!ellipsis;
15
+ var style = tagProps.style,
16
+ restTagProps = _objectWithoutProperties(tagProps, _excluded2);
17
+ var renderChildren = function renderChildren() {
18
+ if (useEllipsis) {
19
+ return /*#__PURE__*/_jsx(Typography.Text, {
20
+ style: _objectSpread({
21
+ color: 'inherit',
22
+ fontSize: 'inherit'
23
+ }, ellipsisTextStyle),
24
+ ellipsis: ellipsis === true ? {
25
+ tooltip: children
26
+ } : ellipsis,
27
+ children: children
28
+ });
29
+ }
30
+ return children;
31
+ };
32
+ return /*#__PURE__*/_jsx(Tag, _objectSpread(_objectSpread({
33
+ onClick: function onClick(e) {
34
+ if (copyable) {
35
+ var copyText = typeof copyable === 'string' ? copyable : children;
36
+ if (!(typeof copyText === 'string')) {
37
+ if (process.env.NODE_ENV === 'development') throw Error('copyable prop only support string children or string copyable');
38
+ return;
39
+ }
40
+ if (navigator.clipboard) {
41
+ navigator.clipboard.writeText(copyText).then(function () {
42
+ return message.success('复制成功!');
43
+ }, function () {
44
+ return message.error('复制失败!');
45
+ });
46
+ } else {
47
+ message.error('当前域名无权限使用剪切板');
48
+ }
49
+ }
50
+ if (_onClick) _onClick(e);
51
+ },
52
+ style: _objectSpread({
53
+ maxWidth: useEllipsis ? '100%' : 'none'
54
+ }, style)
55
+ }, restTagProps), {}, {
56
+ children: renderChildren()
57
+ }));
58
+ };
59
+ export default McTag;
@@ -32,7 +32,8 @@
32
32
  },
33
33
  "Radio": {
34
34
  "buttonLineBg": "rgb(216, 216, 216)",
35
- "buttonLineHeight": 16
35
+ "buttonLineHeight": 16,
36
+ "buttonCheckedBorderColorDisabled": "rgb(216, 216, 216)"
36
37
  }
37
38
  }
38
39
  }
@@ -24,6 +24,16 @@ export default (function () {
24
24
  label: '选项二',
25
25
  value: 2
26
26
  }]
27
+ }), /*#__PURE__*/_jsx(Radio.Group, {
28
+ defaultValue: 1,
29
+ options: [{
30
+ label: '选项一',
31
+ value: 1,
32
+ disabled: true
33
+ }, {
34
+ label: '选项二',
35
+ value: 2
36
+ }]
27
37
  }), /*#__PURE__*/_jsx(Radio.Group, {
28
38
  defaultValue: 2,
29
39
  optionType: "button",
@@ -57,6 +67,20 @@ export default (function () {
57
67
  label: '选项三',
58
68
  value: 3
59
69
  }]
70
+ }), /*#__PURE__*/_jsx(Radio.Group, {
71
+ defaultValue: 1,
72
+ optionType: "button",
73
+ options: [{
74
+ label: '选项一',
75
+ value: 1,
76
+ disabled: true
77
+ }, {
78
+ label: '选项二',
79
+ value: 2
80
+ }, {
81
+ label: '选项三',
82
+ value: 3
83
+ }]
60
84
  }), /*#__PURE__*/_jsx(Radio.Group, {
61
85
  defaultValue: 2,
62
86
  optionType: "button",
@@ -92,6 +116,21 @@ export default (function () {
92
116
  label: '选项三',
93
117
  value: 3
94
118
  }]
119
+ }), /*#__PURE__*/_jsx(Radio.Group, {
120
+ defaultValue: 1,
121
+ optionType: "button",
122
+ buttonStyle: "solid",
123
+ options: [{
124
+ label: '选项一',
125
+ value: 1,
126
+ disabled: true
127
+ }, {
128
+ label: '选项二',
129
+ value: 2
130
+ }, {
131
+ label: '选项三',
132
+ value: 3
133
+ }]
95
134
  })]
96
135
  });
97
136
  });
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
2
2
  var _templateObject;
3
3
  // @ts-nocheck
4
4
  import { createGlobalStyle } from 'antd-style';
5
- var globalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n// <====================== Layout ======================>\n\n", "\n\n// <====================== Font ======================>\n\n@font-face {\n font-family: 'SourceHanSansCN';\n src: url(", ");\n}\n\nbody * {\n font-family: 'SourceHanSansCN';\n}\n\n// <====================== Button ======================>\n\n// primary\n.ant-btn-primary[disabled]{\n background: ", ";\n color: ", ";\n opacity: 0.3;\n}\n\n// default\n.ant-btn-default[disabled] {\n border-color: ", " !important;\n}\n\n// danger\n.ant-btn-default.ant-btn-dangerous,.ant-btn-default[data-danger],\n.ant-btn-default.ant-btn-dangerous[disabled],.ant-btn-default[data-danger][disabled] {\n color: ", ";\n background: ", ";\n border-color:", ";\n\n &:hover {\n color: ", " !important;\n background: ", " !important;\n border-color:", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n.ant-btn-default.ant-btn-dangerous[disabled],.ant-btn-default[data-danger][disabled] {\n opacity: 0.4;\n}\n\n// secondary\n.ant-btn-default[data-secondary],\n// modal\u3001drawer\u3001popconfirm footer\n.ant-modal-footer .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous),\n.ant-drawer-footer .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous),\n.ant-popconfirm-buttons .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous){\n background: ", ";\n border-color: ", ";\n\n &:hover {\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n border-color: ", " !important;\n color: ", " !important;\n }\n}\n\n.ant-btn-default[data-secondary][disabled] {\n color: ", " ;\n background: ", ";\n border-color: ", " !important;\n\n &:hover {\n color: ", ";\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// add\n.ant-btn-default[data-add] {\n background: ", " !important;\n color: ", " !important;\n border-color: ", " !important;\n\n &:hover {\n color: ", " !important;\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active{\n color: ", " !important;\n }\n}\n\n.ant-btn-default[data-add][disabled] {\n opacity: 0.4;\n color: ", ";\n\n &:hover {\n background: ", " !important;\n color: ", " !important;\n }\n\n &:active{\n background: ", " !important;\n color: ", " !important;\n }\n}\n\n//dashed\n.ant-btn-dashed {\n background: ", " !important;\n border-color: ", " !important;\n}\n\n.ant-btn-dashed:not([disabled]) {\n &:hover {\n background: ", " !important;\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active{\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// dashed danger\n.ant-btn-dashed.ant-btn-dangerous,\n.ant-btn-dashed.ant-btn-dangerous:disabled {\n color: ", " !important;\n border-color: ", " !important;\n\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n.ant-btn-dashed.ant-btn-dangerous:disabled {\n opacity: 0.4;\n\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// ghost\n.ant-btn-background-ghost:not([disabled]) {\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// link\n.ant-btn-link:not([disabled]) {\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n\n }\n}\n\n.ant-btn-link[disabled] {\n color: ", " !important;\n opacity: 0.3;\n}\n\n// link danger\n.ant-btn-link.ant-btn-dangerous {\n\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n\n.ant-btn-link.ant-btn-dangerous:disabled {\n color: ", " !important;\n opacity: 0.3;\n}\n\n\n\n// <====================== Drawer ======================>\n\n.ant-drawer .ant-drawer-header{\n border-bottom: none;\n padding: 23px 24px;\n}\n// Drawer \u5BBD\u9AD8 \u4E1A\u52A1\u65B9\u81EA\u884C\u5B9E\u73B0\n//.ant-drawer .ant-drawer-content-wrapper {\n// min-width: 480px\n//}\n.ant-drawer .ant-drawer-body{\n padding: 0 24px;\n}\n.ant-drawer .ant-drawer-footer{\n border-top: none;\n padding: 24px;\n}\n\n// <====================== Modal ======================>\n\n.ant-modal .ant-modal-header {\n margin-bottom:24px;\n}\n\n.ant-modal-body {\n overflow-y: auto\n}\n\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1280px\u4E14\u5C0F\u4E8E1366px\u7684\u65F6\u5019\u6267\u884C,1280-1366*/\n@media screen and (min-width:1280px) and (max-width: 1366px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 80px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 40px;\n }\n }\n}\n\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1440px\u4E14\u5C0F\u4E8E1600px\u7684\u65F6\u5019\u6267\u884C,1440-1600*/\n@media screen and (min-width:1440px) and (max-width:1600px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 200px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 80px;\n }\n }\n}\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1680px\u4E14\u5C0F\u4E8E1920px\u7684\u65F6\u5019\u6267\u884C,1680-1920*/\n@media screen and (min-width:1680px) and (max-width:2560px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 200px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 150px;\n }\n }\n}\n\n// <====================== Tabs ======================>\n\n.ant-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n text-shadow: unset;\n}\n.ant-tabs-card {\n .ant-tabs-nav {\n &::before {\n border: none;\n }\n .ant-tabs-nav-wrap {\n background: transparent;\n .ant-tabs-nav-list {\n background: ", ";\n border-top-right-radius: ", "px;\n .ant-tabs-tab {\n position: relative;\n border: ", ";\n border-radius: ", "px ", "px 0px 0px;\n &::after {\n position: absolute;\n top: 11px;\n right: -1px;\n width: 1px;\n height: 24px;\n background: ", ";\n content: '';\n }\n }\n .ant-tabs-nav-add {\n position: relative;\n border: none;\n border-top-right-radius: ", "px;\n &::before {\n position: absolute;\n top: 11px;\n left: 1px;\n width: 1px;\n height: 24px;\n background: ", ";\n content: '';\n }\n }\n .ant-tabs-tab-active {\n border: ", ";\n &::after {\n display: none;\n }\n }\n .ant-tabs-tab:nth-last-of-type(2) {\n &::after {\n display: none;\n }\n }\n .ant-tabs-tab:has(+ .ant-tabs-tab-active) {\n &::after {\n display: none;\n }\n }\n }\n }\n }\n}\n\n// <====================== Pagination ======================>\n\n.ant-pagination {\n display: flex;\n\n .ant-pagination-total-text {\n margin-right: auto;\n color: ", ";\n }\n\n .ant-pagination-item.ant-pagination-item-active {\n &:hover {\n border-color: ", ";\n }\n\n &>a {\n color: ", ";\n }\n }\n\n &.ant-pagination-mini li:not(:first-of-type) {\n margin-left: 2px;\n }\n}\n\n// <====================== Radio ======================>\n.ant-radio-group {\n .ant-radio-button-wrapper {\n position: relative;\n border: 1px solid ", ";\n &::before {\n display: none;\n }\n &::after {\n display: inline-block;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 1px;\n height: ", "px;\n background: ", ";\n right: -1px;\n content: '';\n }\n }\n .ant-radio-button-wrapper-checked {\n border: 1px solid ", ";\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper:nth-last-of-type(1) {\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper:has(+ .ant-radio-button-wrapper-checked) {\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper-disabled {\n border: 1px solid ", ";\n }\n .ant-radio-button-wrapper-checked:has(+ .ant-radio-button-wrapper-disabled) {\n border: 1px solid ", ";\n background: 1px solid ", ";\n }\n}\n"])), function (props) {
5
+ var globalStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n// <====================== Layout ======================>\n\n", "\n\n// <====================== Font ======================>\n\n@font-face {\n font-family: 'SourceHanSansCN';\n src: url(", ");\n}\n\nbody * {\n font-family: 'SourceHanSansCN';\n}\n\n// <====================== Button ======================>\n\n// primary\n.ant-btn-primary[disabled]{\n background: ", ";\n color: ", ";\n opacity: 0.3;\n}\n\n// default\n.ant-btn-default[disabled] {\n border-color: ", " !important;\n}\n\n// danger\n.ant-btn-default.ant-btn-dangerous,.ant-btn-default[data-danger],\n.ant-btn-default.ant-btn-dangerous[disabled],.ant-btn-default[data-danger][disabled] {\n color: ", ";\n background: ", ";\n border-color:", ";\n\n &:hover {\n color: ", " !important;\n background: ", " !important;\n border-color:", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n.ant-btn-default.ant-btn-dangerous[disabled],.ant-btn-default[data-danger][disabled] {\n opacity: 0.4;\n}\n\n// secondary\n.ant-btn-default[data-secondary],\n// modal\u3001drawer\u3001popconfirm footer\n.ant-modal-footer .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous),\n.ant-drawer-footer .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous),\n.ant-popconfirm-buttons .ant-btn-default:not([data-default]):not([data-danger]):not(.ant-btn-dangerous){\n background: ", ";\n border-color: ", ";\n\n &:hover {\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n border-color: ", " !important;\n color: ", " !important;\n }\n}\n\n.ant-btn-default[data-secondary][disabled] {\n color: ", " ;\n background: ", ";\n border-color: ", " !important;\n\n &:hover {\n color: ", ";\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// add\n.ant-btn-default[data-add] {\n background: ", " !important;\n color: ", " !important;\n border-color: ", " !important;\n\n &:hover {\n color: ", " !important;\n background: ", " !important;\n border-color: ", " !important;\n }\n\n &:active{\n color: ", " !important;\n }\n}\n\n.ant-btn-default[data-add][disabled] {\n opacity: 0.4;\n color: ", ";\n\n &:hover {\n background: ", " !important;\n color: ", " !important;\n }\n\n &:active{\n background: ", " !important;\n color: ", " !important;\n }\n}\n\n//dashed\n.ant-btn-dashed {\n background: ", " !important;\n border-color: ", " !important;\n}\n\n.ant-btn-dashed:not([disabled]) {\n &:hover {\n background: ", " !important;\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active{\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// dashed danger\n.ant-btn-dashed.ant-btn-dangerous,\n.ant-btn-dashed.ant-btn-dangerous:disabled {\n color: ", " !important;\n border-color: ", " !important;\n\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n.ant-btn-dashed.ant-btn-dangerous:disabled {\n opacity: 0.4;\n\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// ghost\n.ant-btn-background-ghost:not([disabled]) {\n &:hover {\n color: ", " !important;\n border-color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n border-color: ", " !important;\n }\n}\n\n// link\n.ant-btn-link:not([disabled]) {\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n\n }\n}\n\n.ant-btn-link[disabled] {\n color: ", " !important;\n opacity: 0.3;\n}\n\n// link danger\n.ant-btn-link.ant-btn-dangerous {\n\n &:hover {\n color: ", " !important;\n }\n\n &:active {\n color: ", " !important;\n }\n}\n\n.ant-btn-link.ant-btn-dangerous:disabled {\n color: ", " !important;\n opacity: 0.3;\n}\n\n\n\n// <====================== Drawer ======================>\n\n.ant-drawer .ant-drawer-header{\n border-bottom: none;\n padding: 23px 24px;\n .ant-drawer-header-title {\n flex-direction: row-reverse;\n .ant-drawer-close {\n margin: -4px;\n }\n }\n}\n// Drawer \u5BBD\u9AD8 \u4E1A\u52A1\u65B9\u81EA\u884C\u5B9E\u73B0\n//.ant-drawer .ant-drawer-content-wrapper {\n// min-width: 480px\n//}\n.ant-drawer .ant-drawer-body{\n padding: 0 24px;\n}\n.ant-drawer .ant-drawer-footer{\n border-top: none;\n padding: 24px;\n}\n\n// <====================== Modal ======================>\n\n.ant-modal .ant-modal-header {\n margin-bottom:24px;\n}\n\n.ant-modal-body {\n overflow-y: auto\n}\n\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1280px\u4E14\u5C0F\u4E8E1366px\u7684\u65F6\u5019\u6267\u884C,1280-1366*/\n@media screen and (min-width:1280px) and (max-width: 1366px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 80px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 40px;\n }\n }\n}\n\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1440px\u4E14\u5C0F\u4E8E1600px\u7684\u65F6\u5019\u6267\u884C,1440-1600*/\n@media screen and (min-width:1440px) and (max-width:1600px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 200px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 80px;\n }\n }\n}\n/*\u5F53\u9875\u9762\u5BBD\u5EA6\u5927\u4E8E1680px\u4E14\u5C0F\u4E8E1920px\u7684\u65F6\u5019\u6267\u884C,1680-1920*/\n@media screen and (min-width:1680px) and (max-width:2560px){\n .ant-modal-root[data-small] {\n .ant-modal-body {\n max-height: 150px;\n }\n .ant-modal {\n top: 200px;\n }\n }\n\n .ant-modal-root[data-medium] {\n .ant-modal-body {\n max-height: 300px;\n min-height: 150px\n }\n .ant-modal {\n top: 150px;\n }\n }\n\n .ant-modal-root[data-large] {\n .ant-modal-body {\n max-height: 450px;\n min-height: 300px\n }\n .ant-modal {\n top: 150px;\n }\n }\n}\n\n// <====================== Tabs ======================>\n\n.ant-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n text-shadow: unset;\n}\n.ant-tabs-card {\n .ant-tabs-nav {\n margin: 0;\n &::before {\n border: none;\n }\n .ant-tabs-nav-wrap {\n background: transparent;\n .ant-tabs-nav-list {\n background: ", ";\n border-top-right-radius: ", "px;\n .ant-tabs-tab {\n position: relative;\n border: ", ";\n border-radius: ", "px ", "px 0px 0px;\n &::after {\n position: absolute;\n top: 11px;\n right: -1px;\n width: 1px;\n height: 24px;\n background: ", ";\n content: '';\n }\n }\n .ant-tabs-nav-add {\n position: relative;\n border: none;\n border-top-right-radius: ", "px;\n &::before {\n position: absolute;\n top: 11px;\n left: 1px;\n width: 1px;\n height: 24px;\n background: ", ";\n content: '';\n }\n }\n .ant-tabs-tab-active {\n border: ", ";\n &::after {\n display: none;\n }\n }\n .ant-tabs-tab:nth-last-of-type(2) {\n &::after {\n display: none;\n }\n }\n .ant-tabs-tab:has(+ .ant-tabs-tab-active) {\n &::after {\n display: none;\n }\n }\n }\n }\n }\n}\n\n// <====================== Pagination ======================>\n\n.ant-pagination {\n display: flex;\n align-items: center;\n\n .ant-pagination-total-text {\n margin-right: auto;\n color: ", ";\n }\n\n .ant-pagination-item.ant-pagination-item-active {\n &:hover {\n border-color: ", ";\n }\n\n &>a {\n color: ", ";\n }\n }\n\n .ant-pagination-options {\n .ant-pagination-options-quick-jumper {\n input {\n background: ", ";\n border-color: ", ";\n padding: 12px;\n\n &:hover {\n border-color: ", ";\n }\n\n &:focus {\n border-color: ", ";\n }\n }\n }\n }\n\n &.ant-pagination-mini li:not(:first-of-type) {\n margin-left: 2px;\n }\n}\n\n// <====================== Radio ======================>\n .ant-radio-group {\n .ant-radio-button-wrapper {\n position: relative;\n border: 1px solid ", ";\n &::before {\n display: none;\n }\n &::after {\n display: inline-block;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 1px;\n height: ", "px;\n background: ", ";\n right: -1px;\n content: '';\n }\n }\n .ant-radio-button-wrapper-checked {\n border: 1px solid ", ";\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper:nth-last-of-type(1) {\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper:has(+ .ant-radio-button-wrapper-checked) {\n &::after {\n display: none;\n }\n }\n .ant-radio-button-wrapper-disabled {\n border: 1px solid ", " !important;\n }\n .ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked {\n border-color: ", " !important;\n }\n}\n"])), function (props) {
6
6
  return props.layout;
7
7
  }, function (props) {
8
8
  return props.font.Regular;
@@ -154,6 +154,14 @@ var globalStyle = createGlobalStyle(_templateObject || (_templateObject = _tagge
154
154
  return props.theme.CustomToken.Pagination.itemActiveHoverBorderColor;
155
155
  }, function (props) {
156
156
  return props.theme.CustomToken.Pagination.itemActiveColor;
157
+ }, function (props) {
158
+ return props.theme.Input.colorBgContainer;
159
+ }, function (props) {
160
+ return props.theme.Input.colorBorder;
161
+ }, function (props) {
162
+ return props.theme.Input.hoverBorderColor;
163
+ }, function (props) {
164
+ return props.theme.Input.hoverBorderColor;
157
165
  }, function (props) {
158
166
  return props.theme.Radio.buttonBg;
159
167
  }, function (props) {
@@ -165,8 +173,6 @@ var globalStyle = createGlobalStyle(_templateObject || (_templateObject = _tagge
165
173
  }, function (props) {
166
174
  return props.theme.Radio.colorBgContainerDisabled;
167
175
  }, function (props) {
168
- return props.theme.Radio.buttonCheckedColorDisabled;
169
- }, function (props) {
170
- return props.theme.Radio.buttonCheckedBgDisabled;
176
+ return props.theme.CustomToken.Radio.buttonCheckedBorderColorDisabled;
171
177
  });
172
178
  export default globalStyle;
@@ -121,7 +121,7 @@
121
121
  "Cascader": {
122
122
  "colorBgContainerDisabled": "rgba(240, 242, 245, 0.5)",
123
123
  "colorSplit": "rgba(5, 5, 5, 0)",
124
- "colorBorder": "rgba(217, 217, 217, 0)"
124
+ "colorBorder": "rgba(217, 217, 217)"
125
125
  },
126
126
  "Switch": {
127
127
  "handleShadow": "-1px 0px 2px 0px rgba(0, 0, 0, 0.1)",
@@ -139,7 +139,7 @@
139
139
  "cardBg": "#F0F4F9",
140
140
  "cardGutter": 0,
141
141
  "cardHeight": 44,
142
- "cardPadding": "11px 32px"
142
+ "cardPadding": "12px 32px"
143
143
  },
144
144
  "Pagination": {
145
145
  "itemActiveBg": "#325CF7",
@@ -1,4 +1,5 @@
1
- declare const _default: {
2
- debounce: (fn: (...args: any[]) => any, wait: number) => (...args: any[]) => void;
3
- };
4
- export default _default;
1
+ /** 工具方法 */
2
+ export { default as debounce } from 'lodash/debounce';
3
+ export { default as isEmpty } from 'lodash/isEmpty';
4
+ export { default as isNil } from 'lodash/isNil';
5
+ export { default as throttle } from 'lodash/throttle';
@@ -1,26 +1,6 @@
1
- /**
2
- * 防抖函数
3
- * @param fn 回调函数
4
- * @param wait 间隔时间
5
- * @returns {void}
6
- */
7
- var debounce = function debounce(fn, wait) {
8
- var timer = null;
9
- return function () {
10
- var _this = this;
11
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
12
- args[_key] = arguments[_key];
13
- }
14
- if (timer) {
15
- clearInterval(timer);
16
- }
17
- timer = setTimeout(function () {
18
- fn.call(_this, args);
19
- clearInterval(timer);
20
- timer = null;
21
- }, wait);
22
- };
23
- };
24
- export default {
25
- debounce: debounce
26
- };
1
+ /** 工具方法 */
2
+
3
+ export { default as debounce } from 'lodash/debounce';
4
+ export { default as isEmpty } from 'lodash/isEmpty';
5
+ export { default as isNil } from 'lodash/isNil';
6
+ export { default as throttle } from 'lodash/throttle';
package/dist/index.d.ts CHANGED
@@ -10,10 +10,13 @@ import McModalProvider from './McModalProvider';
10
10
  import McPeriodSelect from './McPeriodSelect';
11
11
  import McPopoverButton from './McPopoverButton';
12
12
  import McPopoverForm from './McPopoverForm';
13
+ import McProSelect from './McProSelect';
13
14
  import McResult from './McResult';
14
15
  import McSelect from './McSelect';
16
+ import McTag from './McTag';
17
+ import McLazyLoader from './McLazyLoader';
15
18
  import McThemeConfig from './McThemeConfig';
16
19
  import McTreePanel from './McTreePanel';
17
20
  import McTreeSelect from './McTreeSelect';
18
- import Utils from './Utils';
19
- export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McResult, McSelect, McThemeConfig, McTreePanel, McTreeSelect, Utils, };
21
+ import * as Utils from './Utils';
22
+ export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McSelect, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils, };
package/dist/index.js CHANGED
@@ -10,10 +10,13 @@ import McModalProvider from "./McModalProvider";
10
10
  import McPeriodSelect from "./McPeriodSelect";
11
11
  import McPopoverButton from "./McPopoverButton";
12
12
  import McPopoverForm from "./McPopoverForm";
13
+ import McProSelect from "./McProSelect";
13
14
  import McResult from "./McResult";
14
15
  import McSelect from "./McSelect";
16
+ import McTag from "./McTag";
17
+ import McLazyLoader from "./McLazyLoader";
15
18
  import McThemeConfig from "./McThemeConfig";
16
19
  import McTreePanel from "./McTreePanel";
17
20
  import McTreeSelect from "./McTreeSelect";
18
- import Utils from "./Utils";
19
- export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McResult, McSelect, McThemeConfig, McTreePanel, McTreeSelect, Utils };
21
+ import * as Utils from "./Utils";
22
+ export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McLazyLoader, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McProSelect, McResult, McSelect, McTag, McThemeConfig, McTreePanel, McTreeSelect, Utils };