Blame view

src/routes/page.tsx 1.07 KB
31c17765   张志伟   🚚 chore(*): 更新依赖
1
  import { Button, Toast } from '@feewee/h5app-common';
36821dd7   张志伟   feat: init
2
  import { Helmet } from '@modern-js/runtime/head';
0694c397   张志伟   🐹 feat(*): 更新
3
  import { useNavigate } from '@modern-js/runtime/router';
36821dd7   张志伟   feat: init
4
  
0694c397   张志伟   🐹 feat(*): 更新
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  function Index() {
    const navigate = useNavigate();
  
    return (
      <>
        <Helmet>
          <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" />
        </Helmet>
        <main className="p-4 h-screen h-svh">
          <div className="text-center">这是首页</div>
          <div className=" mt-4">
            <Button type="info" shape="round" fill="outline" className="!mx-auto !block" onClick={() => navigate('/demo')}>
              跳转页面
            </Button>
31c17765   张志伟   🚚 chore(*): 更新依赖
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  
            <Button
              type="primary"
              shape="round"
              className="!mx-auto !block !mt-4"
              onClick={() =>
                Toast.show({
                  content: '成功提示',
                  icon: 'success',
                })
              }
            >
              吐司提示
            </Button>
0694c397   张志伟   🐹 feat(*): 更新
33
34
35
36
37
          </div>
        </main>
      </>
    );
  }
36821dd7   张志伟   feat: init
38
39
  
  export default Index;