@ray-js/smart-ui 2.11.0-beta-0 → 2.11.1-beta-0

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.
@@ -14,7 +14,7 @@ export const withReactProps = (WrappedComponent) => {
14
14
  // 自身是否是一个 Slot 组件
15
15
  const isSelfSlot = typeof (props === null || props === void 0 ? void 0 : props.slot) === 'string';
16
16
  const slotProps = isSelfSlot ? {} : (_a = props === null || props === void 0 ? void 0 : props.slot) !== null && _a !== void 0 ? _a : {};
17
- const slotPropsNames = Object.keys(slotProps);
17
+ const slotPropsNames = Object.keys(slotProps).filter(key => React.isValidElement(slotProps[key]));
18
18
  const omitPropKeys = ['className', 'slot', 'children'];
19
19
  const stylePropsKeys = [];
20
20
  let vantProps = omit(props, omitPropKeys);
@@ -32,7 +32,9 @@ var withReactProps = function (WrappedComponent) {
32
32
  // 自身是否是一个 Slot 组件
33
33
  var isSelfSlot = typeof (props === null || props === void 0 ? void 0 : props.slot) === 'string';
34
34
  var slotProps = isSelfSlot ? {} : (_a = props === null || props === void 0 ? void 0 : props.slot) !== null && _a !== void 0 ? _a : {};
35
- var slotPropsNames = Object.keys(slotProps);
35
+ var slotPropsNames = Object.keys(slotProps).filter(function (key) {
36
+ return react_1.default.isValidElement(slotProps[key]);
37
+ });
36
38
  var omitPropKeys = ['className', 'slot', 'children'];
37
39
  var stylePropsKeys = [];
38
40
  var vantProps = (0, lodash_es_1.omit)(props, omitPropKeys);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/smart-ui",
3
- "version": "2.11.0-beta-0",
3
+ "version": "2.11.1-beta-0",
4
4
  "description": "轻量、可靠的智能小程序 UI 组件库",
5
5
  "scripts": {
6
6
  "syncMiniappData": "node ./build/syncMiniappData.js",
@@ -81,4 +81,4 @@
81
81
  "email": "tuyafe@tuya.com"
82
82
  }
83
83
  ]
84
- }
84
+ }