shineout 3.8.0 → 3.8.1-beta.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.
package/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.8.0'
525
+ version: '3.8.1-beta.2'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
12386
12386
  };
12387
12387
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12388
12388
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12389
- /* harmony default export */ var version = ('3.8.0');
12389
+ /* harmony default export */ var version = ('3.8.1-beta.2');
12390
12390
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12391
12391
 
12392
12392
 
@@ -42975,6 +42975,7 @@ var Cascader = function Cascader(props0) {
42975
42975
  return renderLoading();
42976
42976
  }
42977
42977
  if (isDataEmpty) {
42978
+ // todo: 空数据时 是否 支持一下也能走到renderOptionList
42978
42979
  return renderEmpty();
42979
42980
  }
42980
42981
  if (!filterText || filterText && mode !== undefined || data && data.length === 0) {
@@ -49255,6 +49256,9 @@ var removeModalInstance = function removeModalInstance(instanceId) {
49255
49256
  return id !== instanceId;
49256
49257
  });
49257
49258
  };
49259
+ var getInstanceIds = function getInstanceIds() {
49260
+ return modal_content_state.mutate.instanceIds;
49261
+ };
49258
49262
  var mousePosition = null;
49259
49263
  var getClickPosition = function getClickPosition(e) {
49260
49264
  mousePosition = {
@@ -49441,8 +49445,7 @@ var Modal = function Modal(props) {
49441
49445
  if (visible) {
49442
49446
  setDocumentOverflow();
49443
49447
  } else {
49444
- if (config.instanceIds.length && config.instanceIds[config.instanceIds.length - 1] === context.instanceId) return;
49445
- resetDocumentOverflow();
49448
+ if (config.instanceIds.length === 0) resetDocumentOverflow();
49446
49449
  }
49447
49450
  }
49448
49451
  }, [visible, config.instanceIds]);
@@ -49457,10 +49460,10 @@ var Modal = function Modal(props) {
49457
49460
  return function () {
49458
49461
  var _props$shouldDestroy2;
49459
49462
  removeModalInstance(context.instanceId);
49460
- if (context.isMask) {
49463
+ var instanceIds = getInstanceIds();
49464
+ if (instanceIds.length === 0) {
49461
49465
  resetDocumentOverflow();
49462
49466
  }
49463
- ;
49464
49467
  (_props$shouldDestroy2 = props.shouldDestroy) === null || _props$shouldDestroy2 === void 0 || _props$shouldDestroy2.call(props, true);
49465
49468
  if (context.isMask) {
49466
49469
  context.isMask = false;
@@ -57925,6 +57928,7 @@ function Select(props0) {
57925
57928
  });
57926
57929
  };
57927
57930
  var renderEmpty = function renderEmpty() {
57931
+ if (props.emptyText === false) return null;
57928
57932
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
57929
57933
  className: styles === null || styles === void 0 ? void 0 : styles.option,
57930
57934
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@@ -57939,13 +57943,13 @@ function Select(props0) {
57939
57943
  var renderOptions = function renderOptions() {
57940
57944
  if (loading) return renderLoading();
57941
57945
  var isEmpty = !(filterData !== null && filterData !== void 0 && filterData.length);
57942
- if (isEmpty && props.emptyText !== false) return renderEmpty();
57943
57946
  var options = 'treeData' in props ? renderTreeList() : renderList();
57944
57947
  if (renderOptionList) {
57945
- return renderOptionList(options, {
57948
+ return renderOptionList(isEmpty ? renderEmpty() : options, {
57946
57949
  loading: loading
57947
57950
  });
57948
57951
  }
57952
+ if (isEmpty) return renderEmpty();
57949
57953
  return options;
57950
57954
  };
57951
57955
  var renderHeader = function renderHeader() {
@@ -73022,7 +73026,7 @@ var upload_interface = __webpack_require__(8821);
73022
73026
 
73023
73027
 
73024
73028
  /* harmony default export */ var src_0 = ({
73025
- version: '3.8.0'
73029
+ version: '3.8.1-beta.2'
73026
73030
  });
73027
73031
  }();
73028
73032
  /******/ return __webpack_exports__;