正在显示
11 个修改的文件
包含
41 行增加
和
41 行删除
... | ... | @@ -13,9 +13,9 @@ const FormItem = Form.Item; |
13 | 13 | |
14 | 14 | /* eslint react/no-array-index-key: 0 */ |
15 | 15 | |
16 | -@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, loading }) => ({ | |
17 | - BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, | |
18 | - loading: loading.models.BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, | |
16 | +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({ | |
17 | + BLOCK_NAME_CAMEL_CASE, | |
18 | + loading: loading.models.BLOCK_NAME_CAMEL_CASE, | |
19 | 19 | })) |
20 | 20 | @Form.create({ |
21 | 21 | onValuesChange({ dispatch }, changedValues, allValues) { |
... | ... | @@ -24,7 +24,7 @@ const FormItem = Form.Item; |
24 | 24 | console.log(changedValues, allValues); |
25 | 25 | // 模拟查询表单生效 |
26 | 26 | dispatch({ |
27 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch', | |
27 | + type: 'BLOCK_NAME_CAMEL_CASE/fetch', | |
28 | 28 | payload: { |
29 | 29 | count: 8, |
30 | 30 | }, |
... | ... | @@ -35,7 +35,7 @@ class CoverCardList extends PureComponent { |
35 | 35 | componentDidMount() { |
36 | 36 | const { dispatch } = this.props; |
37 | 37 | dispatch({ |
38 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch', | |
38 | + type: 'BLOCK_NAME_CAMEL_CASE/fetch', | |
39 | 39 | payload: { |
40 | 40 | count: 8, |
41 | 41 | }, |
... | ... | @@ -44,7 +44,7 @@ class CoverCardList extends PureComponent { |
44 | 44 | |
45 | 45 | render() { |
46 | 46 | const { |
47 | - BLOCK_NAME_CAMEL_CASE_CAMEL_CASE: { list = [] }, | |
47 | + BLOCK_NAME_CAMEL_CASE: { list = [] }, | |
48 | 48 | loading, |
49 | 49 | form, |
50 | 50 | } = this.props; | ... | ... |
... | ... | @@ -272,8 +272,8 @@ class UpdateForm extends PureComponent { |
272 | 272 | } |
273 | 273 | |
274 | 274 | /* eslint react/no-multi-comp:0 */ |
275 | -@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, loading }) => ({ | |
276 | - BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, | |
275 | +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({ | |
276 | + BLOCK_NAME_CAMEL_CASE, | |
277 | 277 | loading: loading.models.rule, |
278 | 278 | })) |
279 | 279 | @Form.create() |
... | ... | @@ -351,7 +351,7 @@ class TableList extends PureComponent { |
351 | 351 | componentDidMount() { |
352 | 352 | const { dispatch } = this.props; |
353 | 353 | dispatch({ |
354 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch', | |
354 | + type: 'BLOCK_NAME_CAMEL_CASE/fetch', | |
355 | 355 | }); |
356 | 356 | } |
357 | 357 | |
... | ... | @@ -376,7 +376,7 @@ class TableList extends PureComponent { |
376 | 376 | } |
377 | 377 | |
378 | 378 | dispatch({ |
379 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch', | |
379 | + type: 'BLOCK_NAME_CAMEL_CASE/fetch', | |
380 | 380 | payload: params, |
381 | 381 | }); |
382 | 382 | }; |
... | ... | @@ -388,7 +388,7 @@ class TableList extends PureComponent { |
388 | 388 | formValues: {}, |
389 | 389 | }); |
390 | 390 | dispatch({ |
391 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch', | |
391 | + type: 'BLOCK_NAME_CAMEL_CASE/fetch', | |
392 | 392 | payload: {}, |
393 | 393 | }); |
394 | 394 | }; |
... | ... | @@ -408,7 +408,7 @@ class TableList extends PureComponent { |
408 | 408 | switch (e.key) { |
409 | 409 | case 'remove': |
410 | 410 | dispatch({ |
411 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/remove', | |
411 | + type: 'BLOCK_NAME_CAMEL_CASE/remove', | |
412 | 412 | payload: { |
413 | 413 | key: selectedRows.map(row => row.key), |
414 | 414 | }, |
... | ... | @@ -448,7 +448,7 @@ class TableList extends PureComponent { |
448 | 448 | }); |
449 | 449 | |
450 | 450 | dispatch({ |
451 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetch', | |
451 | + type: 'BLOCK_NAME_CAMEL_CASE/fetch', | |
452 | 452 | payload: values, |
453 | 453 | }); |
454 | 454 | }); |
... | ... | @@ -470,7 +470,7 @@ class TableList extends PureComponent { |
470 | 470 | handleAdd = fields => { |
471 | 471 | const { dispatch } = this.props; |
472 | 472 | dispatch({ |
473 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/add', | |
473 | + type: 'BLOCK_NAME_CAMEL_CASE/add', | |
474 | 474 | payload: { |
475 | 475 | desc: fields.desc, |
476 | 476 | }, |
... | ... | @@ -483,7 +483,7 @@ class TableList extends PureComponent { |
483 | 483 | handleUpdate = fields => { |
484 | 484 | const { dispatch } = this.props; |
485 | 485 | dispatch({ |
486 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/update', | |
486 | + type: 'BLOCK_NAME_CAMEL_CASE/update', | |
487 | 487 | payload: { |
488 | 488 | name: fields.name, |
489 | 489 | desc: fields.desc, |
... | ... | @@ -616,7 +616,7 @@ class TableList extends PureComponent { |
616 | 616 | |
617 | 617 | render() { |
618 | 618 | const { |
619 | - BLOCK_NAME_CAMEL_CASE_CAMEL_CASE: { data }, | |
619 | + BLOCK_NAME_CAMEL_CASE: { data }, | |
620 | 620 | loading, |
621 | 621 | } = this.props; |
622 | 622 | const { selectedRows, modalVisible, updateModalVisible, stepFormValues } = this.state; | ... | ... |
... | ... | @@ -8,9 +8,9 @@ import styles from './style.less'; |
8 | 8 | |
9 | 9 | const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login; |
10 | 10 | |
11 | -@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, loading }) => ({ | |
12 | - BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, | |
13 | - submitting: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/login'], | |
11 | +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({ | |
12 | + BLOCK_NAME_CAMEL_CASE, | |
13 | + submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/login'], | |
14 | 14 | })) |
15 | 15 | class LoginPage extends Component { |
16 | 16 | state = { |
... | ... | @@ -30,7 +30,7 @@ class LoginPage extends Component { |
30 | 30 | } else { |
31 | 31 | const { dispatch } = this.props; |
32 | 32 | dispatch({ |
33 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/getCaptcha', | |
33 | + type: 'BLOCK_NAME_CAMEL_CASE/getCaptcha', | |
34 | 34 | payload: values.mobile, |
35 | 35 | }) |
36 | 36 | .then(resolve) |
... | ... | @@ -44,7 +44,7 @@ class LoginPage extends Component { |
44 | 44 | if (!err) { |
45 | 45 | const { dispatch } = this.props; |
46 | 46 | dispatch({ |
47 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/login', | |
47 | + type: 'BLOCK_NAME_CAMEL_CASE/login', | |
48 | 48 | payload: { |
49 | 49 | ...values, |
50 | 50 | type, |
... | ... | @@ -64,8 +64,8 @@ class LoginPage extends Component { |
64 | 64 | ); |
65 | 65 | |
66 | 66 | render() { |
67 | - const { BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, submitting } = this.props; | |
68 | - const { status, type: loginType } = BLOCK_NAME_CAMEL_CASE_CAMEL_CASE; | |
67 | + const { BLOCK_NAME_CAMEL_CASE, submitting } = this.props; | |
68 | + const { status, type: loginType } = BLOCK_NAME_CAMEL_CASE; | |
69 | 69 | const { type, autoLogin } = this.state; |
70 | 70 | return ( |
71 | 71 | <div className={styles.main}> | ... | ... |
... | ... | @@ -6,7 +6,7 @@ import { reloadAuthorized } from './utils/Authorized'; |
6 | 6 | import { fakeAccountLogin, getFakeCaptcha } from './service'; |
7 | 7 | |
8 | 8 | export default { |
9 | - namespace: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE', | |
9 | + namespace: 'BLOCK_NAME_CAMEL_CASE', | |
10 | 10 | |
11 | 11 | state: { |
12 | 12 | status: undefined, | ... | ... |
... | ... | @@ -34,9 +34,9 @@ const passwordProgressMap = { |
34 | 34 | poor: 'exception', |
35 | 35 | }; |
36 | 36 | |
37 | -@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, loading }) => ({ | |
38 | - BLOCK_NAME_CAMEL_CASE_CAMEL_CASE, | |
39 | - submitting: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/submit'], | |
37 | +@connect(({ BLOCK_NAME_CAMEL_CASE, loading }) => ({ | |
38 | + BLOCK_NAME_CAMEL_CASE, | |
39 | + submitting: loading.effects['BLOCK_NAME_CAMEL_CASE/submit'], | |
40 | 40 | })) |
41 | 41 | @Form.create() |
42 | 42 | class PAGE_NAME_UPPER_CAMEL_CASE extends Component { |
... | ... | @@ -49,9 +49,9 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component { |
49 | 49 | }; |
50 | 50 | |
51 | 51 | componentDidUpdate() { |
52 | - const { form, BLOCK_NAME_CAMEL_CASE_CAMEL_CASE } = this.props; | |
52 | + const { form, BLOCK_NAME_CAMEL_CASE } = this.props; | |
53 | 53 | const account = form.getFieldValue('mail'); |
54 | - if (BLOCK_NAME_CAMEL_CASE_CAMEL_CASE.status === 'ok') { | |
54 | + if (BLOCK_NAME_CAMEL_CASE.status === 'ok') { | |
55 | 55 | router.push({ |
56 | 56 | pathname: '/user/register-result', |
57 | 57 | state: { |
... | ... | @@ -96,7 +96,7 @@ class PAGE_NAME_UPPER_CAMEL_CASE extends Component { |
96 | 96 | if (!err) { |
97 | 97 | const { prefix } = this.state; |
98 | 98 | dispatch({ |
99 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/submit', | |
99 | + type: 'BLOCK_NAME_CAMEL_CASE/submit', | |
100 | 100 | payload: { |
101 | 101 | ...values, |
102 | 102 | prefix, | ... | ... |
... | ... | @@ -39,27 +39,27 @@ const links = [ |
39 | 39 | }, |
40 | 40 | ]; |
41 | 41 | |
42 | -@connect(({ BLOCK_NAME_CAMEL_CASE_CAMEL_CASE: { user, project, activities, chart }, loading }) => ({ | |
42 | +@connect(({ BLOCK_NAME_CAMEL_CASE: { user, project, activities, chart }, loading }) => ({ | |
43 | 43 | currentUser: user.currentUser, |
44 | 44 | project, |
45 | 45 | activities, |
46 | 46 | chart, |
47 | - currentUserLoading: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetchUserCurrent'], | |
48 | - projectLoading: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetchProjectNotice'], | |
49 | - activitiesLoading: loading.effects['BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/fetchActivitiesList'], | |
47 | + currentUserLoading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchUserCurrent'], | |
48 | + projectLoading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchProjectNotice'], | |
49 | + activitiesLoading: loading.effects['BLOCK_NAME_CAMEL_CASE/fetchActivitiesList'], | |
50 | 50 | })) |
51 | 51 | class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent { |
52 | 52 | componentDidMount() { |
53 | 53 | const { dispatch } = this.props; |
54 | 54 | dispatch({ |
55 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/init', | |
55 | + type: 'BLOCK_NAME_CAMEL_CASE/init', | |
56 | 56 | }); |
57 | 57 | } |
58 | 58 | |
59 | 59 | componentWillUnmount() { |
60 | 60 | const { dispatch } = this.props; |
61 | 61 | dispatch({ |
62 | - type: 'BLOCK_NAME_CAMEL_CASE_CAMEL_CASE/clear', | |
62 | + type: 'BLOCK_NAME_CAMEL_CASE/clear', | |
63 | 63 | }); |
64 | 64 | } |
65 | 65 | ... | ... |
请
注册
或
登录
后发表评论