diff --git a/src/App.vue b/src/App.vue index bfcfd3faa7fdce7a8ac17b734fd6754edf01ba88..ea7133cc544d2789296564bdf83f5a6a55696b5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,12 +11,12 @@ export default { if (this.txtDate.length > 0) { this.result = '' const dateList = this.txtDate.split(/\n/) - for (let dateStr of x) { + for (let dateStr of dateList) { const curArr = dateStr.split('-') const start = new Date(`2023-03-01 ${curArr[0]}`).getTime() const end = new Date(`2023-03-01 ${curArr[1]}`).getTime() - this.result += dateStr, parseFloat((end-start)/1000/60) + '
' + this.result += '

' + `${dateStr}${parseFloat((end-start)/1000/60)}分钟` + '

' } } }