<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Vue监听事件实现计数器</title>
</head>
<body>
<div id="app">
点击次数:{{count}}
<button @click="count++">点击加1</button>
</div>
<!-- 开发环境版本,包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
new Vue({
el:'#app',
data:{
count:0
}
})
</script>
</body>
</html>
Vue监听事件实现计数器
猜你喜欢
转载自blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/82749145
今日推荐
周排行