提交 158b3a1e authored 作者: wangjiahao's avatar wangjiahao

refactor: 画布按钮位置调整

上级 e5d5afda
......@@ -1007,7 +1007,7 @@ export default {
handler(newVal, oldVla) {
// console.log('newVal:' + JSON.stringify(newVal) + ';oldVla:' + JSON.stringify(oldVla))
// 初始化时componentData 加载可能出现慢的情况 此时重新初始化一下matrix
if (this.lastComponentDataLength === 0 && newVal.length > 0) {
if (newVal.length !== this.lastComponentDataLength) {
this.lastComponentDataLength = newVal.length
this.initMatrix()
}
......@@ -1676,23 +1676,25 @@ export default {
})
},
startMoveIn() {
const moveInItemInfo = this.$store.state.dragComponentInfo
this.addItemBox(moveInItemInfo)
// console.log('startMoveIn:')
const vm = this
// e.preventDefault();
if (!this.infoBox) {
this.infoBox = {}
}
const infoBox = this.infoBox
if (this.canvasStyleData.auxiliaryMatrix) {
const moveInItemInfo = this.$store.state.dragComponentInfo
this.addItemBox(moveInItemInfo)
console.log('startMoveIn:')
const vm = this
// e.preventDefault();
if (!this.infoBox) {
this.infoBox = {}
}
const infoBox = this.infoBox
infoBox.moveItem = moveInItemInfo
infoBox.moveItemIndex = this.yourList.length - 1
infoBox.moveItem = moveInItemInfo
infoBox.moveItemIndex = this.yourList.length - 1
infoBox.oldX = 1 // 实际对象原始X位置
infoBox.oldY = 1
infoBox.oldSizeX = moveInItemInfo.sizex
infoBox.oldSizeY = moveInItemInfo.sizey
infoBox.oldX = 1 // 实际对象原始X位置
infoBox.oldY = 1
infoBox.oldSizeX = moveInItemInfo.sizex
infoBox.oldSizeY = moveInItemInfo.sizey
}
}
}
}
......
......@@ -13,10 +13,21 @@
</div>
<div v-else class="toolbar">
<!-- <div class="canvas-config" style="margin-right: 10px">-->
<!-- <el-switch v-model="canvasStyleData.auxiliaryMatrix" :width="35" name="auxiliaryMatrix" />-->
<!-- <span>{{ $t('panel.matrix_design') }}</span>-->
<!-- </div>-->
<!-- <el-tooltip :content="$t('panel.new_element_distribution')">-->
<!-- <el-switch-->
<!-- v-model="canvasStyleData.auxiliaryMatrix"-->
<!-- :width="35"-->
<!-- active-color="#13ce66"-->
<!-- inactive-color="#ff4949"-->
<!-- :active-text="$t('panel.matrix')"-->
<!-- :inactive-text="$t('panel.suspension')"-->
<!-- />-->
<!-- </el-tooltip>-->
<div class="canvas-config" style="margin-right: 10px">
<el-switch v-model="canvasStyleData.auxiliaryMatrix" :width="35" name="auxiliaryMatrix" />
<span>{{ $t('panel.matrix_design') }}</span>
</div>
<!-- <div class="canvas-config" style="margin-right: 10px">-->
<!-- <span> {{ $t('panel.canvas_scale') }} </span>-->
<!-- <input v-model="scale" @input="handleScaleChange"> %-->
......@@ -371,7 +382,7 @@ export default {
float: right;
height: 35px;
line-height: 35px;
min-width: 400px;
min-width: 500px;
/*background: #fff;*/
/*border-bottom: 1px solid #ddd;*/
......
......@@ -9,18 +9,18 @@
<div v-if="collapseShow" style="margin: 10px;overflow-y: auto">
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item :title="$t('panel.panel')" name="panel">
<el-row class="shape-item">
<span class="shape-item" style="margin-left: 10px">{{ $t('panel.new_element_distribution') }}:</span>
<!-- <el-switch v-model="canvasStyleData.auxiliaryMatrix" :width="35" name="auxiliaryMatrix" />-->
<el-radio-group v-model="canvasStyleData.auxiliaryMatrix" size="mini" name="auxiliaryMatrix" @change="styleChange">
<el-radio-button :label="true">
{{ $t('panel.matrix') }}<i class="icon iconfont icon-shujujuzhen" />
</el-radio-button>
<el-radio-button :label="false">
{{ $t('panel.suspension') }}<i class="icon iconfont icon-xuanfuanniu" />
</el-radio-button>
</el-radio-group>
</el-row>
<!-- <el-row class="shape-item">-->
<!-- <span class="shape-item" style="margin-left: 10px">{{ $t('panel.new_element_distribution') }}:</span>-->
<!-- &lt;!&ndash; <el-switch v-model="canvasStyleData.auxiliaryMatrix" :width="35" name="auxiliaryMatrix" />&ndash;&gt;-->
<!-- <el-radio-group v-model="canvasStyleData.auxiliaryMatrix" size="mini" name="auxiliaryMatrix" @change="styleChange">-->
<!-- <el-radio-button :label="true">-->
<!-- {{ $t('panel.matrix') }}<i class="icon iconfont icon-shujujuzhen" />-->
<!-- </el-radio-button>-->
<!-- <el-radio-button :label="false">-->
<!-- {{ $t('panel.suspension') }}<i class="icon iconfont icon-xuanfuanniu" />-->
<!-- </el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </el-row>-->
<el-row style="background-color: #f7f8fa; margin: 5px">
<background-selector class="attr-selector" />
<component-gap class="attr-selector" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论