File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,10 @@ export const Range: FunctionComponent<
145145 return ! ! range && Array . isArray ( val )
146146 }
147147 const scope = useMemo ( ( ) => {
148- return max === min ? 0.1 : max - min
148+ if ( max < min || max === min ) {
149+ console . log ( 'max 的值需要大于 min的值' )
150+ }
151+ return max - min
149152 } , [ max , min ] )
150153 const calcMainAxis = ( ) => {
151154 const modelVal = current as any
Original file line number Diff line number Diff line change @@ -145,7 +145,10 @@ export const Range: FunctionComponent<
145145 return ! ! range && Array . isArray ( val )
146146 }
147147 const scope = useMemo ( ( ) => {
148- return max === min ? 0.1 : max - min
148+ if ( max < min || max === min ) {
149+ console . log ( 'max 的值需要大于 min的值' )
150+ }
151+ return max - min
149152 } , [ max , min ] )
150153 const calcMainAxis = ( ) => {
151154 const modelVal = current as any
You can’t perform that action at this time.
0 commit comments