warning in ./src/router/index.js

WARNING Compiled with 46 warnings 18:23:38

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

1852:4-15 "export 'onUnmounted' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

1853:4-17 "export 'onDeactivated' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

1854:4-15 "export 'onActivated' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

1867:52-70 "export 'getCurrentInstance' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

1871:25-31 "export 'inject' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

1889:52-70 "export 'getCurrentInstance' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

1893:25-31 "export 'inject' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2059:19-25 "export 'inject' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2060:25-31 "export 'inject' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2061:18-26 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2061:48-53 "export 'unref' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2062:30-38 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2086:21-29 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2088:26-34 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2093:26-31 "export 'unref' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2093:69-74 "export 'unref' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2101:25-43 "export 'getCurrentInstance' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2112:12-23 "export 'watchEffect' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2121:14-22 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2127:37-52 "export 'defineComponent' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2146:21-29 "export 'reactive' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2147:28-34 "export 'inject' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2148:24-32 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2161:18-19 "export 'h' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2239:37-52 "export 'defineComponent' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2255:30-36 "export 'inject' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2256:31-39 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2257:22-28 "export 'inject' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2258:32-40 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2259:8-15 "export 'provide' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2260:8-15 "export 'provide' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2261:8-15 "export 'provide' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2262:24-27 "export 'ref' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2265:8-13 "export 'watch' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2320:30-31 "export 'h' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2365:21-39 "export 'getCurrentInstance' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2466:8-13 "export 'watch' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

2822:25-35 "export 'shallowRef' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

3341:15-23 "export 'nextTick' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

3374:27-32 "export 'unref' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

3394:37-45 "export 'computed' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

3397:42-50 "export 'reactive' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

3454:11-17 "export 'inject' was not found in 'vue'

warning in ./node_modules/_vue-router@4.0.15@vue-router/dist/vue-router.esm-bundler.js

3461:11-17 "export 'inject' was not found in 'vue'

warning in ./src/router/index.js

4:8-14 "export 'default' (imported as 'Router') was not found in 'vue-router'

warning in ./src/router/index.js

5:19-25 "export 'default' (imported as 'Router') was not found in 'vue-router'

vue-router版本太高

cnpm install vue-router@3.5.3 -D

(Emitted value instead of an instance of Error) Error compiling template:

//子组件下只能有一个标签
<template>
<p>这是嵌套路由</p>
{{testdata}}
<!-- <p>{{jsoninfo.name}}</p>-->
</template>

改为

<template>
<div>
<p>这是嵌套路由</p>
{{testdata}} </div> <!-- <p>{{jsoninfo.name}}</p>-->
</template>

Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'jsoninfo') at eval (children-router.vue?c64a:42:1)

在JS中,箭头函数并不是简单的function(){}匿名函数的简写语法,实际上,箭头函数和匿名函数有个明显区别,箭头函数内部的this是词法作用域,

在编写函数时已经确定了,而匿名函数的this指向运行时实际调用该方法的对象,无法在编写函数时确定

getData:function () {
let s={};
this.axios({
method:'get',
url:'http://localhost:8080/static/mock/testjson.json', }).then( function (response){
console.log(this.jsoninfo=response.data)
// response.data;
})
console.log(s)
return s;
}

改为

getData:function () {
let s={};
this.axios({
method:'get',
url:'http://localhost:8080/static/mock/testjson.json', }).then( (response)=>{
console.log(this.jsoninfo=response.data)
// response.data;
})
console.log(s)
return s;
}

