vue 学习 day4

发布时间 2023-07-20 10:38:38作者: svolcano

VUE 相关的指令:

 

v-html 插入原始的 html 
const raw_html = "<h1>Hello world</h1>
<p v-html="raw_html"></p> <!-- 标签不能再有孩子节点, 有的话会报错 -->
 
v-bind 缩写是 ":"
绑定属性值
demo
const attri_01="id01";
<div v-bind:id="attri_01"></div>
 

出入前端不理解什么是脚手架

创建 vue 项目的两种方式

1. npm init vue@latest

2. npm init vite@latest