Commit 58d0684a authored by 郭志伟's avatar 郭志伟

Merge branch 'master' into feat/noticeBar

parents 9224e752 8d594c76
...@@ -94,6 +94,13 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) { ...@@ -94,6 +94,13 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) {
// //
} }
fixGridKey(item) {
if (typeof item.point?.i === 'number' && !isNaN(item.point?.i)) {
return item.id;
}
return item.point?.i || '';
}
layoutUpdatedEvent() { layoutUpdatedEvent() {
this.$nextTick(() => { this.$nextTick(() => {
let layoutSorted = JSON.parse(JSON.stringify(this.layout)); let layoutSorted = JSON.parse(JSON.stringify(this.layout));
......
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
:w="item.point.w" :w="item.point.w"
:h="item.point.h" :h="item.point.h"
:i="item.point.i" :i="item.point.i"
:key="item.point.i + index" :key="fixGridKey(item) + index"
@contextmenu.native.prevent="show($event, index)" @contextmenu.native.prevent="show($event, index)"
@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, 'Dcmcp-item_is-freecontainer': item.name === 'freedom-container'}"> :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="fixGridKey(item) + index" v-bind="item.props"></component>
</grid-item> </grid-item>
<grid-item <grid-item
v-if="pageData.props.showPageBottomTip" v-if="pageData.props.showPageBottomTip"
......
...@@ -150,7 +150,7 @@ export default class EditorModule implements Module<EditorState, RootState> { ...@@ -150,7 +150,7 @@ export default class EditorModule implements Module<EditorState, RootState> {
eleCopyed = cloneDeep(page[containerIndex] || {}); eleCopyed = cloneDeep(page[containerIndex] || {});
eleCopyed.id = newId; eleCopyed.id = newId;
eleCopyed.point.i = newId; eleCopyed.point.i = newId;
page.push({ ...eleCopyed, point: { ...eleCopyed.point, i: page.length }}); page.push({ ...eleCopyed, point: { ...eleCopyed.point }});
} }
} }
}, },
......
...@@ -1501,9 +1501,9 @@ ...@@ -1501,9 +1501,9 @@
} }
}, },
"@qg/citrus-ui": { "@qg/citrus-ui": {
"version": "0.3.9", "version": "0.3.15",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.9.tgz", "resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.15.tgz",
"integrity": "sha512-lo/GdBup72W1MN4sc9yshNzxeK8h4lKqNliDqcGadEiDhUyurl4Y7pyMr3gw9avOsLVz4ic3EfYlazCl9tvjLw==", "integrity": "sha512-r2+TQNexoWy3Gl7egv5cmkA79lyIkWeVLJJt9wQcKzlBXo0vS9HHL/4jHVZJCJpi8ilDavtrjuouQN/aevekmg==",
"requires": { "requires": {
"@better-scroll/core": "^2.1.1", "@better-scroll/core": "^2.1.1",
"@qg/cherry-ui": "^2.23.9", "@qg/cherry-ui": "^2.23.9",
......
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