MU Lesson Network Video Study notes: http://www.imooc.com/learn/694
1. Write HTML, JS, css to a suffix name. Vue's file, distinguish between the three types that are differentiated by <template>, <script>, <style>, this. vue file is converted into traditional HTML, JS, and CSS that the browser can recognize in the process of packaging.
2. Using Vue.js's official command-line tools allows us to focus on the implementation of project functionality.
3. Installation dependent (CNPM install) is required and can be viewed in Package.json. For example, Vue-loader, the function is to parse the Vue file so that the browser can recognize.
4. Page generation, through the Webpack Packaging tool to package the. vue file into HTML, JS, CSS, where JS is a new Vue object.
Important options for 5.vue.js components: data, methods, watch
6.vue object and page presentation (adhesives for HTML and Vue objects)
7.v-if is not rendered directly, and v-show is visible in the code (using the display in CSS).
8.items points to the list in the Vue object, item is the loop body variable, and the Apple equivalent is taken by the properties of the loop body object.
9.dothis is the method of taking from methods
10.v-bind variables and Boolean values, such as IMAGESRC, Red, ClassA, CLASSB is a string, and Isred is a Boolean value, it is used to determine whether red (red is the key in the object) is displayed
11. The Portal file index.html will call the Main.js file (src directory) by default
Import vue from ' Vue' vue-router'./app ';
When the import vue from ' Vue ' is packaged, Vue will take the relevant things from the node_modules inside the Vue frame.
Import App from './app '; From the app file in the statistics directory, omit the. Vue suffix
will automatically convert the hump (in main.js) to lowercase or with a horizontal bar-(index.html) the wording.
12. Components must be registered to use
App.vue file has
Export is the grammar of ES6
13. The Red box section is ES6 (App.vue)
It is equivalent to: data:function () {return ...}
The export of 14.app.vue will automatically generate new Vue ({data...) in the project. }), the export is the parameter in Vue {... }
Simple comprehension: The red box part is understood as the parameters and attributes in Vue.
In writing App.vue, you can imitate the App.vue, the red box part of the change to: data () {... }
Getting Started with "vue.js"