1.0.4 • Published 1 year ago

vue-gototop-button v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

VUE GotopButton

安装

npm i vue-gototop-button

使用

全局加载组件

// main.js
import { createApp } from 'vue'
import { gtbutton } from 'vue-gototop-button'
import App from './App.vue'
// ...
createApp(App).use(gtbutton).mount('#app')

手动导入

<template>
    <GoTopBtn :top="20">
        <p>↑</p>
    </GoTopBtn>
</template>
<script setup>
import { GoTopBtn } from 'vue-gototop-button'
</script>

参数

属性名说明
top当屏幕滚动小于该值时显示按钮

修改 css

node_modules/vue-gototop-button/GoTopButton.css修改

默认值:

button{
    position: fixed;
    right: 50px;
    bottom: 50px;
}
1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.0

1 year ago