Static GitHub Issues

[3028] How to refresh the nuxt page? If the page is refreshed with location.reload (), the page looks like the beauty center rendering asyncData does not appear to be executed

prev: use async code in beforeRouteEnter hook,it throw some error
next: Error appears in browser console when set `generate.minify.maxLineLength` and generate

image

例如执行删除文章,我想让页面刷新一下,但是页面出现空白,必须手动刷新才会出数据

    asyncData ({ params, error }) {
      return axios.get('http://localhost:3333/api/newslist')
      .then((res) => {
        return { datas: res.data }
      }).catch (err => {
          console.log('报错了啊')
      })
    },
    methods: {
      deletFn(id) {
        axios.get('http://localhost:3333/api/newsdelet/' + id)
        .then((res) => {
          alert('文章删除成功!')
          location.reload()
        }).catch (err => {
            console.log('报错了啊', err)
        })
}
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2624">#c2624</a>)</em></sub></div>