提交 ee9481bf23235c3edb8cd77f239f08037d00e728

作者 Yu
提交者 GitHub
1 个父辈 1503c310

add a material demo (#2)

@@ -59,3 +59,8 @@ typings/ @@ -59,3 +59,8 @@ typings/
59 59
60 # next.js build output 60 # next.js build output
61 .next 61 .next
  62 +
  63 +# umi
  64 +pages
  65 +.umi
  66 +.umi-production
  1 +export default {
  2 + plugins: [
  3 + ['umi-plugin-material-dev', {}],
  4 + ],
  5 +}
  1 +export function getText() {
  2 + return 'I am a demo material of umi.';
  3 +};
@@ -4,12 +4,20 @@ @@ -4,12 +4,20 @@
4 "description": "a demo material of umi", 4 "description": "a demo material of umi",
5 "main": "src/index.js", 5 "main": "src/index.js",
6 "scripts": { 6 "scripts": {
7 - "test": "echo \"Error: no test specified\" && exit 1" 7 + "dev": "umi dev"
8 }, 8 },
9 "repository": { 9 "repository": {
10 "type": "git", 10 "type": "git",
11 "url": "https://github.com/umijs/umi-materials/demo" 11 "url": "https://github.com/umijs/umi-materials/demo"
12 }, 12 },
  13 + "dependencies": {
  14 + "react": ">=16",
  15 + "antd": "^3.0.0"
  16 + },
  17 + "devDependencies": {
  18 + "umi": "^2.0.0",
  19 + "umi-plugin-material-dev": "*"
  20 + },
13 "author": "yutingzhao1991 <yutingzhao1991@sina.com>", 21 "author": "yutingzhao1991 <yutingzhao1991@sina.com>",
14 "license": "ISC" 22 "license": "ISC"
15 } 23 }
  1 +import { getText } from '@/utils';
  2 +import styles from './index.less';
  3 +
1 export default () => { 4 export default () => {
2 - return <div>I am a demo material of umi.</div> 5 + return <div className={styles.container}>{getText()}</div>
3 } 6 }
  1 +.container {
  2 + color: red;
  3 +}
注册登录 后发表评论