PPTist/src/views/_element/hooks/useElementShadow.ts
pipipi-pikachu bfb24e5055 update
2020-12-25 15:43:33 +08:00

14 lines
336 B
TypeScript

import { Ref } from 'vue'
import { PPTElementShadow } from '@/types/slides'
export default (shadow: Ref<PPTElementShadow | undefined>) => {
let shadowStyle = ''
if(shadow.value) {
const { h, v, blur, color } = shadow.value
shadowStyle = `${h}px ${v}px ${blur}px ${color}`
}
return {
shadowStyle,
}
}