🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

vue-scrolling-ul

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-scrolling-ul

这是一个Vue组件,提供一个自动滚动的ul列表。This is a Vue component that provides a list of ul that scrolls automatically.

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
1
Created
Source

vue-scrolling-ul

vue-scrolling-ul vuejs nodejs blog

这是一个 Vue2 组件,提供一个自动滚动的 ul 列表。

This is a Vue2 component that provides a list of ul that scrolls automatically.

中文文档

Run Simple Demo

demo

$ git clone https://github.com/SuperYesifang/vue-scrolling-ul.git
$ cd vue-scrolling-ul
$ npm install
$ npm run dev

Usage

1. Global Use in Vue-Cli Project

  • main.js
import Vue from "vue";
import VueScrollingUl from "vue-scrolling-ul";

Vue.use(VueScrollingUl);

new Vue({
  el: "#app",
  render: h => h(App)
});
  • App.vue
<template>
  <div id="app">
    <vue-scrolling-ul>Some LI Tags ...</vue-scrolling-ul>
  </div>
</template>
omit...

2. Direct Use in Vue-Cli Project

  • App.vue
<template>
  <div id="app">
    <scrolling-ul>Some LI Tags ...</scrolling-ul>
  </div>
</template>

<script>
  import ScrollingUl from "vue-scorlling-ul";

  export default {
    name: "App",
    components: {
      ScrollingUl
    }
    omit...
  };
</script>

Options

Some Vue prop options to config vue-scrolling-ul.

propdescriptiontypedefault
startTurn on auto scrolling.Booleantrue
smmothTurn on smooth scrolling.Booleantrue
infinityTurn on infinite scrolling.Booleantrue
barConfigure virtual scroll bar.barOptions{show:'auto'}
speedScrolling speed. (unit: pixel/s, remark: Must be a positive number)Number30
delayScrolling gap time. (unit: ms, remark: Only when smooth prop equals false,Must be a positive number)Number3000
niceTurn on customizes the CSS style and cancels the default style.Booleanfalse

barOptions

Type: Object

propertydescriptiontypedefault
showTurn on virtual scroll bar.Boolean | "auto""auto"
styleCustom CSS style of virtual scroll bar.Objectomit...

More Custom Style

If you want to customize more styles using CSS.You can use the following className. (Only when nice prop equals true)

classNamedescription
scrolling-nice-barthe visual bar when normal.
scrolling-nice-bar.barShowthen visual bar when show.
scrolling-nice-ulthe scrolling ul list when normal.
scrolling-nice-ul.barthen scrolling ul list when visual bar is enabled.

Keywords

vue

FAQs

Package last updated on 16 Jun 2022

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