Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Using TypeScript VueJS , vue-property-decorator
  2.  
  3. In a <template>
  4.     <p>{{ transitionName }} </p>
  5.     <transition :name="transitionName" mode="out-in">
  6.         <router-view></router-view>
  7.     </transition>
  8.  
  9. In export default class App extends Vue
  10.         const   ComputedValue       = toDepth < fromDepth ? 'slide-up-fade' : ((toDepth==fromDepth) ? 'slide-left-fade' : 'slide-down-fade');
  11.         this.syncedTransitionName   = ComputedValue;
  12.         console.log(`${from} -> ${to} (${this.syncedTransitionName}) (${ComputedValue})`);
  13.  
  14. The output is {Object} {Object} (slide-up-fade) (slide-left-fade)
  15.  
  16. Problem Statement:
  17. this.syncedTransitionName gets the default value per @PropSync but attempts to change the value do not work and i'm not sure what i'm missing.
  18.  
  19.     @PropSync('transitionName', { default: 'slide-up-fade', type: String })syncedTransitionName!: string;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement