ls-pro-common 1.1.1 → 1.1.3
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/dist/common.css +66 -3
- package/dist/common.js +1 -1
- package/dist/common.js.LICENSE.txt +14 -3
- package/dist/common.min.css +66 -3
- package/dist/common.min.js +1 -1
- package/dist/common.min.js.LICENSE.txt +14 -3
- package/es/components/AreaCascader.js +35 -48
- package/es/components/AreaCascaderPanel.js +55 -85
- package/es/components/DescritionCard.js +14 -19
- package/es/components/DtlLayout.js +25 -38
- package/es/components/IconSelector.js +27 -50
- package/es/components/ImageSelector.js +89 -139
- package/es/components/InputMultiLine.js +33 -45
- package/es/components/InputTable.js +118 -160
- package/es/components/Loading.js +3 -6
- package/es/components/Permission.d.ts +6 -0
- package/es/components/Permission.js +10 -0
- package/es/components/common.less +63 -0
- package/es/hooks/useDtl/index.d.ts +2 -2
- package/es/hooks/useDtl/index.js +685 -950
- package/es/hooks/usePermission/index.js +0 -9
- package/es/hooks/useSingle/index.d.ts +3 -3
- package/es/hooks/useSingle/index.js +431 -603
- package/es/http/index.js +116 -154
- package/es/index.d.ts +4 -2
- package/es/index.js +2 -2
- package/es/service/BaseService.js +121 -195
- package/es/utils/index.d.ts +9 -22
- package/es/utils/index.js +63 -181
- package/lib/components/404.js +1 -6
- package/lib/components/AreaCascader.js +37 -63
- package/lib/components/AreaCascaderPanel.js +57 -105
- package/lib/components/DescritionCard.js +16 -33
- package/lib/components/DtlLayout.js +27 -49
- package/lib/components/IconSelector.js +29 -64
- package/lib/components/ImageSelector.js +91 -162
- package/lib/components/InputMultiLine.js +35 -61
- package/lib/components/InputTable.js +120 -185
- package/lib/components/Loading.js +4 -16
- package/lib/components/Permission.d.ts +6 -0
- package/lib/components/Permission.js +18 -0
- package/lib/components/common.less +63 -0
- package/lib/hooks/useDtl/index.d.ts +2 -2
- package/lib/hooks/useDtl/index.js +686 -966
- package/lib/hooks/usePermission/index.js +0 -12
- package/lib/hooks/useSingle/index.d.ts +3 -3
- package/lib/hooks/useSingle/index.js +432 -618
- package/lib/http/index.js +114 -163
- package/lib/index.d.ts +4 -2
- package/lib/index.js +9 -21
- package/lib/service/BaseService.js +121 -201
- package/lib/utils/index.d.ts +9 -22
- package/lib/utils/index.js +85 -290
- package/package.json +2 -2
|
@@ -1,140 +1,106 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import "antd/es/message/style";
|
|
3
2
|
import _message from "antd/es/message";
|
|
4
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
4
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
5
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import { httpGet, httpPut, httpPost, httpDelete } from '../http';
|
|
8
8
|
/** 基本增删改查服务 */
|
|
9
|
-
|
|
10
9
|
var BaseService = /*#__PURE__*/function () {
|
|
11
10
|
function BaseService() {
|
|
12
11
|
_classCallCheck(this, BaseService);
|
|
13
|
-
|
|
12
|
+
/** 定义每个服务的api */
|
|
14
13
|
this.api = {};
|
|
14
|
+
/** 定义每个服务接口对应的请求方法,默认为 restful */
|
|
15
15
|
this.method = {
|
|
16
16
|
get: 'get',
|
|
17
17
|
edit: 'put',
|
|
18
18
|
delete: 'delete'
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
|
|
22
21
|
_createClass(BaseService, [{
|
|
23
22
|
key: "load",
|
|
24
|
-
value:
|
|
25
|
-
/** 加载数据方法 @param param 请求参数对象 */
|
|
26
|
-
function () {
|
|
23
|
+
value: /** 加载数据方法 @param param 请求参数对象 */function () {
|
|
27
24
|
var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(param) {
|
|
28
25
|
var _this$api;
|
|
29
|
-
|
|
30
26
|
var url;
|
|
31
27
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
32
|
-
while (1) {
|
|
33
|
-
|
|
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
|
-
case 8:
|
|
59
|
-
_context.next = 10;
|
|
60
|
-
return httpGet(url, param);
|
|
61
|
-
|
|
62
|
-
case 10:
|
|
63
|
-
return _context.abrupt("return", _context.sent);
|
|
64
|
-
|
|
65
|
-
case 11:
|
|
66
|
-
case "end":
|
|
67
|
-
return _context.stop();
|
|
68
|
-
}
|
|
28
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29
|
+
case 0:
|
|
30
|
+
url = (_this$api = this.api) === null || _this$api === void 0 ? void 0 : _this$api.load;
|
|
31
|
+
if (url) {
|
|
32
|
+
_context.next = 4;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
_message.error("加载方法没有配置api");
|
|
36
|
+
return _context.abrupt("return", Promise.reject("加载方法没有配置api"));
|
|
37
|
+
case 4:
|
|
38
|
+
if (!(this.method.get === 'post')) {
|
|
39
|
+
_context.next = 8;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
_context.next = 7;
|
|
43
|
+
return httpPost(url, param);
|
|
44
|
+
case 7:
|
|
45
|
+
return _context.abrupt("return", _context.sent);
|
|
46
|
+
case 8:
|
|
47
|
+
_context.next = 10;
|
|
48
|
+
return httpGet(url, param);
|
|
49
|
+
case 10:
|
|
50
|
+
return _context.abrupt("return", _context.sent);
|
|
51
|
+
case 11:
|
|
52
|
+
case "end":
|
|
53
|
+
return _context.stop();
|
|
69
54
|
}
|
|
70
55
|
}, _callee, this);
|
|
71
56
|
}));
|
|
72
|
-
|
|
73
57
|
function load(_x) {
|
|
74
58
|
return _load.apply(this, arguments);
|
|
75
59
|
}
|
|
76
|
-
|
|
77
60
|
return load;
|
|
78
|
-
}()
|
|
79
|
-
/** 保存数据方法 @param data 对象数据,当存在id时即为更改 */
|
|
80
|
-
|
|
61
|
+
}() /** 保存数据方法 @param data 对象数据,当存在id时即为更改 */
|
|
81
62
|
}, {
|
|
82
63
|
key: "save",
|
|
83
64
|
value: function () {
|
|
84
65
|
var _save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(data) {
|
|
85
66
|
var _this$api2;
|
|
86
|
-
|
|
87
67
|
var url;
|
|
88
68
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
89
|
-
while (1) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
case 9:
|
|
120
|
-
_context2.next = 11;
|
|
121
|
-
return httpPost(url, data);
|
|
122
|
-
|
|
123
|
-
case 11:
|
|
124
|
-
return _context2.abrupt("return", _context2.sent);
|
|
125
|
-
|
|
126
|
-
case 12:
|
|
127
|
-
case "end":
|
|
128
|
-
return _context2.stop();
|
|
129
|
-
}
|
|
69
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
70
|
+
case 0:
|
|
71
|
+
url = (_this$api2 = this.api) === null || _this$api2 === void 0 ? void 0 : _this$api2.add;
|
|
72
|
+
if (data.id && this.api.edit) {
|
|
73
|
+
url = this.api.edit;
|
|
74
|
+
}
|
|
75
|
+
if (url) {
|
|
76
|
+
_context2.next = 5;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
_message.error("保存方法没有配置api");
|
|
80
|
+
return _context2.abrupt("return", Promise.reject("保存方法没有配置api"));
|
|
81
|
+
case 5:
|
|
82
|
+
if (!(data.id && this.method.edit === 'put')) {
|
|
83
|
+
_context2.next = 9;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
_context2.next = 8;
|
|
87
|
+
return httpPut(url, data);
|
|
88
|
+
case 8:
|
|
89
|
+
return _context2.abrupt("return", _context2.sent);
|
|
90
|
+
case 9:
|
|
91
|
+
_context2.next = 11;
|
|
92
|
+
return httpPost(url, data);
|
|
93
|
+
case 11:
|
|
94
|
+
return _context2.abrupt("return", _context2.sent);
|
|
95
|
+
case 12:
|
|
96
|
+
case "end":
|
|
97
|
+
return _context2.stop();
|
|
130
98
|
}
|
|
131
99
|
}, _callee2, this);
|
|
132
100
|
}));
|
|
133
|
-
|
|
134
101
|
function save(_x2) {
|
|
135
102
|
return _save.apply(this, arguments);
|
|
136
103
|
}
|
|
137
|
-
|
|
138
104
|
return save;
|
|
139
105
|
}()
|
|
140
106
|
}, {
|
|
@@ -142,99 +108,72 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
142
108
|
value: function () {
|
|
143
109
|
var _saveMstDtl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data) {
|
|
144
110
|
var _this$api3;
|
|
145
|
-
|
|
146
111
|
var url;
|
|
147
112
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
148
|
-
while (1) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
case 6:
|
|
167
|
-
return _context3.abrupt("return", _context3.sent);
|
|
168
|
-
|
|
169
|
-
case 7:
|
|
170
|
-
case "end":
|
|
171
|
-
return _context3.stop();
|
|
172
|
-
}
|
|
113
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
114
|
+
case 0:
|
|
115
|
+
url = (_this$api3 = this.api) === null || _this$api3 === void 0 ? void 0 : _this$api3.mstDtl;
|
|
116
|
+
if (url) {
|
|
117
|
+
_context3.next = 4;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
_message.error("主从一起保存方法没有配置api");
|
|
121
|
+
return _context3.abrupt("return", Promise.reject("主从一起保存方法没有配置api"));
|
|
122
|
+
case 4:
|
|
123
|
+
_context3.next = 6;
|
|
124
|
+
return httpPost(url, data);
|
|
125
|
+
case 6:
|
|
126
|
+
return _context3.abrupt("return", _context3.sent);
|
|
127
|
+
case 7:
|
|
128
|
+
case "end":
|
|
129
|
+
return _context3.stop();
|
|
173
130
|
}
|
|
174
131
|
}, _callee3, this);
|
|
175
132
|
}));
|
|
176
|
-
|
|
177
133
|
function saveMstDtl(_x3) {
|
|
178
134
|
return _saveMstDtl.apply(this, arguments);
|
|
179
135
|
}
|
|
180
|
-
|
|
181
136
|
return saveMstDtl;
|
|
182
|
-
}()
|
|
183
|
-
/** 批量删除对象方法,@param data id集合 */
|
|
184
|
-
|
|
137
|
+
}() /** 批量删除对象方法,@param data id集合 */
|
|
185
138
|
}, {
|
|
186
139
|
key: "remove",
|
|
187
140
|
value: function () {
|
|
188
141
|
var _remove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data) {
|
|
189
142
|
var _this$api4;
|
|
190
|
-
|
|
191
143
|
var url;
|
|
192
144
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
193
|
-
while (1) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
case 8:
|
|
220
|
-
_context4.next = 10;
|
|
221
|
-
return httpDelete(url, data);
|
|
222
|
-
|
|
223
|
-
case 10:
|
|
224
|
-
return _context4.abrupt("return", _context4.sent);
|
|
225
|
-
|
|
226
|
-
case 11:
|
|
227
|
-
case "end":
|
|
228
|
-
return _context4.stop();
|
|
229
|
-
}
|
|
145
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
146
|
+
case 0:
|
|
147
|
+
url = (_this$api4 = this.api) === null || _this$api4 === void 0 ? void 0 : _this$api4.delete;
|
|
148
|
+
if (url) {
|
|
149
|
+
_context4.next = 4;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
_message.error("删除方法没有配置api");
|
|
153
|
+
return _context4.abrupt("return", Promise.reject("删除方法没有配置api"));
|
|
154
|
+
case 4:
|
|
155
|
+
if (!(this.method.delete === 'post')) {
|
|
156
|
+
_context4.next = 8;
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
_context4.next = 7;
|
|
160
|
+
return httpPost(url, data);
|
|
161
|
+
case 7:
|
|
162
|
+
return _context4.abrupt("return", _context4.sent);
|
|
163
|
+
case 8:
|
|
164
|
+
_context4.next = 10;
|
|
165
|
+
return httpDelete(url, data);
|
|
166
|
+
case 10:
|
|
167
|
+
return _context4.abrupt("return", _context4.sent);
|
|
168
|
+
case 11:
|
|
169
|
+
case "end":
|
|
170
|
+
return _context4.stop();
|
|
230
171
|
}
|
|
231
172
|
}, _callee4, this);
|
|
232
173
|
}));
|
|
233
|
-
|
|
234
174
|
function remove(_x4) {
|
|
235
175
|
return _remove.apply(this, arguments);
|
|
236
176
|
}
|
|
237
|
-
|
|
238
177
|
return remove;
|
|
239
178
|
}()
|
|
240
179
|
}, {
|
|
@@ -242,47 +181,34 @@ var BaseService = /*#__PURE__*/function () {
|
|
|
242
181
|
value: function () {
|
|
243
182
|
var _audit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(data) {
|
|
244
183
|
var _this$api5;
|
|
245
|
-
|
|
246
184
|
var url;
|
|
247
185
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
248
|
-
while (1) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
case 6:
|
|
267
|
-
return _context5.abrupt("return", _context5.sent);
|
|
268
|
-
|
|
269
|
-
case 7:
|
|
270
|
-
case "end":
|
|
271
|
-
return _context5.stop();
|
|
272
|
-
}
|
|
186
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
187
|
+
case 0:
|
|
188
|
+
url = (_this$api5 = this.api) === null || _this$api5 === void 0 ? void 0 : _this$api5.audit;
|
|
189
|
+
if (url) {
|
|
190
|
+
_context5.next = 4;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
_message.error("审核方法没有配置api");
|
|
194
|
+
return _context5.abrupt("return", Promise.reject("审核方法没有配置api"));
|
|
195
|
+
case 4:
|
|
196
|
+
_context5.next = 6;
|
|
197
|
+
return httpPost(url, data);
|
|
198
|
+
case 6:
|
|
199
|
+
return _context5.abrupt("return", _context5.sent);
|
|
200
|
+
case 7:
|
|
201
|
+
case "end":
|
|
202
|
+
return _context5.stop();
|
|
273
203
|
}
|
|
274
204
|
}, _callee5, this);
|
|
275
205
|
}));
|
|
276
|
-
|
|
277
206
|
function audit(_x5) {
|
|
278
207
|
return _audit.apply(this, arguments);
|
|
279
208
|
}
|
|
280
|
-
|
|
281
209
|
return audit;
|
|
282
210
|
}()
|
|
283
211
|
}]);
|
|
284
|
-
|
|
285
212
|
return BaseService;
|
|
286
213
|
}();
|
|
287
|
-
|
|
288
214
|
export default BaseService;
|
package/es/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ModalFuncProps } from 'antd';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
export { throttle, debounce } from 'lodash';
|
|
4
5
|
export { getUrlQuery, setUrlQuery, toGatewayUrl, dateFormat, getResourceProps } from 'ls-pro-table';
|
|
5
6
|
/**
|
|
6
7
|
* 设置文档title
|
|
@@ -26,13 +27,14 @@ export declare const today: () => string;
|
|
|
26
27
|
*/
|
|
27
28
|
export declare const now: () => string;
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
+
* 时间加减
|
|
31
|
+
* @param dt 原始时间,传 null 为当前时间
|
|
30
32
|
* @param addDay 添加添数,可为负数
|
|
31
33
|
* @param addMonth 添加月数,可为负数
|
|
32
34
|
* @param addYear 添加年数,可以负责
|
|
33
|
-
* @returns YYYY-MM-DD
|
|
35
|
+
* @returns YYYY-MM-DD hh:mm:ss
|
|
34
36
|
*/
|
|
35
|
-
export declare const
|
|
37
|
+
export declare const dateAdd: (dt: Date | null, addDay: number, addMonth?: number, addYear?: number) => string;
|
|
36
38
|
/**
|
|
37
39
|
* 当前时间加减
|
|
38
40
|
* @param addDay 添加添数,可为负数
|
|
@@ -42,14 +44,13 @@ export declare const todayAdd: (addDay: number, addMonth?: number, addYear?: num
|
|
|
42
44
|
*/
|
|
43
45
|
export declare const nowAdd: (addDay: number, addMonth?: number, addYear?: number) => string;
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
46
|
-
* @param dt 原始时间,传 null 为当前时间
|
|
47
|
+
* 当前日期加减
|
|
47
48
|
* @param addDay 添加添数,可为负数
|
|
48
49
|
* @param addMonth 添加月数,可为负数
|
|
49
50
|
* @param addYear 添加年数,可以负责
|
|
50
|
-
* @returns YYYY-MM-DD
|
|
51
|
+
* @returns YYYY-MM-DD
|
|
51
52
|
*/
|
|
52
|
-
export declare const
|
|
53
|
+
export declare const todayAdd: (addDay: number, addMonth?: number, addYear?: number) => string;
|
|
53
54
|
/**
|
|
54
55
|
* 千位符格式化数值
|
|
55
56
|
* @param num 数值
|
|
@@ -75,6 +76,7 @@ export declare const setCookie: (key: string, value: string | number, day?: numb
|
|
|
75
76
|
* @returns
|
|
76
77
|
*/
|
|
77
78
|
export declare const isLogin: () => boolean;
|
|
79
|
+
export declare const getFullScreenElement: () => any;
|
|
78
80
|
/**
|
|
79
81
|
* 设置本地缓存
|
|
80
82
|
* @param { String } key 关键字
|
|
@@ -101,7 +103,6 @@ export declare const showError: (text: string) => void;
|
|
|
101
103
|
export declare const showWarn: (text: string) => void;
|
|
102
104
|
/** @name 显示成功 */
|
|
103
105
|
export declare const showSuccess: (text: string) => void;
|
|
104
|
-
export declare const getFullScreenElement: () => any;
|
|
105
106
|
/**
|
|
106
107
|
* 弹框提示
|
|
107
108
|
* @param text 提示信息
|
|
@@ -165,20 +166,6 @@ export declare const treeFind: (list: any[], key: string, val: any, children?: s
|
|
|
165
166
|
* @returns 返回已处理好的表头[{dataIndex:sizeTypeNo,title:'国标码',width:120,children[...]},{dataIndex:'f1',...}...]
|
|
166
167
|
*/
|
|
167
168
|
export declare const handleSizeCols: (orgSizeHeader: any[], typeWidth?: number, sizeWidth?: number) => any[];
|
|
168
|
-
/**
|
|
169
|
-
* 函数防抖, 限定的时间内多次操作只执行最后一次
|
|
170
|
-
* @param fn 函数
|
|
171
|
-
* @param delay 限时
|
|
172
|
-
* @returns function
|
|
173
|
-
*/
|
|
174
|
-
export declare const debounce: (fn: Function, delay?: number) => () => void;
|
|
175
|
-
/**
|
|
176
|
-
* 函数节流,限时内只触发一次函数
|
|
177
|
-
* @param fn 函数
|
|
178
|
-
* @param delay 限时
|
|
179
|
-
* @returns function
|
|
180
|
-
*/
|
|
181
|
-
export declare const throttle: (fn: Function, delay?: number) => (...args: any[]) => void;
|
|
182
169
|
/**
|
|
183
170
|
* 绑定事件
|
|
184
171
|
* @param eventName 事件名
|