Skip to content

Commit

Permalink
make lottie animation work
Browse files Browse the repository at this point in the history
  • Loading branch information
CHEN Qing committed May 3, 2017
1 parent c51e15c commit 6ee7563
Show file tree
Hide file tree
Showing 7 changed files with 8,842 additions and 24 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "my-component",
"description": "A Vue.js project",
"name": "vue-lottie",
"description": "Lottie Animation View for Vue",
"version": "0.0.1",
"author": "CHEN Qing",
"private": true,
Expand All @@ -10,7 +10,8 @@
"gh-pages": "git checkout gh-pages && git merge master --no-edit && npm run build && git add . && git commit -m 'chore: build demo' --allow-empty && git push && git checkout master"
},
"dependencies": {
"vue": "^2.2.1"
"vue": "^2.2.1",
"bodymovin": "^4.5.6"
},
"devDependencies": {
"babel-core": "^6.0.0",
Expand All @@ -24,6 +25,6 @@
"webpack": "^2.2.0",
"webpack-dev-server": "^2.2.0"
},
"main": "src/my-component.vue"
"main": "src/lottie.vue"

}
12 changes: 9 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<template>
<div id="app">
<img src="./assets/logo.png">
<my-component/>
<lottie :options="defaultOptions" height="400" width="400"/>
</div>

</template>

<script>
import MyComponent from './my-component.vue'
import Lottie from './lottie.vue';
import * as animationData from './assets/pinjump.json';
export default {
name: 'app',
components: {
'my-component': MyComponent
'lottie': Lottie
},
data() {
return {
defaultOptions: {animationData: animationData}
}
}
}
</script>
Expand Down
Loading

0 comments on commit 6ee7563

Please sign in to comment.