修复页面中充电宝选择js
This commit is contained in:
parent
a45cafe6f1
commit
866e12dbe9
|
|
@ -1,7 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import {onMounted} from "vue";
|
||||
|
||||
import {useHead} from "#app";
|
||||
|
||||
|
||||
// 使用 Nuxt 3 的 useHead 来管理头部资源
|
||||
useHead({
|
||||
link: [
|
||||
|
|
@ -9,13 +10,25 @@ useHead({
|
|||
{rel: 'stylesheet', href: '/css/main2.css'},
|
||||
{rel: 'stylesheet', href: '/css/main.css'},
|
||||
{rel: 'stylesheet', href: '/css/yuxi2019.css'}
|
||||
],
|
||||
script: [
|
||||
{src: '/js/gopcOm.js', defer: true}
|
||||
]
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 页面挂载后的初始化逻辑可以在这里添加
|
||||
// 资源已经通过 useHead 预加载,无需动态加载
|
||||
$('.layer-2 ul li').click(function () {
|
||||
$('.layer-2 p').eq($(this).index() - 1).show().siblings().hide();
|
||||
if ($(this).index() == 1) {
|
||||
$('#sanjiao').animate({top: '60px'}, 600)
|
||||
} else if ($(this).index() == 2) {
|
||||
$('#sanjiao').animate({top: '173px'}, 600)
|
||||
} else if ($(this).index() == 3) {
|
||||
$('#sanjiao').animate({top: '283px'}, 600)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -170,3 +183,4 @@ onMounted(() => {
|
|||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user