diff --git a/src/components/BackgroundLayer.vue b/src/components/BackgroundLayer.vue index 8e95878..a42079e 100644 --- a/src/components/BackgroundLayer.vue +++ b/src/components/BackgroundLayer.vue @@ -1,5 +1,5 @@ @@ -46,18 +46,6 @@ const props = defineProps({ type: Boolean, default: true, }, - - // 是否使用CSS背景模式(用于重复背景等) - useCssBackground: { - type: Boolean, - default: false, - }, - - // CSS背景模式下的背景属性 - cssBackgroundProps: { - type: Object, - default: () => ({}), - }, }) // 过滤掉空的图片路径 @@ -67,29 +55,6 @@ const filteredBackgroundImages = computed(() => { } return props.backgroundImages }) - -// 合并样式 -const combinedLayerStyle = computed(() => { - if (props.useCssBackground && filteredBackgroundImages.value.length > 0) { - return { - ...props.layerStyle, - backgroundImage: `url(${filteredBackgroundImages.value[0]})`, - backgroundRepeat: props.cssBackgroundProps.repeat, - backgroundPosition: props.cssBackgroundProps.position, - backgroundSize: props.cssBackgroundProps.size, - } - } - - return { - ...props.layerStyle, - } -}) - -const combinedImageStyle = computed(() => { - return props.useCssBackground - ? { display: 'none' } // 当使用CSS背景模式时隐藏img元素 - : props.imageStyle -})