Commit 0b0ba1f3 by owen

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

parent 984351fb
<template> <template>
<div <div
:style="{ :style="{
...style, ...style
background: property.bgType === 'color' ? property.bgColor : `url(${property.bgImg})`
}" }"
> >
<slot></slot> <slot></slot>
...@@ -18,7 +17,7 @@ import { ComponentStyle } from '@/components/DiyEditor/util' ...@@ -18,7 +17,7 @@ import { ComponentStyle } from '@/components/DiyEditor/util'
*/ */
defineOptions({ name: 'ComponentContainer' }) defineOptions({ name: 'ComponentContainer' })
const props = defineProps<{ property: ComponentStyle }>() const props = defineProps<{ property: ComponentStyle | undefined }>()
const style = computed(() => { const style = computed(() => {
if (!props.property) { if (!props.property) {
...@@ -37,7 +36,9 @@ const style = computed(() => { ...@@ -37,7 +36,9 @@ const style = computed(() => {
borderTopRightRadius: `${props.property.borderTopRightRadius || 0}px`, borderTopRightRadius: `${props.property.borderTopRightRadius || 0}px`,
borderBottomRightRadius: `${props.property.borderBottomRightRadius || 0}px`, borderBottomRightRadius: `${props.property.borderBottomRightRadius || 0}px`,
borderBottomLeftRadius: `${props.property.borderBottomLeftRadius || 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> </script>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<draggable <draggable
class="component-container" class="component-container"
ghost-class="draggable-ghost" ghost-class="draggable-ghost"
item-key="index"
:list="group.components" :list="group.components"
:sort="false" :sort="false"
:group="{ name: 'component', pull: 'clone', put: false }" :group="{ name: 'component', pull: 'clone', put: false }"
......
...@@ -42,7 +42,6 @@ defineProps<{ property: SearchProperty }>() ...@@ -42,7 +42,6 @@ defineProps<{ property: SearchProperty }>()
<style scoped lang="scss"> <style scoped lang="scss">
.search-bar { .search-bar {
width: 375px;
/* 搜索框 */ /* 搜索框 */
.inner { .inner {
position: relative; 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