style:快照图标更换

This commit is contained in:
zhangyu
2022-06-06 10:38:57 +08:00
parent 59ba14e466
commit 9e00620e12
11 changed files with 130 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
import bus from '@/libs/bus'
import moment from 'moment-timezone'
import i18n from '@/components/common/i18n'
export default {
methods: {
@@ -79,5 +80,17 @@ export default {
return str
}
},
momentTz (timestamp, fmt) { // moment 转化时间戳为str
const offset = localStorage.getItem('nz-sys-timezone')
const format = fmt || localStorage.getItem('nz-default-dateFormat')
return moment.tz(timestamp, offset).format(format)
},
momentStrToTimestamp (str, fmt) {
const offset = localStorage.getItem('nz-sys-timezone')
const format = fmt || localStorage.getItem('nz-default-dateFormat')
const date = moment.tz(str, format, offset).valueOf()
console.log(date)
return date
}
}
}