import { defineStore } from "pinia";
import { getTagList } from "@/api/tag/tag";

export const useTagStore = defineStore("useTagStore", {
  state: () => ({
    count: 0,
    tagList: [],
    Val: "测试"
  }),

  actions: {
    async getData(name = null) {
      const res = await getTagList(name);
      console.log(res);
      this.tagList = res.data; // 假设 res.data 是你要更新的标签列表
    }
  },
});