Answers for "vuejs reset component"

0

re init data vue js

export default {
    data () {
        return {
            h2: 0,
            // other attributes...
        };
    },
    methods: {
        resetFields () {
            Object.assign(this.$data, this.$options.data.call(this));
        }
    }
}
Posted by: Guest on May-31-2020
0

vuejs reset component

Object.assign(this.$data, this.$options.data())
Posted by: Guest on February-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language