This commit is contained in:
liuhanhua
2025-10-28 14:38:16 +08:00
parent 143327de89
commit 6cdc748f9e
20 changed files with 7525 additions and 29 deletions

39
.gitignore vendored
View File

@@ -1,29 +1,10 @@
# ---> Dart /node_modules
# See https://www.dartlang.org/guides/libraries/private-files /.env.local
/.umirc.local.ts
# Files and directories created by pub /config/config.local.ts
.dart_tool/ /src/.umi
.packages /src/.umi-production
build/ /src/.umi-test
# If you're building an application, you may want to check-in your pubspec.lock /dist
pubspec.lock .swc
yarn.local
# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
# dotenv environment variables file
.env*
# Avoid committing generated Javascript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map
.flutter-plugins
.flutter-plugins-dependencies

2
.npmrc Normal file
View File

@@ -0,0 +1,2 @@
registry=https://registry.npmmirror.com/

9
config/config.js Normal file
View File

@@ -0,0 +1,9 @@
import { defineConfig } from "umi";
export default defineConfig({
routes: [
{ path: "/", component: "index" },
{ path: "/docs", component: "docs" },
],
npmClient: 'yarn',
});

3
jsconfig.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": "./src/.umi/tsconfig.json"
}

0
mock/app.jsx Normal file
View File

19
package.json Normal file
View File

@@ -0,0 +1,19 @@
{
"private": true,
"author": "liuhanhua <1>",
"scripts": {
"dev": "umi dev",
"build": "umi build",
"postinstall": "umi setup",
"setup": "umi setup",
"start": "npm run dev"
},
"dependencies": {
"umi": "^4.5.3"
},
"devDependencies": {
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"typescript": "^5.0.3"
}
}

0
src/app.jsx Normal file
View File

BIN
src/assets/yay.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

0
src/global.js Normal file
View File

0
src/global.less Normal file
View File

21
src/layouts/index.jsx Normal file
View File

@@ -0,0 +1,21 @@
import { Link, Outlet } from 'umi';
import styles from './index.less';
export default function Layout() {
return (
<div className={styles.navs}>
<ul>
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/docs">Docs</Link>
</li>
<li>
<a href="https://github.com/umijs/umi">Github</a>
</li>
</ul>
<Outlet />
</div>
);
}

10
src/layouts/index.less Normal file
View File

@@ -0,0 +1,10 @@
.navs {
ul {
padding: 0;
list-style: none;
display: flex;
}
li {
margin-right: 1em;
}
}

0
src/loading.jsx Normal file
View File

0
src/models/global.js Normal file
View File

0
src/models/index.js Normal file
View File

0
src/overrides.less Normal file
View File

9
src/pages/docs.jsx Normal file
View File

@@ -0,0 +1,9 @@
const DocsPage = () => {
return (
<div>
<p>This is umi docs.</p>
</div>
);
};
export default DocsPage;

15
src/pages/index.jsx Normal file
View File

@@ -0,0 +1,15 @@
import yayJpg from '../assets/yay.jpg';
export default function HomePage() {
return (
<div>
<h2>Yay! Welcome to umi!</h2>
<p>
<img src={yayJpg} width="388" />
</p>
<p>
To get started, edit <code>pages/index.tsx</code> and save to reload.
</p>
</div>
);
}

1
typings.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
import 'umi/typings';

7426
yarn.lock Normal file

File diff suppressed because it is too large Load Diff