This commit is contained in:
expdsn 2024-11-28 19:21:06 +08:00
parent 3a40fa7a25
commit 7b0e992c98
2 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,7 @@ export function sendParent(
ifSearch: boolean
}
]
| ['information', string]
) {
parent.window.postMessage(
{

View File

@ -1,3 +1,5 @@
import { sendParent } from "@/utils/parent";
import { generateRandomString } from "@/utils/tool";
import useTimeStore from "@/utils/useTimeStore";
import dayjs from "dayjs";
import { defineStore } from "pinia";
@ -97,10 +99,13 @@ export default defineStore("work", () => {
stopTomatoTime()
}
// sendParent(['information', '恭喜你完成了一个番茄钟' + generateRandomString(4)])
if (remainingTime.value === 0) {
state.timeList.push(
dayjs().valueOf()
)
sendParent(['information', '恭喜你完成了一个番茄钟'])
}
})
const openShowModel = ref<undefined | null | TomatoTarget>()