Merge pull request #2758 from dataease/dev

dev merge
This commit is contained in:
王嘉豪 2022-08-02 12:01:56 +08:00 committed by GitHub
commit ae330c5299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 11 deletions

View File

@ -5,7 +5,7 @@
@click="handleClick"
@mousedown="elementMouseDown"
>
<edit-bar v-if="componentActiveFlag" :element="config" :show-position="showPosition" @showViewDetails="showViewDetails" />
<edit-bar v-if="componentActiveFlag" :source-element="sourceConfig" :element="config" :show-position="showPosition" @showViewDetails="showViewDetails" />
<div :id="componentCanvasId" :style="commonStyle" class="main_view">
<close-bar v-if="previewVisible" @closePreview="closePreview" />
<de-out-widget
@ -62,6 +62,11 @@ export default {
components: { CloseBar, MobileCheckBar, DeOutWidget, EditBar },
mixins: [mixins],
props: {
sourceConfig: {
type: Object,
require: true,
default: null
},
config: {
type: Object,
require: true,

View File

@ -58,6 +58,10 @@ export default {
components: { SettingMenu, LinkageField },
props: {
sourceElement: {
type: Object,
required: true
},
element: {
type: Object,
required: true
@ -101,7 +105,7 @@ export default {
},
computed: {
showEditPosition() {
if (this.activeModel === 'edit') {
if (this.activeModel === 'edit' && !this.linkageAreaShow && !this.batchOptAreaShow) {
const toRight = (this.canvasStyleData.width - this.element.style.left - this.element.style.width) * this.curCanvasScale.scalePointWidth
const toLeft = this.element.style.left * this.curCanvasScale.scalePointWidth
if (this.barWidth < toRight) {
@ -180,10 +184,10 @@ export default {
multiplexingCheck(val) {
if (val) {
// push
this.$store.commit('addCurMultiplexingComponent', { 'component': this.element, 'componentId': this.element.id })
this.$store.commit('addCurMultiplexingComponent', { 'component': this.sourceElement, 'componentId': this.element.id })
} else {
// remove
this.$store.commit('removeCurMultiplexingComponentWithId', this.element.id )
this.$store.commit('removeCurMultiplexingComponentWithId', this.element.id)
}
},
closePreview() {

View File

@ -26,6 +26,7 @@
:key="index"
ref="viewWrapperChild"
:config="item"
:source-config="componentData[index]"
:search-count="searchCount"
:in-screen="inScreen"
:terminal="terminal"

View File

@ -9,13 +9,13 @@ export default {
state: {
copyData: null, // 复制粘贴剪切
isCut: false,
baseStyle: {
width: 300,
height: 200,
top: 0,
left: 0
},
viewBase: {
style: {
width: 300,
height: 200,
top: 0,
left: 0
},
x: 1,
y: 216,
sizex: 48,
@ -39,10 +39,15 @@ export default {
const component =
{
...deepCopy(state.curMultiplexingComponents[componentId]),
...deepCopy(deepCopy(state.viewBase)),
...deepCopy(state.viewBase),
'auxiliaryMatrix': canvasStyleData.auxiliaryMatrix
}
component.style = {
...component.style,
...deepCopy(state.baseStyle)
}
const tilePosition = index % 3
const divisiblePosition = parseInt(index / 3)
if (canvasStyleData.auxiliaryMatrix) {