Vue.js basic tutorial (official manual)

Read(57982) update time(2022-04-15)

Welcome friends to join the ranks of basic learning of Vue.js. Vue is a progressive framework for building user interfaces. "Vue.js Basic Tutorial" can give learners a general understanding of Vue.js.


Vue.js (pronounced /vju?/, similar to view) is a progressive framework for building user interfaces.

Vue only focuses on the view layer and adopts a bottom-up incremental development design.

The goal of Vue is to implement responsive data binding and composed view components through the simplest possible API.

Vue is very easy to learn. This tutorial is based on Vue 2.1.8 version test.

What you need to know before reading this tutorial:

This tutorial mainly introduces Vue2.x version usage.

First example

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例</title>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>
<body>
<div id="app">
  <p>{{ message }}</p>
</div>

<script>
new Vue({
  el: '#app',
  data: {
    message: 'Hello Vue.js!'
  }
})
</script>
</body>
</html>

Reference:

Webpack Getting Started Tutorial: https://www.php. cn/js-tutorial-430652.html

Official documentation: http://vuejs.org/v2/guide/syntax.html

Chinese documentation: https://www.php. cn/js/js-vuejs-syntax.html

Latest chapter


加入 Vue.js 社区 2019-09-20
对比其他框架 2019-09-20
从 Vuex 0.6.x 迁移到 1.0 2019-09-20
从 Vue Router 0.7.x 迁移 2019-09-19
从 Vue 1.x 迁移 2019-09-19
深入响应式原理 2019-09-19
服务端渲染 2019-09-19
状态管理 2019-09-19