vue:要素:日付:月

シナリオ 1: 月の設定方法。デフォルトでは現在の月が表示され、過去 6 か月のみが表示されます。

 

レンダリングは次のとおりです。

    

htmlコード:

         

 

JSコード:

 

データ( ) {

   戻る {

      // デフォルト値を設定します

      billMonthPrice: new Date().getFull Year() + '-' + (new Date().getMonth() + 1)、

   }

}、

注) パラメータを渡すときは形式の変換に注意してください: billMonthStart: this.$moment(times).format('YYYY-MM')

 

 

 

おすすめ

転載: blog.csdn.net/u013592575/article/details/116457454