# add cur time with moment.js
This commit is contained in:
parent
8538e02f0c
commit
43ece7e820
|
@ -47,6 +47,7 @@
|
|||
"jsonlint": "1.6.3",
|
||||
"jszip": "3.1.5",
|
||||
"mockjs": "1.0.1-beta3",
|
||||
"moment": "^2.22.2",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"screenfull": "3.3.2",
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'screen',
|
||||
props: {
|
||||
|
@ -63,7 +64,9 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
lastTime() {
|
||||
return this.lastItem.calc_time.substr(0, 16).split('')
|
||||
const curTime = moment().format('YYYY-MM-DD HH:mm')
|
||||
return curTime.split('')
|
||||
// return this.lastItem.calc_time.substr(0, 16).split('')
|
||||
},
|
||||
lastCount() {
|
||||
const count = this.lastItem.mosq_count
|
||||
|
|
Loading…
Reference in New Issue