动画

<transition name="fade">
<p v-if="show">hello</p>
</transition> 如果你使用一个没有名字的 <transition>,则 v-是这些类名的默认前缀。如果你使用了 <transition name="my-transition">,那么 v-enter 会替换为 my-transition-enter

使用axios

安装:cnpm install axios

使用:

main.js

import axios from 'axios'
Vue.prototype.$ajax = axios

不能使用vue.use(axios),会报错

组件中使用:

this.$http.get('http://cangdu.org:8001/v1/cities?type=group')
.then(function(response){
console.log(response);
})
.catch(function(error){
console.log(error);
});

事件绑定:

在 Vue 2.0 中,为自定义组件绑定原生事件必须使用 .native 修饰符:

<my-component @click.native="handleClick">Click Me</my-component>

从易用性的角度出发,mintui对 Button 组件进行了处理,使它可以监听 click 事件:

<mt-button @click="handleButtonClick">Click Me</mt-button>

但是对于其他组件,还是需要添加 .native 修饰符。

最新文章

  1. 球谐光照(Spherical Harmonics Lighting)及其应用-实验篇
  2. Win8怎么查看IP地址
  3. HDU 5724 Chess(国际象棋)
  4. angularJS项目-ajax事件的按钮loading和页面loading状态 &amp; Controller之间通信-待续
  5. SlideLayout
  6. 字符串逆转(递归和非递归java)
  7. xcode 环境,多工程联编设置【转】
  8. chorme调试Paused in debugger问题解决
  9. 线性表-&gt;顺序存储
  10. 开发Canvas 绘画应用(三):实现对照绘画
  11. Linux下docker报错syntax error:unexpected protocol at end of statement
  12. mui 对话框 点击按钮不关闭对话框的办法
  13. Windows上搭建安卓的Java开发环境
  14. SSM获取表单数据插入数据库并返回插入记录的ID值
  15. Python 全栈开发六 常用模块学习
  16. Solr系列一:Solr(Solr介绍、Solr应用架构、Solr安装使用)
  17. oops_根据epc定位linux_kernel_panic位置
  18. Tiny microcontroller hosts dual dc/dc-boost converters
  19. Go语言中字符串的查找方法小结
  20. Effective Java-第4章

热门文章

  1. Altera: set pin locations using tcl
  2. LUOGU P4322 [JSOI2016]最佳团体(0/1分数规划+树形背包)
  3. ajax跨域获取网站json数据
  4. Android问题集锦An error occurred while automatically activating bundle com.android.ide.eclipse.adt .
  5. EXCEL函数常用技巧浅析
  6. jeecms jeecmsv93建库
  7. HDU-2095-find your present (2)-位或/STL(set)
  8. Java 内部类,成员类,局部类,匿名类等
  9. 19.SimLogin_case06
  10. 第三周课堂笔记1thand2thand3th