New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vue-gototop-button

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-gototop-button

A button that, when you click it, brings your screen to the top

latest
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

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;
}

Keywords

vue

FAQs

Package last updated on 03 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts