Newer
Older
HuangJiPC / src / pinia / index.js
@zhangdeliang zhangdeliang on 21 Jun 370 bytes update
import { defineStore } from "pinia";

export const useDataStore = defineStore("dataStores", {
    state: () => {
        return {
            legendData: [], //不同菜单对应不同图例
        };
    },
    getters: {},
    actions: {
        // 动态设置图例数据
        setLegendData(data) {
            this.legendData = [...data];
        },
    },
});