参考代码如下:
new Intl.DateTimeFormat(this.$i18n.locale, { year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric'}).format(Date.now())
结果如图:
具体这个函数的api可以参考:
https://cloud.tencent.com/developer/section/1191799
https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat