![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
非让我改名字
这个作者很懒,什么都没留下…
展开
-
echarts组件封装
<template> <!-- 为 ECharts 准备一个定义了宽高的 DOM --> <div :id="uuid" :style="style"></div></template><script>import * as echarts from "echarts";const genID = () => new Date().getTime();export default { props: {原创 2021-11-05 19:18:25 · 241 阅读 · 0 评论 -
vue事件总线
// eventBus.js// new 一个 Vue 实例,实例上有 $emit $on $off 事件import Vue from 'vue'const eventBus = new Vue()export default eventBuseventBus.$emit('handleTime', this.time) // 触发 handleTime 事件并传参// 其他组件监听事件的触发mounted(){ eventBus.$on('handleTime', this.hah原创 2021-10-18 11:22:41 · 46 阅读 · 0 评论 -
vue跨域
// vue.config.jslet proxyObj = {}proxyObj['/'] = { ws: false, // websocket target: "http://localhost:8081", changeOrigin: true, pathRewrite: { '^/': '/' }}module.exports = { devServer:{ host: 'localhost', port: 8080, // 前端端口 proxy: p原创 2021-10-17 21:33:04 · 43 阅读 · 0 评论 -
axios ele-ui 二次封装
import axios from 'axios'import {Message} from 'element-ui'import router from '../router'axios.interceptors.response.use(success=>{ // 请求发送给服务端了,但有的操作可能服务端不允许 if(success.status && success.status == 200){ if(success.data.code == 500 || su原创 2021-10-17 21:10:04 · 66 阅读 · 0 评论