@sheinx/base 3.8.1-beta.2 → 3.8.1-beta.4

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 +1 @@
1
- {"version":3,"file":"cascader.d.ts","sourceRoot":"","sources":["cascader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,YAAY,EAIb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAahD,QAAA,MAAM,QAAQ,6HAoxBb,CAAC;AACF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"cascader.d.ts","sourceRoot":"","sources":["cascader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,YAAY,EAIb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAahD,QAAA,MAAM,QAAQ,6HAmxBb,CAAC;AACF,eAAe,QAAQ,CAAC"}
@@ -559,15 +559,14 @@ var Cascader = function Cascader(props0) {
559
559
  });
560
560
  };
561
561
  var renderEmpty = function renderEmpty() {
562
- if (emptyText) {
563
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
564
- className: styles === null || styles === void 0 ? void 0 : styles.empty,
565
- children: emptyText
562
+ if (renderOptionList) {
563
+ return renderOptionList(null, {
564
+ loading: !!loading
566
565
  });
567
566
  }
568
567
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
569
568
  className: styles === null || styles === void 0 ? void 0 : styles.empty,
570
- children: (0, _config.getLocale)(locale, 'noData')
569
+ children: emptyText || (0, _config.getLocale)(locale, 'noData')
571
570
  });
572
571
  };
573
572
  var renderNormalList = function renderNormalList() {
@@ -630,7 +629,6 @@ var Cascader = function Cascader(props0) {
630
629
  return renderLoading();
631
630
  }
632
631
  if (isDataEmpty) {
633
- // todo: 空数据时 是否 支持一下也能走到renderOptionList
634
632
  return renderEmpty();
635
633
  }
636
634
  if (!filterText || filterText && mode !== undefined || data && data.length === 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"cascader.d.ts","sourceRoot":"","sources":["cascader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,YAAY,EAIb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAahD,QAAA,MAAM,QAAQ,6HAoxBb,CAAC;AACF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"cascader.d.ts","sourceRoot":"","sources":["cascader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAML,YAAY,EAIb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAahD,QAAA,MAAM,QAAQ,6HAmxBb,CAAC;AACF,eAAe,QAAQ,CAAC"}
@@ -552,15 +552,14 @@ var Cascader = function Cascader(props0) {
552
552
  });
553
553
  };
554
554
  var renderEmpty = function renderEmpty() {
555
- if (emptyText) {
556
- return /*#__PURE__*/_jsx("div", {
557
- className: styles === null || styles === void 0 ? void 0 : styles.empty,
558
- children: emptyText
555
+ if (renderOptionList) {
556
+ return renderOptionList(null, {
557
+ loading: !!loading
559
558
  });
560
559
  }
561
560
  return /*#__PURE__*/_jsx("div", {
562
561
  className: styles === null || styles === void 0 ? void 0 : styles.empty,
563
- children: getLocale(locale, 'noData')
562
+ children: emptyText || getLocale(locale, 'noData')
564
563
  });
565
564
  };
566
565
  var renderNormalList = function renderNormalList() {
@@ -623,7 +622,6 @@ var Cascader = function Cascader(props0) {
623
622
  return renderLoading();
624
623
  }
625
624
  if (isDataEmpty) {
626
- // todo: 空数据时 是否 支持一下也能走到renderOptionList
627
625
  return renderEmpty();
628
626
  }
629
627
  if (!filterText || filterText && mode !== undefined || data && data.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.8.1-beta.2",
3
+ "version": "3.8.1-beta.4",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.8.1-beta.2",
13
+ "@sheinx/hooks": "3.8.1-beta.4",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"