Commit 0694c3978cf6d1ac359a2af1306747ff6e405c8e

Authored by 张志伟
1 parent 8e793f40

🐹 feat(*): 更新

modern.config.ts
@@ -45,6 +45,9 @@ export default defineConfig({ @@ -45,6 +45,9 @@ export default defineConfig({
45 }; 45 };
46 return config; 46 return config;
47 }, 47 },
  48 + sass: {
  49 + additionalData: '@import "@feewee/h5app-common/dist/es/styles/custom_theme.css";',
  50 + },
48 devServer: { 51 devServer: {
49 proxy: { 52 proxy: {
50 '/api': { 53 '/api': {
src/routes/page.tsx
  1 +import { Button } from '@feewee/h5app-common';
1 import { Helmet } from '@modern-js/runtime/head'; 2 import { Helmet } from '@modern-js/runtime/head';
  3 +import { useNavigate } from '@modern-js/runtime/router';
2 4
3 -const Index = () => (  
4 - <>  
5 - <Helmet>  
6 - <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" />  
7 - </Helmet>  
8 - <main className="p-4">  
9 - <div>这是首页 页面</div>  
10 - </main>  
11 - </>  
12 -); 5 +function Index() {
  6 + const navigate = useNavigate();
  7 +
  8 + return (
  9 + <>
  10 + <Helmet>
  11 + <link rel="icon" type="image/x-icon" href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico" />
  12 + </Helmet>
  13 + <main className="p-4 h-screen h-svh">
  14 + <div className="text-center">这是首页</div>
  15 + <div className=" mt-4">
  16 + <Button type="info" shape="round" fill="outline" className="!mx-auto !block" onClick={() => navigate('/demo')}>
  17 + 跳转页面
  18 + </Button>
  19 + </div>
  20 + </main>
  21 + </>
  22 + );
  23 +}
13 24
14 export default Index; 25 export default Index;
src/style/global.scss
1 -@import '@feewee/h5app-common/dist/es/styles/custom_theme.css';  
2 -  
3 @tailwind base; 1 @tailwind base;
4 @tailwind components; 2 @tailwind components;
5 @tailwind utilities; 3 @tailwind utilities;
src/style/loading.module.scss deleted
1 -.loading-progress {  
2 - width: 120px;  
3 - height: 22px;  
4 - border-radius: 20px;  
5 - color: var(--color-loading-bar, #514b82);  
6 - border: 2px solid;  
7 - position: relative;  
8 -}  
9 -.loading-progress::before {  
10 - content: '';  
11 - position: absolute;  
12 - margin: 2px;  
13 - inset: 0 100% 0 0;  
14 - border-radius: inherit;  
15 - background: var(--color-loading-bar, #514b82);  
16 - animation: p6 2s infinite;  
17 -}  
18 -  
19 -@keyframes p6 {  
20 - 100% {  
21 - inset: 0;  
22 - }  
23 -}