page.tsx 1.15 KB
import { Helmet } from '@modern-js/runtime/head';
import { ListRow, Button, Icon, IconFont, Space, PageProvider } from '@feewee/h5app-common';
import { useSafeState } from 'ahooks';
import { useEffect } from 'react';

const Index = () => {
  const [loading, setLoading] = useSafeState(true);

  useEffect(() => {
    setTimeout(() => setLoading(false), 2500);
  }, []);

  return (
    <>
      <Helmet>
        {/* 这里面可以映入外部的一些样式或者js之类的,如果有需要的话。也可以调整head里的信息 */}
        <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" />
      </Helmet>
      <PageProvider tittle="demo页面" loading={loading}>
        <main className="p-5">
          <div>demo 页面</div>
          <ListRow title="标题" description="副标题" extra="描述文字" radius={6} align="center" onClick={() => console.info('点击事件')} />
          <Button type="primary">默认</Button>
          <Space>
            <Icon.Add />
            <IconFont name="down" />
          </Space>
        </main>
      </PageProvider>
    </>
  );
};

export default Index;