warning in ./src/router/index.js (Emitted value instead of an instance of Error) Error compiling template: Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'jsoninfo'的更多相关文章

  1. vue - src for components || router(index.js)

    描述:重新编写一个组件 1.1 编写一个PrintName.vue <!--这里是模板 --> <template> <div class="hello&quo ...

  2. index.js

    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...

  3. emitted value instead of an instance of error the scope attribute for scoped slots webpack babel polyfill

    api20180803.vue emitted value instead of an instance of error the scope attribute for scoped slots h ...

  4. 【vue】index.html main.js app.vue index.js怎么结合的? 怎么打包的?搜集的信息

    转载:https://blog.csdn.net/yudiandemingzi/article/details/80247137 怎么结合的: 一.启动项目 第一步:cmd进入项目文件里,运行npm ...

  5. vue中config/index.js:配置的详细理解

    当我们需要和后台分离部署的时候,必须配置config/index.js: 用vue-cli 自动构建的目录里面  (环境变量及其基本变量的配置) var path = require('path') ...

  6. 对vue中 默认的 config/index.js:配置的详细理解 -【以及webpack配置的理解】-config配置的目的都是为了服务webpack的配置,给不同的编译条件提供配置

    当我们需要和后台分离部署的时候,必须配置config/index.js: 用vue-cli 自动构建的目录里面  (环境变量及其基本变量的配置) var path = require('path') ...

  7. vue-cli下面的config/index.js注解 webpack.base.conf.js注解

    config/indexjs详解上代码: 'use strict' // Template version: 1.3.1 // see http://vuejs-templates.github.io ...

  8. Warning: File `src/core/nginx.h&#39; has modification time 1.2e+07 s in the future

    Nginx安装时Warning: File `src/core/nginx.h' has modification time 1.2e+07 s in the future问题的解决方法 问题场景: ...

  9. [Poi] Use Poi to Build an Index.js with Modern JavaScript Features

    Poi can easily launch an index.js file simply by running the poi command. This will launch a dev-ser ...

  10. Vue、webpack中默认的config.js、index.js 配置详情

    在vue.js 框架搭建好后,其vue-cli 自动构建的目录里面相关环境变量及其基本变量配置,如下代码所示: module.exports = { build: { index: path.reso ...

随机推荐

  1. P1751 贪吃虫 题解

    题意: 题目传送门 在一棵 n 个结点的树上,有 k 个贪吃虫去吃食物. 每个贪吃虫都走到达食物的唯一路径. 当一条贪吃虫通向食物的道路上有另一条贪吃虫,则较远的那只停止移动. 多条贪吃虫要进入同一节 ...

  2. 沉思篇-剖析Jetpack的ViewModel

    ViewModel做为架构组件的三元老之一,是实现MVVM的有力武器. ViewModel的设计目标 ViewModel的基本功能就是管理UI的数据.其实,从职责上来说,这又是对Activity和Fr ...

  3. 基于生成式预训练Transformer的跨语言文本摘要与情感分析

    目录 1. 引言 2. 技术原理及概念 2.1 基本概念解释 2.2 技术原理介绍 2.3 相关技术比较 3. 实现步骤与流程 3.1 准备工作:环境配置与依赖安装 3.2 核心模块实现 3.3 集成 ...

  4. pta第三阶段题目集

    (1)前言 pta第三阶段作业中,主要包含了如下的主要内容: 1.全程贯穿了课程设计的程序,每一次都是上一次的迭代和修改,难度较大,中间涉及到先是类与类之间的多态和继承关系,后面的修改中,转变为了组合 ...

  5. 西门子S7系列转以太网通讯处理器类型分析

    捷米特以太网通讯处理器用于西门子S7-200/SMART /S7-200/S7-300/S7-400/西门子数控840D.840DSL等PLC的以太网数据采集,支持工控领域内绝大多数SCADA软件,支 ...

  6. VS2017配置OpenCV

    VS2017配置OpenCV 0 OpenCV介绍 OpenCV(Open Source Computer Vision Library)是一个开源的计算机视觉库,它提供了丰富的图像处理和计算机视觉算 ...

  7. 2023年郑州轻工业大学校赛邀请赛myh

    赛程回顾和赛后总结 赛程回顾 although 昨天刚复盘的,但还是记不住题号.就口胡下是那类型题吧. 刚开始时,我和队长先看的a,让jc去找签到题.我们看了下a,队长说可能dp,但还是感觉没啥思路就 ...

  8. C#解析匿名JSON数据

    C#解析匿名JSON数据 使用工具:Newtonsoft.Json 使用方式: //模拟数据 var jsonData = JsonConvert.SerializeObject(new { Name ...

  9. zanePerfor中一套简单通用的Node前后端Token登录机制和github授权登录方式

    HI!,你好,我是zane,zanePerfor是一款我开发的一个前端性能监控平台,现在支持web浏览器端和微信小程序端. 我定义为一款完整,高性能,高可用的前端性能监控系统,这是未来会达到的目的,现 ...

  10. [selenium]取值元素文本属性样式

    前言 版本: python:3.9 selenium:4.1.5 获取元素文本 text = driver.find_element(by=By.XPATH, value=""). ...