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

Commit d485ed7

Browse files
committed
refactor(media-query): improve pagi in mobile
1 parent 34cfe2a commit d485ed7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

components/Pagi/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Pagination } from 'antd'
99
import PropTypes from 'prop-types'
1010

1111
import { makeDebugger } from 'utils'
12-
import { PagiWrapper, BottomMsg } from './styles'
12+
import { PagiWrapper, CustomText, BottomMsg } from './styles'
1313

1414
/* eslint-disable-next-line */
1515
const debug = makeDebugger('c:Pagi:index')
@@ -19,9 +19,9 @@ const hasExtraPage = (totalCount, pageSize) => totalCount > pageSize
1919
export const PagiCustomRender = (current, type, originalElement) => {
2020
/* eslint-disable */
2121
if (type === 'prev') {
22-
return <a>上一页</a>
22+
return <CustomText>上一页</CustomText>
2323
} else if (type === 'next') {
24-
return <a>下一页</a>
24+
return <CustomText>下一页</CustomText>
2525
}
2626
/* eslint-enable */
2727
return originalElement

components/Pagi/styles/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from 'styled-components'
2-
import { theme } from 'utils'
2+
import { theme, cs } from 'utils'
33

44
export const PagiWrapper = styled.div`
55
text-align: center;
@@ -8,6 +8,10 @@ export const PagiWrapper = styled.div`
88
margin-left: ${({ left }) => left};
99
`
1010

11+
export const CustomText = styled.a`
12+
${cs.media.tablet`display: none`};
13+
`
14+
1115
export const BottomMsg = styled.div`
1216
font-size: 1.1rem;
1317
color: ${theme('thread.articleDigest')};

0 commit comments

Comments
 (0)