From b84cf37399e44c28ff49a91a5193d172dd955b64 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Wed, 4 Sep 2024 18:56:45 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=83=AD=E5=8C=BA=E5=88=A0=E9=99=A4=E5=AD=97?= =?UTF-8?q?=E6=AE=B5img?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/hot/index.vue | 8 ++++---- src/components/model-hot-zone/model-hot-zone-content.vue | 2 +- src/types/global.d.ts | 1 - src/views/layout/components/main/default/hot-zone.ts | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/common/hot/index.vue b/src/components/common/hot/index.vue index e9768508..180aa4ea 100644 --- a/src/components/common/hot/index.vue +++ b/src/components/common/hot/index.vue @@ -14,7 +14,7 @@
- +
@@ -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: [], }, },