浏览代码

人日移动端修改月份调整,与网页端一致

XuZinan 3 年之前
父节点
当前提交
4702a5fa0c
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      pages/index/index.vue

+ 3 - 2
pages/index/index.vue

@@ -5,6 +5,7 @@
       class="uni-calendar--hook"
       :selected="info.selected"
       :showMonth="false"
+      :date="day"
       @change="change"
       @monthSwitch="monthSwitch"
     >
@@ -185,9 +186,9 @@ export default {
       this.currentList = e.extraInfo.list || [];
     },
     monthSwitch(e) {
-      console.log(e);
       this.monthDate = moment(`${e.year}-${e.month}-01`, "YYYY-MM-DD");
-      console.log(this.monthDate);
+      this.day = `${e.year}-${e.month < 10 ? "0" + e.month : e.month}-${moment(this.day).format("DD")}`;
+      this.currentList = [];
       this.queryWorkHours();
       // this.day = e.fulldate;
       // this.currentList = e.extraInfo.list || [];