ls-pro-common 3.0.28 → 3.0.30

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.
@@ -1,3 +1,3 @@
1
1
  import './common.less';
2
- declare const _default: () => JSX.Element;
2
+ declare const _default: (props: any) => JSX.Element;
3
3
  export default _default;
@@ -1,9 +1,10 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import React from "react";
2
3
  import './common.less';
3
- export default (function () {
4
- return /*#__PURE__*/React.createElement("div", {
4
+ export default (function (props) {
5
+ return /*#__PURE__*/React.createElement("div", _extends({
5
6
  className: "page404"
6
- }, /*#__PURE__*/React.createElement("img", {
7
+ }, props), /*#__PURE__*/React.createElement("img", {
7
8
  src: require('./404.jpg')
8
9
  }), " \u60A8\u8BBF\u95EE\u7684\u8D44\u6E90\u4E0D\u5B58\u5728~~");
9
10
  });
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconBack: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconBack: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconBack;
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconBell: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconBell: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconBell;
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconQuestion: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconQuestion: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconQuestion;
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconSearch: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconSearch: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconSearch;
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconText: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconText: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconText;
@@ -194,12 +194,13 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
194
194
  setTimeout(function () {
195
195
  var txt = '',
196
196
  val = '';
197
+ var row;
197
198
  if (rowKey) {
198
199
  try {
199
- var _formRef$current2, _formRef$current2$get, _formRef$current2$get2;
200
- var row = formRef === null || formRef === void 0 ? void 0 : (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : (_formRef$current2$get = _formRef$current2.getFieldsValue) === null || _formRef$current2$get === void 0 ? void 0 : (_formRef$current2$get2 = _formRef$current2$get.call(_formRef$current2)) === null || _formRef$current2$get2 === void 0 ? void 0 : _formRef$current2$get2[rowKey];
201
- txt = row === null || row === void 0 ? void 0 : row[textNameProp];
202
- val = row === null || row === void 0 ? void 0 : row[name];
200
+ var _formRef$current2, _formRef$current2$get, _formRef$current2$get2, _row, _row2;
201
+ row = formRef === null || formRef === void 0 ? void 0 : (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : (_formRef$current2$get = _formRef$current2.getFieldsValue) === null || _formRef$current2$get === void 0 ? void 0 : (_formRef$current2$get2 = _formRef$current2$get.call(_formRef$current2)) === null || _formRef$current2$get2 === void 0 ? void 0 : _formRef$current2$get2[rowKey];
202
+ txt = (_row = row) === null || _row === void 0 ? void 0 : _row[textNameProp];
203
+ val = (_row2 = row) === null || _row2 === void 0 ? void 0 : _row2[name];
203
204
  } catch (_unused) {}
204
205
  } else {
205
206
  var _formRef$current3, _formRef$current3$get, _formRef$current4, _formRef$current4$get;
@@ -209,16 +210,21 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
209
210
  if (txt) {
210
211
  setText(txt);
211
212
  } else if (val) {
212
- var _formRef$current5, _formRef$current5$set;
213
213
  setText(val);
214
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : (_formRef$current5$set = _formRef$current5.setFieldsValue) === null || _formRef$current5$set === void 0 ? void 0 : _formRef$current5$set.call(_formRef$current5, _defineProperty({}, textNameProp, val));
214
+ if (rowKey) {
215
+ var _formRef$current5, _formRef$current5$set;
216
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : (_formRef$current5$set = _formRef$current5.setFieldsValue) === null || _formRef$current5$set === void 0 ? void 0 : _formRef$current5$set.call(_formRef$current5, _defineProperty({}, rowKey, _objectSpread(_objectSpread({}, row), {}, _defineProperty({}, textNameProp, val))));
217
+ } else {
218
+ var _formRef$current6, _formRef$current6$set;
219
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : (_formRef$current6$set = _formRef$current6.setFieldsValue) === null || _formRef$current6$set === void 0 ? void 0 : _formRef$current6$set.call(_formRef$current6, _defineProperty({}, textNameProp, val));
220
+ }
215
221
  }
216
222
  }, 0);
217
223
  }, [rowKey]);
218
224
  // 处理返回数据
219
225
  var handleValue = function handleValue(row) {
220
- var _formRef$current6, _formRef$current6$get;
221
- var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : (_formRef$current6$get = _formRef$current6.getFieldsValue) === null || _formRef$current6$get === void 0 ? void 0 : _formRef$current6$get.call(_formRef$current6)) || {};
226
+ var _formRef$current7, _formRef$current7$get;
227
+ var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current7 = formRef.current) === null || _formRef$current7 === void 0 ? void 0 : (_formRef$current7$get = _formRef$current7.getFieldsValue) === null || _formRef$current7$get === void 0 ? void 0 : _formRef$current7$get.call(_formRef$current7)) || {};
222
228
  if (rowKey) {
223
229
  formValue = formValue[rowKey] || {};
224
230
  }
@@ -258,11 +264,11 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
258
264
  setText(txt);
259
265
  setVisible(false);
260
266
  if (rowKey) {
261
- var _formRef$current7, _formRef$current7$set;
262
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current7 = formRef.current) === null || _formRef$current7 === void 0 ? void 0 : (_formRef$current7$set = _formRef$current7.setFieldsValue) === null || _formRef$current7$set === void 0 ? void 0 : _formRef$current7$set.call(_formRef$current7, _defineProperty({}, rowKey, formValue));
263
- } else {
264
267
  var _formRef$current8, _formRef$current8$set;
265
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current8 = formRef.current) === null || _formRef$current8 === void 0 ? void 0 : (_formRef$current8$set = _formRef$current8.setFieldsValue) === null || _formRef$current8$set === void 0 ? void 0 : _formRef$current8$set.call(_formRef$current8, _objectSpread({}, formValue));
268
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current8 = formRef.current) === null || _formRef$current8 === void 0 ? void 0 : (_formRef$current8$set = _formRef$current8.setFieldsValue) === null || _formRef$current8$set === void 0 ? void 0 : _formRef$current8$set.call(_formRef$current8, _defineProperty({}, rowKey, formValue));
269
+ } else {
270
+ var _formRef$current9, _formRef$current9$set;
271
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current9 = formRef.current) === null || _formRef$current9 === void 0 ? void 0 : (_formRef$current9$set = _formRef$current9.setFieldsValue) === null || _formRef$current9$set === void 0 ? void 0 : _formRef$current9$set.call(_formRef$current9, _objectSpread({}, formValue));
266
272
  }
267
273
  onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(row, formRef);
268
274
  };
@@ -293,8 +299,8 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
293
299
  };
294
300
  //直接输入不回车,value 和 text 为同一个值
295
301
  var onInput = function onInput(e) {
296
- var _formRef$current9, _formRef$current9$get;
297
- var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current9 = formRef.current) === null || _formRef$current9 === void 0 ? void 0 : (_formRef$current9$get = _formRef$current9.getFieldsValue) === null || _formRef$current9$get === void 0 ? void 0 : _formRef$current9$get.call(_formRef$current9)) || {};
302
+ var _formRef$current10, _formRef$current10$ge;
303
+ var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current10 = formRef.current) === null || _formRef$current10 === void 0 ? void 0 : (_formRef$current10$ge = _formRef$current10.getFieldsValue) === null || _formRef$current10$ge === void 0 ? void 0 : _formRef$current10$ge.call(_formRef$current10)) || {};
298
304
  if (rowKey) {
299
305
  formValue = formValue[rowKey] || {};
300
306
  }
@@ -303,30 +309,30 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
303
309
  formValue[textNameProp] = val;
304
310
  setText(val);
305
311
  if (rowKey) {
306
- var _formRef$current10, _formRef$current10$se;
307
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current10 = formRef.current) === null || _formRef$current10 === void 0 ? void 0 : (_formRef$current10$se = _formRef$current10.setFieldsValue) === null || _formRef$current10$se === void 0 ? void 0 : _formRef$current10$se.call(_formRef$current10, _defineProperty({}, rowKey, formValue));
308
- } else {
309
312
  var _formRef$current11, _formRef$current11$se;
310
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current11 = formRef.current) === null || _formRef$current11 === void 0 ? void 0 : (_formRef$current11$se = _formRef$current11.setFieldsValue) === null || _formRef$current11$se === void 0 ? void 0 : _formRef$current11$se.call(_formRef$current11, _objectSpread({}, formValue));
313
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current11 = formRef.current) === null || _formRef$current11 === void 0 ? void 0 : (_formRef$current11$se = _formRef$current11.setFieldsValue) === null || _formRef$current11$se === void 0 ? void 0 : _formRef$current11$se.call(_formRef$current11, _defineProperty({}, rowKey, formValue));
314
+ } else {
315
+ var _formRef$current12, _formRef$current12$se;
316
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current12 = formRef.current) === null || _formRef$current12 === void 0 ? void 0 : (_formRef$current12$se = _formRef$current12.setFieldsValue) === null || _formRef$current12$se === void 0 ? void 0 : _formRef$current12$se.call(_formRef$current12, _objectSpread({}, formValue));
311
317
  }
