📜  在 Nuxt JS 中使用 vuejs-datepicker - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:07.635000             🧑  作者: Mango

代码示例1
npm i vuejs-dnpm i vuejs-datepicker

/plugins/vue-datepicker.js
import Vue from 'vue'
import Datepicker from 'vuejs-datepicker'
Vue.component('date-picker', Datepicker)

nuxt.config.js 
plugins: [
    ... other plugins
    { src: '~/plugins/vue-datepicker', ssr: false }, // datepicker plugin here
  ],
  
  
  


data(){
return{
... your other data variables ...
date_today:new Date()
}
}