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 @@
@resized="resizedEvent"
@moved="movedEvent"
: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>
</grid-item>
<grid-item
......@@ -112,6 +112,10 @@
.Dcmcp-item_selected {
.border();
}
.Dcmcp-item_is-freecontainer::before {
z-index: 1 !important;
}
}
&_draging {
......
......@@ -119,7 +119,7 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
}
handleElementClick(curEleIndex?: number | null, curChildIndex?: number | null) {
// console.log('handleElementClick - DashBoard', curEleIndex, curChildIndex);
console.log('handleElementClick - DashBoard', curEleIndex, curChildIndex);
this.toggle(false);
this.setCurEleIndex(curEleIndex);
this.setCurChildIndex(curChildIndex);
......
......@@ -8,7 +8,8 @@ export default class TransformStyleMixin extends Vue {
// console.log('transformStyle', styleObj, element);
let style = {
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover'
backgroundSize: 'cover',
backgroundPosition: 'center'
};
if (!styleObj) { return style; }
for (const key of Object.keys(styleObj)) {
......
......@@ -115,8 +115,8 @@ export default class EditorModule implements Module<EditorState, RootState> {
[SET_CUR_ELE_INDEX](state, curEleIndex) {
state.curEleIndex = curEleIndex;
},
[SET_CUR_ELE_INDEX](state, curEleIndex) {
state.curEleIndex = curEleIndex;
[SET_CUR_CHILD_INDEX](state, curChildIndex) {
state.curChildIndex = curChildIndex;
},
[SET_CUR_RIGHT_TAB_NAME](state, 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