312
318
  };
313
319
  // 当表单重置或点clear时,处理值
314
320
  var clearValue = function clearValue(e) {
315
321
  if (!e.target.value) {
316
- var _formRef$current12, _formRef$current12$ge;
322
+ var _formRef$current13, _formRef$current13$ge;
317
323
  setText('');
318
- var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current12 = formRef.current) === null || _formRef$current12 === void 0 ? void 0 : (_formRef$current12$ge = _formRef$current12.getFieldsValue) === null || _formRef$current12$ge === void 0 ? void 0 : _formRef$current12$ge.call(_formRef$current12)) || {};
324
+ var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current13 = formRef.current) === null || _formRef$current13 === void 0 ? void 0 : (_formRef$current13$ge = _formRef$current13.getFieldsValue) === null || _formRef$current13$ge === void 0 ? void 0 : _formRef$current13$ge.call(_formRef$current13)) || {};
319
325
  if (rowKey) {
320
326
  formValue = formValue[rowKey] || {};
321
327
  }
322
328
  formValue[name] = '';
323
329
  formValue[textNameProp] = '';
324
330
  if (rowKey) {
325
- var _formRef$current13, _formRef$current13$se;
326
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current13 = formRef.current) === null || _formRef$current13 === void 0 ? void 0 : (_formRef$current13$se = _formRef$current13.setFieldsValue) === null || _formRef$current13$se === void 0 ? void 0 : _formRef$current13$se.call(_formRef$current13, _defineProperty({}, rowKey, formValue));
327
- } else {
328
331
  var _formRef$current14, _formRef$current14$se;
329
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current14 = formRef.current) === null || _formRef$current14 === void 0 ? void 0 : (_formRef$current14$se = _formRef$current14.setFieldsValue) === null || _formRef$current14$se === void 0 ? void 0 : _formRef$current14$se.call(_formRef$current14, _objectSpread({}, formValue));
332
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current14 = formRef.current) === null || _formRef$current14 === void 0 ? void 0 : (_formRef$current14$se = _formRef$current14.setFieldsValue) === null || _formRef$current14$se === void 0 ? void 0 : _formRef$current14$se.call(_formRef$current14, _defineProperty({}, rowKey, formValue));
333
+ } else {
334
+ var _formRef$current15, _formRef$current15$se;
335
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current15 = formRef.current) === null || _formRef$current15 === void 0 ? void 0 : (_formRef$current15$se = _formRef$current15.setFieldsValue) === null || _formRef$current15$se === void 0 ? void 0 : _formRef$current15$se.call(_formRef$current15, _objectSpread({}, formValue));
330
336
  }
