查看渲染错误(Vue)

时间:2019-07-28 22:27:23

标签: vuejs2 vue-component vue-router vuetify.js

转到路线时,视图呈现为“错误”:

我正在使用Vuetify,第一次正确完成路由访问渲染。

enter image description here

当我单击“编辑(EDITAR)”时,我转到另一条路线,可以在其中更改项目记录;当单击“保存”时,我使用以下代码返回上一条路线:

axios.patch(`${url}produtos/${this.$route.params.id}`, formData, {
    headers: {
      'Content-Type': 'multipart/form-data',
      accept: 'application/json',
    },
  }).then((result) => {
    console.log(result);
    Toast.open({
      message: 'As Alterações Foram Salvas!',
      type: 'is-success',
      position: 'is-top',
      indefinite: true,
    });
    this.$router.push({ path: `/produtos/${this.$route.params.id}` });
  });

但是,它不会呈现我所期望的效果,因为它会缩小Vuetify Carousel中的iframe并仍返回到上一页,其位置与该项目的编辑页面相同(位于页面底部)。

enter image description here

有人知道为什么会这样以及如何解决吗?

预先感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

我找到了问题的原因,我在使用Buefy Toast组件,并且以某种方式阻碍了iframe的加载,它只是删除了buefy使其正常工作,现在我将找到Buefy's Toast的替代方案。