0.2.5 • Published 3 years ago

jctk-page-preview-scrollbar v0.2.5

Weekly downloads
21
License
-
Repository
github
Last release
3 years ago

Page Preview Scrollbar

A scrollbar with current page preview for Vue2.

Demo

Demo Video

img

Installation

npm install -D jctk-page-preview-scrollbar
npm install @vue/composition-api

Usage

// main.js
import 'jctk-page-preview-scrollbar'
import 'jctk-page-preview-scrollbar/dist/jctk-page-preview-scrollbar.css'
import VueCompositionAPI from '@vue/composition-api'

Vue.use(VueCompositionAPI)

In your component.

<template>
    <PagePreviewScrollbar />
</template>

Why Composition API

Since some mechanism of vue & composition API.

The library deveoped with composition API seems can not run individually without it.

The detail is descriped here.

Configurations

PropertyTypeDefaultDescription
isHideShorterHeightBooleantrueAutomatically hide the scrollbar when screen is short.
isShowCloseButtonBooleantrueDisplay the buton which can close scrollbar.
isAutoOpacityBooleantrueMake the scrollbar transparent.
persistBooleantrueForce the scrollbar always appeared/disappeared.
repaintAnimationBooleantrueAdd transition animation when repaint.
isResizeAutoRepaintBooleanfalseAuto repain when sceen height or width resizes.
disableRepaintBooleanfalseSet true to avoid performance decreased by repainting.
zIndexNumber100css z-index.
targetSelectorString"html"The element used to preview.
elementToRmoveSelectorsArray[]The elements should not appear in scrollbar.
throttleNumber25
debounceRepaintNumber1000

Events

EventDescription
@repaintedTriggered when scrollbar repainted the preview.
@activeTriggered when scrollbar is active.
@inactiveTriggered when scrollbar is inactive.

Methods

MethodDescription
ResetForce the scrollbar repaint the preview.
ResetScrollerForce the scrollbar reset the screen position.
0.2.1

3 years ago

0.2.0

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago