Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 7619d96

Browse files
committed
Merge branch 'upgrade-pkg' into dev
2 parents f28641f + 25b99fe commit 7619d96

File tree

147 files changed

+3559
-3721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+3559
-3721
lines changed

components/A/index.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ export const StyledA = styled.a`
1919
}
2020
`
2121

22-
function A(props) {
23-
return (
24-
<StyledA href={props.href} rel="noopener noreferrer" target={props.target}>
25-
{props.children}
26-
</StyledA>
27-
)
28-
}
22+
const A = ({ href, target, children }) => (
23+
<StyledA href={href} rel="noopener noreferrer" target={target}>
24+
{children}
25+
</StyledA>
26+
)
2927

3028
A.propTypes = {
3129
href: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,

components/AdderCell/styles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled from 'styled-components'
22

3+
import Img from '../../Img'
34
import { Animate } from '../../../utils'
4-
import { Img } from '../../../components'
55

66
export const AddWrapper = styled.div`
77
display: flex;

components/AvatarsRow/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import React from 'react'
88
import PropTypes from 'prop-types'
99
import R from 'ramda'
1010

11+
import { Tooltip } from 'antd'
1112
import { ATATARS_LIST_LENGTH } from '../../config/general'
1213

13-
import { Tooltip } from '../../components'
1414
import { Avatars, AvatarsItem, AvatarsImg, AvatarsMore } from './styles'
1515

1616
/* eslint-disable no-unused-vars */
@@ -19,7 +19,10 @@ import { makeDebugger, prettyNum, uid } from '../../utils'
1919
const debug = makeDebugger('c:AvatarsRow:index')
2020
/* eslint-enable no-unused-vars */
2121

22-
const validUser = R.compose(R.not, R.isNil)
22+
const validUser = R.compose(
23+
R.not,
24+
R.isNil
25+
)
2326

2427
const AvatarsRow = ({
2528
users,

components/BannerCountBrief/index.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,30 @@ const CountBrief = ({ filteredCount, totalCount, thread, unit }) => {
2626
return (
2727
<Result>
2828
<ResultBottom>
29-
<ResultText>当前共有{thread}</ResultText>
29+
<ResultText>
30+
当前共有
31+
{thread}
32+
</ResultText>
3033
<ResultNumber>{totalCount} </ResultNumber>
3134
<ResultText>{unit}</ResultText>
3235
</ResultBottom>
3336
</Result>
3437
)
35-
} else if (filteredCount < 0 && totalCount === 0) {
38+
}
39+
if (filteredCount < 0 && totalCount === 0) {
3640
return <Result>正在加载, 请稍后...</Result>
3741
}
3842
return (
3943
<Result>
4044
<ResultTop>
41-
{thread}总数为 {totalCount} {unit}
45+
{thread}
46+
总数为 {totalCount} {unit}
4247
</ResultTop>
4348
<ResultBottom>
44-
<ResultText>符合当前条件的{thread}</ResultText>
49+
<ResultText>
50+
符合当前条件的
51+
{thread}
52+
</ResultText>
4553
<ResultNumber>{filteredCount} </ResultNumber>
4654
<ResultText>
4755
{unit}, 占比 {toPercentNum(filteredCount, totalCount)}

components/CategoriesCell/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
import React from 'react'
88
import PropTypes from 'prop-types'
99
import R from 'ramda'
10+
import { Icon } from 'antd'
1011

1112
import { ICON_CMD } from '../../config'
1213

13-
import { AdderCell, Icon } from '../../components'
14+
import AdderCell from '../AdderCell'
1415

1516
import {
1617
Wrapper,

components/CategoriesCell/styles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled from 'styled-components'
22

3+
import Img from '../../Img'
34
import { Animate } from '../../../utils'
4-
import { Img } from '../../../components'
55

66
export const UnsetText = styled.div`
77
color: tomato;

components/CommunityCell/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import PropTypes from 'prop-types'
1010
import ReactTooltip from 'react-tooltip'
1111

1212
import { ICON_CMD } from '../../config'
13-
import { AdderCell } from '../../components'
13+
14+
import AdderCell from '../AdderCell'
1415

1516
import {
1617
Wrapper,
@@ -71,7 +72,8 @@ const renderContent = props => {
7172
const { data, array, withSetter, source, thread, onAdd, onDelete } = props
7273
if (!R.isEmpty(data)) {
7374
return <SingleCommunity community={data} />
74-
} else if (withSetter && !R.isEmpty(array)) {
75+
}
76+
if (withSetter && !R.isEmpty(array)) {
7577
return (
7678
<Wrapper>
7779
<CommunitiesSetter
@@ -85,7 +87,8 @@ const renderContent = props => {
8587
</div>
8688
</Wrapper>
8789
)
88-
} else if (!R.isEmpty(array)) {
90+
}
91+
if (!R.isEmpty(array)) {
8992
return (
9093
<Wrapper>
9194
<CommunitiesLogoArray array={array} />

components/CommunityCell/styles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled from 'styled-components'
22

3+
import Img from '../../Img'
34
import { Animate } from '../../../utils'
4-
import { Img } from '../../../components'
55

66
export const Wrapper = styled.div`
77
display: flex;

components/CommunityMatrix/styles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from 'styled-components'
2-
import { Img } from '../../../components'
32

3+
import Img from '../../Img'
44
import { smokey } from '../../../utils'
55

66
export const MatrixWrapper = styled.div`

components/ContentFilter/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import React from 'react'
88
import PropTypes from 'prop-types'
99
import { Button, Row, Col, Tag } from 'antd'
10-
import { Popover } from '../../components'
10+
import Popover from '../Popover'
1111

1212
import { ICON_CMD } from '../../config'
1313

0 commit comments

Comments
 (0)