vuepress-plugin-last-reading
A vuepress plugin to record the last reading
Installation
yarn add vuepress-plugin-last-reading# ornpm i vuepress-plugin-last-reading
Usage
moduleexports =plugins:'last-reading'
Options
popupConfig
- Type:
Object
- Required:
false
The default content displayed in the popup component.
moduleexports =plugins:'last-reading'popupConfig:message: 'Go back'buttonText: 'ok'
Or refer to i18n
popupCountdown
- Type:
Number
- Default:
10000
- Required:
false
Configure the time that the popup will display.
popupComponent
- Type:
string
- Required:
false
A custom component to replace the default popup component, refer to Customize the UI of Popup.
popupCustom
- Type:
Object
- Required:
false
Custom popup related logic.
moduleexports =plugins:'last-reading'{const now =if now - thislastReadingtimestamp > 30 * 24 * 60 *60 * 1000thiselse if this$routepath === thislastReadingpaththiselsethisshow = true}