<!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>example methods</title>
<script src="../assets/js/vue.js"></script>
<script src="../assets/js/jquery-3.1.0.min.js"></script>
</head>
<body>
<h1>example methods</h1>
<hr>
<div id="app">
{{message}}
</div>
<script>
var app = new Vue({
el: ‘#app‘,
data: {
message: ‘hellow word‘
},
methods: {
add() {
console.log(‘调用了构造器内部的add方法‘)
}
},
mounted() {
$(‘#app‘).html(‘我是jquery‘)
},
})
app.add()
</script>
</body>
</html>