添加标签组件类型声明,优化导航组件逻辑,更新样式,调整配置文件

This commit is contained in:
2025-12-23 11:14:04 +08:00
parent 3cd1b10b0f
commit 192357af79
6 changed files with 94 additions and 16 deletions

View File

@ -117,9 +117,9 @@ const getLocation = () => {
break;
}
const res = await $http.mix.getIp();
latitude.value = res.data.lat;
longitude.value = res.data.lon;
const jw = `${longitude.value?.toFixed(2)},${latitude.value?.toFixed(2)}`;
latitude.value = Number(res.data.data.lat);
longitude.value = Number(res.data.data.lng);
const jw = `${longitude.value?.toFixed(4)},${latitude.value?.toFixed(4)}`;
// 这里可以添加调用后端API获取具体位置名称的逻辑
handdleJw(jw);
@ -214,7 +214,7 @@ onMounted(() => {
getLocation(); // 组件挂载时获取位置
const h: number = nav.value.clientHeight
navx.setNavH(h)
if(h>0) navx.setNavH(h)
@ -223,7 +223,9 @@ onBeforeUpdate(() => {
userinfo.value = $cookies.get('userinfo');
key.value = route.name as string;
const h: number = nav.value.clientHeight
navx.setNavH(h)
// console.log('******>>> --> nav.value:', nav.value)
// console.log('()()()()()>>> --> h:', h)
if(h>0) navx.setNavH(h)
})
</script>