08 2020 档案

摘要:先说下网上给的解答方案: 1、npm i jszip file-saver (axios) axios一般第一次请求的时候就下载过了,如果没有,这里下载的时候加上axios 2、引入这3个插件 import axios from 'axios' import JSZip from 'jszip' i 阅读全文
posted @ 2020-08-26 19:21 吴小明- 阅读(6302) 评论(1) 推荐(0) 编辑
摘要:举个例子吧,就做这个了: 打开之后是这样的: 操作: 1、准备工作:就差一个option配置项了 2、开心地将option粘过来,报错了,没有ROOT_PATH 3、添加ROOT_PATH(let ROOT_PATH = 'https://echarts.apache.org/examples'), 阅读全文
posted @ 2020-08-21 11:18 吴小明- 阅读(1192) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2020-08-20 16:12 吴小明- 阅读(10557) 评论(0) 推荐(0) 编辑
摘要:// fetch('./data.json').then(res=>res.json()).then(data=>{ // console.log(data) // }) // $.get('./data.json',data=>{ // console.log(data) // }) $.getJ 阅读全文
posted @ 2020-08-20 11:35 吴小明- 阅读(24209) 评论(0) 推荐(0) 编辑
摘要:前提:设计稿为750px 1、下载flexible.js:(它的原理是将当前设备宽度划分为10等份) (function flexible (window, document) { var docEl = document.documentElement var dpr = window.devic 阅读全文
posted @ 2020-08-12 17:54 吴小明- 阅读(1015) 评论(0) 推荐(0) 编辑
摘要:1、引入flexible.js文件: (function flexible(window, document) { var docEl = document.documentElement; var dpr = window.devicePixelRatio || 1; // adjust body 阅读全文
posted @ 2020-08-12 17:17 吴小明- 阅读(2499) 评论(1) 推荐(2) 编辑
摘要:1、变量声明let和const 在es6之前,声明变量都是用var关键字,无论声明在何处,都会被视为声明在函数的最顶部,或者是在全局作用域的最顶部,这就是变量提升,例如: function fun(bool) { if (bool) { var test = 'hello man' console. 阅读全文
posted @ 2020-08-11 15:19 吴小明- 阅读(244) 评论(0) 推荐(0) 编辑
摘要:问题:China.js的地图在页面上没有显示,并且报错: 原因分析:main.js中已经全局引入echarts了,其他的柱状图和折线图可以正常显示了 这里使用的是china.js: 解决: 查看页面: china地图已经出来了 阅读全文
posted @ 2020-08-08 14:30 吴小明- 阅读(5694) 评论(2) 推荐(1) 编辑
摘要:规则1:父组件设置scoped,子组件不设置scoped,父组件的样式不会影响到子组件,但此时如果子组件的css权重高于父组件会影响到父组件的样式 解决:①给子组件添加scoped ②使用scss,用一个div将当前子组件所有样式包裹起来,只要这个外层div的类名在整个项目中是唯一的就可以保证当前子 阅读全文
posted @ 2020-08-06 14:44 吴小明- 阅读(307) 评论(0) 推荐(0) 编辑
摘要:不可继承的: display margin padding border background height min-height max-height width min-width max-width overflow position left right top bottom z-index 阅读全文
posted @ 2020-08-05 20:17 吴小明- 阅读(717) 评论(0) 推荐(0) 编辑
摘要:网页可见区域宽:document.body.clientWidth网页可见区域高:document.body.clientHeight网页可见区域宽:document.body.offsetWidth (包括边线的宽)网页可见区域高:document.body.offsetHeight (包括边线的 阅读全文
posted @ 2020-08-04 17:51 吴小明- 阅读(10474) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示