Commit 0b0ba1f3 by owen

营销:优化装修编辑器样式

parent 984351fb
<template>
<div
:style="{
...style,
background: property.bgType === 'color' ? property.bgColor : `url(${property.bgImg})`
...style
}"
>
<slot></slot>
......@@ -18,7 +17,7 @@ import { ComponentStyle } from '@/components/DiyEditor/util'
*/
defineOptions({ name: 'ComponentContainer' })
const props = defineProps<{ property: ComponentStyle }>()
const props = defineProps<{ property: ComponentStyle | undefined }>()
const style = computed(() => {
if (!props.property) {
......@@ -37,7 +36,9 @@ const style = computed(() => {
borderTopRightRadius: `${props.property.borderTopRightRadius || 0}px`,
borderBottomRightRadius: `${props.property.borderBottomRightRadius || 0}px`,
borderBottomLeftRadius: `${props.property.borderBottomLeftRadius || 0}px`,
overflow: 'hidden'
overflow: 'hidden',
background:
props.property.bgType === 'color' ? props.property.bgColor : `url(${props.property.bgImg})`
}
})
</script>
......
......@@ -11,6 +11,7 @@
<draggable
class="component-container"
ghost-class="draggable-ghost"
item-key="index"
:list="group.components"
:sort="false"
:group="{ name: 'component', pull: 'clone', put: false }"
......
......@@ -42,7 +42,6 @@ defineProps<{ property: SearchProperty }>()
<style scoped lang="scss">
.search-bar {
width: 375px;
/* 搜索框 */
.inner {
position: relative;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment