修复所有界面导航头样式

This commit is contained in:
WindowBird 2025-10-21 11:24:37 +08:00
parent a6a7fd150e
commit b3a5ae9e98
2 changed files with 39 additions and 49 deletions

View File

@ -114,39 +114,29 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
// 使 Nuxt useHead
useHead({
title: '创特科技 - 万物互联 智启未来',
meta: [
{
name: 'description',
content: '创特科技专注于共享解决方案、行业解决方案、软件应用开发和物联网解决方案,提供专业的智能化服务'
},
{name: 'keywords', content: '创特科技,共享解决方案,物联网,软件开发,智能硬件,共享单车,共享电动车'}
],
link: [],
script: [
{src: '/js/gopcOm.js', defer: true}
]
})
onMounted(() => { onMounted(() => {
// CSS
loadCSSFiles()
// JavaScript
loadJSFiles()
// //
nextTick(() => { nextTick(() => {
initNavigationHover() initNavigationHover()
}) })
}) })
const loadJSFiles = () => {
const jsFiles = [
'/js/gopcOm.js'
]
jsFiles.forEach(src => {
// JS
const existingScript = document.querySelector(`script[src="${src}"]`)
if (!existingScript) {
const script = document.createElement('script')
script.src = src
script.type = 'text/javascript'
document.head.appendChild(script)
}
})
}
// //
const handleDropdownImageHover = (dropdownMenu: Element, index: number) => { const handleDropdownImageHover = (dropdownMenu: Element, index: number) => {
const images = dropdownMenu.querySelectorAll('.pull-left img') const images = dropdownMenu.querySelectorAll('.pull-left img')
@ -166,28 +156,6 @@ const initNavigationHover = () => {
}) })
}) })
} }
const loadCSSFiles = () => {
const cssFiles = [
'/css/bootstrap.min.css',
'/css/main2.css',
'/css/yuxi2019.css'
]
cssFiles.forEach(href => {
// CSS
const existingLink = document.querySelector(`link[href="${href}"]`)
if (!existingLink) {
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = href
link.type = 'text/css'
document.head.appendChild(link)
}
})
}
</script> </script>
<style scoped> <style scoped>
@ -263,5 +231,22 @@ html, body {
padding-right: 75px; padding-right: 75px;
} }
@media (max-width: 768px) {
.navbar-default .navbar-nav > li > a {
height: 37px !important;
line-height: 37px !important;
}
.navbar-default .navbar-brand {
margin-top: 8px !important;
}
.navbar-default .navbar-toggle {
padding: 7px 8px !important;
margin-top: 8px !important;
margin-bottom: 8px !important;
}
}
</style> </style>

View File

@ -83,10 +83,13 @@ useHead({
], ],
link: [ link: [
{rel: 'stylesheet', href: '/news/bootstrap.min.css'}, {rel: 'stylesheet', href: '/news/bootstrap.min.css'},
{rel: 'stylesheet', href: '/news/main22.css'}, {rel: 'stylesheet', href: '/news/main22.css'},
{rel: 'stylesheet', href: '/news/new_index.css'}, {rel: 'stylesheet', href: '/news/new_index.css'},
{rel: 'stylesheet', href: '/news/float.css'}, {rel: 'stylesheet', href: '/news/float.css'},
{rel: 'stylesheet', href: '/news/animate.min.css'} {rel: 'stylesheet', href: '/news/animate.min.css'},
{rel: 'stylesheet', href: '/css/main2.css'},
], ],
script: [ script: [
@ -103,7 +106,7 @@ onMounted(() => {
<template> <template>
<view> <view>
<!-- 顶部 --> <!-- 顶部 -->
<!-- 文章正文 --> <!-- 文章正文 -->
<section class="container" style="margin-top: 88px;"> <section class="container" style="margin-top: 88px;">
<div class="row"> <div class="row">
@ -307,5 +310,7 @@ onMounted(() => {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
</style> </style>