vue.js - 运行./start报错

查看:114
本文介绍了vue.js - 运行./start报错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

iOS

Prerequisites
Install Node.js 4.0+
Under project root
npm install, install project
./start

运行./start报错
ERROR in ./~/weex-vue-loader/lib/template-compiler.js?id=data-v-7ff5a0ff!./~/weex-vue-loader/lib/selector.js?type=template&index=0!./examples/vue/include/tabbar.vue

template syntax error <tabitem v-for="item in tabItems">: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.... for more info.

解决方案

这是因为写了 for 指令没写 key 报出的警告,不影响渲染结果,key 属性可以用来优化列表重排速度(官方文档)。

这个改动是 Vue 2.2.0 里的,参考官方 release note。Weex 里 examples 里的代码还没跟进上新版本的改动。

When using v-for with a component, a key is now required. You will likely see a bunch of "soft warnings" when you upgrade, but this does not affect the current behavior of your app.

这篇关于vue.js - 运行./start报错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