mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
17 lines
401 B
TypeScript
17 lines
401 B
TypeScript
import { computed, Ref } from 'vue'
|
|
import { PPTElementShadow } from '@/types/slides'
|
|
|
|
// 计算元素的阴影样式
|
|
export default (shadow: Ref<PPTElementShadow | undefined>) => {
|
|
const shadowStyle = computed(() => {
|
|
if (shadow.value) {
|
|
const { h, v, blur, color } = shadow.value
|
|
return `${h}px ${v}px ${blur}px ${color}`
|
|
}
|
|
return ''
|
|
})
|
|
|
|
return {
|
|
shadowStyle,
|
|
}
|
|
} |