From fd82e68712135fb4589b0586c26d8ea0865766e5 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期一, 28 四月 2025 16:21:55 +0800 Subject: [PATCH] 搜索优化 --- src/views/chronology/index.vue | 45 ++++++++++++++++++++++++++++++++------------- 1 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue index 61ca221..3165ba5 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; @@ -444,7 +453,17 @@ right: 5px; z-index: 999; } + ::v-deep .el-loading-spinner { - color: #937950 !important; + .el-loading-text { + font-size: 14px; + color: #937950; + } + + .el-icon-loading { + font-size: 14px; + color: #937950; + } } + </style> -- Gitblit v1.9.1