SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html lang="en">

<head>
    <title>example methods 实例</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script type="text/javascript" src="../assets/js/vue.js"></script>
    <script type="text/javascript" src="../assets/js/jquery-3.3.1.min.js"></script>
</head>

<body>
    <h1>example methods 实例</h1>
    <hr>
    <div id="app">
        {{message}}
    </div>

    <button onclick="app.add()">调用</button>

    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                message: "hello world!"
            },
            mounted() {
                $("#app").html("我是Jquery~!")
            },
            methods: {
                add: function () {
                    alert("调用了构造器内部的Add方法");
                }
            }
        })
    </script>
</body>

</html>

本项目引用的自定义外部资源