@peng_kai/kit 0.3.0-beta.3 → 0.3.0-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.
@@ -72,14 +72,15 @@ export function useAntdModal<Comp extends Component>(
72
72
  newCompProps?: typeof compProps,
73
73
  newAntdModalProps?: Omit<Partial<ModalProps>, 'open'>,
74
74
  ) => {
75
- Object.assign(_modalProps, newAntdModalProps);
76
- Object.assign(compProps, newCompProps);
77
-
78
75
  if (_modalProps.open) {
79
76
  // return Promise.reject(new Error('Modal is already open'));
80
77
  return;
81
78
  }
82
79
 
80
+ Object.assign(_modalProps, newAntdModalProps);
81
+ !(comp as any).props && Object.keys(compProps).forEach(key => delete compProps[key]);
82
+ Object.assign(compProps, newCompProps);
83
+
83
84
  promiseResolvers = Promise.withResolvers();
84
85
  _modalProps.open = true;
85
86
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@peng_kai/kit",
3
3
  "type": "module",
4
- "version": "0.3.0-beta.3",
4
+ "version": "0.3.0-beta.5",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "ISC",