// dayjs import dayjs from 'dayjs' app.config.globalProperties.$dayjs = dayjs; const instance: any = getCurrentInstance(); //获取上下文实例,instance=vue2的this const _this = instance.appContext.config.globalProperties; _this.$dayjs().format("YYYY-MM")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter