ls-pro-common 1.0.46 → 1.0.49

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.
@@ -34,6 +34,7 @@ export declare type InputTableProps = ProFormItemProps<InputProps> & {
34
34
  fillMap?: Record<string, string>;
35
35
  /**@name 输入后检查数据的触发方式,默认为entry回车触发 */
36
36
  triggerCheck?: 'entry' | 'blur';
37
+ loadOnShow?: boolean;
37
38
  /**@name 选择行事件 */
38
39
  onSelectChange?: (item: any, formRef?: any) => void;
39
40
  /**@name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
@@ -83,6 +84,7 @@ declare const InputTable: React.ForwardRefExoticComponent<{
83
84
  fillMap?: Record<string, string> | undefined;
84
85
  /**@name 输入后检查数据的触发方式,默认为entry回车触发 */
85
86
  triggerCheck?: "entry" | "blur" | undefined;
87
+ loadOnShow?: boolean | undefined;
86
88
  /**@name 选择行事件 */
87
89
  onSelectChange?: ((item: any, formRef?: any) => void) | undefined;
88
90
  /**@name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
@@ -10,7 +10,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
11
11
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
12
12
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
13
- var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps", "searchField", "fillMap", "triggerCheck"],
13
+ var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps", "searchField", "fillMap", "loadOnShow", "triggerCheck"],
14
14
  _excluded2 = ["current", "pageSize"];
15
15
  import React, { useRef, useState, useEffect, useContext, useMemo, useImperativeHandle } from 'react';
16
16
  import ProTable from 'ls-pro-table';
@@ -73,6 +73,8 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
73
73
  fieldProps = prop.fieldProps,
74
74
  searchField = prop.searchField,
75
75
  fillMap = prop.fillMap,
76
+ _prop$loadOnShow = prop.loadOnShow,
77
+ loadOnShow = _prop$loadOnShow === void 0 ? false : _prop$loadOnShow,
76
78
  _prop$triggerCheck = prop.triggerCheck,
77
79
  triggerCheck = _prop$triggerCheck === void 0 ? 'entry' : _prop$triggerCheck,
78
80
  rest = _objectWithoutProperties(prop, _excluded); //显示输入框绑定的name,如果不设置textName,设置为$name__text
@@ -324,7 +326,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
324
326
  }
325
327
  }, "\u786E\u8BA4")];
326
328
  },
327
- headerTitle: "\u53CC\u51FB\u8FD4\u56DE\u5F53\u524D\u884C\u6570\u636E"
329
+ headerTitle: "\u53CC\u51FB\u9009\u4E2D\u5F53\u524D\u884C\u6570\u636E"
328
330
  }, tableConfig));
329
331
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
330
332
  style: {
@@ -343,7 +345,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
343
345
  maxHeight: '95vh',
344
346
  overflow: 'auto'
345
347
  }
346
- }, tableDom),
348
+ }, loadOnShow ? visible ? tableDom : null : tableDom),
347
349
  trigger: "click",
348
350
  visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
349
351
  onVisibleChange: setVisible
@@ -380,7 +382,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
380
382
  maxHeight: '95vh',
381
383
  overflow: 'auto'
382
384
  }
383
- }, tableDom),
385
+ }, loadOnShow ? visible ? tableDom : null : tableDom),
384
386
  trigger: "click",
385
387
  visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
386
388
  onVisibleChange: setVisible
@@ -1,45 +1,45 @@
1
1
  body {
2
- --ant-primary-color: #4997E6;
3
- --ant-primary-color-hover: #74b7f2;
4
- --ant-primary-color-active: #3475bf;
5
- --ant-primary-color-outline: rgba(73, 151, 230, 0.2);
6
- --ant-primary-1: #f0faff;
7
- --ant-primary-2: #f0f9ff;
8
- --ant-primary-3: #ccebff;
9
- --ant-primary-4: #a3d7ff;
10
- --ant-primary-5: #74b7f2;
11
- --ant-primary-6: #4997E6;
12
- --ant-primary-7: #3475bf;
13
- --ant-primary-color-deprecated-pure: #e6f1fc;
14
- --ant-primary-color-deprecated-l-35: #e6f1fc;
15
- --ant-primary-color-deprecated-l-20: #a3caf2;
16
- --ant-primary-color-deprecated-t-20: #6daceb;
17
- --ant-primary-color-deprecated-t-50: #a4cbf3;
18
- --ant-primary-color-deprecated-f-12: rgba(73, 151, 230, 0.12);
2
+ --ant-primary-color : #4997E6;
3
+ --ant-primary-color-hover : #74b7f2;
4
+ --ant-primary-color-active : #3475bf;
5
+ --ant-primary-color-outline : rgba(73, 151, 230, 0.2);
6
+ --ant-primary-1 : #f0faff;
7
+ --ant-primary-2 : #f0f9ff;
8
+ --ant-primary-3 : #ccebff;
9
+ --ant-primary-4 : #a3d7ff;
10
+ --ant-primary-5 : #74b7f2;
11
+ --ant-primary-6 : #4997E6;
12
+ --ant-primary-7 : #3475bf;
13
+ --ant-primary-color-deprecated-pure : #e6f1fc;
14
+ --ant-primary-color-deprecated-l-35 : #e6f1fc;
15
+ --ant-primary-color-deprecated-l-20 : #a3caf2;
16
+ --ant-primary-color-deprecated-t-20 : #6daceb;
17
+ --ant-primary-color-deprecated-t-50 : #a4cbf3;
18
+ --ant-primary-color-deprecated-f-12 : rgba(73, 151, 230, 0.12);
19
19
  --ant-primary-color-active-deprecated-f-30: rgba(240, 250, 255, 0.3);
20
20
  --ant-primary-color-active-deprecated-d-02: #e6f7ff;
21
- --ant-success-color: #52c41a;
22
- --ant-success-color-hover: #73d13d;
23
- --ant-success-color-active: #389e0d;
24
- --ant-success-color-outline: rgba(82, 196, 26, 0.2);
25
- --ant-success-color-deprecated-bg: #f6ffed;
26
- --ant-success-color-deprecated-border: #b7eb8f;
27
- --ant-error-color: #ff4d4f;
28
- --ant-error-color-hover: #ff7875;
29
- --ant-error-color-active: #d9363e;
30
- --ant-error-color-outline: rgba(255, 77, 79, 0.2);
31
- --ant-error-color-deprecated-bg: #fff2f0;
32
- --ant-error-color-deprecated-border: #ffccc7;
33
- --ant-warning-color: #faad14;
34
- --ant-warning-color-hover: #ffc53d;
35
- --ant-warning-color-active: #d48806;
36
- --ant-warning-color-outline: rgba(250, 173, 20, 0.2);
37
- --ant-warning-color-deprecated-bg: #fffbe6;
38
- --ant-warning-color-deprecated-border: #ffe58f;
39
- --ant-info-color: #4997E6;
40
- --ant-info-color-deprecated-bg: #f0faff;
41
- --ant-info-color-deprecated-border: #ccebff;
42
- }
21
+ --ant-success-color : #52c41a;
22
+ --ant-success-color-hover : #73d13d;
23
+ --ant-success-color-active : #389e0d;
24
+ --ant-success-color-outline : rgba(82, 196, 26, 0.2);
25
+ --ant-success-color-deprecated-bg : #f6ffed;
26
+ --ant-success-color-deprecated-border : #b7eb8f;
27
+ --ant-error-color : #ff4d4f;
28
+ --ant-error-color-hover : #ff7875;
29
+ --ant-error-color-active : #d9363e;
30
+ --ant-error-color-outline : rgba(255, 77, 79, 0.2);
31
+ --ant-error-color-deprecated-bg : #fff2f0;
32
+ --ant-error-color-deprecated-border : #ffccc7;
33
+ --ant-warning-color : #faad14;
34
+ --ant-warning-color-hover : #ffc53d;
35
+ --ant-warning-color-active : #d48806;
36
+ --ant-warning-color-outline : rgba(250, 173, 20, 0.2);
37
+ --ant-warning-color-deprecated-bg : #fffbe6;
38
+ --ant-warning-color-deprecated-border : #ffe58f;
39
+ --ant-info-color : #4997E6;
40
+ --ant-info-color-deprecated-bg : #f0faff;
41
+ --ant-info-color-deprecated-border : #ccebff;
42
+ }
43
43
 
44
44
  .dtl-layout {
45
45
  position : absolute;
@@ -135,19 +135,27 @@ body {
135
135
  border-radius: 4px;
136
136
  border-color : var(--ant-primary-color);
137
137
  color : var(--ant-primary-color);
138
-
138
+
139
139
  &:active {
140
- border-color: var(--ant-primary-color-hover);
141
- color : var(--ant-primary-color-hover);
140
+ border-color: var(--ant-primary-color-hover);
141
+ color : var(--ant-primary-color-hover);
142
142
  }
143
- }
144
-
145
- .ant-btn-primary {
143
+ }
144
+
145
+ .ant-btn-primary {
146
146
  color: #fff;
147
- }
147
+ }
148
148
 
149
- .ant-btn-dangerous {
150
- color: var(--ant-error-color);
149
+ .ant-btn-dangerous {
150
+ color : var(--ant-error-color);
151
151
  border-color: var(--ant-error-color);
152
- background: #fff;
153
- }
152
+ background : #fff;
153
+ }
154
+
155
+ a {
156
+ color: var(--ant-primary-color);
157
+ }
158
+
159
+ a:hover {
160
+ color: var(--ant-primary-5);
161
+ }
package/es/http/index.js CHANGED
@@ -26,6 +26,11 @@ request.interceptors.request.use(function (url, options) {
26
26
  resCode: getUrlQuery('resCode') || getUrlQuery('resourceId') || getResourceProps('resourceId'),
27
27
  _t1: Date.now()
28
28
  };
29
+
30
+ if (!param.resCode) {
31
+ delete param.resCode;
32
+ }
33
+
29
34
  return {
30
35
  url: setUrlQuery(url, param),
31
36
  options: opts
@@ -34,6 +34,7 @@ export declare type InputTableProps = ProFormItemProps<InputProps> & {
34
34
  fillMap?: Record<string, string>;
35
35
  /**@name 输入后检查数据的触发方式,默认为entry回车触发 */
36
36
  triggerCheck?: 'entry' | 'blur';
37
+ loadOnShow?: boolean;
37
38
  /**@name 选择行事件 */
38
39
  onSelectChange?: (item: any, formRef?: any) => void;
39
40
  /**@name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
@@ -83,6 +84,7 @@ declare const InputTable: React.ForwardRefExoticComponent<{
83
84
  fillMap?: Record<string, string> | undefined;
84
85
  /**@name 输入后检查数据的触发方式,默认为entry回车触发 */
85
86
  triggerCheck?: "entry" | "blur" | undefined;
87
+ loadOnShow?: boolean | undefined;
86
88
  /**@name 选择行事件 */
87
89
  onSelectChange?: ((item: any, formRef?: any) => void) | undefined;
88
90
  /**@name 加载之前事件,param为查询条件对象,可以通过此方法调整 */
@@ -45,7 +45,7 @@ var _http = require("../http");
45
45
 
46
46
  var _utils = require("../utils");
47
47
 
48
- var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps", "searchField", "fillMap", "triggerCheck"],
48
+ var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps", "searchField", "fillMap", "loadOnShow", "triggerCheck"],
49
49
  _excluded2 = ["current", "pageSize"];
50
50
 
51
51
  var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
@@ -102,6 +102,8 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
102
102
  fieldProps = prop.fieldProps,
103
103
  searchField = prop.searchField,
104
104
  fillMap = prop.fillMap,
105
+ _prop$loadOnShow = prop.loadOnShow,
106
+ loadOnShow = _prop$loadOnShow === void 0 ? false : _prop$loadOnShow,
105
107
  _prop$triggerCheck = prop.triggerCheck,
106
108
  triggerCheck = _prop$triggerCheck === void 0 ? 'entry' : _prop$triggerCheck,
107
109
  rest = (0, _objectWithoutProperties2.default)(prop, _excluded); //显示输入框绑定的name,如果不设置textName,设置为$name__text
@@ -352,7 +354,7 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
352
354
  }
