import { defineStore } from 'pinia';

/**
 * 路由加载状态管理
 */
export const useRouteLoadingStore = defineStore('routeLoading', {
	state: () => ({
		isLoading: false,
	}),
	actions: {
		// 显示loading
		showLoading() {
			this.isLoading = true;
		},
		// 隐藏loading
		hideLoading() {
			this.isLoading = false;
		},
	},
});