vue - lilunze/lilunze.github.io GitHub Wiki

vue.js

安装

在全局引入vue.js即可,vue.js使用的es6的特性,不兼容IE8,但支持所有兼容es6的浏览器

声明式渲染

{{}}

v-bind:

条件与循环

v-if

v-for

v-model

模板

<template-name></template-name>

Vue.component('template-name',{
    template:''
    })

生命周期

created
mounted
updated
destroyed

模板语法

v-once

v-html

计算属性

computed

class & style 绑定

条件渲染

template

v-if

v-show

列表渲染