331
337
  }
332
338
  };
@@ -3,6 +3,7 @@ import './common.less';
3
3
  declare type LoadingType = {
4
4
  Text?: string | JSX.Element;
5
5
  className?: string;
6
+ style?: any;
6
7
  };
7
8
  declare const _default: (props: LoadingType) => JSX.Element;
8
9
  export default _default;
package/es/utils/index.js CHANGED
@@ -621,7 +621,10 @@ export var appPath = function appPath() {
621
621
  // @ts-ignore
622
622
  return window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
623
623
  }
624
- return path ? path : './';
624
+ if (path) return path;
625
+ var p = location.pathname || '';
626
+ var idx = p.indexOf('/', 1);
627
+ return idx > 0 ? p.slice(0, idx + 1) : p.length > 1 ? p + '/' : './';
625
628
  };
626
629
  /**
627
630
  * 深度复制对象
@@ -1,3 +1,3 @@
1
1
  import './common.less';
2
- declare const _default: () => JSX.Element;
2
+ declare const _default: (props: any) => JSX.Element;
3
3
  export default _default;
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
9
  var _react = _interopRequireDefault(require("react"));
9
10
  require("./common.less");
10
- var _default = function _default() {
11
- return /*#__PURE__*/_react.default.createElement("div", {
11
+ var _default = function _default(props) {
12
+ return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
12
13
  className: "page404"
13
- }, /*#__PURE__*/_react.default.createElement("img", {
14
+ }, props), /*#__PURE__*/_react.default.createElement("img", {
14
15
  src: require('./404.jpg')
15
16
  }), " \u60A8\u8BBF\u95EE\u7684\u8D44\u6E90\u4E0D\u5B58\u5728~~");
16
17
  };
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconBack: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconBack: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconBack;
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconBell: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconBell: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconBell;
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconQuestion: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconQuestion: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconQuestion;
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconSearch: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconSearch: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconSearch;
@@ -1,3 +1,5 @@
1
1
  import type { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- declare const IconText: (props: Partial<CustomIconComponentProps>) => JSX.Element;
2
+ declare const IconText: (props: Partial<CustomIconComponentProps> & {
3
+ onClick?: ((e: any) => any) | undefined;
4
+ }) => JSX.Element;
3
5
  export default IconText;
@@ -16,7 +16,7 @@ require("antd/es/button/style");
16
16
  var _button = _interopRequireDefault(require("antd/es/button"));
17
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
18
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
19
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
19
+ var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
20
20
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
21
21
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
22
22
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
@@ -144,7 +144,7 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
144
144
  if (Object.keys(rest).length && !isV2) {
145
145
  data.where = rest;
146
146
  } else {
147
- data = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), rest);
147
+ data = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, data), rest);
148
148
  }
149
149
  if (!keepSelect) {
150
150
  selectRowRef.current = [];
@@ -202,12 +202,13 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
202
202
  setTimeout(function () {
203
203
  var txt = '',
204
204
  val = '';
205
+ var row;
205
206
  if (rowKey) {
206
207
  try {
207
- var _formRef$current2, _formRef$current2$get, _formRef$current2$get2;
208
- var row = formRef === null || formRef === void 0 ? void 0 : (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : (_formRef$current2$get = _formRef$current2.getFieldsValue) === null || _formRef$current2$get === void 0 ? void 0 : (_formRef$current2$get2 = _formRef$current2$get.call(_formRef$current2)) === null || _formRef$current2$get2 === void 0 ? void 0 : _formRef$current2$get2[rowKey];
209
- txt = row === null || row === void 0 ? void 0 : row[textNameProp];
210
- val = row === null || row === void 0 ? void 0 : row[name];
208
+ var _formRef$current2, _formRef$current2$get, _formRef$current2$get2, _row, _row2;
209
+ row = formRef === null || formRef === void 0 ? void 0 : (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : (_formRef$current2$get = _formRef$current2.getFieldsValue) === null || _formRef$current2$get === void 0 ? void 0 : (_formRef$current2$get2 = _formRef$current2$get.call(_formRef$current2)) === null || _formRef$current2$get2 === void 0 ? void 0 : _formRef$current2$get2[rowKey];
210
+ txt = (_row = row) === null || _row === void 0 ? void 0 : _row[textNameProp];
211
+ val = (_row2 = row) === null || _row2 === void 0 ? void 0 : _row2[name];
211
212
  } catch (_unused) {}
212
213
  } else {
213
214
  var _formRef$current3, _formRef$current3$get, _formRef$current4, _formRef$current4$get;
@@ -217,16 +218,21 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
217
218
  if (txt) {
218
219
  setText(txt);
219
220
  } else if (val) {
220
- var _formRef$current5, _formRef$current5$set;
221
221
  setText(val);
222
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : (_formRef$current5$set = _formRef$current5.setFieldsValue) === null || _formRef$current5$set === void 0 ? void 0 : _formRef$current5$set.call(_formRef$current5, (0, _defineProperty2.default)({}, textNameProp, val));
222
+ if (rowKey) {
223
+ var _formRef$current5, _formRef$current5$set;
224
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current5 = formRef.current) === null || _formRef$current5 === void 0 ? void 0 : (_formRef$current5$set = _formRef$current5.setFieldsValue) === null || _formRef$current5$set === void 0 ? void 0 : _formRef$current5$set.call(_formRef$current5, (0, _defineProperty2.default)({}, rowKey, (0, _objectSpread3.default)((0, _objectSpread3.default)({}, row), {}, (0, _defineProperty2.default)({}, textNameProp, val))));
225
+ } else {
226
+ var _formRef$current6, _formRef$current6$set;
227
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : (_formRef$current6$set = _formRef$current6.setFieldsValue) === null || _formRef$current6$set === void 0 ? void 0 : _formRef$current6$set.call(_formRef$current6, (0, _defineProperty2.default)({}, textNameProp, val));
228
+ }
223
229
  }
224
230
  }, 0);
225
231
  }, [rowKey]);
226
232
  // 处理返回数据
227
233
  var handleValue = function handleValue(row) {
228
- var _formRef$current6, _formRef$current6$get;
229
- var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current6 = formRef.current) === null || _formRef$current6 === void 0 ? void 0 : (_formRef$current6$get = _formRef$current6.getFieldsValue) === null || _formRef$current6$get === void 0 ? void 0 : _formRef$current6$get.call(_formRef$current6)) || {};
234
+ var _formRef$current7, _formRef$current7$get;
235
+ var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current7 = formRef.current) === null || _formRef$current7 === void 0 ? void 0 : (_formRef$current7$get = _formRef$current7.getFieldsValue) === null || _formRef$current7$get === void 0 ? void 0 : _formRef$current7$get.call(_formRef$current7)) || {};
230
236
  if (rowKey) {
231
237
  formValue = formValue[rowKey] || {};
232
238
  }
@@ -266,11 +272,11 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
266
272
  setText(txt);
267
273
  setVisible(false);
