2.0.5 • Published 3 years ago

vue-effect-page v2.0.5

Weekly downloads
45
License
-
Repository
-
Last release
3 years ago

vue-effect-page

Запись_2021_03_21_01_46_28_125

Description

VUE-EFFECT-PAGE - It's VUE JS component for your projects, which allows you to add animation of the effect of switching pages in your SPA application. There are a large number of different 3D effects that will make your application excellent. Your users will appreciate it.

View DEMO

Install

npm install vue-effect-page

Usage

1.

import VueEffectPage from 'vue-effect-page'
Vue.use(VueEffectPage)

Wrap <router-view/> in an <vue-effect-page></vue-effect-page> component and set prop defaultEffect

<template>
  <div id="app">
    <vue-effect-page :defaultEffect="defaultEffect">
      <router-view/>
    </vue-effect-page>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      defaultEffect: 33
    }
  }
}
</script>

OR set up a unique effect for each route, for this add the property effect

const router = new VueRouter({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      effect: '1'// Specific code of effect or effect ID
    },
    {
      path: '/second-page',
      name: 'second-page',
      component: SecondPage,
      effect: '5'// Specific code of effect or effect ID
    },
    {
      path: '/random-page',
      name: 'random-page',
      component: RandomPage,
      effect: '25'// Specific code of effect or effect ID
    },
  ],
});

new Vue({
  el: '#app',
  render: h => h(App),
  router
});

Properties

PropertyRequiredTypeDefaultDescription
defaultEffectfalseNumber, Stringnullspecific code of effect or effect ID

this.$effectPage

  • setEffect: (routeName: String, effectID: String | Number) => void
    Method for programmatically assigning an effect to a route by the name of the route
this.$effectPage.setEffect('second-page', 'move-to-left--from-right');
  • current The object of the current effect for the current route
this.$effectPage.current
  
// result: { id: '...', name: '...', code: '...', ... }

List of all effects

IDNameCode
1Move to left/ from rightmove-to-left--from-right
2Move to right/ from leftmove-to-right--from-left
3Move to top/ from bottommove-to-top--from-bottom
4Move to bottom/ from topmove-to-bottom--from-top
5Fade / from rightfade---from-right
6Fade / from leftfade---from-left
7Fade / from bottomfade---from-bottom
8Fade / from topfade---from-top
9Fade left / Fade rightfade-left---fade-right
10Fade right / Fade leftfade-right---fade-left
11Fade top / Fade bottomfade-top---fade-bottom
12Fade bottom / Fade topfade-bottom---fade-top
13Different easing / from rightdifferent-easing---from-right
14Different easing / from leftdifferent-easing---from-left
15Different easing / from bottomdifferent-easing---from-bottom
16Different easing / from topdifferent-easing---from-top
17Scale down / from rightscale-down---from-right
18Scale down / from leftscale-down---from-left
19Scale down / from bottomscale-down---from-bottom
20Scale down / from topscale-down---from-top
21Scale down / scale downscale-down---scale-down
22Scale up / scale upscale-up---scale-up
23Move to left / scale upmove-to-left---scale-up
24Move to right / scale upmove-to-right---scale-up
25Move to top / scale upmove-to-top---scale-up
26Move to bottom / scale upmove-to-bottom---scale-up
27Scale down / scale upscale-down---scale-up
28Glue left / from rightglue-left---from-right
29Glue right / from leftglue-right---from-left
30Glue bottom / from topglue-bottom---from-top
31Glue top / from bottomglue-top---from-bottom
32Flip rightflip-right
33Flip leftflip-left
34Flip topflip-top
35Flip bottomflip-bottom
36Fallfall
37Newspapernewspaper
38Push left / from rightpush-left---from-right
39Push right / from leftpush-right---from-left
40Push top / from bottompush-top---from-bottom
41Push bottom / from toppush-bottom---from-top
42Push left / pull rightpush-left---pull-right
43Push right / pull leftpush-right---pull-left
44Push top / pull bottompush-top---pull-bottom
45Push bottom / pull toppush-bottom---pull-top
46Fold left / from rightfold-left---from-right
47Fold right / from leftfold-right---from-left
48Fold top / from bottomfold-top---from-bottom
49Fold bottom / from topfold-bottom---from-top
50Move to right / unfold leftmove-to-right---unfold-left
51Move to left / unfold rightmove-to-left---unfold-right
52Move to bottom / unfold topmove-to-bottom---unfold-top
53Move to top / unfold bottommove-to-top---unfold-bottom
54Room to leftroom-to-left
55Room to rightroom-to-right
56Room to toproom-to-top
57Room to bottomroom-to-bottom
58Cube to leftcube-to-left
59Cube to rightcube-to-right
60Cube to topcube-to-top
61Cube to bottomcube-to-bottom
62Carousel to leftcarousel-to-left
63Carousel to rightcarousel-to-right
64Carousel to topcarousel-to-top
65Carousel to bottomcarousel-to-bottom
66Sidessides
67Slideslide
2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago