update bug

qianlishi 3 years ago
parent 87ac9151d1
commit 1e392b7bfd

@ -317,7 +317,6 @@ export default {
handlerLayerWidget(val) { handlerLayerWidget(val) {
const layerWidgetArr = []; const layerWidgetArr = [];
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
console.log(getToolByCode(val[i].type));
const obj = {}; const obj = {};
obj.icon = getToolByCode(val[i].type).icon; obj.icon = getToolByCode(val[i].type).icon;
const options = val[i].options["setup"]; const options = val[i].options["setup"];
@ -554,7 +553,6 @@ export default {
return; return;
} }
this.widgetIndex = obj.index; this.widgetIndex = obj.index;
this.widgetOptions = this.deepClone(this.widgets[obj.index]["options"]);
this.widgets[obj.index].value.position = obj; this.widgets[obj.index].value.position = obj;
this.widgets[obj.index].options.position.forEach(el => { this.widgets[obj.index].options.position.forEach(el => {
for (const key in obj) { for (const key in obj) {
@ -563,6 +561,7 @@ export default {
} }
} }
}); });
this.widgetOptions = this.deepClone(this.widgets[obj.index]["options"]);
}, },
widgetsClick(index) { widgetsClick(index) {
const draggableArr = this.$refs.widgets; const draggableArr = this.$refs.widgets;

@ -103,9 +103,7 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
handleFocus({ index, left, top, width, height }) { handleFocus({ index, left, top, width, height }) {},
// console.log(index, left, top, width, height);
},
handleBlur({ index, left, top, width, height }) { handleBlur({ index, left, top, width, height }) {
this.$emit("onActivated", { index, left, top, width, height }); this.$emit("onActivated", { index, left, top, width, height });
this.$refs.draggable.setActive(true); this.$refs.draggable.setActive(true);

Loading…
Cancel
Save