Last active
February 21, 2019 14:35
-
-
Save MSergiu7/dcce168d74528194329b9fd419303e4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'nativescript-vue'; | |
import App from './components/App'; | |
import VueDevtools from 'nativescript-vue-devtools'; | |
if(TNS_ENV !== 'production') { | |
Vue.use(VueDevtools); | |
} | |
// Prints Vue logs when --env.production is *NOT* set while building | |
Vue.config.silent = (TNS_ENV === 'production'); | |
Vue.registerElement('LottieView', () => require('nativescript-lottie').LottieView); | |
new Vue({ | |
render: h => h('frame', [h(App)]), | |
store | |
}).$start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<Page> | |
<ActionBar title="Animation"/> | |
<StackLayout> | |
<LottieView height="130" src="pinjump.json" :loop="true" :autoPlay="true" @loaded="lottieViewLoaded"></LottieView> | |
</StackLayout> | |
</Page> | |
</template> | |
<script> | |
export default { | |
data() { | |
return { | |
_lottieView: null, | |
} | |
}, | |
methods: { | |
lottieViewLoaded(args) { | |
console.log('asdsad'); | |
this._lottieView = args.object; | |
}, | |
}, | |
created() { | |
console.log('animation page'); | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment