@lemon-fe/kits 1.0.0-125 → 1.0.0-126

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.
@@ -190,14 +190,14 @@ function Filter(props) {
190
190
  collapsed = _useState14[0],
191
191
  setCollapsed = _useState14[1];
192
192
 
193
- var _useRequest = useRequest(function () {
193
+ useRequest(function () {
194
194
  if (!storageKey) {
195
195
  return null;
196
196
  }
197
197
 
198
198
  return getStorageData(storageKey);
199
199
  }, {
200
- loadingState: false,
200
+ manual: false,
201
201
  onSuccess: function onSuccess(res) {
202
202
  if (res !== null) {
203
203
  setTabs(function (prev) {
@@ -205,12 +205,7 @@ function Filter(props) {
205
205
  });
206
206
  }
207
207
  }
208
- }),
209
- init = _useRequest.run;
210
-
211
- useEffect(function () {
212
- init();
213
- }, []);
208
+ });
214
209
  useEffect(function () {
215
210
  if (value) {
216
211
  form.setFieldsValue(value);
@@ -357,7 +352,7 @@ function Filter(props) {
357
352
  var result = _objectSpread(_objectSpread({}, emptyValue), tabs[index].value);
358
353
 
359
354
  form.setFieldsValue(result);
360
- handleFinish(result, 'reset');
355
+ handleFinish(form.getFieldsValue(), 'reset');
361
356
  }
362
357
  };
363
358
 
@@ -26,6 +26,9 @@ declare namespace FormLayout {
26
26
  children?: React.ReactNode;
27
27
  }>;
28
28
  var Col: React.FC<{
29
+ /**
30
+ * @description 最大24,设计上6为一列
31
+ */
29
32
  span?: number | undefined;
30
33
  children?: React.ReactNode;
31
34
  className?: string | undefined;
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
 
5
5
  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; }
6
6
 
7
- import React from 'react';
8
7
  import classNames from 'classnames';
8
+ import React from 'react';
9
9
  import { prefixClassName } from "../utils";
10
10
  var prefix = prefixClassName('form');
11
11
 
@@ -58,6 +58,7 @@
58
58
 
59
59
  &-control {
60
60
  flex: 1 1 0;
61
+ min-width: 0;
61
62
  }
62
63
  }
63
64
 
@@ -1,5 +1,5 @@
1
- import type { ComponentProps } from 'react';
2
1
  import Icon from '@ant-design/icons';
2
+ import type { ComponentProps } from 'react';
3
3
  export default function Tip(props: {
4
4
  type?: 'success' | 'error' | 'warning' | 'info';
5
5
  } & ComponentProps<typeof Icon>): JSX.Element;
@@ -6,131 +6,121 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
6
6
 
7
7
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
8
8
 
9
- import React from 'react';
10
9
  import Icon from '@ant-design/icons';
10
+ import React from 'react';
11
11
 
12
12
  var ErrorSvg = function ErrorSvg(props) {
13
13
  return /*#__PURE__*/React.createElement("svg", _extends({
14
- width: "1em",
15
- height: "1em",
16
14
  xmlns: "http://www.w3.org/2000/svg",
17
15
  viewBox: "0 0 20 20"
18
16
  }, props), /*#__PURE__*/React.createElement("g", {
19
17
  fill: "none",
20
18
  fillRule: "evenodd"
21
19
  }, /*#__PURE__*/React.createElement("circle", {
22
- fill: "#EC4510",
23
20
  cx: "10",
24
21
  cy: "10",
25
- r: "10"
26
- }), /*#__PURE__*/React.createElement("g", {
27
- transform: "rotate(45 3.172 12.828)",
28
- fill: "#FFF"
29
- }, /*#__PURE__*/React.createElement("rect", {
30
- x: "4",
31
- width: "4",
32
- height: "12",
33
- rx: "1"
22
+ r: "10",
23
+ fill: "#FF4128"
24
+ }), /*#__PURE__*/React.createElement("rect", {
25
+ width: "2",
26
+ height: "10",
27
+ x: "9",
28
+ y: "5",
29
+ fill: "#FFF",
30
+ rx: "1",
31
+ transform: "rotate(45 10 10)"
34
32
  }), /*#__PURE__*/React.createElement("rect", {
35
- transform: "rotate(90 6 6)",
36
- x: "4",
37
- width: "4",
38
- height: "12",
39
- rx: "1"
40
- }))));
33
+ width: "2",
34
+ height: "10",
35
+ x: "9",
36
+ y: "5",
37
+ fill: "#FFF",
38
+ rx: "1",
39
+ transform: "scale(-1 1) rotate(45 0 -14.142)"
40
+ })));
41
41
  };
42
42
 
43
43
  var SuccessSvg = function SuccessSvg(props) {
44
44
  return /*#__PURE__*/React.createElement("svg", _extends({
45
- width: "1em",
46
- height: "1em",
47
45
  xmlns: "http://www.w3.org/2000/svg",
48
46
  viewBox: "0 0 20 20"
49
47
  }, props), /*#__PURE__*/React.createElement("g", {
50
48
  fill: "none",
51
49
  fillRule: "evenodd"
52
50
  }, /*#__PURE__*/React.createElement("circle", {
53
- fill: "#1ED07C",
54
51
  cx: "10",
55
52
  cy: "10",
56
- r: "10"
57
- }), /*#__PURE__*/React.createElement("g", {
58
- transform: "rotate(45 3.379 14.743)",
59
- fill: "#FFF"
60
- }, /*#__PURE__*/React.createElement("rect", {
61
- x: "4",
62
- width: "4",
63
- height: "12",
64
- rx: "1"
65
- }), /*#__PURE__*/React.createElement("rect", {
66
- transform: "rotate(90 4 10)",
67
- x: "2",
68
- y: "6",
69
- width: "4",
70
- height: "8",
71
- rx: "1"
72
- }))));
53
+ r: "10",
54
+ fill: "#22C07D"
55
+ }), /*#__PURE__*/React.createElement("path", {
56
+ stroke: "#FFF",
57
+ strokeLinecap: "round",
58
+ strokeLinejoin: "round",
59
+ strokeWidth: "2",
60
+ d: "m14.243 7.586-5.657 5.657-2.829-2.829"
61
+ })));
73
62
  };
74
63
 
75
64
  var WarningSvg = function WarningSvg(props) {
76
65
  return /*#__PURE__*/React.createElement("svg", _extends({
77
- width: "1em",
78
- height: "1em",
79
66
  xmlns: "http://www.w3.org/2000/svg",
80
67
  viewBox: "0 0 20 20"
81
68
  }, props), /*#__PURE__*/React.createElement("g", {
82
69
  fill: "none",
83
70
  fillRule: "evenodd"
84
71
  }, /*#__PURE__*/React.createElement("circle", {
85
- fill: "#FAAD14",
86
72
  cx: "10",
87
73
  cy: "10",
88
- r: "10"
74
+ r: "10",
75
+ fill: "#FF7F18"
89
76
  }), /*#__PURE__*/React.createElement("rect", {
77
+ width: "2",
78
+ height: "8",
79
+ x: "9",
80
+ y: "4",
90
81
  fill: "#FFF",
91
- x: "8",
92
- y: "13",
93
- width: "4",
94
- height: "4",
95
- rx: "1"
82
+ rx: "1",
83
+ transform: "matrix(-1 0 0 1 20 0)"
96
84
  }), /*#__PURE__*/React.createElement("rect", {
85
+ width: "2",
86
+ height: "2",
87
+ x: "9",
88
+ y: "13",
97
89
  fill: "#FFF",
98
- x: "8",
99
- y: "4",
100
- width: "4",
101
- height: "8",
102
- rx: "1"
90
+ rx: "1",
91
+ transform: "matrix(-1 0 0 1 20 0)"
103
92
  })));
104
93
  };
105
94
 
106
95
  var InfoSvg = function InfoSvg(props) {
107
96
  return /*#__PURE__*/React.createElement("svg", _extends({
108
- width: "1em",
109
- height: "1em",
110
97
  xmlns: "http://www.w3.org/2000/svg",
111
98
  viewBox: "0 0 20 20"
112
99
  }, props), /*#__PURE__*/React.createElement("g", {
113
100
  fill: "none",
114
- fillRule: "evenodd"
101
+ fillRule: "evenodd",
102
+ transform: "rotate(-180 10 10)"
115
103
  }, /*#__PURE__*/React.createElement("circle", {
116
- fill: "#2357DF",
117
104
  cx: "10",
118
105
  cy: "10",
119
- r: "10"
106
+ r: "10",
107
+ fill: "#226BF3"
120
108
  }), /*#__PURE__*/React.createElement("rect", {
121
- fill: "#FFF",
122
- x: "8",
109
+ width: "2",
110
+ height: "8",
111
+ x: "9",
123
112
  y: "4",
124
- width: "4",
125
- height: "4",
126
- rx: "1"
113
+ fill: "#FFF",
114
+ rx: "1",
115
+ transform: "matrix(-1 0 0 1 20 0)"
127
116
  }), /*#__PURE__*/React.createElement("rect", {
117
+ width: "2",
118
+ height: "2",
119
+ x: "9",
120
+ y: "13",
128
121
  fill: "#FFF",
129
- x: "8",
130
- y: "9",
131
- width: "4",
132
- height: "8",
133
- rx: "1"
122
+ rx: "1",
123
+ transform: "matrix(-1 0 0 1 20 0)"
134
124
  })));
135
125
  };
136
126
 
package/es/init.js CHANGED
@@ -6,15 +6,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
6
6
 
