{{ item.name }}
{{ !is_obj_empty(item.link) ? '已设置' : '未设置' }}
@@ -160,7 +160,7 @@ const start_drag_area_box = (index: number, event: MouseEvent) => {
// 当子元素拖拽方法触发后父元素方法不触发
document.onmousemove = (areaBoxEvent) => {
- areaBoxEvent.stopPropagation();
+ // areaBoxEvent.stopPropagation();
if (drag_box_bool.value) {
if (!imgBoxRef.value) return;
const new_coordinate = {
@@ -186,7 +186,7 @@ const start_drag_area_box = (index: number, event: MouseEvent) => {
}
};
document.onmouseup = (areaBoxEvent) => {
- areaBoxEvent.stopPropagation();
+ // areaBoxEvent.stopPropagation();
drag_box_bool.value = false;
};
};
@@ -198,7 +198,7 @@ const start_drag_btn = (index: number, event: MouseEvent) => {
let clone_drag_start = hot_list.value.data[hot_list_index.value].drag_start;
let clone_drag_end = hot_list.value.data[hot_list_index.value].drag_end;
document.onmousemove = (dragBtnEvent) => {
- dragBtnEvent.stopPropagation();
+ // dragBtnEvent.stopPropagation();
//用鼠标的位置减去鼠标相对元素的位置,得到元素的位置
if (drag_box_scale_bool.value) {
if (!imgBoxRef.value) return;
@@ -213,7 +213,7 @@ const start_drag_btn = (index: number, event: MouseEvent) => {
}
};
document.onmouseup = (dragBtnEvent2) => {
- dragBtnEvent2.stopPropagation();
+ // dragBtnEvent2.stopPropagation();
drag_box_scale_bool.value = false;
};
};
diff --git a/src/components/model-hot-zone/index.vue b/src/components/model-hot-zone/index.vue
index 2ed67850..6dd441f1 100644
--- a/src/components/model-hot-zone/index.vue
+++ b/src/components/model-hot-zone/index.vue
@@ -39,7 +39,7 @@ watch(
img_width.value = new_content?.hot.img_width || 1;
img_height.value = new_content?.hot.img_height || 1;
style_container.value = common_styles_computer(new_style.common_style);
- nextTick(() => {
+ setTimeout(() => {
if (containerRef.value && hotRef.value) {
// 原图片的宽和高和实际展示的图片宽和高的比例
w_scale1.value = containerRef.value?.clientWidth / img_width.value;
@@ -48,8 +48,9 @@ watch(
// 坐标缩小比例 containerRef的宽高除以hotRef的宽高
w_scale2.value = hotRef.value?.clientWidth / containerRef.value?.clientWidth;
h_scale2.value = hotRef.value?.clientHeight / containerRef.value?.clientHeight;
+ console.log(containerRef.value?.clientHeight);
}
- });
+ }, 50);
},
{ immediate: true, deep: true }
);