Vue页面结构

Vue页面结构

App.vue

html 复制代码
<!--html标签-->
<template>
  <div>
    <h1>饿了么?</h1>
  </div>
  <HelloWorld msg="Vite + Vue" />
</template>
<!--js代码 vue3的语法-->
<script setup>
import HelloWorld from './components/HelloWorld.vue'

</script>
<!--css样式 美化-->
<style scoped>

</style>

HelloWorld.vue

html 复制代码
<script setup>
import { ref } from 'vue'

defineProps({
  msg: String,
})

const count = ref(0)
</script>

<template>
  <h1>{{ msg }}</h1>

  <h1>吃的什么啊?</h1>
</template>

<style scoped>
.read-the-docs {
  color: #888;
}
</style>
相关推荐
Cacciatore->1 小时前
Electron 快速上手
javascript·arcgis·electron
vvilkim1 小时前
Electron 进程间通信(IPC)深度优化指南
前端·javascript·electron
某公司摸鱼前端2 小时前
ES13(ES2022)新特性整理
javascript·ecmascript·es13
ai小鬼头3 小时前
百度秒搭发布:无代码编程如何让普通人轻松打造AI应用?
前端·后端·github
漂流瓶jz3 小时前
清除浮动/避开margin折叠:前端CSS中BFC的特点与限制
前端·css·面试
前端 贾公子3 小时前
在移动端使用 Tailwind CSS (uniapp)
前端·uni-app
散步去海边3 小时前
Cursor 进阶使用教程
前端·ai编程·cursor
清幽竹客3 小时前
vue-30(理解 Nuxt.js 目录结构)
前端·javascript·vue.js
知性的小mahua3 小时前
echarts+vue实现中国地图板块渲染+省市区跳转渲染
vue.js
weiweiweb8883 小时前
cesium加载Draco几何压缩数据
前端·javascript·vue.js