获取项目信息1

This commit is contained in:
妖姐 2024-03-14 00:54:40 +08:00
parent 1cf1f3d4f9
commit 26a1a38d56

View File

@ -74,18 +74,18 @@
<div id="navbar-dropdown" class="w-full md:block md:w-auto">
<ul class="flex flex-col font-medium p-4 md:p-0 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:space-x-8 rtl:space-x-reverse md:flex-row md:mt-0 md:border-0 md:bg-white">
<li>
<a aria-current="page" class="block py-2 px-3 text-white bg-blue-700 rounded md:bg-transparent md:text-blue-500 md:p-0" href="/" onclick="changeColor('home')">
<a aria-current="page" id="home" class=" nav-link block py-2 px-3 text-white bg-blue-700 rounded md:bg-transparent md:text-blue-500 md:p-0" href="/" onclick="changeColor('home')">
首页
</a>
</li>
<li>
<a class="block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0" href="/Project" onclick="changeColor('projects')">
<a id="project" class=" nav-link block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0" href="/Project" onclick="changeColor('projects')">
项目
</a>
</li>
<li class="relative">
<button id="dropdownNavbarLink" class="flex items-center justify-between w-full py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 md:w-auto" data-dropdown-toggle="dropdownNavbar" @click="toggleDropdown()">
<button id="about" class=" nav-link flex items-center justify-between w-full py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 md:w-auto" data-dropdown-toggle="dropdownNavbar" @click="changeColor('about')">
关于
<svg aria-hidden="true" class="w-2.5 h-2.5 ms-2.5" fill="none" viewBox="0 0 10 6" xmlns="http://www.w3.org/2000/svg">
<path d="m1 1 4 4 4-4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
@ -107,10 +107,10 @@
</div>
</li>
<li>
<a class="block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0" href="#">团队</a>
<a id="team" class=" nav-link block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0" href="#" @click="changeColor('team')">团队</a>
</li>
<li>
<a class="block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0" href="/New">新闻</a>
<a id="new" class=" nav-link block py-2 px-3 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0" href="/New" @click="changeColor('new')">新闻</a>
</li>
</ul>
</div>
@ -148,19 +148,30 @@ function toggleDropdown(){
isDropdownOpen.value = !isDropdownOpen.value;
}
function changeColor(item){
const homeLink = document.getElementById('homeLink');
const projectsLink = document.getElementById('projectsLink');
// function changeColor(item){
// const homeLink = document.getElementById('homeLink');
// const projectsLink = document.getElementById('projectsLink');
//
// homeLink.classList.remove('text-blue-500');
// projectsLink.classList.remove('text-blue-500');
//
// if (item === 'home') {
// homeLink.classList.add('text-blue-500');
// } else if (item === 'projects') {
// projectsLink.classList.add('text-blue-500');
// }
// // textColor.value = 'blue';
// }
homeLink.classList.remove('text-blue-500');
projectsLink.classList.remove('text-blue-500');
if (item === 'home') {
homeLink.classList.add('text-blue-500');
} else if (item === 'projects') {
projectsLink.classList.add('text-blue-500');
function changeColor(id) {
const links = document.getElementsByClassName('nav-link');
for (let i = 0; i < links.length; i++) {
if (links[i].id === id + '-link') {
links[i].classList.add('text-blue-500');
} else {
links[i].classList.remove('text-blue-500');
}
}
// textColor.value = 'blue';
}
// function backMain() {
// //
@ -228,6 +239,9 @@ function JumpMyManage (){
function JumpPersonalInformation (){
router.push("/WorkLoad/PersonalInformation")
}
function JumpMyResponsible(){
router.push("/WorkLoad/I_Responsible")
}
// function MyResponsible(){
// router.push("")
// }