Merge branch 'dev-sws' into dev-yxl

v1.0.0
于肖磊 2024-08-16 18:13:05 +08:00
commit 37b23a146f
5 changed files with 158 additions and 19 deletions

View File

@ -148,6 +148,7 @@ const end_drag = (event: MouseEvent) => {
drag_end: cloneDeep(rect_end.value),
});
}
rect_start.value = { x: 0, y: 0, width: 0, height: 0 };
rect_end.value = { x: 0, y: 0, width: 0, height: 0 };
};

View File

@ -0,0 +1,87 @@
<template>
<div ref="containerRef" class="oh" :style="style_container">
<div ref="hotRef" class="hot re" :style="style">
<image-empty v-model="img" class="w" error-img-style="width:10rem;height:10rem;" error-style="padding:15rem 0;"></image-empty>
<div v-for="(item, index) in hot_data" :key="index" class="hot_box" :style="rect_style(item.drag_start, item.drag_end)"></div>
</div>
</div>
</template>
<script setup lang="ts">
import { common_styles_computer } from '@/utils';
const props = defineProps({
value: {
type: Object,
default: () => ({}),
},
});
const containerRef = ref<HTMLElement | null>(null);
const hotRef = ref<HTMLElement | null>(null);