fix: 解决动态变更颜色,部分组件不会更新的问题

This commit is contained in:
奔跑的面条
2022-08-19 10:02:09 +08:00
parent 8ddc85738a
commit a6d1baec3e
10 changed files with 59 additions and 20 deletions
@@ -70,9 +70,13 @@ const { FolderIcon, FolderOpenIcon } = icon.ionicons5
const chartEditStore = useChartEditStore()
const { handleContextMenu, onClickOutSide } = useContextMenu()
const themeColor = ref(designStore.getAppTheme)
const expend = ref(false)
// 颜色
const themeColor = computed(() => {
return designStore.getAppTheme
})
// 右键
const optionsHandle = (
targetList: MenuOptionsItemType[],
@@ -22,16 +22,20 @@
</template>
<script setup lang="ts">
import { ref, toRefs, computed } from 'vue'
import { toRefs, computed } from 'vue'
import { requireErrorImg } from '@/utils'
import { useDesignStore } from '@/store/modules/designStore/designStore'
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
// 全局颜色
const designStore = useDesignStore()
const themeColor = ref(designStore.getAppTheme)
const chartEditStore = useChartEditStore()
// 颜色
const themeColor = computed(() => {
return designStore.getAppTheme
})
const props = defineProps({
componentData: {
type: Object,