美文网首页
vue 常用指令

vue 常用指令

作者: 紫由袅 | 来源:发表于2017-03-06 17:28 被阅读40次

v-text

{{name}}

v-html

{{{html}}}

v-model

123showModel

v-show

hello world

Ok

v-if

hello

world

Ok

v-bind:style

hello world

v-for

{{arr.name}}

v-bind:

{{url}}{{url}}

red

red

Ok

{{name}}

.red{

color: red;

}

v-on:

testtest

var data = {el: '#demo',data: {name: 'yao',html: '

123456

',inp: '',sel: '',tex: '',bool: false,size: 20,bool2: false,bool3:true,arrs: [{name: 'yao'}, {name: 'xie'}, {name: 'lan'}],url: 'img/1.jpg'},methods: {showModel: function() {this.test();console.log(this);console.log(this.inp, this.sel, this.tex);},test: function() {console.log('test')},t: function() {console.log('t')}},ready: function() {this.t();}}var demo = new Vue(data);/*console.log(demo)demo.t();*/

相关文章

  • vue入门6---vue基本指令、自定义指令、插件

    一、vue常用指令概览 二、vue自定义指令 注册全局指令Vue.directive('my-directive'...

  • Vue.js第二天

    指令 1.什么是指令? 2.vue中常用的指令

  • Vue基础知识介绍

    本节主要介绍Vue.js开发中的常用指令介绍,后续会持续补充 1. vue中常用的v-指令 v-text // 是...

  • vue 常用指令

    一、了解 Vue.js 1 Vue.js是什么?作者:尤雨溪Vue.js是一套用于构建用户界面的渐进式框架。V...

  • Vue常用指令:

    v-for="(value,index) in arr" 循环 遍历 v-model=""双向数据...

  • vue常用指令

    v-text:绑定内容 v-html:渲染html v-show:切换显示隐藏 v-if:条件渲染 v-else:...

  • Vue常用指令

    v-bind:将这个元素节点的特性和Vue实例的属性保持一致v-if:将其绑定到DOM结构中v-for:用于绑定数...

  • vue常用指令

    常用指令列表 v-modelv-ifv-elsev-showv-forv-bind----简写: :class="...

  • vue 常用指令

    v-text {{name}} v-html {{{html}}} v-model 123showModel v-...

  • VUE常用指令

    一、指令 v-model 双向绑定,监听用户的输入事件,更新数据 v-bind 能够及时对页面的数据进行更改 必须...

网友评论

      本文标题:vue 常用指令

      本文链接:https://www.haomeiwen.com/subject/jjrugttx.html