One of the simplest examples Vue

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    {{ message }}
</div>

<script src="demo.js"></script>
</body>
</html>

html

was app = new Vue ({ 
    el: '#app' , 
    data: { 
        message: 'Hello Vue' 
    } 
})

js

Put two files in a directory, as long as the computer can be networked, which can get

Hello Vue!


 

Guess you like

Origin www.cnblogs.com/caoyi/p/11351726.html