修复所有界面导航头样式
This commit is contained in:
parent
a6a7fd150e
commit
b3a5ae9e98
|
|
@ -114,39 +114,29 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// 使用 Nuxt 的 useHead 来管理页面资源
|
||||
useHead({
|
||||
title: '创特科技 - 万物互联 智启未来',
|
||||
meta: [
|
||||
{
|
||||
name: 'description',
|
||||
content: '创特科技专注于共享解决方案、行业解决方案、软件应用开发和物联网解决方案,提供专业的智能化服务'
|
||||
},
|
||||
{name: 'keywords', content: '创特科技,共享解决方案,物联网,软件开发,智能硬件,共享单车,共享电动车'}
|
||||
],
|
||||
link: [],
|
||||
script: [
|
||||
{src: '/js/gopcOm.js', defer: true}
|
||||
]
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 加载CSS样式文件
|
||||
loadCSSFiles()
|
||||
|
||||
// 加载JavaScript文件
|
||||
loadJSFiles()
|
||||
|
||||
// 初始化导航菜单图片切换功能
|
||||
nextTick(() => {
|
||||
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 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>
|
||||
|
||||
<style scoped>
|
||||
|
|
@ -263,5 +231,22 @@ html, body {
|
|||
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>
|
||||
|
|
|
|||
|
|
@ -83,10 +83,13 @@ useHead({
|
|||
],
|
||||
link: [
|
||||
{rel: 'stylesheet', href: '/news/bootstrap.min.css'},
|
||||
|
||||
{rel: 'stylesheet', href: '/news/main22.css'},
|
||||
|
||||
{rel: 'stylesheet', href: '/news/new_index.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: [
|
||||
|
||||
|
|
@ -103,7 +106,7 @@ onMounted(() => {
|
|||
<template>
|
||||
<view>
|
||||
<!-- 顶部 -->
|
||||
|
||||
|
||||
<!-- 文章正文 -->
|
||||
<section class="container" style="margin-top: 88px;">
|
||||
<div class="row">
|
||||
|
|
@ -307,5 +310,7 @@ onMounted(() => {
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user