How to integrate defaultConfig to Vue?
by RomainMazB
HTML
<div id="app">
{{ this.thumbnails_size }}
</div>
JavaScript
function defaultConfig () {
return {
thumbnails_size: {
width: 100,
height: 100
},
file_infos_empty_object: {
name: null,
last_modified_date: null,
type: null,
file_size: null,
image_size: {
width: null,
height: null
}
}
}
}
new Vue({
el: '#app',
data: {
thumbnails_size: new defaultConfig()
}
});