plain-design 1.0.0-beta.129 → 1.0.0-beta.130
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plain-design",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.130",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/plain-design.min.js",
|
|
6
6
|
"module": "dist/plain-design.commonjs.min.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@peryl/react-compose": "0.0.
|
|
22
|
+
"@peryl/react-compose": "0.0.225",
|
|
23
23
|
"exceljs": "^4.2.1",
|
|
24
24
|
"file-saver": "^2.0.5",
|
|
25
25
|
"react": "^18.0.1",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@peryl/icon": "0.0.8",
|
|
34
|
-
"@peryl/utils": "^0.1.
|
|
34
|
+
"@peryl/utils": "^0.1.72",
|
|
35
35
|
"@types/color": "3.0.6",
|
|
36
36
|
"@types/react-transition-group": "4.4.10",
|
|
37
37
|
"color": "4.2.3",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"react-transition-group": "4.4.5"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@peryl/react-compose": "0.0.
|
|
43
|
+
"@peryl/react-compose": "0.0.225",
|
|
44
44
|
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
|
45
45
|
"@babel/plugin-transform-class-properties": "7.23.3",
|
|
46
46
|
"@babel/preset-env": "7.23.7",
|
|
@@ -370,6 +370,7 @@ export const PopupItem = designComponent({
|
|
|
370
370
|
if (manager.methods.isOpen(state.option)) {
|
|
371
371
|
manager.hooks.onPopupItemClose.exec(state.option);
|
|
372
372
|
}
|
|
373
|
+
delay().then(() => {state.option = null as any;});
|
|
373
374
|
});
|
|
374
375
|
|
|
375
376
|
PopupItemProvide.provide(state);
|
|
@@ -12,6 +12,7 @@ import {useManagerTriggerContextmenu} from "./trigger/useManagerTrigger.contextm
|
|
|
12
12
|
import {useManagerTriggerFocus} from "./trigger/useManagerTrigger.focus";
|
|
13
13
|
import {useManagerTriggerClickOutside} from "./trigger/useManagerTrigger.clickOutside";
|
|
14
14
|
import {toArray} from "@peryl/utils/toArray";
|
|
15
|
+
import {delay} from "@peryl/utils/delay";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* popup item管理器
|
|
@@ -246,7 +247,17 @@ export function usePopupManager({ getSize }: { getSize: () => typeof ThemeSize.T
|
|
|
246
247
|
|
|
247
248
|
PopupManager.add(manager);
|
|
248
249
|
|
|
249
|
-
onBeforeUnmount(() => {
|
|
250
|
+
onBeforeUnmount(() => {
|
|
251
|
+
PopupManager.remove(manager);
|
|
252
|
+
delay().then(() => {
|
|
253
|
+
Object.keys(findOption.value.id2option).forEach(k => {delete findOption.value.id2option[k];});
|
|
254
|
+
manager.state.options = [];
|
|
255
|
+
manager.state.isOpenMap = {};
|
|
256
|
+
manager.state.isShowMap = {};
|
|
257
|
+
manager.parent = null;
|
|
258
|
+
manager.render = () => null;
|
|
259
|
+
});
|
|
260
|
+
});
|
|
250
261
|
|
|
251
262
|
return manager;
|
|
252
263
|
}
|