refactor(frontend): refactor popup api and make sure call dispose callback
Close #14122
This commit is contained in:
@@ -35,7 +35,9 @@ const prevCookies = ref(0);
|
||||
function onClick(ev: MouseEvent) {
|
||||
const x = ev.clientX;
|
||||
const y = ev.clientY;
|
||||
os.popup(MkPlusOneEffect, { x, y }, {}, 'end');
|
||||
const { dispose } = os.popup(MkPlusOneEffect, { x, y }, {
|
||||
end: () => dispose(),
|
||||
});
|
||||
|
||||
saveData.value!.cookies++;
|
||||
saveData.value!.totalCookies++;
|
||||
|
Reference in New Issue
Block a user