Vue automatically refreshes the page, endless loop

the following code this.reload () call will automatically refresh the page and write in created will cause a dead loop. How to write into the page will automatically call the reload () method without entering the endless loop

export default {
    created(){
         this.reload()//
    },
    methods: {

    }
}
Apr.11,2022

first understand the life cycle.
when the created hook executes, you call refresh, and the current page comes back in again, and then execute created , of course.
if you want to achieve the current page refresh function, you can refer to

Previous: Is there a js library that can export excel files? Picture is required in excel.

Next: Update mechanism for applications such as nails

Menu