Commit 27e153f0 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/bgsize' into 'master'

fix(bgsize): 修复bgsize兼容问题

See merge request !38
parents 6a239e91 9184a14c
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
@resized="resizedEvent" @resized="resizedEvent"
@moved="movedEvent" @moved="movedEvent"
:style="transformStyle(item.commonStyle, item.name)" :style="transformStyle(item.commonStyle, item.name)"
:class="{'Dcmcp-item_selected': curEleIndex === index && curChildIndex === null}"> :class="{'Dcmcp-item_selected': curEleIndex === index && curChildIndex === null, 'Dcmcp-item_is-freecontainer': item.name === 'freedom-container'}">
<component ref="container" :id="item.id" class="Dcmcp-item-com" @handleElementClick="handleElementClick" :containerIndex="index" :childItem="item" :is="item.name" :key="item.point.i + index" v-bind="item.props"></component> <component ref="container" :id="item.id" class="Dcmcp-item-com" @handleElementClick="handleElementClick" :containerIndex="index" :childItem="item" :is="item.name" :key="item.point.i + index" v-bind="item.props"></component>
</grid-item> </grid-item>
<grid-item <grid-item
...@@ -112,6 +112,10 @@ ...@@ -112,6 +112,10 @@
.Dcmcp-item_selected { .Dcmcp-item_selected {
.border(); .border();
} }
.Dcmcp-item_is-freecontainer::before {
z-index: 1 !important;
}
} }
&_draging { &_draging {
......
...@@ -119,7 +119,7 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin, ...@@ -119,7 +119,7 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
} }
handleElementClick(curEleIndex?: number | null, curChildIndex?: number | null) { handleElementClick(curEleIndex?: number | null, curChildIndex?: number | null) {
// console.log('handleElementClick - DashBoard', curEleIndex, curChildIndex); console.log('handleElementClick - DashBoard', curEleIndex, curChildIndex);
this.toggle(false); this.toggle(false);
this.setCurEleIndex(curEleIndex); this.setCurEleIndex(curEleIndex);
this.setCurChildIndex(curChildIndex); this.setCurChildIndex(curChildIndex);
......
...@@ -8,7 +8,8 @@ export default class TransformStyleMixin extends Vue { ...@@ -8,7 +8,8 @@ export default class TransformStyleMixin extends Vue {
// console.log('transformStyle', styleObj, element); // console.log('transformStyle', styleObj, element);
let style = { let style = {
backgroundRepeat: 'no-repeat', backgroundRepeat: 'no-repeat',
backgroundSize: 'cover' backgroundSize: 'cover',
backgroundPosition: 'center'
}; };
if (!styleObj) { return style; } if (!styleObj) { return style; }
for (const key of Object.keys(styleObj)) { for (const key of Object.keys(styleObj)) {
......
...@@ -115,8 +115,8 @@ export default class EditorModule implements Module<EditorState, RootState> { ...@@ -115,8 +115,8 @@ export default class EditorModule implements Module<EditorState, RootState> {
[SET_CUR_ELE_INDEX](state, curEleIndex) { [SET_CUR_ELE_INDEX](state, curEleIndex) {
state.curEleIndex = curEleIndex; state.curEleIndex = curEleIndex;
}, },
[SET_CUR_ELE_INDEX](state, curEleIndex) { [SET_CUR_CHILD_INDEX](state, curChildIndex) {
state.curEleIndex = curEleIndex; state.curChildIndex = curChildIndex;
}, },
[SET_CUR_RIGHT_TAB_NAME](state, curRightTabName) { [SET_CUR_RIGHT_TAB_NAME](state, curRightTabName) {
state.curRightTabName = curRightTabName; state.curRightTabName = curRightTabName;
......
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 to comment