import { ref } from 'vue'; import { defineStore } from 'pinia'; export const useMapAnimationStore = defineStore('mapAnimation', () => { // // 动画状态,0:停止;1:播放;2:暂停 const status = ref(0); function start() { status.value = 1; } function pause() { status.value = 2; } function stop() { status.value = 0; } return { status, start, pause, stop }; });