From 7f6fa75678e36a992f3037ce530d0226f0dd2128 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期二, 08 四月 2025 17:56:30 +0800 Subject: [PATCH] 比例修改 --- src/views/chronology/index.vue | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue index ec3c594..c624c7e 100644 --- a/src/views/chronology/index.vue +++ b/src/views/chronology/index.vue @@ -44,11 +44,12 @@ v-for="(citem, cindex) in item.list" :style="{ background: citem.color }" @mouseover="showDetail(index, cindex, 1)" + @mouseout="closeDetail(index, cindex, 0)" :key="cindex" > <div class="detailDialog" v-if="citem.showDetail"> <!-- <div class="dialogContent" @click="gotoDetail(citem)"> --> - <floatingWindow :info="citem" /> + <floatingWindow :info="citem" /> <!-- </div> --> </div> </div> @@ -87,6 +88,7 @@ showDetail: false, name: "鐜嬫案鐐�", year: "1938", + type: "journal", id: "1", }, ], @@ -100,6 +102,7 @@ showDetail: false, name: "鐜嬫案鐐�", year: "1937", + type: "image", id: "1", }, { @@ -107,6 +110,7 @@ showDetail: false, name: "鐜嬫案鐐�", year: "1937", + type: "book", id: "2", }, ], @@ -126,12 +130,14 @@ color: "#87A7B9", showDetail: false, name: "鐜嬫案鐐�", + type: "video", id: "3", }, { color: "#87A7B9", showDetail: false, name: "鐜嬫案鐐�", + type: "audio", id: "4", }, { @@ -812,6 +818,18 @@ methods: { gotoDetail(item) {}, + + closeDetail(index, cindex, type) { + // console.log(cindex, "cindex"); + // for (let i = 0; i < this.contentList.length; i++) { + // const item = this.contentList[i]; + // for (let j = 0; j < item.list.length; j++) { + // const citem = item.list[j]; + // this.$set(citem, "showDetail", false); + // } + // } + + }, showDetail(index, cindex, type) { for (let i = 0; i < this.contentList.length; i++) { const item = this.contentList[i]; @@ -820,7 +838,8 @@ this.$set(citem, "showDetail", false); } } - if (type == 1) { + + if (this.contentList[index].list[cindex].type) { this.contentList[index].list[cindex].showDetail = true; } else { this.contentList[index].list[cindex].showDetail = false; @@ -990,7 +1009,7 @@ z-index: 9999; cursor: pointer; background: #fff; - border: 2px solid #CBBEAA; + border: 2px solid #cbbeaa; box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.5); } -- Gitblit v1.9.1