When it comes to adding styles to an HTML element from methods, I ran into a small hiccup. Here's what I tried:
<div class="add-profile-img" v-bind:style="getBackgroundImg()">
The method in question is:
getBackgroundImg: function() {
return {
width: 180px;
height: 180px;
background-color: 'yellow';
background-image:url(this.BASE_URL +'/uploads/noimg.gif');
}
},
Unfortunately, instead of success, I encountered this error message:
Syntax Error: Identifier directly after number (79:13)
77 | getBackgroundImg: function() {
78 | return {
> 79 | width: 180px;
| ^
Any pointers on how I can fix this issue?