fix: display 兼容老数据

This commit is contained in:
zx.xiao
2021-12-21 10:11:07 +08:00
parent de48b8fe4d
commit 6caa3c2955

View File

@@ -146,7 +146,12 @@ function Blocks(props: PropsWithChildren<BlockProps>) {
width: props.data.width, width: props.data.width,
height: props.data.height, height: props.data.height,
zIndex: props.data.zIndex, zIndex: props.data.zIndex,
display: props.data.canSee ? props.data.display : 'none', display:
typeof props.data.canSee === 'boolean'
? props.data.canSee
? props.data.display
: 'none'
: props.data.display,
opacity: props.iframe ? 0 : 1, opacity: props.iframe ? 0 : 1,
transform: `rotate(${props.data.rotate.value}deg)`, transform: `rotate(${props.data.rotate.value}deg)`,
}} }}