Commit 3acc1431 authored by timel's avatar timel

fix: opponent update order

parent c2364341
Pipeline #22415 failed with stages
in 13 minutes and 40 seconds
......@@ -99,11 +99,11 @@ export const displaySelectActionsModal = async (
args: Partial<Omit<typeof defaultProps, "isOpen">>
) => {
resetSelectActionsModal(); // 先重置为初始状态
localStore.isOpen = true;
Object.entries(args).forEach(([key, value]) => {
// @ts-ignore
localStore[key] = value;
});
localStore.isOpen = true;
await new Promise<void>((resolve) => (rs = resolve)); // 等待在组件内resolve
localStore.isOpen = false;
};
......
......@@ -38,8 +38,8 @@ let rs: (options: Snapshot<Option[]>) => void = () => {};
export const displaySimpleSelectCardsModal = async (
args: Omit<typeof defaultProps, "isOpen">
) => {
localStore.isOpen = true;
localStore.selectables = args.selectables;
localStore.isOpen = true;
const res = await new Promise<Snapshot<Option[]>>(
(resolve) => (rs = resolve)
); // 等待在组件内resolve
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment