Scenario 1: How to set the month, the current month is displayed by default, and only the last six months can be displayed
The renderings are as follows:
html code:
Js code:
data( ) { return { // set the default value billMonthPrice: new Date().getFullYear() + '-' + (new Date().getMonth() + 1), } }, Note) Please pay attention to converting the format when passing parameters: billMonthStart: this.$moment(times).format('YYYY-MM') |