缺少导入语句 插入"const item = require('@/plugins/timeline/src/item')"
时间: 2023-11-28 09:04:51 浏览: 64
一个基于WebAssembly和Duktape / QuickJS的安全评估库。-C/C++开发
好的,以下是添加了导入语句后的代码:
```
const item = require('@/plugins/timeline/src/item');
const data = [
{
title: '2021',
items: [
new item({
title: 'Event 1',
content: 'Description of Event 1',
date: new Date(2021, 1, 1),
}),
new item({
title: 'Event 2',
content: 'Description of Event 2',
date: new Date(2021, 4, 1),
}),
new item({
title: 'Event 3',
content: 'Description of Event 3',
date: new Date(2021, 7, 1),
}),
],
},
{
title: '2020',
items: [
new item({
title: 'Event 4',
content: 'Description of Event 4',
date: new Date(2020, 2, 1),
}),
new item({
title: 'Event 5',
content: 'Description of Event 5',
date: new Date(2020, 5, 1),
}),
],
},
];
export default data;
```
阅读全文