vue 3.0 报错 Property or method “form“ is not defined on the instance but referenced during render

如何处理 vue 3.0 当中 遇到的Property or method “form“ is not defined on the instance but referenced during render

1. 有可能是form 或者pageData 没有被定义在 return 里

form: {

        MarketingDepartmentId:"",

        PostType:0,

        PostName: "",

        ProjectName: "",

      },

 pageData:[],

pageDataInit

vue 3.0 报错 Property or method “form“ is not defined on the instance but referenced during render_第1张图片 

里面初始化

this.pageData = res.data.rows; 

此时界面显示正常了

vue 3.0 报错 Property or method “form“ is not defined on the instance but referenced during render_第2张图片

大致如上操作就不会报错

 

你可能感兴趣的:(vue.js,javascript,前端)