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. CKS 考试题整理 (13)-使用 sysdig 检查容器里里的异常进程

    Task 使用运行时检测工具来检测 Pod tomcat 单个容器中频发生成和执行的异常进程 有两种工具可供使用: sysdig falco 注: 这些工具只预装在cluster的工作节点,不在 ma ...

  2. navicate的安装使用

    1 navicat概述 Navicat for MySQL 是管理和开发 MySQL 或 MariaDB 的理想解决方案. 这套全面的前端工具为数据库管理.开发和维护提供了一款直观而强大的图形界面. ...

  3. ArcPy批量对大量遥感影像相减做差

      本文介绍基于Python中ArcPy模块,对大量栅格遥感影像文件批量进行相减做差的方法.   首先,我们来明确一下本文的具体需求.现有一个存储有多张.tif格式遥感影像的文件夹,其中每一个遥感影像 ...

  4. G1垃圾回收参数调优及MySQL虚引用造成GC时间过长分析

    1. 背景 我方有一应用,偶尔会出现GC时间过长(间隔约4小时),导致性能波动的问题(接口最长需要耗时3秒以上).经排查为G1垃圾回收器参数配置不当 叠加 MySQL 链接超过闲置时间回收,产生大量的 ...

  5. AI-3线性回归

    3.1笔记 线性回归假设y与多个x之间的关系是线性的,且噪声符合正态分布. 线性模型则是对输入特征做仿射变换Y^ = W * X+b,其中Y^为预测值,我们希望预测值与真实值Y的误差最小.那如何衡量这 ...

  6. Docker、CICD持续集成部署、Gitlab使用、Jenkins介绍

    目录 1.Docker的基本操作 1.1镜像拉取 1.2镜像的操作 1.3容器的操作 运行容器 查看正在运行的容器 查看容器运行日志 进入到容器内部 停止容器运行 删除容器 启动容器 2.Docker ...

  7. List去除重复数据的五种方式

    来自:CSDN,作者:多纤果冻 链接:https://blog.csdn.net/qq_37939251/article/details/90713643 以下介绍五种-不同的方法去除 Java 中A ...

  8. 嵌入式低功耗WiFi设备保活功耗分析

    (一)嵌入式低功耗设备介绍 在物联网(IoT)领域,设备可以使用以太网和无线网进行网络连接. 以太网: 网络稳定,带宽高,延迟低,但是以太网需要拉网布线,设备安装邻活便利性能差. 无线网络:安装位置灵 ...

  9. 用字符串表达式执行引擎消除掉if else if

    背景 最近我搞了个微信机器人,@机器人 xxx 这样来发送命令 能拿到的信息有,消息内容,消息发送人,消息所在的群id等 需要根据消息内容或者消息发送群id等不同的条件组合来决定走哪个处理逻辑. 简单 ...

  10. 多app应用(推荐方式)

    多app应用目录结构 项目单独一个app结构: 多个app: 多个app放在一个apps文件夹中, 在根目录下创建apps的文件夹 操作: 没勾选template,那么项目根目录就没有template ...