跳到主要内容

如何使用Vue.js创建应用程序

How to build a blog app with Vue.js

+$The JavaScript ecosystem has been changing for over a decade, meaning front end developers have had to track new technologies. After testingJavaScript框架+$and libraries for over five years, I have found the one that works for me: Vue.js.

+$In this tutorial, I will explain the basic structure of a Vue app. In addition, I am going to define components in detail and touch on more advanced features like mixins to demonstrate如何开始博客+$running on your own simple app.

+$The advantages of Vue.js

+$The main selling point of Vue.js is how easy it is to learn, as it is written in plain HTML, CSS and JavaScript. The library is supported by a set of文件+$that is constantly updated. The size of the library is small compared to competitors. Moreover, its CLI 3.0 has been rewritten to be future-proof.

开始吧

+$To follow this tutorial, you just need an internet connection as all development is going to take place in CodeSandbox, a full-feature web code editor. The link to the code can be found这里

+$Our app will include configuration files such as的package.json,一个的index.html+$page that is the entry file of our app and an+$SRC+$folder that is the core of our application. The content of this folder is going to be explained throughout the tutorial.

+$Components In Vue

+$Vue offers the ability to create components. These are custom elements used to encapsulate reusable code and can vary from a simple button to a full-featured page. A component consists of three main sections,