DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>数据、方法和计算属性title>
head>
<body>
<div id="app">
<button-counter>button-counter><br>
<button-counter>button-counter><br>
<button-counter>button-counter><br>
<button-counter>button-counter><br>
<button-counter>button-counter>
div>
<script src="../vue.js">script>
<script>
// 定义一个名为 button-counter 的新组件
Vue.component('button-counter', {
data: function () {
return {
count: 0
}
},
computed:{
},
watch:{
},
methods:{
},
template: ''
});
let vue = new Vue({
el: "#app",
data: {
}
})
script>
body>
html>