Skip to content

Commit

Permalink
Merge pull request #11 from SchnapsterDog/develop
Browse files Browse the repository at this point in the history
feat: added new prop 'overflowActive' for handling the global overflow
  • Loading branch information
SchnapsterDog authored Jul 14, 2023
2 parents f4e9cab + cc085c3 commit 3ee0573
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ The transition-type prop in the Vue preloader component specifies the type of fa
|**background-color**|`String`|`#091a28`|The prop background-color allows you to customize the background color of the preloader component. You can pass in a string value that represents a valid HEX color, such as #000000.
|**color**|`String`|`#ffffff`|This prop allows you to customize the color of loading bar.
|**loading-speed**|`Number`|`15`|The loading-speed prop is used to adjust the speed of the loading bar. You can pass in a number value that represents the animation speed in milliseconds. A lower value will result in a faster animation, while a higher value will slow it down. This prop can take an integer value.
|**overflow-active**|`Boolean`|`true`| Set overflow of the page
|**transition-speed**|`Number`|`1400`|The transition-speed prop is used to adjust the speed of the transition between the preloader and the main content of your application. You can pass in a number value that represents the transition speed in milliseconds. A lower value will result in a faster transition, while a higher value will slow it down.
|**transition-type**|`String`|`fade-left`|The transition-type prop accepts four possible values: fade-left, fade-right, fade-up, and fade-down. Each value specifies the direction in which the preloader will fade out of view. When the transition-type prop is not specified, the preloader will fade out of view towards the left.
|**transition-is-over**|`Event`|`/`|The event transition-is-over is fired when the transition is over and the component is no longer available in the DOM. It can be useful to create logic when the vue-loader should be re-rendered.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-preloader",
"description": "Vue-Preloader is a versatile and easy-to-use Vue.js component that allows you to add loading animations to your Vue.js or Nuxt.js projects. It is compatible with both Vue 2 and Vue 3.",
"version": "1.1.0",
"version": "1.1.1",
"private": false,
"homepage": "https://vue-preloader.com/",
"author": {
Expand Down
4 changes: 2 additions & 2 deletions src/components/VuePreloader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ watchEffect(() => {
});
onBeforeMount(() => {
setOverflowHidden()
if (props.overflowActve) setOverflowHidden()
});
onMounted(() => {
Expand All @@ -61,7 +61,7 @@ function setOverflowHidden() {
function transitionIsOver() {
setTimeout(() => {
emit('transition-is-over')
setOverflowAuto()
if (props.overflowActve) setOverflowAuto()
}, props.transitionSpeed)
}
</script>
Expand Down
4 changes: 4 additions & 0 deletions src/props/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const definedProps = {
type: Number as PropType<number>,
default: 15
},
overflowActve: {
type: Boolean,
default: true
},
transitionSpeed: {
type: Number as PropType<number>,
default: 1400
Expand Down

0 comments on commit 3ee0573

Please sign in to comment.