File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 9595 offset = ` ${ offset} px`
9696 }
9797 if (slider) {
98- if (this .useTransition ) slider .style [TRANSITION ] = ` all 0.2s linear`
98+ if (this .useTransition ) slider .style [TRANSITION ] = ` ${ TRANSFORM } 0.2s linear`
9999 slider .style [TRANSFORM ] = ` translateX(${ offset} ) translateZ(0)`
100100 }
101101 },
Original file line number Diff line number Diff line change 2020 const TRANSFORM = prefixStyle (' transform' )
2121
2222 const COMPONENT_NAME = ' cube-tab-panels'
23+ const INDEX_OUT_OF_BOUNDARY = - 1
2324
2425 export default {
2526 name: COMPONENT_NAME ,
4344 methods: {
4445 _move (label ) {
4546 const curIndex = findIndex (this .panels , panel => panel .label === label)
47+ /* istanbul ignore if */
48+ if (curIndex === INDEX_OUT_OF_BOUNDARY ) {
49+ return
50+ }
4651 const panelsGroup = this .$refs .panelsGroup
4752 const distance = - (curIndex * 100 )
4853 panelsGroup .style [TRANSFORM ] = ` translateX(${ distance} %)`
You can’t perform that action at this time.
0 commit comments