提交 2424ce36 编写于 作者: WodahsOrez's avatar WodahsOrez

lxm--timeline报错修复

上级 b2657c35
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<template v-for="(item, index) of items"> <template v-for="(item, index) of items">
<el-timeline-item :key="index" :timestamp="item.name" placement="top"> <el-timeline-item :key="index" :timestamp="item.name" placement="top">
<template v-for="data of item.items"> <template v-for="data of item.items">
<div :key="data.srfkey" class="app-timeline-item-title" @click="onClick(data)"> <div :key="index+data.srfkey" class="app-timeline-item-title" @click="onClick(data)">
<card> <card>
<div>{{data.name}}</div> <div>{{data.name}}</div>
<div>{{data.actor || data.create_uid_text}}</div> <div>{{data.actor || data.create_uid_text}}</div>
...@@ -72,6 +72,7 @@ export default class AppTimeline extends Vue { ...@@ -72,6 +72,7 @@ export default class AppTimeline extends Vue {
*/ */
public prepareData(datas: any[] = []) { public prepareData(datas: any[] = []) {
let format: any = this.getFormat(); let format: any = this.getFormat();
this.items = [];
datas.forEach((data: any) => { datas.forEach((data: any) => {
let time = data.time || data.create_date; let time = data.time || data.create_date;
if(format.test(time)) { if(format.test(time)) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册