- 博客(6)
- 收藏
- 关注
原创 最简单的Express服务器hello world
const express = require("express")const app = express()const port = 3000app.get("/",(req,res)=>res.send("hello,world"))app.listen(port,()=>console.log(`Service is running...at ${port}!`))
2020-10-21 16:35:44
168
原创 Vue中混合的使用方法
Vue中混合使用在项目里mixin文件下新建js文件,文件里放入,无需script标签export default { ...}在需要的文件里 用import 引入文件import data from "../../mixin/data.js"export default { mixins:[data], data(){ return { ... } } ...}...
2020-06-15 11:20:26
684
原创 多个echarts在页面自适应方法
使用window.addEventListener方法 /* 在Vue中使用,加载动态页面 */ mounted() { // 1.设置echarts对象 this.myChart = this.$echarts.init(document.getElementById("dangerLevel")); // 2.获取后台数据 api.dangerLevel().then(res => {
2020-06-13 16:04:50
549
5
原创 Vue中代理配置,解决跨域
Vue中跨域代理配置1.项目根目下打开vue.config.js(若无此文件,新建)2.代理设置,代码如下module.exports ={ devServer:{ proxy:{ //配置跨域 "/api":{ target:"服务器地址测试环境", ws:true, changOrigin:true, pathRewrite:{ "^/api":"/" } } } }}...
2020-06-13 15:13:25
203
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人