@gm-mobile/c-react 3.9.8-beta.0 → 3.10.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gm-mobile/c-react",
3
- "version": "3.9.8-beta.0",
3
+ "version": "3.10.1",
4
4
  "description": "> TODO: description",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gm-mobile#readme",
@@ -21,9 +21,9 @@
21
21
  "url": "https://github.com/gmfe/gm-mobile/issues"
22
22
  },
23
23
  "dependencies": {
24
- "@gm-mobile/c-font": "^3.9.8-beta.0",
25
- "@gm-mobile/c-tool": "^3.9.8-beta.0",
26
- "@gm-mobile/locales": "^3.9.8-beta.0"
24
+ "@gm-mobile/c-font": "^3.10.1",
25
+ "@gm-mobile/c-tool": "^3.10.1",
26
+ "@gm-mobile/locales": "^3.10.1"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@tarojs/components": "3.0.18",
@@ -33,5 +33,5 @@
33
33
  "prop-types": "^15.7.2",
34
34
  "react": "^16.13.1"
35
35
  },
36
- "gitHead": "6e1b6288b6de69f436106057325566565136e8dc"
36
+ "gitHead": "c2d50826688fe4a121b1ec7f047225f5e7b1ccdf"
37
37
  }
@@ -12,7 +12,7 @@ const WEEK_COUNT = 7
12
12
 
13
13
  const Container: FC<ContainerProps> = ({ min, max, selected, ...rest }) => {
14
14
  // 方便下面循环计算,多减去一天
15
- const start = moment(min).weekday(0).add(-1, 'day').startOf('day')
15
+ let start = moment(min).weekday(0).add(-1, 'day').startOf('day')
16
16
  // 计算相隔几周,加上头尾两天 + 多减去的一天
17
17
  const cycleWeeks =
18
18
  (moment(max).weekday(6).diff(start, 'days') + 3) / WEEK_COUNT
@@ -24,13 +24,14 @@ const Container: FC<ContainerProps> = ({ min, max, selected, ...rest }) => {
24
24
  return (
25
25
  <Flex none key={index}>
26
26
  {_.times(WEEK_COUNT, () => {
27
+ start = start.add(1, 'day')
27
28
  return (
28
29
  <Day
29
30
  key={start.format('YYYY-MM-DD')}
30
31
  {...rest}
31
32
  min={min}
32
33
  max={max}
33
- currentDate={start.add(1, 'day').toDate()}
34
+ currentDate={start.toDate()}
34
35
  selected={_selected}
35
36
  />
36
37
  )