@xtdev/xt-miniprogram-ui 1.2.48 → 1.2.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -264,6 +264,7 @@ Component({
264
264
  dateArr,
265
265
  defaultDate,
266
266
  minDate,
267
+ filtType
267
268
  },
268
269
  } = this;
269
270
  currentDate = currentDate || getDefaultDate();
@@ -281,7 +282,7 @@ Component({
281
282
  : 1;
282
283
  if (curDateArr && curDateArr.length) {
283
284
  // 如果有设置当前日期,则数组下标选中当前日期
284
- dateStr = `${curYear}年${curMonth}月${curDay}日`;
285
+ dateStr = filtType === "yearMonth" ? `${curYear}年${curMonth}月` : `${curYear}年${curMonth}月${curDay}日`;
285
286
  dateArr = [
286
287
  curYear - defaultYear,
287
288
  curMonth - defaultMonth,
@@ -290,7 +291,9 @@ Component({
290
291
  dateValue = `${curYear}-${curMonth}-${curDay}`;
291
292
  } else {
292
293
  // 如果有设置当前日期,则数组下标默认选中当前
293
- dateStr = `${now.getFullYear()}年${
294
+ dateStr = filtType === "yearMonth" ? `${now.getFullYear()}年${
295
+ now.getMonth() + 1
296
+ }月` : `${now.getFullYear()}年${
294
297
  now.getMonth() + 1
295
298
  }月${now.getDate()}日`;
296
299
  dateArr = [now.getFullYear() - 1990, now.getMonth(), now.getDate() - 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtdev/xt-miniprogram-ui",
3
- "version": "1.2.48",
3
+ "version": "1.2.49",
4
4
  "description": "",
5
5
  "miniprogram": "libs",
6
6
  "publishConfig": {