diff --git a/modern.config.ts b/modern.config.ts index fc2f1de..2e7d486 100644 --- a/modern.config.ts +++ b/modern.config.ts @@ -45,6 +45,9 @@ export default defineConfig({ }; return config; }, + sass: { + additionalData: '@import "@feewee/h5app-common/dist/es/styles/custom_theme.css";', + }, devServer: { proxy: { '/api': { diff --git a/src/routes/page.tsx b/src/routes/page.tsx index a326841..a603549 100644 --- a/src/routes/page.tsx +++ b/src/routes/page.tsx @@ -1,14 +1,25 @@ +import { Button } from '@feewee/h5app-common'; import { Helmet } from '@modern-js/runtime/head'; +import { useNavigate } from '@modern-js/runtime/router'; -const Index = () => ( - <> - - - -
-
这是首页 页面
-
- -); +function Index() { + const navigate = useNavigate(); + + return ( + <> + + + +
+
这是首页
+
+ +
+
+ + ); +} export default Index; diff --git a/src/style/global.scss b/src/style/global.scss index 729ee12..aa857d8 100644 --- a/src/style/global.scss +++ b/src/style/global.scss @@ -1,5 +1,3 @@ -@import '@feewee/h5app-common/dist/es/styles/custom_theme.css'; - @tailwind base; @tailwind components; @tailwind utilities; diff --git a/src/style/loading.module.scss b/src/style/loading.module.scss deleted file mode 100644 index 371491b..0000000 --- a/src/style/loading.module.scss +++ /dev/null @@ -1,23 +0,0 @@ -.loading-progress { - width: 120px; - height: 22px; - border-radius: 20px; - color: var(--color-loading-bar, #514b82); - border: 2px solid; - position: relative; -} -.loading-progress::before { - content: ''; - position: absolute; - margin: 2px; - inset: 0 100% 0 0; - border-radius: inherit; - background: var(--color-loading-bar, #514b82); - animation: p6 2s infinite; -} - -@keyframes p6 { - 100% { - inset: 0; - } -}