@gm-mobile/c-react 3.12.7-beta.6 → 3.12.7-beta.7

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.12.7-beta.6",
3
+ "version": "3.12.7-beta.7",
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.12.7-beta.6",
25
- "@gm-mobile/c-tool": "^3.12.7-beta.6",
26
- "@gm-mobile/locales": "^3.12.7-beta.6",
24
+ "@gm-mobile/c-font": "^3.12.7-beta.7",
25
+ "@gm-mobile/c-tool": "^3.12.7-beta.7",
26
+ "@gm-mobile/locales": "^3.12.7-beta.7",
27
27
  "dayjs": "^1.11.6"
28
28
  },
29
29
  "peerDependencies": {
@@ -34,5 +34,5 @@
34
34
  "prop-types": "^15.7.2",
35
35
  "react": "^16.13.1"
36
36
  },
37
- "gitHead": "7dafd80614346aa8042857377dd30d2a90e60e72"
37
+ "gitHead": "613431bec6e652226773fc6828a2efcab5270b66"
38
38
  }
@@ -9,7 +9,7 @@ import { MonthListProps } from './types'
9
9
  import usePreviousObject from './use_previous'
10
10
 
11
11
  // 目前只支持固定高度,定为265
12
- const MONTH_HEIGHT = 265
12
+ const MONTH_HEIGHT = 285
13
13
 
14
14
  function whichValueChanged(
15
15
  prevArray: [Dayjs, Dayjs],
@@ -46,6 +46,7 @@ const MonthsList: FC<MonthListProps> = ({
46
46
  disabledDate,
47
47
  showDateLabel,
48
48
  canScrollWhenMaxOrMinChange = false,
49
+ itemHeight = MONTH_HEIGHT,
49
50
  }) => {
50
51
  const refList = useRef<VListRef>(null)
51
52
  const previous = usePreviousObject(selected)
@@ -132,7 +133,7 @@ const MonthsList: FC<MonthListProps> = ({
132
133
  className='m-calendar-content'
133
134
  data={monthsList}
134
135
  height={height}
135
- itemHeight={MONTH_HEIGHT}
136
+ itemHeight={itemHeight}
136
137
  distance={0}
137
138
  renderItem={(month: { item: Dayjs; index: number }) => {
138
139
  return (
@@ -32,6 +32,7 @@ interface MonthProps {
32
32
  interface MonthListProps extends Omit<MonthProps, 'currentMoment'> {
33
33
  height: number
34
34
  canScrollWhenMaxOrMinChange?: boolean
35
+ itemHeight?: number
35
36
  }
36
37
 
37
38
  interface BaseCalendarProps