ls-pro-common 1.1.4 → 3.0.0
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 +420 -108
- package/dist/common.js +1 -1
- package/dist/common.less +1 -0
- package/dist/common.min.css +420 -108
- package/dist/common.min.js +1 -1
- package/es/components/DtlLayout.d.ts +5 -3
- package/es/components/DtlLayout.js +29 -24
- package/es/components/GroupTip.d.ts +10 -0
- package/es/components/GroupTip.js +31 -0
- package/es/components/Permission.js +5 -2
- package/es/components/antd-custom.less +207 -0
- package/es/components/common.less +153 -159
- package/es/hooks/useSingle/index.js +1 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +3 -3
- package/es/utils/index.js +6 -0
- package/lib/components/DtlLayout.d.ts +5 -3
- package/lib/components/DtlLayout.js +28 -23
- package/lib/components/GroupTip.d.ts +10 -0
- package/lib/components/GroupTip.js +39 -0
- package/lib/components/Permission.js +5 -2
- package/lib/components/antd-custom.less +207 -0
- package/lib/components/common.less +153 -159
- package/lib/hooks/useSingle/index.js +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +7 -0
- package/lib/utils/index.d.ts +3 -3
- package/lib/utils/index.js +6 -0
- package/package.json +5 -4
|
@@ -592,6 +592,7 @@ function useSingle(inParam) {
|
|
|
592
592
|
var tableTools = (0, _react.useMemo)(function () {
|
|
593
593
|
return [(toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.add) && canAdd ? /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
594
594
|
key: "add",
|
|
595
|
+
type: "primary",
|
|
595
596
|
onClick: function onClick() {
|
|
596
597
|
return onAdd(null);
|
|
597
598
|
},
|
package/lib/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import AreaCascader from './components/AreaCascader';
|
|
|
9
9
|
import AreaCascaderPanel from './components/AreaCascaderPanel';
|
|
10
10
|
import DescritionCard from './components/DescritionCard';
|
|
11
11
|
import Permission from './components/Permission';
|
|
12
|
+
import GroupTip from './components/GroupTip';
|
|
12
13
|
import BaseService from './service/BaseService';
|
|
13
14
|
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions } from './http';
|
|
14
15
|
import * as utils from './utils';
|
|
@@ -22,4 +23,4 @@ import type { DtlLyaoutProps } from './components/DtlLayout';
|
|
|
22
23
|
import type { DescritionCardProps } from './components/DescritionCard';
|
|
23
24
|
import type { PermissionProps } from './components/Permission';
|
|
24
25
|
export type { ApiResponse, TableToolbar, BaseApiType, MethodType, DtlLyaoutProps, DescritionCardProps, PermissionProps };
|
|
25
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
|
26
|
+
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, GroupTip, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
package/lib/index.js
CHANGED
|
@@ -35,6 +35,12 @@ Object.defineProperty(exports, "DtlLayout", {
|
|
|
35
35
|
return _DtlLayout.default;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
+
Object.defineProperty(exports, "GroupTip", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _GroupTip.default;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
38
44
|
Object.defineProperty(exports, "IconSelector", {
|
|
39
45
|
enumerable: true,
|
|
40
46
|
get: function get() {
|
|
@@ -149,6 +155,7 @@ var _AreaCascader = _interopRequireDefault(require("./components/AreaCascader"))
|
|
|
149
155
|
var _AreaCascaderPanel = _interopRequireDefault(require("./components/AreaCascaderPanel"));
|
|
150
156
|
var _DescritionCard = _interopRequireDefault(require("./components/DescritionCard"));
|
|
151
157
|
var _Permission = _interopRequireDefault(require("./components/Permission"));
|
|
158
|
+
var _GroupTip = _interopRequireDefault(require("./components/GroupTip"));
|
|
152
159
|
var _BaseService = _interopRequireDefault(require("./service/BaseService"));
|
|
153
160
|
var _http = _interopRequireWildcard(require("./http"));
|
|
154
161
|
var utils = _interopRequireWildcard(require("./utils"));
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -98,11 +98,11 @@ export declare const getCache: (key: string, session?: boolean) => string | null
|
|
|
98
98
|
*/
|
|
99
99
|
export declare const clearCache: (key?: string | undefined, session?: boolean) => void;
|
|
100
100
|
/** @name 显示错误 */
|
|
101
|
-
export declare const showError: (text: string) => void;
|
|
101
|
+
export declare const showError: (text: string, duration?: number) => void;
|
|
102
102
|
/** @name 显示警示 */
|
|
103
|
-
export declare const showWarn: (text: string) => void;
|
|
103
|
+
export declare const showWarn: (text: string, duration?: number) => void;
|
|
104
104
|
/** @name 显示成功 */
|
|
105
|
-
export declare const showSuccess: (text: string) => void;
|
|
105
|
+
export declare const showSuccess: (text: string, duration?: number) => void;
|
|
106
106
|
/**
|
|
107
107
|
* 弹框提示
|
|
108
108
|
* @param text 提示信息
|
package/lib/utils/index.js
CHANGED
|
@@ -282,8 +282,10 @@ _message2.default.config({
|
|
|
282
282
|
});
|
|
283
283
|
/** @name 显示错误 */
|
|
284
284
|
var showError = function showError(text) {
|
|
285
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
|
|
285
286
|
_message2.default.error({
|
|
286
287
|
content: text,
|
|
288
|
+
duration: duration,
|
|
287
289
|
getPopupContainer: function getPopupContainer(e) {
|
|
288
290
|
return getFullScreenElement() || document.body;
|
|
289
291
|
}
|
|
@@ -292,8 +294,10 @@ var showError = function showError(text) {
|
|
|
292
294
|
/** @name 显示警示 */
|
|
293
295
|
exports.showError = showError;
|
|
294
296
|
var showWarn = function showWarn(text) {
|
|
297
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
|
|
295
298
|
_message2.default.warn({
|
|
296
299
|
content: text,
|
|
300
|
+
duration: duration,
|
|
297
301
|
getPopupContainer: function getPopupContainer(e) {
|
|
298
302
|
return getFullScreenElement() || document.body;
|
|
299
303
|
}
|
|
@@ -302,8 +306,10 @@ var showWarn = function showWarn(text) {
|
|
|
302
306
|
/** @name 显示成功 */
|
|
303
307
|
exports.showWarn = showWarn;
|
|
304
308
|
var showSuccess = function showSuccess(text) {
|
|
309
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
|
|
305
310
|
_message2.default.success({
|
|
306
311
|
content: text,
|
|
312
|
+
duration: duration,
|
|
307
313
|
getPopupContainer: function getPopupContainer(e) {
|
|
308
314
|
return getFullScreenElement() || document.body;
|
|
309
315
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ls-pro-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "ls-pro-common",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd",
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@ant-design/icons": "^4.3.0",
|
|
30
|
-
"ls-pro-table": "
|
|
31
|
-
"ls-pro-form": "
|
|
32
|
-
"ls-pro-descriptions":"^
|
|
30
|
+
"ls-pro-table": "^3.0.0",
|
|
31
|
+
"ls-pro-form": "^3.0.0",
|
|
32
|
+
"ls-pro-descriptions":"^3.0.0",
|
|
33
|
+
"ls-pro-card":"^3.0.0",
|
|
33
34
|
"@babel/runtime": "^7.16.3",
|
|
34
35
|
"classnames": "^2.2.6",
|
|
35
36
|
"moment": "^2.27.0",
|