268
274
  if (rowKey) {
269
- var _formRef$current7, _formRef$current7$set;
270
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current7 = formRef.current) === null || _formRef$current7 === void 0 ? void 0 : (_formRef$current7$set = _formRef$current7.setFieldsValue) === null || _formRef$current7$set === void 0 ? void 0 : _formRef$current7$set.call(_formRef$current7, (0, _defineProperty2.default)({}, rowKey, formValue));
271
- } else {
272
275
  var _formRef$current8, _formRef$current8$set;
273
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current8 = formRef.current) === null || _formRef$current8 === void 0 ? void 0 : (_formRef$current8$set = _formRef$current8.setFieldsValue) === null || _formRef$current8$set === void 0 ? void 0 : _formRef$current8$set.call(_formRef$current8, (0, _objectSpread2.default)({}, formValue));
276
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current8 = formRef.current) === null || _formRef$current8 === void 0 ? void 0 : (_formRef$current8$set = _formRef$current8.setFieldsValue) === null || _formRef$current8$set === void 0 ? void 0 : _formRef$current8$set.call(_formRef$current8, (0, _defineProperty2.default)({}, rowKey, formValue));
277
+ } else {
278
+ var _formRef$current9, _formRef$current9$set;
279
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current9 = formRef.current) === null || _formRef$current9 === void 0 ? void 0 : (_formRef$current9$set = _formRef$current9.setFieldsValue) === null || _formRef$current9$set === void 0 ? void 0 : _formRef$current9$set.call(_formRef$current9, (0, _objectSpread3.default)({}, formValue));
274
280
  }
275
281
  onSelectChange === null || onSelectChange === void 0 ? void 0 : onSelectChange(row, formRef);
276
282
  };
@@ -301,8 +307,8 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
301
307
  };
302
308
  //直接输入不回车,value 和 text 为同一个值
303
309
  var onInput = function onInput(e) {
304
- var _formRef$current9, _formRef$current9$get;
305
- var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current9 = formRef.current) === null || _formRef$current9 === void 0 ? void 0 : (_formRef$current9$get = _formRef$current9.getFieldsValue) === null || _formRef$current9$get === void 0 ? void 0 : _formRef$current9$get.call(_formRef$current9)) || {};
310
+ var _formRef$current10, _formRef$current10$ge;
311
+ var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current10 = formRef.current) === null || _formRef$current10 === void 0 ? void 0 : (_formRef$current10$ge = _formRef$current10.getFieldsValue) === null || _formRef$current10$ge === void 0 ? void 0 : _formRef$current10$ge.call(_formRef$current10)) || {};
306
312
  if (rowKey) {
307
313
  formValue = formValue[rowKey] || {};
308
314
  }
@@ -311,30 +317,30 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
311
317
  formValue[textNameProp] = val;
312
318
  setText(val);
313
319
  if (rowKey) {
314
- var _formRef$current10, _formRef$current10$se;
315
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current10 = formRef.current) === null || _formRef$current10 === void 0 ? void 0 : (_formRef$current10$se = _formRef$current10.setFieldsValue) === null || _formRef$current10$se === void 0 ? void 0 : _formRef$current10$se.call(_formRef$current10, (0, _defineProperty2.default)({}, rowKey, formValue));
316
- } else {
317
320
  var _formRef$current11, _formRef$current11$se;
318
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current11 = formRef.current) === null || _formRef$current11 === void 0 ? void 0 : (_formRef$current11$se = _formRef$current11.setFieldsValue) === null || _formRef$current11$se === void 0 ? void 0 : _formRef$current11$se.call(_formRef$current11, (0, _objectSpread2.default)({}, formValue));
321
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current11 = formRef.current) === null || _formRef$current11 === void 0 ? void 0 : (_formRef$current11$se = _formRef$current11.setFieldsValue) === null || _formRef$current11$se === void 0 ? void 0 : _formRef$current11$se.call(_formRef$current11, (0, _defineProperty2.default)({}, rowKey, formValue));
322
+ } else {
323
+ var _formRef$current12, _formRef$current12$se;
324
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current12 = formRef.current) === null || _formRef$current12 === void 0 ? void 0 : (_formRef$current12$se = _formRef$current12.setFieldsValue) === null || _formRef$current12$se === void 0 ? void 0 : _formRef$current12$se.call(_formRef$current12, (0, _objectSpread3.default)({}, formValue));
319
325
  }
320
326
  };
321
327
  // 当表单重置或点clear时,处理值
