mirror of
https://gitee.com/dromara/go-view.git
synced 2025-05-04 07:16:35 +08:00
19 lines
473 B
TypeScript
19 lines
473 B
TypeScript
import { defineStore } from 'pinia'
|
|
import { PackagesStoreType, ConfigType } from './packagesStore.d'
|
|
import { packagesList } from '@/packages/index'
|
|
|
|
export const usePackagesStore = defineStore({
|
|
id: 'usePackagesStore',
|
|
state: (): PackagesStoreType => ({
|
|
packagesList
|
|
}),
|
|
getters: {
|
|
getPackagesList(): ConfigType | {} {
|
|
if (this.packagesList && this.packagesList.charts) {
|
|
return this.packagesList.charts
|
|
}
|
|
return {}
|
|
}
|
|
}
|
|
})
|