Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: grayModel、colorWeakModel (#243)
Browse files Browse the repository at this point in the history
* fix: grayModel、colorWeakModel

* chore: update
  • Loading branch information
likui628 authored Nov 2, 2023
1 parent 6637e5a commit 04ed22d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/hooks/src/web/useLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const FOOTER_HEIGHT = '--footer-height'
const LIGHT_TEXT_COLOR = 'rgba(0,0,0,.85)'
const DARK_TEXT_COLOR = '#fff'

export function createThemeColorListen(el?: MaybeElementRef | null) {
export function createThemeColorListen() {
const { sidebar, header, grayMode, colorWeak, theme, setAppConfig } =
useAppConfig()

Expand Down
8 changes: 7 additions & 1 deletion packages/layouts/src/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script lang="ts" setup>
import { computed, defineComponent, nextTick, unref } from 'vue'
import { NavBarModeEnum } from '@vben/constants'
import { computed, defineComponent, unref } from 'vue'
import { createThemeColorListen } from '@vben/hooks'
import LeftMenuLayout from './left-menu.vue'
import TopMenuLayout from './top-menu.vue'
import TopMenuMixLayout from './top-menu-mixed.vue'
Expand Down Expand Up @@ -30,6 +32,10 @@ const layout = computed<ReturnType<typeof defineComponent>>(() => {
return undefined
}
})
nextTick(() => {
createThemeColorListen()
})
</script>
<template>
<component :is="layout" v-bind="lockEvents">
Expand Down

0 comments on commit 04ed22d

Please sign in to comment.