vue
夕阳丬桥
这个作者很懒,什么都没留下…
展开
-
使用this.$router.push跳转路由,NavigationDuplicated: Avoided redundant navigation to current location错误解决方案
使用this.$router.push跳转相同路由时报NavigationDuplicated: Avoided redundant navigation to current location错误在对参数没要求时可以添加一个随机参数this.$router.push({ name: 'xxx', query: { xxx: xxx, xxx: xxx }, params: { xxx: Math.random() } })...原创 2021-08-26 11:42:32 · 459 阅读 · 0 评论 -
vue集成websocket(无发送)
<template></template><script>export default {//自己选择初始化位置 created () { this.initWebSocket() }, methods: { //初始化连接 initWebSocket: function () { //此处为服务端地址 let host = window.location.hostname const url =原创 2021-08-25 15:14:58 · 312 阅读 · 0 评论 -
关于Vue this嵌套使用this 报错Uncaught (in promise) TypeError: Cannot read property ‘$refs‘ of undefined
类似于这种: this.$confirm('确定删除吗?删除后不可恢复!!!', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.$refs.tableData.selection })this嵌套this时因为this嵌套指向问题,所以找不到$refs需要在最外层定义一个原创 2021-08-19 18:14:54 · 1483 阅读 · 0 评论 -
vue使用 echarts 3d echarts_esm_echarts__WEBPACK_IMPORTED_MODULE_0__.registerPostInit is not a function
查看vue中echarts 和echarts-gl版本卸载 当前echarts和echarts-glnpm uninstall echarts-gl npm uninstall echarts 这里echarts有个版本为4.0.1npm install --save echarts@4.1.0//再安装3dnpm install --save echarts-gl 启动vue...原创 2020-12-22 15:06:16 · 5393 阅读 · 2 评论 -
vue使用echarts基础设置
//安装echarts:npm install echarts --save 方法一:main.js中引入 ://引入echartsimport echarts from 'echarts'//将echarts设置全局变量,$echarts自定义Vue.prototype.$echarts = echarts然后在需要用到的地方:<template> <div id="main" ref="main" class="text item echart" style原创 2020-12-22 14:28:11 · 216 阅读 · 0 评论