zoukankan      html  css  js  c++  java
  • ReferenceError: courseInfo is not defined

    在页面中查询所有讲师的时候提示No data

    如图:

    浏览器控制台信息如下:

    //这个是警告

    [Vue warn]: Error in created hook: "ReferenceError: courseInfo is not defined" found in --->
    <Info> at srcviewseducourseinfo.vue <AppMain> at srcviewslayoutcomponentsAppMain.vue <Layout> at srcviewslayoutLayout.vue <App> at srcApp.vue <Root>
    //这个是错误
    //说这个courseInfo没有定义
    ReferenceError: courseInfo is not defined
        getListTeacher course.js:18
        getListTeacher info.vue:83
        created info.vue:75
        VueJS 59
        init vue-router.esm.js:2508
        init vue-router.esm.js:2507
        updateRoute vue-router.esm.js:1997
        transitionTo vue-router.esm.js:1875
        confirmTransition vue-router.esm.js:1984
        step vue-router.esm.js:1714
        step vue-router.esm.js:1721
        step vue-router.esm.js:1721
        runQueue vue-router.esm.js:1725
        confirmTransition vue-router.esm.js:1979
        step vue-router.esm.js:1714
        step vue-router.esm.js:1718
        iterator vue-router.esm.js:1964
        resolve vue-router.esm.js:1757
        once vue-router.esm.js:1833

    截图:

     原因:

    后来发现在course.js的查询所有讲师方法中多了一行, 删除data就好了

     测试:

    给其中一个讲师添加课程

     

    添加成功后讲师id有值了

     编码不细心, 中途两行泪!

  • 相关阅读:
    [NOTE]常用Linux命令总结[Thx for commandlinefu]
    [原]隧道Proxy原理详解(基于Node.js)
    [转]MySQL索引详解(1)
    [QA]服务端进程模型
    [转]MySQL索引详解(2)
    非动态规划实现LCS算法
    Java里线程安全的有界容器的实现
    maven历史版本下载
    JDK9下载
    maven排除依赖和添加本地依赖
  • 原文地址:https://www.cnblogs.com/ooo888ooo/p/13467931.html
Copyright © 2011-2022 走看看