1.2.2 • Published 2 years ago

vue-scrolling-ul v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.
1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago