zoukankan      html  css  js  c++  java
  • Vue Property or method "" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based

    学习下Vue框架

    照着教程App.vue加了一个

    copyright : {{ corpright }}
    

    main.js

    new Vue({
        el: '#app',
        data:{
          corpright:"wf"
        },
        methods:{
          a:function(){
            return 'afei';
          }
        },
      render: h => h(App),
    }).$mount('#app')
    

    刷新页面不显示{{ corpright }}

    Property or method "corpright" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based

    后来查询到解决方案

    在App.vue文件后加

    <script>
    export default {
      name: 'hello',
      data () {
        return {
          corpright: 'afei export default'
        }
      },
      methods: {
             
      }
    }
    </script>
    

     显示出来了

  • 相关阅读:
    压缩与解压缩
    权限和特殊权限
    用户和组
    bash基础特性
    vim编辑器
    目录及文件操作命令
    ye
    软件包的安装与管理
    磁盘管理
    归档与展开归档
  • 原文地址:https://www.cnblogs.com/kala00k/p/13234194.html
Copyright © 2011-2022 走看看