【发布时间】:2019-05-05 11:20:02
【问题描述】:
所以,伙计们,我正在尝试为我正在处理的项目创建一个虚拟数据库,现在我将以 Todo 应用程序为例。
const todos = [
{
id: 1,
title: "lunch",
description: "Go for lunc by 2pm"
}
];
export default todos;
这很好!但是当我创建一个待办事项列表和要从商店购买的物品列表时-
const todos = [
{
id: 1,
title: "lunch",
description: "Go for lunc by 2pm"
}
const shoppingList = [
{
id: 1,
item: "lunch",
description: "Go for lunc by 2pm"
}
];
导出默认待办事项; 导出默认购物清单;
如果我尝试运行它,我会收到此错误消息 “每个模块只允许一个默认导出。(90:0- 这是我上面给出的最后一行 )"
【问题讨论】:
标签: javascript