export type State = {
colorIndex: number, currentColor: string, lifeCycleNum: number
} const colorList: string[] = ['#FF0000', '#00FF00', '#0000FF'] export const state = reactive({
colorIndex: 0, currentColor: colorList[0], lifeCycleNum: 0
} as State) export const setColorIndex = (index: number) => { state.colorIndex = index state.currentColor = colorList[index] }
export const setLifeCycleNum = (num: number) => { state.lifeCycleNum = num }