Skip to content

Commit

Permalink
文章页打赏样式修改
Browse files Browse the repository at this point in the history
  • Loading branch information
by05021 committed Mar 16, 2020
1 parent d65a277 commit b43fd8e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class App extends PureComponent {

getMuisic(){
axios.get('/music/music/v1/list').then((res) => {
if(res.models.length){
if(res.models.length > 0){
const options = {
container: document.getElementById('player'),
fixed: true,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/article/tocify.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class Tocify {
}

render() {
if (this.tocItems.length) {
if (this.tocItems.length > 0) {
return (
<Anchor className='toc' affix showInkInFixed onClick={handleClick} offsetTop={100}>
<h3>文章目录</h3>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/links/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const LinksList = (props) => {
} else {
return (
<div className='links cell'>
{list.length ? <div className='extra'>
{list.length > 0 ? <div className='extra'>
{list.map((item, index) => {
return (
<div className='item' key={index}>
Expand Down Expand Up @@ -70,13 +70,13 @@ class Links extends PureComponent {
<div className='flex-items'>
<LinksList list={list} loading={loading}/>
<div className='toc-box'>
{list.length?<Anchor className='toc' affix showInkInFixed onClick={this.handleClick} offsetTop={100}>
{list.length > 0 && <Anchor className='toc' affix showInkInFixed onClick={this.handleClick} offsetTop={100}>
{list.map((item)=>{
return(
<Link key={item.title} href={`#${item.title}`} title={item.title}/>
)
})}
</Anchor>:null}
</Anchor>}
</div>
</div>
</MainWrapper>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tags/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const TagsList = (props) => {
} else {
return (
<div className='tags-list'>
{list.length?list.map((item, index) => {
{list.length > 0 ?list.map((item, index) => {
return (
<Tag color={color[getrand(0, color.length - 1)]} key={index}>
<Link to={'/tags/' + item.id}>{item.name}({item.postsTotal})</Link>
Expand Down

0 comments on commit b43fd8e

Please sign in to comment.