1.0.1 • Published 3 years ago

@kaynewang/fiction-reader v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Fiction Reader (vue3)

This is a basic feature fiction reader designed for easier rendering of text.

Usage

git clone git@github.com:KayneWang/fiction-reader.git

npm install

npm run dev

or

npm install @kaynewang/fiction-reader

Note: Remember import the style.css file in your root js/ts file.

import '@kaynewang/fiction-reader/dist/style.css'

Properties

NameDescriptionDefault
modescroll, paginationscroll
contextrender text''
line-breaktext line break tag\n
font-size-class-built-in class
line-height-class-built-in class
paragraph-gap-class-built-in class

Events

NameDescription
page-changecallback function for page turning
total-page-changecallback function for total page changing

Pagination

<Reader
  ref="readerRef"
  mode="pagination"
  context="test context"
/>
const readerRef = ref()

readerRef.value?.renderNextPageContent() // Next page

readerRef.value?.renderPreviousPageContent() // Previous page

For more usage, please refer to src/App.vue

1.0.1

3 years ago

1.0.0

3 years ago