this.cvalidateStr取值

This commit is contained in:
liyuetong
2021-07-14 16:54:30 +08:00
parent 06824f510e
commit c7d8ee5454

View File

@@ -74,9 +74,11 @@ export default {
}, },
computed: { computed: {
cvalidateStrToFormat() { cvalidateStrToFormat() {
return utils.formatDate(new Date(this.cvalidateStr), 'yyyy年MM月dd日') console.log(this.cvalidateStr,'computed')
return utils.formatDate(new Date('2021-07-01'), 'yyyy年MM月dd日')
}, },
cvalidateStrOneDayOff() { cvalidateStrOneDayOff() {
console.log(this.cvalidateStr,'computed1')
let date = new Date(this.cvalidateStr) let date = new Date(this.cvalidateStr)
let dateTime let dateTime
dateTime=date.setDate(date.getDate()-1); dateTime=date.setDate(date.getDate()-1);
@@ -90,8 +92,10 @@ export default {
[Dialog.name]: Dialog, [Dialog.name]: Dialog,
[NoticeBar.name]: NoticeBar [NoticeBar.name]: NoticeBar
}, },
mounted() { created() {
this.init() this.init()
},
mounted() {
let readingType = localStorage.getItem('readingProtocolType') let readingType = localStorage.getItem('readingProtocolType')
if (readingType && readingType === '1') { if (readingType && readingType === '1') {
this.protocol = true this.protocol = true