123456789101112131415161718192021222324 |
- import { defineStore } from 'pinia'
- export const useReportStore = defineStore('report', {
- state: () => ({
- reportCate: null
- }),
- actions: {
- setReportCate(data) {
- this.reportCate = data
- },
- // 初始化时从Storage加载
- loadReportCate() {
- this.reportCate = null
- },
- cleanReportCate() {
- this.reportCate = null
- }
- },
- getters: {
- isReportCate(state){
- return !!state.reportCate;
- }
- }
- })
|