{ {time}} data(){ return{ time:'' } } methods: { // 获取右上角实时时间 getTime() { this.time = this.$moment(new Date()).format("YYYY.MM.DD HH:mm"); },}mounted() { let that = this; that.getTime(); }复制代码
本文共 232 字,大约阅读时间需要 1 分钟。
{ {time}} data(){ return{ time:'' } } methods: { // 获取右上角实时时间 getTime() { this.time = this.$moment(new Date()).format("YYYY.MM.DD HH:mm"); },}mounted() { let that = this; that.getTime(); }复制代码
转载地址:http://gqrua.baihongyu.com/