提交 594c3e797674d215bd60b8c9e39c79f297687b2b
提交者
chencheng (云谦)
1 个父辈
49e0cc0b
feat: add demo with dependencies (#27)
正在显示
5 个修改的文件
包含
48 行增加
和
1 行删除
demo-with-dependencies/.umirc.js
0 → 100644
demo-with-dependencies/package.json
0 → 100644
1 | +{ | ||
2 | + "name": "@umi-blocks/demo-with-dependencies", | ||
3 | + "description": "a demo block with dependencies", | ||
4 | + "scripts": { | ||
5 | + "dev": "umi dev" | ||
6 | + }, | ||
7 | + "dependencies": { | ||
8 | + "antd": "^3.10.9" | ||
9 | + }, | ||
10 | + "devDependencies": { | ||
11 | + "umi": "^2.3.0", | ||
12 | + "umi-plugin-react": "^1.3.0", | ||
13 | + "umi-plugin-block-dev": "^1.0.0" | ||
14 | + }, | ||
15 | + "blockConfig": { | ||
16 | + "dependencies": ["demo"] | ||
17 | + } | ||
18 | +} |
demo-with-dependencies/src/index.js
0 → 100644
1 | +import React from 'react'; | ||
2 | +import { Row, Col } from 'antd'; | ||
3 | +import Demo from './Demo'; | ||
4 | +import styles from './index.less'; | ||
5 | + | ||
6 | +export default () => { | ||
7 | + return ( | ||
8 | + <div className={styles.container}> | ||
9 | + <Row><Col span={24}>I am a block with dependencies.</Col></Row> | ||
10 | + <Row> | ||
11 | + <Col span={12}><Demo /></Col> | ||
12 | + <Col span={12}><Demo /></Col> | ||
13 | + </Row> | ||
14 | + </div> | ||
15 | + ) | ||
16 | +} |
demo-with-dependencies/src/index.less
0 → 100644
1 | -import styles from './index.less'; | ||
2 | import React from 'react'; | 1 | import React from 'react'; |
3 | import { Button } from 'antd'; | 2 | import { Button } from 'antd'; |
3 | +import styles from './index.less'; | ||
4 | 4 | ||
5 | export default () => { | 5 | export default () => { |
6 | return <Button className={styles.container}>Hello UmiJS!</Button> | 6 | return <Button className={styles.container}>Hello UmiJS!</Button> |
请
注册
或
登录
后发表评论