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

refactor: 画布按钮位置调整

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