@pisell/core 1.0.18 → 1.0.20

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.
@@ -303,10 +303,11 @@ export var Application = /*#__PURE__*/function () {
303
303
  var _this4 = this;
304
304
  var Component = function Component() {
305
305
  var _ref4 = useRef();
306
+ var Com = component === null || component === void 0 ? void 0 : component.Component;
306
307
  for (var _len = arguments.length, result = new Array(_len), _key = 0; _key < _len; _key++) {
307
308
  result[_key] = arguments[_key];
308
309
  }
309
- return /*#__PURE__*/React.createElement(component.Component, _extends({}, result, {
310
+ return /*#__PURE__*/React.createElement(Com, _extends({}, result, {
310
311
  ref: function ref(_ref) {
311
312
  _ref4.current = _ref;
312
313
  console.log('组件ref执行了');
@@ -316,7 +317,9 @@ export var Application = /*#__PURE__*/function () {
316
317
  }
317
318
  }));
318
319
  };
319
- this.components.set(code, _objectSpread({}, component));
320
+ this.components.set(code, _objectSpread(_objectSpread({}, component), {}, {
321
+ Component: Component
322
+ }));
320
323
  }
321
324
 
322
325
  /**
@@ -172,8 +172,9 @@ var Application = class {
172
172
  setComponent(code, component) {
173
173
  const Component = (...result) => {
174
174
  const ref = (0, import_react.useRef)();
175
+ const Com = component == null ? void 0 : component.Component;
175
176
  return /* @__PURE__ */ import_react.default.createElement(
176
- component.Component,
177
+ Com,
177
178
  {
178
179
  ...result,
179
180
  ref: (_ref) => {
@@ -188,8 +189,8 @@ var Application = class {
188
189
  );
189
190
  };
190
191
  this.components.set(code, {
191
- ...component
192
- // Component: Component,
192
+ ...component,
193
+ Component
193
194
  });
194
195
  }
195
196
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/core",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",