0
点赞
收藏
分享

微信扫一扫

数据挖掘 聚类度量

船长_Kevin 2023-12-31 阅读 39

<el-date-picker
          v-model="monthValue"
          type="month"
          placeholder="选择月"
          value-format="yyyy-MM-dd"
          @change="monthChange"
        >
</el-date-picker>
​
   
   monthChange(val) {
      const [year, month, day] = val.split('-') // 获取对应的年月日
      const endDate = new Date(year, month, 0).getDate() // 获取对应的年所在月有多少天
      let res = [`${year}-${month}-${day}`, `${year}-${month}-${endDate}`]
      console.log(res)
  },
举报

相关推荐

0 条评论