我是vue.js的新手,我试图创建一个Vue组件。
Vue.component('sales-report', {
data: function() {
return { products: products, seasons: seasons }
},
template: '<course-details-menu :dropdown-data="{ products, outlineClassifications, seasons, years }"></course-details-menu>'
});
这是我的应用的简化示例,它适用于Chrome,但在IE中,我从Vue收到此错误:
编译模板时出错:: - 表达式无效:: dropdown-data =&#34; {products,seasons}&#34; 发现于---&gt;
<SalesReport>
答案 0 :(得分:0)
IE11 doesn't support ECMAScript 2015属性名称的简写。
您需要明确说明对象的键值,如下所示:
:dropdown-data="{ products: products, seasons: seasons }"