Vuejs Redefinir componente
Object.assign(this.$data, this.$options.data())
Filthy Fish
Object.assign(this.$data, this.$options.data())
export default {
data () {
return {
h2: 0,
// other attributes...
};
},
methods: {
resetFields () {
Object.assign(this.$data, this.$options.data.call(this));
}
}
}