index.tsx 1017 B

1234567891011121314151617181920212223242526272829303132
  1. import React from 'react'
  2. import { View, Text } from '@tarojs/components'
  3. import { TabBarLayout } from '@/layouts/tab-bar-layout'
  4. import { Input } from '@/components/ui/input'
  5. import { Label } from '@/components/ui/label'
  6. import { Navbar } from '@/components/ui/navbar'
  7. import './index.css'
  8. const HomePage: React.FC = () => {
  9. return (
  10. <TabBarLayout activeKey="home">
  11. <Navbar
  12. title="首页"
  13. rightIcon="i-heroicons-bell-20-solid"
  14. onClickRight={() => console.log('点击通知')}
  15. leftIcon=""
  16. />
  17. <View className="px-4 py-4">
  18. <Text className="text-2xl font-bold text-gray-900">欢迎使用</Text>
  19. <View className="mt-4">
  20. <Text className="text-gray-600">这是一个简洁优雅的小程序首页</Text>
  21. <View className="mt-6">
  22. <Label className="mb-2">搜索</Label>
  23. <Input placeholder="搜索内容..." />
  24. </View>
  25. </View>
  26. </View>
  27. </TabBarLayout>
  28. )
  29. }
  30. export default HomePage