This is a basic feature fiction reader designed for easier rendering of text.
git clone [email protected]:KayneWang/fiction-reader.git
npm install
npm run devor
npm install @kaynewang/fiction-readerNote: Remember import the style.css file in your root js/ts file.
import '@kaynewang/fiction-reader/dist/style.css'| Name | Description | Default |
|---|---|---|
| mode | scroll, pagination | scroll |
| context | render text | '' |
| line-break | text line break tag | \n |
| font-size-class | - | built-in class |
| line-height-class | - | built-in class |
| paragraph-gap-class | - | built-in class |
| Name | Description |
|---|---|
| page-change | callback function for page turning |
| total-page-change | callback function for total page changing |
<Reader
ref="readerRef"
mode="pagination"
context="test context"
/>const readerRef = ref()
readerRef.value?.renderNextPageContent() // Next page
readerRef.value?.renderPreviousPageContent() // Previous pageFor more usage, please refer to src/App.vue