feat: 新增chart组件数据内容

This commit is contained in:
MTrun
2022-01-14 16:17:14 +08:00
parent 95e2cdc689
commit b03a495712
32 changed files with 493 additions and 187 deletions
+7
View File
@@ -0,0 +1,7 @@
import { PackagesType, ConfigType } from '@/packages/index.d'
export { ConfigType }
export interface PackagesStoreType {
packagesList: PackagesType
}
@@ -0,0 +1,18 @@
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 {}
}
}
})