353
355
  }, "\u786E\u8BA4")];
354
356
  },
355
- headerTitle: "\u53CC\u51FB\u8FD4\u56DE\u5F53\u524D\u884C\u6570\u636E"
357
+ headerTitle: "\u53CC\u51FB\u9009\u4E2D\u5F53\u524D\u884C\u6570\u636E"
356
358
  }, tableConfig));
357
359
 
358
360
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
@@ -372,7 +374,7 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
372
374
  maxHeight: '95vh',
373
375
  overflow: 'auto'
374
376
  }
375
- }, tableDom),
377
+ }, loadOnShow ? visible ? tableDom : null : tableDom),
376
378
  trigger: "click",
377
379
  visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
378
380
  onVisibleChange: setVisible
@@ -409,7 +411,7 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
409
411
  maxHeight: '95vh',
410
412
  overflow: 'auto'
411
413
  }
412
- }, tableDom),
414
+ }, loadOnShow ? visible ? tableDom : null : tableDom),
413
415
  trigger: "click",
414
416
  visible: rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled) ? false : visible,
415
417
  onVisibleChange: setVisible
@@ -150,4 +150,12 @@ body {
150
150
  color: var(--ant-error-color);
151
151
  border-color: var(--ant-error-color);
152
152
  background: #fff;
153
- }
153
+ }
154
+
155
+ a {
156
+ color: var(--ant-primary-color);
157
+ }
158
+
159
+ a:hover {
160
+ color: var(--ant-primary-5);
161
+ }
package/lib/http/index.js CHANGED
@@ -45,6 +45,11 @@ request.interceptors.request.use(function (url, options) {
45
45
  resCode: (0, _utils.getUrlQuery)('resCode') || (0, _utils.getUrlQuery)('resourceId') || (0, _utils.getResourceProps)('resourceId'),
46
46
  _t1: Date.now()
47
47
  };
48
+
49
+ if (!param.resCode) {
50
+ delete param.resCode;
51
+ }
52
+
48
53
  return {
49
54
  url: (0, _utils.setUrlQuery)(url, param),
50
55
  options: opts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "1.0.46",
3
+ "version": "1.0.49",
4
4
  "description": "ls-pro-common",
5
5
  "keywords": [
6
6
  "antd",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@ant-design/icons": "^4.3.0",
31
- "ls-pro-table": "2.62.35",
31
+ "ls-pro-table": "2.62.37",
32
32
  "ls-pro-form": "1.52.27",
33
33
  "@babel/runtime": "^7.16.3",
34
34
  "classnames": "^2.2.6",