30 lines
635 B
TypeScript
30 lines
635 B
TypeScript
import { defineStore } from "pinia";
|
|
import { reactive, ref } from "vue";
|
|
|
|
export type TomatoTarget = {
|
|
id: string;
|
|
finishTime: number;
|
|
remindTime: number | null;
|
|
title: string;
|
|
isCompleted: boolean;
|
|
|
|
}
|
|
export type TomatoTime = {
|
|
date: number;
|
|
finishTime: number;
|
|
}
|
|
|
|
export default defineStore("work", () => {
|
|
const state = reactive({
|
|
list: [] as TomatoTarget[],
|
|
timeList: [] as TomatoTime[]
|
|
|
|
})
|
|
const openShowModel = ref<undefined | null | TomatoTarget>()
|
|
const openFullscreen = ref(false)
|
|
return {
|
|
state,
|
|
openShowModel,
|
|
openFullscreen
|
|
}
|
|
})
|