<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="app">
{
{i}}
<button @click="i++">+</button>
</div>
<script type="text/javascript">
new Vue({
el: '#app',
data: {
i: 0
},
beforeCreate(){
console.log('beforeCreate....')
},
created(){
console.log('created....')
},
beforeMount(){
console.log('beforeMount...')
},
mounted(){
co
Vue核心,生命周期钩子函数
最新推荐文章于 2024-03-27 17:10:07 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)