mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat:新增全局接口配置,单个图表映射表,抽离柱状图数据格式,
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import hljs from 'highlight.js/lib/core'
|
||||
import json from 'highlight.js/lib/languages/json'
|
||||
import typescript from 'highlight.js/lib/languages/typescript'
|
||||
|
||||
export const useHook = () => {
|
||||
hljs.registerLanguage('json', json)
|
||||
hljs.registerLanguage('typescript', typescript)
|
||||
return hljs
|
||||
}
|
||||
+2
-1
@@ -1,2 +1,3 @@
|
||||
export * from '@/hooks/theme.hook'
|
||||
export * from '@/hooks/previewScale.hook'
|
||||
export * from '@/hooks/previewScale.hook'
|
||||
export * from '@/hooks/code.hook'
|
||||
@@ -7,10 +7,10 @@ import { toLight } from '@/utils'
|
||||
/**
|
||||
* 设置全局主题
|
||||
*/
|
||||
export const getThemeOverridesHook = () => {
|
||||
export const useThemeOverridesHook = () => {
|
||||
const designStore = useDesignStore()
|
||||
const { getAppTheme } = toRefs(designStore)
|
||||
const getDarkTheme = computed(
|
||||
const darkTheme = computed(
|
||||
(): GlobalThemeOverrides => {
|
||||
// 通用
|
||||
const commonObj = {
|
||||
@@ -40,11 +40,11 @@ export const getThemeOverridesHook = () => {
|
||||
return designStore.getDarkTheme ? dartObject : lightObject
|
||||
}
|
||||
)
|
||||
return getDarkTheme
|
||||
return darkTheme
|
||||
}
|
||||
|
||||
// 返回暗黑主题
|
||||
export const getDarkThemeHook = () => {
|
||||
export const useDarkThemeHook = () => {
|
||||
const designStore = useDesignStore()
|
||||
return computed(() => (designStore.getDarkTheme ? darkTheme : undefined))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user