Skip to content

Commit

Permalink
fix(back-top): modify some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Mar 16, 2021
1 parent c673100 commit fbde4f2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/varlet-ui/src/back-top/BackTop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { defineComponent, ref, Ref, onMounted, onBeforeUnmount } from 'vue'
import Button from '../button'
import Icon from '../icon'
import { props } from './props'
import { isString, easeInOutCubic, throttle } from '../utils/shared'
import { isString, easeInOutCubic, throttle, toNumber } from '../utils/shared'
import { getScrollTop, requestAnimationFrame } from '../utils/elements'
export default defineComponent({
Expand Down Expand Up @@ -44,7 +44,7 @@ export default defineComponent({
}
const scroll = () => {
show.value = getScrollTop(element.value as Element) >= +props.visibilityHeight
show.value = getScrollTop(element.value as Element) >= toNumber(props.visibilityHeight)
}
const throttleScroll = throttle(scroll, 200)
Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/back-top/docs/en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default {

| Event | Description | arguments |
| ----- | -------------- | -------- |
| `click` | Triggers when click | - |
| `click` | Triggers when click | `event: Event` |

### 插槽

Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/back-top/docs/zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default {

| 事件名 | 说明 | 回调参数 |
| ----- | -------------- | -------- |
| `click` | 点击按钮触发的事件 | - |
| `click` | 点击按钮触发的事件 | `event: Event` |

### 插槽

Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/back-top/example/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineComponent({

<style scoped>
.var-back-top__example {
height: calc(100vh - 60px);
height: calc(100vh - 40px);
overflow: auto;
}
</style>

0 comments on commit fbde4f2

Please sign in to comment.