Merge pull request 'fix : 修复首页切换bug' (#391) from dengjie into dev
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/391
This commit is contained in:
@@ -125,7 +125,7 @@
|
|||||||
<div v-else class="shrink-right" @click="closeRight"></div>
|
<div v-else class="shrink-right" @click="closeRight"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="switch-btn">
|
<div class="switch-btn">
|
||||||
<div class="arrow" @click="previousBtn"></div>{{initialIndex}}
|
<div class="arrow" @click="previousBtn"></div>
|
||||||
<el-carousel height="150px" type="card" ref="tunnelBtn" :autoplay="false" :initial-index="initialIndex"
|
<el-carousel height="150px" type="card" ref="tunnelBtn" :autoplay="false" :initial-index="initialIndex"
|
||||||
@change="changeTunnel">
|
@change="changeTunnel">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
@@ -588,7 +588,8 @@ const getTunnel = (id) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
tunnelList.value = res.data;
|
console.info("🚀 ~method: tunnelList.value -----", tunnelList.value)
|
||||||
|
// tunnelList.value = res.data;
|
||||||
getScreenInfo(res.data[0]?.value);
|
getScreenInfo(res.data[0]?.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -596,16 +597,18 @@ const getTunnel = (id) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
const changeTunnel = (e) => {
|
const changeTunnel = (e) => {
|
||||||
console.info("🚀 ~method:'socket' -----", socket)
|
// console.info("🚀 ~method:'tunnelList.value' -----", tunnelList.value)
|
||||||
|
// console.info("🚀 ~method:'changeTunnel' -----", e)
|
||||||
if(socket){
|
if(socket){
|
||||||
socket.close()
|
socket.close()
|
||||||
}
|
}
|
||||||
let newObj = {}
|
let newObj = {}
|
||||||
tunnelList.value.forEach((item, index) => {
|
tunnelList.value.forEach((item, index) => {
|
||||||
if (index === e) {
|
if (index == e) {
|
||||||
newObj = item;
|
newObj = item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// console.info("🚀 ~method:changeTunnel -----", newObj)
|
||||||
showFan.value = false;
|
showFan.value = false;
|
||||||
showBadLoading.value = 0;
|
showBadLoading.value = 0;
|
||||||
showWindLoading.value = 0;
|
showWindLoading.value = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user