|
@@ -76,9 +76,9 @@
|
|
|
<div class="list custom-scrollbar" style="z-index: 2;" v-show="viewState === 1"
|
|
|
:class="{ dragging: dragState === 1 }">
|
|
|
<ul>
|
|
|
- <li v-for="(layer, index) in layersNoBg" :key="index">
|
|
|
- <div class="layer" :class="{ active: editingLayer === layer}" @click="setEditingLayer(layer)"
|
|
|
- @mousedown="moveLayer">
|
|
|
+ <li v-for="(layer, index) in layersNoBg" :key="index" >
|
|
|
+ <div class="layer" :class="{ active: editingLayer === layer}"
|
|
|
+ @mousedown="moveLayer($event,layer)">
|
|
|
<span class="thumb" :style="{ backgroundImage: 'url(' + layer.imgSrc + ')' }"></span>{{ layer.type }}
|
|
|
</div>
|
|
|
</li>
|
|
@@ -133,7 +133,8 @@ export default {
|
|
|
questionList: [],
|
|
|
isShowQuestion: false,
|
|
|
currentPage: 0,
|
|
|
- selectQuestions: this.questions
|
|
|
+ selectQuestions: this.questions,
|
|
|
+ mousedDownFired :false,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -182,6 +183,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ setTest(){
|
|
|
+ console.log("点击测试");
|
|
|
+ },
|
|
|
operationCommand(command, page, index) {
|
|
|
if (command == "del") {
|
|
|
console.log("删除", index);
|
|
@@ -320,7 +324,8 @@ export default {
|
|
|
}
|
|
|
return result;
|
|
|
},
|
|
|
- moveLayer(downEvent) {
|
|
|
+ moveLayer(downEvent,element) {
|
|
|
+ this.setEditingLayer(element);
|
|
|
let height = 34;
|
|
|
let timer = null;
|
|
|
let layer = downEvent.target;
|
|
@@ -467,6 +472,7 @@ export default {
|
|
|
this.$store.dispatch("setEditorPage", page);
|
|
|
},
|
|
|
setEditingLayer(layer) {
|
|
|
+ console.log("点击了")
|
|
|
this.$store.state.editor.complexEditorElement = [];
|
|
|
this.$store.dispatch("setEditorElement", null);
|
|
|
this.$store.dispatch("setEditorElement", layer);
|