Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created December 7, 2019 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmiller1990/031576335adc1932cdb6ab23e63b3f73 to your computer and use it in GitHub Desktop.
Save lmiller1990/031576335adc1932cdb6ab23e63b3f73 to your computer and use it in GitHub Desktop.
<template>
<div>
{{ percent }}
</div>
</template>
<script lang="ts">
import Vue from 'vue'
interface IMarkers {
progressStartMarker: HTMLElement | null
progressEndMarker: HTMLElement | null
}
interface IData extends IMarkers {
percent: number
scrollEvent: ((this: Window, ev: Event) => void) | null
}
export default Vue.extend({
name: 'Progress',
data(): IData {
return {
percent: 0,
scrollEvent: null,
progressStartMarker: null,
progressEndMarker: null,
}
}
})
</script>
<style scoped>
div {
display: flex;
align-items: center;
justify-content: center;
border: 1px solid red;
height: 50px;
width: 50px;
position: fixed;
right: 25px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment