File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,17 +86,17 @@ export const Step: FunctionComponent<
8686 if ( ! title && ! description ) return null
8787
8888 return (
89- < div className = { `${ classPrefix } -main` } >
89+ < View className = { `${ classPrefix } -main` } >
9090 { title && < View className = { `${ classPrefix } -title` } > { title } </ View > }
9191 { description && (
9292 < View className = { `${ classPrefix } -description` } > { description } </ View >
9393 ) }
94- </ div >
94+ </ View >
9595 )
9696 } , [ title , description ] )
9797
9898 return (
99- < div className = { classes } style = { style } onClick = { handleClickStep } >
99+ < View className = { classes } style = { style } onClick = { handleClickStep } >
100100 < View className = { `${ classPrefix } -head` } >
101101 < View className = { `${ classPrefix } -head-${ type || parentType } -wrap` } >
102102 { renderHeadType }
@@ -106,7 +106,7 @@ export const Step: FunctionComponent<
106106 < View className = { `${ classPrefix } -line-inner` } />
107107 </ View >
108108 { renderContent }
109- </ div >
109+ </ View >
110110 )
111111}
112112
Original file line number Diff line number Diff line change 11import React , { FunctionComponent } from 'react'
22import classNames from 'classnames'
3+ import { View } from '@tarojs/components'
34import { DataContext } from './context'
45import { ComponentDefaults } from '@/utils/typings'
56import { TaroStepsProps } from '@/types'
@@ -49,7 +50,7 @@ export const Steps: FunctionComponent<
4950 )
5051 return (
5152 < DataContext . Provider value = { parentSteps } >
52- < div className = { classes } { ... restProps } >
53+ < View className = { classes } >
5354 { React . Children . map ( children , ( child , index ) => {
5455 if ( React . isValidElement ( child ) ) {
5556 return React . cloneElement ( child , {
@@ -61,7 +62,7 @@ export const Steps: FunctionComponent<
6162 }
6263 return child
6364 } ) }
64- </ div >
65+ </ View >
6566 </ DataContext . Provider >
6667 )
6768}
You can’t perform that action at this time.
0 commit comments