forked from gxwebsoft/mp-10550
提交代码
This commit is contained in:
31
src/components/Header.tsx
Normal file
31
src/components/Header.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import {NavBar} from '@nutui/nutui-react-taro'
|
||||
import {ArrowLeft} from '@nutui/icons-react-taro'
|
||||
import Taro from '@tarojs/taro'
|
||||
|
||||
function Header(props) {
|
||||
return (
|
||||
<>
|
||||
<NavBar
|
||||
style={{
|
||||
background: 'url(https://oss.wsdns.cn/20250413/defb52abb1414429930ae2727d2b8ff6.png)',
|
||||
backgroundSize: 'cover',
|
||||
color: '#fff',
|
||||
}}
|
||||
onBackClick={() => {
|
||||
}}
|
||||
back={
|
||||
<>
|
||||
<div className={'flex items-center'} onClick={() => Taro.navigateBack()}>
|
||||
<ArrowLeft size={14}/>
|
||||
返回
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<span className={'text-white'}>{props?.title || '标题'}</span>
|
||||
</NavBar>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Header;
|
||||
Reference in New Issue
Block a user