Vue原型

124 阅读1分钟

1、main.js中使用(例)

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

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