@lingxiteam/assets 4.1.1 → 4.2.1-alpha.2

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.
@@ -11,7 +11,8 @@ var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
11
11
  onOk = props.onOk,
12
12
  onCancel = props.onCancel,
13
13
  okText = props.okText,
14
- cancelText = props.cancelText;
14
+ cancelText = props.cancelText,
15
+ showErrorCode = props.showErrorCode;
15
16
  return visible ? /*#__PURE__*/React.createElement("div", {
16
17
  className: "lxm-modal-wraper",
17
18
  ref: ref
@@ -28,7 +29,7 @@ var Modal = /*#__PURE__*/forwardRef(function (props, ref) {
28
29
  alt: ""
29
30
  })), title ? /*#__PURE__*/React.createElement("div", {
30
31
  className: "lxm-modal-title"
31
- }, title) : '', subtitle ? /*#__PURE__*/React.createElement("div", {
32
+ }, title) : '', showErrorCode !== false && subtitle ? /*#__PURE__*/React.createElement("div", {
32
33
  className: "lxm-modal-subtitle"
33
34
  }, subtitle) : '', content ? /*#__PURE__*/React.createElement("div", {
34
35
  className: "lxm-modal-content"
@@ -6,6 +6,8 @@ export var defaultGlobalConfig = {
6
6
  maxLen: null,
7
7
  showType: 'modal',
8
8
  maxCount: null,
9
+ showErrorCode: true,
10
+ // 在错误提示框里展示错误编码
9
11
  resolve: process.env.LingXi_ERROR_RESOLVE || resolveRequestPath('/lcdp/error/queryErrorInfoByCodeOrMsg'),
10
12
  okText: '查看详情',
11
13
  cancelText: '知道了',
@@ -23,7 +23,8 @@ var Notice = /*#__PURE__*/forwardRef(function (props, ref) {
23
23
  maxLen = props.maxLen,
24
24
  duration = props.duration,
25
25
  badge = props.badge,
26
- onShowStash = props.onShowStash;
26
+ onShowStash = props.onShowStash,
27
+ showErrorCode = props.showErrorCode;
27
28
  var _useState = useState(),
28
29
  _useState2 = _slicedToArray(_useState, 2),
29
30
  footerContent = _useState2[0],
@@ -111,7 +112,7 @@ var Notice = /*#__PURE__*/forwardRef(function (props, ref) {
111
112
  className: "lx-notification-notice-head-state"
112
113
  }), /*#__PURE__*/React.createElement("div", {
113
114
  className: "lx-notification-notice-head-title"
114
- }, title, isDomEle(code) ? /*#__PURE__*/React.createElement("span", {
115
+ }, title, showErrorCode !== false && isDomEle(code) ? /*#__PURE__*/React.createElement("span", {
115
116
  className: "lx-notification-notice-head-code"
116
117
  }, code) : ''), isDomEle(extra) ? /*#__PURE__*/React.createElement("div", {
117
118
  className: "lx-notification-notice-head-extra"
@@ -48,9 +48,7 @@ var Notification = /*#__PURE__*/forwardRef(function (props, ref) {
48
48
  return item.key !== key;
49
49
  });
50
50
  });
51
- if (stashOpenList.length) {
52
- setStashOpenList([]);
53
- }
51
+ setStashOpenList([]);
54
52
  };
55
53
  var onAddNotice = function onAddNotice(config) {
56
54
  setConfigList(function (list) {
@@ -11,6 +11,8 @@ export var defaultGlobalConfig = {
11
11
  // 最大错误显示数据
12
12
  showBadge: false,
13
13
  // 展示当前错误徽标数,当maxCount为1时生效
14
+ showErrorCode: true,
15
+ // 在错误提示框里展示错误编码
14
16
  placement: 'topRight',
15
17
  // 'topRight', 'topLeft', 'bottomRight', 'bottomLeft'
16
18
  extendFooter: null,
@@ -1,5 +1,7 @@
1
1
  import * as mobileRootConfig from './mobile';
2
2
  import * as pcRootConfig from './pc';
3
+ import * as todoCallback from './todoCallback';
3
4
  export { getTodoActionListByKey } from './todoActionList';
4
5
  export { default as todoOptionList } from './todoOptionList';
5
- export { mobileRootConfig, pcRootConfig, };
6
+ export type { KV } from './todoCallback';
7
+ export { mobileRootConfig, pcRootConfig, todoCallback, };
@@ -1,5 +1,6 @@
1
1
  import * as mobileRootConfig from './mobile';
2
2
  import * as pcRootConfig from './pc';
3
+ import * as todoCallback from './todoCallback';
3
4
  export { getTodoActionListByKey } from './todoActionList';
4
5
  export { default as todoOptionList } from './todoOptionList';
5
- export { mobileRootConfig, pcRootConfig };
6
+ export { mobileRootConfig, pcRootConfig, todoCallback };