7
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); }
8
8
 
9
- import React from 'react';
10
- import { message, Modal, Select, ConfigProvider, Result, Button, DatePicker, Cascader, TreeSelect, Empty, Menu } from 'antd';
11
9
  import { config } from '@lemon-fe/hooks';
12
- import PageLoading from "./components/PageLoading";
10
+ import { message, Modal, Select, ConfigProvider, Result, Button, DatePicker, Cascader, TreeSelect, Empty, Menu } from 'antd';
11
+ import React from 'react';
13
12
  import Icons from "./components/Icons";
13
+ import PageLoading from "./components/PageLoading";
14
14
  import empty from "./styles/empty.png";
15
15
  var Tip = Icons.Tip,
16
16
  Down = Icons.Down,
17
- BigTip = Icons.BigTip,
18
17
  Close = Icons.Close,
19
18
  Clear = Icons.Clear;
20
19
  export default function init() {
@@ -71,10 +70,11 @@ export default function init() {
71
70
 
72
71
  Modal[item] = function () {
73
72
  return modalAPI(_objectSpread({
74
- icon: /*#__PURE__*/React.createElement(BigTip, {
73
+ title: '提示',
74
+ width: 400,
75
+ icon: /*#__PURE__*/React.createElement(Tip, {
75
76
  type: item
76
- }),
77
- title: '提示'
77
+ })
78
78
  }, arguments.length <= 0 ? undefined : arguments[0]));
79
79
  };
80
80
  });
@@ -82,9 +82,10 @@ export default function init() {
82
82
 
83
83
  Modal.confirm = function () {
84
84
  return modalConfirm(_objectSpread({
85
- icon: /*#__PURE__*/React.createElement(BigTip, {
85
+ icon: /*#__PURE__*/React.createElement(Tip, {
86
86
  type: "info"
87
87
  }),
88
+ width: 400,
88
89
  title: '提示'
89
90
  }, arguments.length <= 0 ? undefined : arguments[0]));
90
91
  };
@@ -66,57 +66,25 @@ a[title='站长统计'] {
66
66
 
67
67
  /** modal */
68
68
 
69
- .@{ant-prefix}-modal-content {
70
- border-radius: 8px;
71
- }
69
+ @modal-header-padding-horizontal: @padding-md;
70
+ @modal-body-padding: @padding-md;
71
+ @modal-footer-padding-horizontal: @padding-md;
72
+ @modal-confirm-body-padding: 20px;
73
+ @modal-border-radius: 8px;
72
74
 
73
- .@{ant-prefix}-modal-header {
74
- border-radius: 8px 8px 0 0;
75
+ .@{ant-prefix}-modal-confirm-body > .anticon {
76
+ margin-right: 8px;
75
77
  }
76
78
 
77
- .@{ant-prefix}-modal-confirm {
78
- .@{ant-prefix}-modal-body {
79
- padding: 0;
80
- }
81
-
82
- .@{ant-prefix}-modal-confirm-body {
83
- padding: 40px 48px;
84
- overflow: hidden;
85
-
86
- & > img:first-child {
87
- position: absolute;
88
- top: 40px;
89
- left: 48px;
90
- }
91
- }
92
-
93
- .@{ant-prefix}-modal-confirm-btns {
94
- float: none;
95
- margin-top: 0;
96
- padding: 10px 16px;
97
- text-align: right;
98
- background: transparent;
99
- border-top: 1px solid rgba(0, 0, 0, 0.06);
100
- border-radius: 0 0 2px 2px;
101
-
102
- & > .@{ant-prefix}-btn {
103
- min-width: 72px;
104
- }
105
- }
106
-
107
- .@{ant-prefix}-modal-confirm-title {
108
- float: none;
109
- margin-left: 56px;
110
- font-weight: 600;
111
- line-height: 24px;
112
- }
79
+ .@{ant-prefix}-modal-confirm-body
80
+ > .anticon
81
+ + .@{ant-prefix}-modal-confirm-title
82
+ + .@{ant-prefix}-modal-confirm-content {
83
+ margin-left: 30px;
84
+ }
113
85
 
114
- .@{ant-prefix}-modal-confirm-content {
115
- float: none;
116
- margin: 2px 0 0 56px;
117
- color: rgba(51, 51, 51, 0.5);
118
- line-height: 22px;
119
- }
86
+ .@{ant-prefix}-modal-confirm-body .@{ant-prefix}-modal-confirm-content {
87
+ color: fade(#333, 70);
120
88
  }
121
89
 
122
90
  /** pagination */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.0.0-125",
3
+ "version": "1.0.0-126",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -19,6 +19,7 @@
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org"
21
21
  },
22
+ "sideEffects": false,
22
23
  "module": "es/index.js",
23
24
  "typings": "es/index.d.ts",
24
25
  "main": "es/index.js",