From 231de87426edb19d38e62a669034108e3a74069d Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期日, 27 四月 2025 18:10:48 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/wyyDatabase --- src/views/chronology/index.vue | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue index 61ca221..57d1426 100644 --- a/src/views/chronology/index.vue +++ b/src/views/chronology/index.vue @@ -49,20 +49,17 @@ class="gradchild" v-for="(citem, cindex) in item.list" :style="{ background: citem.color }" - @mouseover="showDetail(index, cindex, 1)" - @mouseleave="closeDetail(index, cindex, 0)" + @click.stop="showDetail(index, cindex, 1, $event)" :key="cindex" > <div class="detailDialog" v-if="citem.showDetail"> - <!-- <div class="dialogContent" @click="gotoDetail(citem)"> --> <div class="closeBtn" - @click="closeDetail(index, cindex, 0)" + @click.stop="closeDetail(index, cindex, 0)" > <i class="el-icon-close"></i> </div> <floatingWindow :info="citem" /> - <!-- </div> --> </div> </div> </div> @@ -121,7 +118,7 @@ }, methods: { - showYearWindow(item) { + showYearWindow(item, event) { console.log(item, "item"); for (let i = 0; i < this.contentList.length; i++) { const item = this.contentList[i]; @@ -163,7 +160,7 @@ } console.log(this.contentList, "this.contentList"); - this.contentList = res.datas.reverse(); + this.contentList = res.datas; this.showList = true; }); }, @@ -226,7 +223,8 @@ } this.contentList[index].list[cindex].showDetail = false; }, - showDetail(index, cindex, type) { + showDetail(index, cindex, type, event) { + console.log(event, "event"); for (let i = 0; i < this.contentList.length; i++) { const item = this.contentList[i]; if (item && item.length > 0) { @@ -237,11 +235,11 @@ } } } + if (this.contentList[index].list[cindex].type) { this.contentList[index].list[cindex].showDetail = true; - } else { - this.contentList[index].list[cindex].showDetail = false; } + console.log(this.contentList[index].list, "this.contentList[index].list[cindex]"); }, }, }; @@ -303,7 +301,7 @@ // } /* 瀵逛簬WebKit娴忚鍣ㄥ拰Blink寮曟搸锛堝Chrome, Opera锛� */ ::-webkit-scrollbar { - width: 16px; /* 婊氬姩鏉$殑瀹藉害 */ + width: 4px; /* 婊氬姩鏉$殑瀹藉害 */ height: 16px; /* 婊氬姩鏉$殑楂樺害 */ } @@ -313,7 +311,8 @@ ::-webkit-scrollbar-thumb { background: #b9a587; /* 婊氬姩鏉℃粦鍧楃殑棰滆壊 */ - border-radius: 16px; /* 婊氬姩鏉℃粦鍧楃殑鍦嗚 */ + border-radius: 2px; /* 婊氬姩鏉℃粦鍧楃殑鍦嗚 */ + width: 4px; } ::-webkit-scrollbar-thumb:hover { @@ -365,6 +364,14 @@ position: relative; } +.gradchild:hover { + width: 25px; + height: 25px; + margin-top: 2px; + margin-right: 2px; + cursor: pointer; + position: relative; +} .item-circle { width: 100%; height: 20px; @@ -408,6 +415,8 @@ .detailDialog { position: absolute; top: -700%; + transform: translateY(20%); + transform: translateX(-50%); width: 524px; z-index: 9999; cursor: pointer; -- Gitblit v1.9.1