<script setup lang="ts">
import { onMounted } from 'vue'
import Swiper from 'swiper'
import { Navigation, Pagination, Autoplay } from 'swiper/modules'
import 'swiper/css'
import 'swiper/css/pagination'
import 'swiper/css/navigation'

onMounted(() => {
  new Swiper('.swiper-container', {
    modules: [Navigation, Pagination, Autoplay],
    loop: true,
    navigation: {
      nextEl: '.left',
      prevEl: '.right',
    },
    autoplay: {
      delay: 5000,
      disableOnInteraction: false
    },
    pagination: {
      el: '.swiper-pagination',
      clickable: true
    }
  })
})
</script>

<template>
  <div class="header">
    <div class="center-width header-top">
      <i class="logo"></i>
      <ul class="navigation">
        <li class="active">首 页</li>
        <li>产品技术</li>
        <li>客户名录</li>
        <li>新闻资讯</li>
        <li>加入我们</li>
        <li>关于我们</li>
      </ul>
      <div style="clear: both;"></div>
    </div>
    <div class="swiper-container use-swiper">
      <div class="swiper-wrapper">
        <div class="swiper-slide">
          <img src="../assets/images/banner_one.png" alt="">
        </div>
        <div class="swiper-slide">
          <img src="../assets/images/banner_one.png" alt="">
        </div>
      </div>
      <div class="swiper-pagination"></div>
      <div class="center-width btns">
        <div class="btn right"></div>
        <div class="cut"></div>
        <div class="btn left"></div>
        <div style="clear: both;"></div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.header {
  width: 100%;
  overflow: hidden;
}
</style> 