vue 获取当前日期的农历(阴历)
生活随笔
收集整理的這篇文章主要介紹了
vue 获取当前日期的农历(阴历)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
安裝chinese-lunar-calendar
npm install --save chinese-lunar-calendar <script> import { getLunar } from 'chinese-lunar-calendar' export default {data() {return {getLunarDay: '',year: new Date().getFullYear(),month: new Date().getMonth() + 1,date: new Date().getDate()}},mounted() {// 獲取農歷this.getLunarDay = getLunar(this.year, this.month, this.date)console.log(this.getLunarDay)} } </script>總結
以上是生活随笔為你收集整理的vue 获取当前日期的农历(阴历)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 如何使用Arduino Uno开发板制作
- 下一篇: 2542: 弟弟的作业