
vue
powderhose
这个作者很懒,什么都没留下…
展开
-
新建一个vue项目
1.$: cnpm install -g vue-cli 2.vue-cli初始化项目 $: vue init webpack my-project 3.进到目录 $: cd my-project 4.安装依赖 $: cnpm install 5.开始运行 $: cnpm run dev原创 2017-03-08 19:15:24 · 505 阅读 · 0 评论 -
vue2.0 渲染列表在苹果手机加载不出来的问题
一开始对vue的实例化new Vue是在html最后面写的,安卓手机和浏览器都可以加载渲染出来,但是苹果手机不行,最后在'#app'的div标签后边又写了一个script标签,把vue的实例化放在要绑定的元素后面,成功加载出来,具体原因还不清楚是为什么原创 2017-06-27 20:23:58 · 4288 阅读 · 0 评论 -
vue防止闪烁
[v-cloak] { display: none; }原创 2017-06-27 20:01:21 · 507 阅读 · 0 评论 -
v-on:click获取当前事件对象元素
dom元素这样写: i @click="iconToogle($event)" class="iconfont icon-xuanzhong1">i> vue实例中的methods的写法: function (event){ console.log($(event.target) },原创 2017-06-26 16:06:52 · 7313 阅读 · 0 评论 -
vue使用v-for渲染列表属性需要:="items.attribute"绑定
- src="{{items.img}}": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of , use . 绑定img的src属性,一开始的写法: li class="zlb原创 2017-06-26 10:08:16 · 6426 阅读 · 1 评论 -
vue使用component遇到的问题
- Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead. -我是先谢了一个模板,内容如下: script type="text/html" id="原创 2017-06-26 09:53:48 · 3450 阅读 · 0 评论 -
vue-router第一个小demo
坑! 1、在src/components下新建一个Demo.vue文件 {{ msg }} export default{ name: 'demo', data () { return { msg: '123456' } } } 2、注意原创 2017-03-14 21:24:58 · 323 阅读 · 0 评论 -
vue-ant components antd.Vbutton
搭建好vue框架并且安装vue-ant vue-antd http://okoala.github.io/vue-antd/#!/docs/download 1.引用组件 2.组件传值 3.页面渲染结果原创 2017-03-28 13:13:05 · 805 阅读 · 0 评论 -
Vue-ant
新建一个Vue项目后: 再看下src的目录结构: 看下修改后页面加载的效果:原创 2017-03-09 22:23:26 · 1542 阅读 · 0 评论 -
vue 多个input type = radio单击事件
因为vue有绑定事件,v-mode,所以只需要给每个input设置value初值,并绑定同一个data,便可以实现单击按钮切换显示不同内容。 demo8 .component-fade-enter-active,.component-fade-leave-actie{ transition:opacity .原创 2017-03-04 22:49:17 · 6060 阅读 · 0 评论 -
Vue router
报错 :TypeError: Cannot read property '_c' of undefined(…) 定义路由的时候,是component而不要写成components routes: [ { path: '/goods', name: 'goods', component: ratings }, { path: '/原创 2017-07-08 08:39:56 · 494 阅读 · 0 评论