import { defineStore } from 'pinia'

const useKnowledge = defineStore({
  id: 'knowledge',
  state: () => ({
    category: '', // 文档当前分类
    categoryName: '', // 文档当前分类名称
  }),
  actions: {
    setCategory(val: any) {
      this.category = val?.id
      this.categoryName = val?.name
    },
  }
})

export default useKnowledge
