114 lines
2.8 KiB
Vue
114 lines
2.8 KiB
Vue
<script lang="ts" setup>
|
|
import {onMounted} from "vue";
|
|
|
|
onMounted(() => {
|
|
// 加载CSS样式文件
|
|
loadCSSFiles()
|
|
|
|
// 加载JavaScript文件
|
|
loadJSFiles()
|
|
})
|
|
|
|
const loadJSFiles = () => {
|
|
const jsFiles = [
|
|
|
|
|
|
'/js/news.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 loadCSSFiles = () => {
|
|
const cssFiles = []
|
|
|
|
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>
|
|
|
|
<template>
|
|
<!--box3 新闻-->
|
|
<!-- <div style="background: #fafafa;"> -->
|
|
<div class="container">
|
|
<div class="text-center">
|
|
<div class="blank50"/>
|
|
<div
|
|
class="cBlack f_42 line42 marginB10 wow fadeInDown animated"
|
|
style="visibility: visible; animation-name: fadeInDown;"><!-- APP -->开发资讯
|
|
</div>
|
|
<div class="cGray f_18 wow fadeInUp animated" style="visibility: visible; animation-name: fadeInUp;">NEWS</div>
|
|
<div class="blank20"/>
|
|
<div class="blank20"/>
|
|
</div>
|
|
|
|
<div
|
|
class="col-md-4 firstPageBox3Li wow fadeInDown animated active" data-wow-delay="300ms"
|
|
style="visibility: visible; animation-delay: 300ms; animation-name: fadeInDown;">
|
|
<div class="title f_22 cBlue text-center pointer" title="解决方案"/>
|
|
<hr>
|
|
<div class="blank20"/>
|
|
<ul/>
|
|
<div class="blank50"/>
|
|
</div>
|
|
|
|
<div
|
|
class="col-md-4 firstPageBox3Li wow fadeInDown animated active" data-wow-delay="500ms"
|
|
style="visibility: visible; animation-delay: 500ms; animation-name: fadeInDown;">
|
|
<div class="title f_22 cBlue text-center pointer" title="开发知识"/>
|
|
<hr>
|
|
<div class="blank20"/>
|
|
<ul/>
|
|
<div class="blank50"/>
|
|
</div>
|
|
|
|
<div
|
|
class="col-md-4 firstPageBox3Li wow fadeInDown animated active" data-wow-delay="700ms"
|
|
style="visibility: visible; animation-delay: 700ms; animation-name: fadeInDown;">
|
|
<div class="title f_22 cBlue text-center pointer" title="行业动态"/>
|
|
<hr>
|
|
<div class="blank20"/>
|
|
<ul/>
|
|
<div class="blank50"/>
|
|
</div>
|
|
</div>
|
|
<!-- </div> -->
|
|
|
|
</template>
|
|
|
|
|
|
<style scoped>
|
|
.line-clamp-2 {
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 响应式调整 */
|
|
@media (max-width: 1024px) {
|
|
.grid {
|
|
gap: 1.5rem;
|
|
}
|
|
}
|
|
</style> |