Commit 8d594c76 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/good' into 'master'

Fix/good

See merge request !46
parents 32a0d570 2e23dcc4
...@@ -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 }});
} }
} }
}, },
......
...@@ -26,8 +26,8 @@ export default (appInfo: EggAppConfig) => { ...@@ -26,8 +26,8 @@ export default (appInfo: EggAppConfig) => {
dialect: 'mysql', dialect: 'mysql',
username: 'qa', username: 'qa',
password: 'qatest', password: 'qatest',
host: '172.17.5.17', host: '172.17.5.46',
port: 31548, port: 30198,
database: 'low_code', database: 'low_code',
}; };
...@@ -36,8 +36,8 @@ export default (appInfo: EggAppConfig) => { ...@@ -36,8 +36,8 @@ export default (appInfo: EggAppConfig) => {
keyPrefix: appInfo.name + ':', keyPrefix: appInfo.name + ':',
}, },
client: { client: {
port: 32625, // Redis port port: 31226, // Redis port
host: '172.17.5.2', // Redis host host: '172.17.5.14', // Redis host
password: '', password: '',
db: 0 db: 0
} }
......
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