0👍
Found it! No need for CSS
var vue = new Vue ({
el: "#body",
data: {
background: "--BACKGROUND LINK--",
},
watch: {
background: {
immediate: true,
handler(new_background, old_background) {
document.getElementById("body").style.background = "linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(" + new_background + ") no-repeat center center fixed";
},
},
},
});
- [Vuejs]-How do I get my images to load in Vue app using webpack and vue-loader?
- [Vuejs]-Vuestic-ui VaCheckbox Component is missing template or render function
Source:stackexchange.com