322
328
  var clearValue = function clearValue(e) {
323
329
  if (!e.target.value) {
324
- var _formRef$current12, _formRef$current12$ge;
330
+ var _formRef$current13, _formRef$current13$ge;
325
331
  setText('');
326
- var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current12 = formRef.current) === null || _formRef$current12 === void 0 ? void 0 : (_formRef$current12$ge = _formRef$current12.getFieldsValue) === null || _formRef$current12$ge === void 0 ? void 0 : _formRef$current12$ge.call(_formRef$current12)) || {};
332
+ var formValue = (formRef === null || formRef === void 0 ? void 0 : (_formRef$current13 = formRef.current) === null || _formRef$current13 === void 0 ? void 0 : (_formRef$current13$ge = _formRef$current13.getFieldsValue) === null || _formRef$current13$ge === void 0 ? void 0 : _formRef$current13$ge.call(_formRef$current13)) || {};
327
333
  if (rowKey) {
328
334
  formValue = formValue[rowKey] || {};
329
335
  }
330
336
  formValue[name] = '';
331
337
  formValue[textNameProp] = '';
332
338
  if (rowKey) {
333
- var _formRef$current13, _formRef$current13$se;
334
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current13 = formRef.current) === null || _formRef$current13 === void 0 ? void 0 : (_formRef$current13$se = _formRef$current13.setFieldsValue) === null || _formRef$current13$se === void 0 ? void 0 : _formRef$current13$se.call(_formRef$current13, (0, _defineProperty2.default)({}, rowKey, formValue));
335
- } else {
336
339
  var _formRef$current14, _formRef$current14$se;
337
- formRef === null || formRef === void 0 ? void 0 : (_formRef$current14 = formRef.current) === null || _formRef$current14 === void 0 ? void 0 : (_formRef$current14$se = _formRef$current14.setFieldsValue) === null || _formRef$current14$se === void 0 ? void 0 : _formRef$current14$se.call(_formRef$current14, (0, _objectSpread2.default)({}, formValue));
340
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current14 = formRef.current) === null || _formRef$current14 === void 0 ? void 0 : (_formRef$current14$se = _formRef$current14.setFieldsValue) === null || _formRef$current14$se === void 0 ? void 0 : _formRef$current14$se.call(_formRef$current14, (0, _defineProperty2.default)({}, rowKey, formValue));
341
+ } else {
342
+ var _formRef$current15, _formRef$current15$se;
343
+ formRef === null || formRef === void 0 ? void 0 : (_formRef$current15 = formRef.current) === null || _formRef$current15 === void 0 ? void 0 : (_formRef$current15$se = _formRef$current15.setFieldsValue) === null || _formRef$current15$se === void 0 ? void 0 : _formRef$current15$se.call(_formRef$current15, (0, _objectSpread3.default)({}, formValue));
338
344
  }
339
345
  }
340
346
  };
@@ -3,6 +3,7 @@ import './common.less';
3
3
  declare type LoadingType = {
4
4
  Text?: string | JSX.Element;
5
5
  className?: string;
6
+ style?: any;
6
7
  };
7
8
  declare const _default: (props: LoadingType) => JSX.Element;
8
9
  export default _default;
@@ -712,7 +712,10 @@ var appPath = function appPath() {
712
712
  // @ts-ignore
713
713
  return window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
714
714
  }
715
- return path ? path : './';
715
+ if (path) return path;
716
+ var p = location.pathname || '';
717
+ var idx = p.indexOf('/', 1);
718
+ return idx > 0 ? p.slice(0, idx + 1) : p.length > 1 ? p + '/' : './';
716
719
  };
717
720
  /**
718
721
  * 深度复制对象
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "3.0.28",
3
+ "version": "3.0.30",
4
4
  "description": "ls-pro-common",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "@ant-design/icons": "^4.3.0",
24
- "ls-pro-table": "^3.0.17",
24
+ "ls-pro-table": "^3.0.18",
25
25
  "ls-pro-form": "^3.0.6",
26
26
  "ls-pro-descriptions": "^3.0.1",
27
27
  "ls-pro-card": "^3.0.3",