vue-lottie
vue-lottie copied to clipboard
Error: <svg> attribute viewBox: Expected number, "0 0..
Setting up as per the example and getting:
Error:
Any ideas?
Same problem .. i did exactly the same as the example and always have this error...
should be
animationData: animationData.default
should be
animationData: animationData.default
Thanks a lot ! It works for me now :)
damn me to! frigg! thanks github!
It works for me too. Thanks! I want to know the reason is 'lottie-web' version upgrade?
@patrick-sung you saved me from something that's been blocking me the entire day. THANK YOU! 😭
OMG. WHY THIS ISN'T IN THE DOCUMENTATION.
I literally wasted half of the day..
Yeah, had the same problem, please update the doc, I would never have figured out by myself if @patrick-sung didn't reveal the trick
How can I find this in the Lottie doc?
Ow please update the documentation( https://github.com/chenqingspring/vue-lottie/blob/master/README.md#L65 ) for animationData.default
please!
Thanks @patrick-sung, was stuck on this for over an hour!
Thx so much
should be
animationData: animationData.default
Very thx! Save my day!
should be
animationData: animationData.default
thanks a lottie!!!
should be
animationData: animationData.default
thanks for your help,
should be
animationData: animationData.default
so cool
After
should be
animationData: animationData.default
Finally, thanks ya,,, anyone tell me why it's not working as the documentation...
After
should be
animationData: animationData.default
Finally, thanks ya,,, anyone tell me why it's not working as the documentation...
Good question. But seems like it will not be fixed.
Could also change how it's imported:
- import * as animationData from './planets-spinning.json'
+ import animationData from './planets-spinning.json'
This way you don't have to get animationData.default
as it automatically imports the default.
2 years later and the documentation still needs updating :(
There are even PRs for it: https://github.com/chenqingspring/vue-lottie/pull/40 https://github.com/chenqingspring/vue-lottie/pull/42 https://github.com/chenqingspring/vue-lottie/pull/51
@chenqingspring please update? :)
Could also change how it's imported:
- import * as animationData from './planets-spinning.json' + import animationData from './planets-spinning.json'
This way you don't have to get
animationData.default
as it automatically imports the default.
Sensacional!!! Uffaaaa.. ja tava desistindo.. Valeu demais!
@patrick-sung god
Update the docs!!!
should be
animationData: animationData.default
nice
what about Typescript? it's not happy with that saying
Property 'default' does not exist on type '{ v: string; fr: number; ip: number; op: number; w: number; h: number; nm: string; ddd: number; assets: ({ id: string;
Yeah, for TypeScript it's better to do
import { default as animationData } from '../animation-with-blackjack-and-hooks.json'
and then
const defaultOptions:Options = { loop: true, autoplay: true, animationData: animationData, rendererSettings: { preserveAspectRatio: 'xMidYMid slice' } };
should be
animationData: animationData.default
where add this?
should be
animationData: animationData.default
where should i add this