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