-
+
@@ -89,15 +89,16 @@ const app = getCurrentInstance();
/**
* @description: 热区
* @param modelValue{Object} 默认值
+ * @param img_url {Array} 图片列表
* @param dialog_visible {Boolean} 弹窗显示
* @return {*} update:modelValue
*/
const props = defineProps({});
const modelValue = defineModel({ type: Object as PropType, default: {} });
+const img_url = defineModel('img', { type: Array as PropType, default: [] });
const dialog_visible = defineModel('visibleDialog', { type: Boolean, default: false });
const hot_list = ref({
- img: '',
img_height: 1,
img_width: 1,
data: [],
@@ -381,9 +382,8 @@ const hot_confirm_event = () => {
//#region 热区开启关闭确认取消回调 -----------------------------------------------start
// 打开热区弹窗
const open_hot_event = () => {
- if (modelValue.value.img.length > 0) {
+ if (img_url.value.length > 0) {
dialog_visible.value = true;
- hot_list.value.img = modelValue.value.img;
setTimeout(() => {
// 创建临时变量储存传过来的数据
let temp_data = cloneDeep(modelValue.value);
diff --git a/src/components/model-hot-zone/model-hot-zone-content.vue b/src/components/model-hot-zone/model-hot-zone-content.vue
index 63461036..675dcfbe 100644
--- a/src/components/model-hot-zone/model-hot-zone-content.vue
+++ b/src/components/model-hot-zone/model-hot-zone-content.vue
@@ -6,7 +6,7 @@
-
+
diff --git a/src/types/global.d.ts b/src/types/global.d.ts
index 87cf8869..4b2385cd 100644
--- a/src/types/global.d.ts
+++ b/src/types/global.d.ts
@@ -140,7 +140,6 @@ declare global {
* 热区参数
*/
type hotData = {
- img: string;
img_width: number;
img_height: number;
data: hotListData[];
diff --git a/src/views/layout/components/main/default/hot-zone.ts b/src/views/layout/components/main/default/hot-zone.ts
index a287ea91..11943bc4 100644
--- a/src/views/layout/components/main/default/hot-zone.ts
+++ b/src/views/layout/components/main/default/hot-zone.ts
@@ -17,7 +17,6 @@ const defaultHotZone: DefaultHotZone = {
// /src/assets/images/components/model-user-info/avatar.png
img_height: 1,
img_width: 1,
- img: '',
data: [],
},
},