@teamix/pro 1.3.10 → 1.3.11

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/pro.js CHANGED
@@ -59490,35 +59490,41 @@ var Unit = function Unit(props) {
59490
59490
  /* harmony export */ });
59491
59491
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59787);
59492
59492
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
59493
- /* harmony import */ var _teamix_pro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42345);
59494
- /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80653);
59495
-
59493
+ /* harmony import */ var _teamix_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80653);
59496
59494
 
59497
59495
 
59498
- var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.baseClass)('teamix-pro-field-output-value-with-status');
59496
+ var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_1__.baseClass)('teamix-pro-field-output-value-with-status');
59499
59497
 
59500
59498
  var ValueWithStatus = function ValueWithStatus(props) {
59501
- var _render$valueWithStat, _render$valueWithStat2, _fieldValue$endValue, _render$valueWithStat3, _render$valueWithStat4;
59499
+ var _ref2;
59502
59500
 
59503
59501
  var fieldValue = props.fieldValue,
59504
59502
  result = props.result,
59505
59503
  render = props.render;
59504
+
59505
+ var _ref = fieldValue || {},
59506
+ endValue = _ref.endValue;
59507
+
59508
+ var _render$valueWithStat = render === null || render === void 0 ? void 0 : render.valueWithStatusConfig,
59509
+ frontValueWidth = _render$valueWithStat.frontValueWidth,
59510
+ fronValueWidth = _render$valueWithStat.fronValueWidth,
59511
+ endValueColor = _render$valueWithStat.endValueColor;
59512
+
59506
59513
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59507
59514
  className: cls('')
59508
59515
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59509
59516
  className: cls('result'),
59510
59517
  style: {
59511
- width: (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.endValue) !== undefined ? (_render$valueWithStat = render === null || render === void 0 ? void 0 : (_render$valueWithStat2 = render.valueWithStatusConfig) === null || _render$valueWithStat2 === void 0 ? void 0 : _render$valueWithStat2.fronValueWidth) !== null && _render$valueWithStat !== void 0 ? _render$valueWithStat : 50 : 'unset'
59518
+ width: endValue !== undefined ? (_ref2 = frontValueWidth || fronValueWidth) !== null && _ref2 !== void 0 ? _ref2 : 50 : 'unset'
59512
59519
  }
59513
- }, result), (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.endValue) !== undefined && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59520
+ }, result), endValue ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59514
59521
  className: cls('divider')
59515
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_pro__WEBPACK_IMPORTED_MODULE_1__.ProField, {
59516
- type: "text",
59517
- value: (_fieldValue$endValue = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.endValue) !== null && _fieldValue$endValue !== void 0 ? _fieldValue$endValue : '',
59518
- render: {
59519
- color: (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.getColor)((_render$valueWithStat3 = render === null || render === void 0 ? void 0 : (_render$valueWithStat4 = render.valueWithStatusConfig) === null || _render$valueWithStat4 === void 0 ? void 0 : _render$valueWithStat4.endValueColor) !== null && _render$valueWithStat3 !== void 0 ? _render$valueWithStat3 : 'var(--color-text1-3, #333333)')
59522
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
59523
+ className: cls('value-with-status'),
59524
+ style: {
59525
+ color: (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_1__.getColor)(endValueColor !== null && endValueColor !== void 0 ? endValueColor : 'var(--color-text1-3, #333333)')
59520
59526
  }
59521
- }));
59527
+ }, endValue)) : null);
59522
59528
  };
59523
59529
 
59524
59530
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ValueWithStatus);
@@ -63404,7 +63410,7 @@ function useDialogFormAction(action, context) {
63404
63410
 
63405
63411
  _onFinish && _onFinish((_innerFormRef$current2 = innerFormRef.current) == null ? void 0 : _innerFormRef$current2.values);
63406
63412
  }
63407
- }, others), context);
63413
+ }, others), context, true);
63408
63414
  }
63409
63415
  /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (useDialogFormAction)));
63410
63416
 
@@ -63545,7 +63551,7 @@ function getFooterAlignClass(isDrawer, align) {
63545
63551
  } // 弹窗 -> 请求(点击确认,发送数据请求)
63546
63552
 
63547
63553
 
63548
- function useDialogAction(action, actionContext) {
63554
+ function useDialogAction(action, actionContext, hasForm) {
63549
63555
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
63550
63556
  loading = _useState[0],
63551
63557
  setLoading = _useState[1];
@@ -63649,22 +63655,27 @@ function useDialogAction(action, actionContext) {
63649
63655
  case 6:
63650
63656
  onFinish && onFinish();
63651
63657
  resolve(true);
63652
- _context.next = 16;
63658
+ _context.next = 18;
63653
63659
  break;
63654
63660
 
63655
63661
  case 10:
63656
63662
  _context.prev = 10;
63657
63663
  _context.t0 = _context["catch"](2);
63658
- setLoading(false); // 如果 beforeRequest 中返回了 false,则直接关闭弹窗
63664
+ setLoading(false); // 如果 beforeRequest 中返回了 false 并且不是 dialog-form,则直接关闭弹窗
63659
63665
 
63660
- if (beforeRequest) {
63661
- resolve(true);
63666
+ if (!(beforeRequest && !hasForm)) {
63667
+ _context.next = 16;
63668
+ break;
63662
63669
  }
63663
63670
 
63664
- resolve(false);
63671
+ resolve(true);
63665
63672
  return _context.abrupt("return");
63666
63673
 
63667
63674
  case 16:
63675
+ resolve(false);
63676
+ return _context.abrupt("return");
63677
+
63678
+ case 18:
63668
63679
  case "end":
63669
63680
  return _context.stop();
63670
63681
  }
@@ -69288,7 +69299,7 @@ _teamix_icon__WEBPACK_IMPORTED_MODULE_15__/* ["default"].setConfig */ .Z.setConf
69288
69299
  // export * from './sidebar';
69289
69300
 
69290
69301
 
69291
- var version = '1.3.10';
69302
+ var version = '1.3.11';
69292
69303
 
69293
69304
 
69294
69305
  /***/ }),