营销:装修页面适配搜索框

This commit is contained in:
owen
2023-11-04 22:06:40 +08:00
parent 82bce400d7
commit e55218330c
4 changed files with 26 additions and 24 deletions
+16 -13
View File
@@ -20,12 +20,12 @@
const elBackground = computed(() => {
if (props.styles) {
if (props.styles.background.type == 'color')
return { background: props.styles.background.bgColor };
if (props.styles.background.type == 'image')
if (props.styles.bgType === 'color')
return { background: props.styles.bgColor };
if (props.styles.bgType === 'img')
return {
background: `url(${sheep.$url.cdn(
props.styles.background.bgImage,
props.styles.bgImage,
)}) no-repeat top center / 100% auto`,
};
}
@@ -34,15 +34,18 @@
const elStyles = computed(() => {
if (props.styles) {
return {
marginTop: `${props.styles.marginTop}px`,
marginBottom: props.styles.marginBottom + 'px',
marginLeft: `${props.styles.marginLeft}px`,
marginRight: props.styles.marginRight + 'px',
'border-top-left-radius': props.styles.borderRadiusTop + 'px',
'border-top-right-radius': props.styles.borderRadiusTop + 'px',
'border-bottom-left-radius': props.styles.borderRadiusBottom + 'px',
'border-bottom-right-radius': props.styles.borderRadiusBottom + 'px',
padding: props.styles.padding + 'px',
marginTop: `${props.styles.marginTop || 0}px`,
marginBottom: `${props.styles.marginBottom || 0}px`,
marginLeft: `${props.styles.marginLeft || 0}px`,
marginRight: `${props.styles.marginRight || 0}px`,
paddingTop: `${props.styles.paddingTop || 0}px`,
paddingRight: `${props.styles.paddingRight || 0}px`,
paddingBottom: `${props.styles.paddingBottom || 0}px`,
paddingLeft: `${props.styles.paddingLeft || 0}px`,
borderTopLeftRadius: `${props.styles.borderTopLeftRadius || 0}px`,
borderTopRightRadius: `${props.styles.borderTopRightRadius || 0}px`,
borderBottomRightRadius: `${props.styles.borderBottomRightRadius || 0}px`,
borderBottomLeftRadius: `${props.styles.borderBottomLeftRadius || 0}px`,
overflow: 'hidden',
};
}