fix: 新增全局滤镜

This commit is contained in:
奔跑的面条
2022-04-25 16:17:22 +08:00
parent 5d73a5fdd3
commit 30bd83b032
7 changed files with 41 additions and 31 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
<script setup lang="ts">
import { computed } from 'vue'
import { PreviewRenderList } from './components/PreviewRenderList'
import { getEditCanvasConfigStyle, getSessionStorageInfo } from './utils'
import { getEditCanvasConfigStyle, getStyle, getSessionStorageInfo } from './utils'
import { useComInstall } from './hooks/useComInstall.hook'
import { useScale } from './hooks/useScale.hook'
import { useStore } from './hooks/useStore.hook'
@@ -25,7 +25,7 @@ import type { ChartEditStorageType } from './index.d'
const localStorageInfo: ChartEditStorageType = getSessionStorageInfo() as ChartEditStorageType
const previewRefStyle: any = computed(() => {
return getEditCanvasConfigStyle(localStorageInfo.editCanvasConfig)
return { ...getEditCanvasConfigStyle(localStorageInfo.editCanvasConfig), ...getStyle(localStorageInfo.editCanvasConfig) }
})
useStore(localStorageInfo)
+1 -1
View File
@@ -45,7 +45,7 @@ export const animationsClass = (animations: string[]) => {
}
// 样式
export const getStyle = (styles: StylesType) => {
export const getStyle = (styles: StylesType | EditCanvasConfigType) => {
const { opacity, saturate, contrast, hueRotate, brightness } = styles
return {
// 透明度