index.tsx 997 B

12345678910111213141516171819202122232425262728293031
  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. />
  16. <View className="px-4 py-4">
  17. <Text className="text-2xl font-bold text-gray-900">欢迎使用</Text>
  18. <View className="mt-4">
  19. <Text className="text-gray-600">这是一个简洁优雅的小程序首页</Text>
  20. <View className="mt-6">
  21. <Label className="mb-2">搜索</Label>
  22. <Input placeholder="搜索内容..." />
  23. </View>
  24. </View>
  25. </View>
  26. </TabBarLayout>
  27. )
  28. }
  29. export default HomePage