前端构建

This commit is contained in:
iVampireSP.com 2023-03-06 09:08:46 +08:00
parent b4482da0f0
commit 0d38a27fd2
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
4 changed files with 93 additions and 82 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
"src": "node_modules/bootstrap-icons/font/fonts/bootstrap-icons.woff"
},
"resources/js/app.js": {
"file": "assets/app.03eb1395.js",
"file": "assets/app.7c2f338c.js",
"src": "resources/js/app.js",
"isEntry": true,
"css": [

View File

@ -40,3 +40,14 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
// enabledTransports: ['ws', 'wss'],
// });
// 根据 URL 自动激活导航栏
const navLinks = document.querySelectorAll('#nav .nav-link, #nav .dropdown-item');
const currentUrl = window.location.href;
for (let i = 0; i < navLinks.length; i++) {
const navLink = navLinks[i];
if (currentUrl === navLink.href) {
navLink.classList.add('active');
}
}