【Vue】组件

再别的地方定义好,导过来用就行
标签,看你起的别名

<script setup>
  import Header from"./components/Header.vue"
  import Navigator from"./components/Navigator.vue"
  import Content from"./components/Content.vue"  
script>

<template>
  <div>
    <Header class="header">Header>
    <Navigator class="navigator">Navigator>
    <Content class="content">Content> 
  div>
template> 

↓/components/Header.vue

<script setup>

script>

<template>
  <div>
    Header 页头
  div>
template>

<style scoped>
style>

你可能感兴趣的:(Vue,vue.js,前端,javascript)