vue3知识点链接
vue2写法
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>vue2入门基础</title>
<script src="js/vue.js"></script>
<style type="text/css">
.red{
color: red;
}
.green{
color: green;
}
.bgyellow{
background-color: yellow;
}
</style>
</head>
<body>
<div id="app">
<p v-if="istrue==0">{
{pop}}</p>
<p v-else-if="istrue==1">1.{
{pop}}</p>
<p v-else></p>
<p v-show="show">2.我是v-show</p>
<template v-if="show">3.v-if 与v-show的另一个区别template</template><br />
<button @click="handleclick">4.点击v-on</button><br />
<button @click="handleclick1($event)">4.点击v-on</button><br />
5.v-for 遍历
<ul>
<li v-for="(item,index) in arr">{
{item}}---{
{index}}</li>
</ul>
<ul>
<li v-for="(value,key) in obj">{
{value}}--{
{key}}</li>
</ul>
<ul>
<li v-for="item in 4">{
{item}}</li>
</ul>
<ul>
<li v-for