正在显示
5 个修改的文件
包含
7 行增加
和
7 行删除
... | ... | @@ -14,6 +14,7 @@ module.exports = { |
14 | 14 | page: true, |
15 | 15 | }, |
16 | 16 | rules: { |
17 | + 'import/prefer-default-export': 0, | |
17 | 18 | 'react/jsx-filename-extension': [1, { extensions: ['.js'] }], |
18 | 19 | 'react/jsx-wrap-multilines': 0, |
19 | 20 | 'react/prop-types': 0, |
... | ... | @@ -21,7 +22,7 @@ module.exports = { |
21 | 22 | 'react/jsx-one-expression-per-line': 0, |
22 | 23 | 'import/no-unresolved': [2, { ignore: ['^@/', '^umi/'] }], |
23 | 24 | 'import/no-extraneous-dependencies': [ |
24 | - 2, | |
25 | + 1, | |
25 | 26 | { |
26 | 27 | optionalDependencies: true, |
27 | 28 | devDependencies: ['**/tests/**.js', '/mock/**.js', '**/**.test.js'], | ... | ... |
... | ... | @@ -4,13 +4,12 @@ import { connect } from 'dva'; |
4 | 4 | |
5 | 5 | import styles from './style.less'; |
6 | 6 | |
7 | -// TODO: Page 修改为有意义的名称 | |
8 | -@connect(({ page }) => page) | |
7 | +@connect(({ BLOCK_NAME }) => BLOCK_NAME) | |
9 | 8 | class Page extends Component { |
10 | 9 | componentDidMount() { |
11 | 10 | const { dispatch } = this.props; |
12 | 11 | dispatch({ |
13 | - type: 'page/fetch', | |
12 | + type: 'BLOCK_NAME/fetch', | |
14 | 13 | }); |
15 | 14 | } |
16 | 15 | ... | ... |
请
注册
或
登录
后发表评论