Skip to content

Commit eba0a36

Browse files
committed
chore: repair part types
1 parent 8e7b4cd commit eba0a36

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/examples/customize.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// @ts-nocheck
21
import moment, { type Moment } from 'moment';
32
import * as React from 'react';
43
import '../../assets/index.less';
54
import Picker, { PickerPanel } from '../../src';
65
import momentGenerateConfig from '../../src/generate/moment';
76
import zhCN from '../../src/locale/zh_CN';
87
import './slide.less';
8+
import type { OnPanelChange } from '@/interface';
99

1010
interface DateRangeState {
1111
startValue: Moment | null;
@@ -21,9 +21,9 @@ function disabledDate(current: Moment) {
2121
// Can not select days before today
2222
return current && current < moment().subtract(1, 'days').endOf('day');
2323
}
24-
function changePanelCallBack(value: Moment, mode: PanelMode) {
24+
const changePanelCallBack: OnPanelChange<Moment> = (value, mode) => {
2525
console.log(value, mode);
26-
}
26+
};
2727
class Customize extends React.Component<{}, DateRangeState> {
2828
poupContainerRef: React.RefObject<HTMLDivElement>;
2929

@@ -142,12 +142,13 @@ class Customize extends React.Component<{}, DateRangeState> {
142142
/>
143143
<div ref={this.poupContainerRef} />
144144
</div>
145-
<div>
145+
{/* TODO: PickerPanel 目前已经没用 renderExtraFooter, 只在 NewPicker 中的组件有实作 */}
146+
{/* <div>
146147
<h3>renderExtraFooter</h3>
147148
<PickerPanel
148149
generateConfig={momentGenerateConfig}
149150
locale={zhCN}
150-
showToday
151+
showNow
151152
disabledDate={disabledDate}
152153
onSelect={this.handleSelect}
153154
value={initValue}
@@ -165,7 +166,7 @@ class Customize extends React.Component<{}, DateRangeState> {
165166
onSelect={this.handleSelectMonth}
166167
renderExtraFooter={() => <div>extra footer</div>}
167168
/>
168-
</div>
169+
</div> */}
169170
<div>
170171
<h3>monthCellRender</h3>
171172
<PickerPanel

0 commit comments

Comments
 (0)