Skip to content

Commit 0b0ba1f

Browse files
committed
营销:优化装修编辑器样式
1 parent 984351f commit 0b0ba1f

File tree

4 files changed

+172
-163
lines changed

4 files changed

+172
-163
lines changed

src/components/DiyEditor/components/ComponentContainer.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<template>
22
<div
33
:style="{
4-
...style,
5-
background: property.bgType === 'color' ? property.bgColor : `url(${property.bgImg})`
4+
...style
65
}"
76
>
87
<slot></slot>
@@ -18,7 +17,7 @@ import { ComponentStyle } from '@/components/DiyEditor/util'
1817
*/
1918
defineOptions({ name: 'ComponentContainer' })
2019
21-
const props = defineProps<{ property: ComponentStyle }>()
20+
const props = defineProps<{ property: ComponentStyle | undefined }>()
2221
2322
const style = computed(() => {
2423
if (!props.property) {
@@ -37,7 +36,9 @@ const style = computed(() => {
3736
borderTopRightRadius: `${props.property.borderTopRightRadius || 0}px`,
3837
borderBottomRightRadius: `${props.property.borderBottomRightRadius || 0}px`,
3938
borderBottomLeftRadius: `${props.property.borderBottomLeftRadius || 0}px`,
40-
overflow: 'hidden'
39+
overflow: 'hidden',
40+
background:
41+
props.property.bgType === 'color' ? props.property.bgColor : `url(${props.property.bgImg})`
4142
}
4243
})
4344
</script>

src/components/DiyEditor/components/ComponentLibrary.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<draggable
1212
class="component-container"
1313
ghost-class="draggable-ghost"
14+
item-key="index"
1415
:list="group.components"
1516
:sort="false"
1617
:group="{ name: 'component', pull: 'clone', put: false }"

src/components/DiyEditor/components/mobile/SearchBar/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ defineProps<{ property: SearchProperty }>()
4242

4343
<style scoped lang="scss">
4444
.search-bar {
45-
width: 375px;
4645
/* 搜索框 */
4746
.inner {
4847
position: relative;

0 commit comments

Comments
 (0)