Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
hq001 committed Dec 21, 2020
1 parent 528d2ad commit 253e5b2
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions src/pages/header/component/push-shift.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,35 +79,36 @@ export const PushShift = defineComponent({
})
}

const { historyRoute } = store.state
const forward = () => handleRouteCommand(COMMAND.FORWARD)
const back = () => handleRouteCommand(COMMAND.BACK)

return () => (
<div class="push-shift">
<ve-button
disabled={!historyRoute.before.length}
class={classnames({
'push-shift-disabled': !historyRoute.before.length
})}
onClick={back}
type="text"
circle
>
<icon icon="toLeft" size={16}></icon>
</ve-button>
<ve-button
disabled={!historyRoute.after.length}
class={classnames({
'push-shift-disabled': !historyRoute.after.length
})}
onClick={forward}
type="text"
circle
>
<icon icon="toRight" size={16} color={'#fff'}></icon>
</ve-button>
</div>
)
return () => {
const { historyRoute } = store.state
const forward = () => handleRouteCommand(COMMAND.FORWARD)
const back = () => handleRouteCommand(COMMAND.BACK)
return (
<div class="push-shift">
<ve-button
disabled={!historyRoute.before.length}
class={classnames({
'push-shift-disabled': !historyRoute.before.length
})}
onClick={back}
type="text"
circle
>
<icon icon="toLeft" size={16}></icon>
</ve-button>
<ve-button
disabled={!historyRoute.after.length}
class={classnames({
'push-shift-disabled': !historyRoute.after.length
})}
onClick={forward}
type="text"
circle
>
<icon icon="toRight" size={16} color={'#fff'}></icon>
</ve-button>
</div>
)
}
}
})

0 comments on commit 253e5b2

Please sign in to comment.