@@ -7,13 +7,13 @@ import {
7
7
type PropType ,
8
8
} from 'vue' ;
9
9
import CalendarScrollContainer from './CalendarScrollContainer' ;
10
- import { ScorllDireType } from './components/scroll-container' ;
11
10
import languageUtil , { LanguageEntityType , LanguageType } from './language' ;
12
11
import type {
13
12
CalendarDateType ,
14
13
CalendarPanelType ,
15
14
DisabledScrollType ,
16
15
LangType ,
16
+ ScrollDirectionType ,
17
17
} from './types' ;
18
18
import {
19
19
isDateInRange ,
@@ -146,7 +146,7 @@ export default defineComponent({
146
146
}
147
147
} ;
148
148
149
- const slideChange = ( direc : ScorllDireType ) => {
149
+ const slideChange = ( direc : ScrollDirectionType ) => {
150
150
if ( direc === 'left' ) {
151
151
getNextOpitonData ( ) ;
152
152
} else if ( direc === 'right' ) {
@@ -202,7 +202,7 @@ export default defineComponent({
202
202
if ( ! date ) return ; // fix:1月无法选中
203
203
if ( isDisabled ( date , index ) ) return ;
204
204
205
- let checkedDate = { ...props . calendarDate , type : props . type } ;
205
+ let checkedDate = { ...props . calendarDate } ;
206
206
if ( props . type === 'month' ) {
207
207
checkedDate = {
208
208
...checkedDate ,
@@ -223,7 +223,7 @@ export default defineComponent({
223
223
} ;
224
224
}
225
225
226
- emit ( 'click' , checkedDate ) ;
226
+ emit ( 'click' , checkedDate , props . type ) ;
227
227
} ;
228
228
229
229
const isChecked = ( date : YearRangeType & number , index : number ) => {
@@ -329,7 +329,7 @@ export default defineComponent({
329
329
onTouchmove = { touchMove }
330
330
onTouchend = { touchEnd }
331
331
onSlidechange = { slideChange }
332
- v-slot = { ( data : ( YearRangeType & number ) [ ] ) =>
332
+ v-slots = { ( data : ( YearRangeType & number ) [ ] ) =>
333
333
renderYearMonthItem ( data )
334
334
}
335
335
/>
0 commit comments