From c4b8209d92daa8c6e8ec20bdd56fecf4a95d0990 Mon Sep 17 00:00:00 2001 From: YM <479443481@qq.com> Date: 星期三, 05 六月 2024 16:41:33 +0800 Subject: [PATCH] 1 --- src/pages/character/index.vue | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/pages/character/index.vue b/src/pages/character/index.vue index fded48b..fe8ecf5 100644 --- a/src/pages/character/index.vue +++ b/src/pages/character/index.vue @@ -28,12 +28,13 @@ </li> </ul> </view> - <view style="margin-left: 0.2rem">涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�</view> + <view style="margin-left: 0.2rem">涔︿腑鏈�甯告彁鍒扮殑100浣嶄汉鐗�</view> <!-- 鍏崇郴琛ㄥ湴鍥� --> <view id="relation" style="margin-top: 0.2rem; flex: 1; width: 100%; position: relative" - ><div + > + <div v-if="!loading && relationships.length == 0" style=" position: absolute; @@ -46,8 +47,8 @@ " > 鏆傛棤鐩稿叧鏁版嵁 - </div></view - > + </div> + </view> <!-- 鏈濅唬 --> <!-- <view @@ -282,10 +283,10 @@ }, mounted() { this.getData(); - this.echartsArr(); + // this.echartsArr(); this.hotSearch(); // 鐩戝惉绐楀彛澶у皬鍙樺寲 - // window.addEventListener("resize", this.relation); + window.addEventListener("resize", this.relation); this.innt(); }, onLoad(options) { @@ -293,6 +294,7 @@ }, methods: { getData(key) { + this.loading = true; getFuzzySearch({ keyword: key ? key : this.searchKey ? this.searchKey : "" }).then((res) => { @@ -307,13 +309,13 @@ (node) => node.id === item.identifier2 && node.name === item.name2 ); // 璇佹槑涓嶅瓨鍦� - if (exists1 !== true) { + if (item.name1 && exists1 !== true) { this.nodes.push({ name: item.name1, id: item.identifier1 }); } - if (exists2 !== true) { + if (item.name2 && exists2 !== true) { this.nodes.push({ name: item.name2, id: item.identifier2 @@ -461,8 +463,8 @@ } }, force: { - initLayout: null, - // gravity: 0 + // layoutAnimation: false, + // friction: 1, repulsion: 800, edgeLength: 400 } -- Gitblit v1.9.1