mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增chart组件数据内容
This commit is contained in:
@@ -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 {}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user