@sheinx/base 3.9.9-beta.4 → 3.9.9-beta.5

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":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AAiHD,wBAAyC"}
1
+ {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AAsHD,wBAAyC"}
@@ -95,14 +95,14 @@ var More = function More(props) {
95
95
  var after = [];
96
96
  var afterLength = 0;
97
97
  if (!shouldShowMore) {
98
- var validShowNum = showNum || 0;
99
- before = new Array(validShowNum).fill(undefined).map(function (_item, index) {
98
+ var _validShowNum = showNum || 0;
99
+ before = new Array(_validShowNum).fill(undefined).map(function (_item, index) {
100
100
  return data[index];
101
101
  });
102
- var afterCount = Math.max(0, data.length - validShowNum);
102
+ var afterCount = Math.max(0, data.length - _validShowNum);
103
103
  try {
104
104
  after = new Array(afterCount).fill(undefined).map(function (_item, index) {
105
- return data[validShowNum + index];
105
+ return data[_validShowNum + index];
106
106
  });
107
107
  afterLength = after.length;
108
108
  } catch (error) {
@@ -158,13 +158,17 @@ var More = function More(props) {
158
158
  })]
159
159
  });
160
160
  };
161
+
162
+ // 当 compressed === 'no-repeat' 时,只传递未显示的数据
163
+ var validShowNum = showNum || 0;
164
+ var compressedData = compressed === 'no-repeat' ? (datas || []).slice(validShowNum) : datas;
161
165
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
162
166
  children: [shouldShowMore ? data : before, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
163
167
  style: {
164
168
  display: 'inline-flex'
165
169
  },
166
170
  children: renderCompressed ? renderCompressed({
167
- data: datas,
171
+ data: compressedData,
168
172
  onRemove: onRemove
169
173
  }) : renderCompressedTag()
170
174
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AAiHD,wBAAyC"}
1
+ {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AAsHD,wBAAyC"}
@@ -85,14 +85,14 @@ var More = function More(props) {
85
85
  var after = [];
86
86
  var afterLength = 0;
87
87
  if (!shouldShowMore) {
88
- var validShowNum = showNum || 0;
89
- before = new Array(validShowNum).fill(undefined).map(function (_item, index) {
88
+ var _validShowNum = showNum || 0;
89
+ before = new Array(_validShowNum).fill(undefined).map(function (_item, index) {
90
90
  return data[index];
91
91
  });
92
- var afterCount = Math.max(0, data.length - validShowNum);
92
+ var afterCount = Math.max(0, data.length - _validShowNum);
93
93
  try {
94
94
  after = new Array(afterCount).fill(undefined).map(function (_item, index) {
95
- return data[validShowNum + index];
95
+ return data[_validShowNum + index];
96
96
  });
97
97
  afterLength = after.length;
98
98
  } catch (error) {
@@ -148,13 +148,17 @@ var More = function More(props) {
148
148
  })]
149
149
  });
150
150
  };
151
+
152
+ // 当 compressed === 'no-repeat' 时,只传递未显示的数据
153
+ var validShowNum = showNum || 0;
154
+ var compressedData = compressed === 'no-repeat' ? (datas || []).slice(validShowNum) : datas;
151
155
  return /*#__PURE__*/_jsxs(React.Fragment, {
152
156
  children: [shouldShowMore ? data : before, /*#__PURE__*/_jsx("span", {
153
157
  style: {
154
158
  display: 'inline-flex'
155
159
  },
156
160
  children: renderCompressed ? renderCompressed({
157
- data: datas,
161
+ data: compressedData,
158
162
  onRemove: onRemove
159
163
  }) : renderCompressedTag()
160
164
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.9.9-beta.4",
3
+ "version": "3.9.9-beta.5",
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.9.9-beta.4",
13
+ "@sheinx/hooks": "3.9.9-beta.5",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.3.3"