mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 13:22:49 +00:00
23 lines
480 B
JavaScript
Vendored
23 lines
480 B
JavaScript
Vendored
import emitter from "../../store/events";
|
|
|
|
let microAggregate = [];
|
|
|
|
const setMicroAggregate = (names) => {
|
|
microAggregate = names;
|
|
}
|
|
|
|
const hasMicroAggregate = () => {
|
|
return microAggregate.length > 0;
|
|
}
|
|
|
|
const closeLastMicroAggregate = () => {
|
|
const name = microAggregate.pop();
|
|
if (!name) {
|
|
return false;
|
|
}
|
|
emitter.emit("observeMicroApp:close", name);
|
|
return true;
|
|
}
|
|
|
|
export { setMicroAggregate, hasMicroAggregate, closeLastMicroAggregate};
|