Form Page Data (data)
Designers can define data used in the page in scripts according to Vue's Data Specification. For example: using data in fields such as dropdown selection, checkbox group, radio button group, etc.
Example Script
js
{
data: function () {
return {
favoriteTypes:[
{
id:'music',
label:'Music'
},
{
id:'sports',
label:'Sports'
},
{
id:'swim',
label:'Swimming'
}
]
}
},
created: function () {
console.log('script.created');
},
mounted: function () {
console.log('script.mounted');
var that = this;
setTimeout(function () {
that.setup();
}, 0);
},
beforeDestroy: function () {
},
methods: {
setup: function () {
var that = this;
console.log('script.setup');
}
}
}
