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>
相关推荐
刘发财1 天前
弃用html2pdf.js,这个html转pdf方案能力是它的几十倍
前端·javascript·github
牛奶1 天前
2026年大模型怎么选?前端人实用对比
前端·人工智能·ai编程
牛奶1 天前
前端人为什么要学AI?
前端·人工智能·ai编程
Kagol1 天前
🎉OpenTiny NEXT-SDK 重磅发布:四步把你的前端应用变成智能应用!
前端·开源·agent
GIS之路1 天前
ArcGIS Pro 中的 notebook 初识
前端
JavaGuide1 天前
7 道 RAG 基础概念知识点/面试题总结
前端·后端
ssshooter1 天前
看完就懂 useSyncExternalStore
前端·javascript·react.js
格砸1 天前
从入门到辞职|从ChatGPT到OpenClaw,跟上智能时代的进化
前端·人工智能·后端
Live000001 天前
在鸿蒙中使用 Repeat 渲染嵌套列表,修改内层列表的一个元素,页面不会更新
前端·javascript·react native
柳杉1 天前
使用Ai从零开发智慧水利态势感知大屏(开源)
前端·javascript·数据可视化