提交 49e0cc0ba743b6a0072db59d0a0bf40c8bc1ea4f

作者 Yu
提交者 chencheng (云谦)
1 个父辈 23e59e85

feat: migrate demo block to v2 (#26)

1 1 export default {
2 2 plugins: [
3   - ['umi-plugin-block-dev', {}],
  3 + ['umi-plugin-block-dev', {
  4 + layout: 'ant-design-pro',
  5 + }],
4 6 ['umi-plugin-react', {
5 7 antd: true,
6 8 }],
... ...
1   -export function getText() {
2   - return 'I am a demo material of umi.';
3   -};
1 1 {
2 2 "name": "@umi-blocks/demo",
3 3 "description": "a demo block of umi",
4   - "blockConfig": {
5   - "specVersion": "0.1"
  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"
6 14 }
7   -}
\ No newline at end of file
  15 +}
... ...
1   -export default {
2   - 'GET /api/test': { text: 'ok' },
3   -};
1   -import { getText } from '@/utils/helper';
2 1 import styles from './index.less';
3 2 import React from 'react';
4 3 import { Button } from 'antd';
5 4
6 5 export default () => {
7   - return <Button className={styles.container}>{getText()}</Button>
  6 + return <Button className={styles.container}>Hello UmiJS!</Button>
8 7 }
... ...
注册登录 后发表评论