Vue原型

109 阅读1分钟

1、main.js中使用(例)

improt dayjs from 'dayjs'
Vue.prototype.$dayjs=dayjs

页面使用方法:this.$dayjs().format()