Tue Apr 18 08:25:00 UTC 2023 inscode

上级 4b07d85b
......@@ -22,6 +22,9 @@ export default {
this.result = ''
const dateList = this.txtDate.split(/\n/)
for (let dateStr of dateList) {
if(!dateStr) {
this.result += '<hr>'
} else {
const curArr = dateStr.split('-')
const start = new Date(`2023-03-01 ${curArr[0]}`).getTime()
const end = new Date(`2023-03-01 ${curArr[1]}`).getTime()
......@@ -29,6 +32,7 @@ export default {
this.result += '<p>' + `<span style="font-weight: 600; color: green;width: 120px; display:inline-block;margin-right: 16px;">${dateStr}</span>${parseFloat((end-start)/1000/60)}分钟` + '</p>'
}
}
}
},
setNum(num) {
return num >= 10 ? num : '0' + num
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册