
js
黄大仙儿
这个作者很懒,什么都没留下…
展开
-
phantomjs网页局部div截图
如果之前没用过phantomjs,先看看这个使用phantomjs操作DOM并对页面进行截图需要注意的几个问题在windows cmd中执行:phantomjs.exe phantomtest.js http://127.0.0.1:8888/test/index/ test.png第一个参数:js的路径;第二个参数:要截图的url;第三个参数:保存图片的路径phantomtest原创 2017-01-20 10:47:52 · 7012 阅读 · 0 评论 -
jQuery scroll结束事件和resize结束事件
通过设置timeout,判断滚动事件和resize事件的结束scroll end事件$.fn.scrollEnd = function(callback, timeout) { $(this).scroll(function(){ var $this = $(this); if ($this.data('scrollTimeout')) {原创 2017-07-14 14:28:26 · 8800 阅读 · 0 评论 -
解决 前后端分离 跨域 sessionid每次都变化
前端开发使用的VUE,后端使用的java,前后端分离,因为跨域问题JSESSIONID每次请求都会变化,解决方法如下:前端要将withCredentials设为true以ajax请求为例:$.ajax({ url: a_cross_domain_url, // 将XHR对象的withCredentials设为true xhrFields: { wi原创 2017-08-29 15:59:57 · 34704 阅读 · 8 评论 -
git eslint problem
1.git commit的时候报错 Commit failed with error 0 files committed, 1 file failed to commit: test warning: LF will be replaced by CRLF in src/xxxx. The file will have its original line endings in your wo...原创 2018-06-29 20:16:26 · 2108 阅读 · 0 评论 -
Access-Control-Request-Headers: authorization 401
后端加了Authorization验证,前端在header里加了authorization,然而结果还是401,发现是跨域先要发一个预检请求,参考https://segmentfault.com/a/1190000006095018解决方案参考https://segmentfault.com/q/1010000012364132if (request.getMethod().equals("OPT...原创 2018-06-28 15:00:01 · 24454 阅读 · 1 评论 -
vue echarts组件 option以及on事件设置
<template> <div ref="dom"></div></template><script>import echarts from 'echarts'import {on, off} from '@/libs/tools'export default { name: 'eChart', props: ...原创 2018-12-13 19:16:46 · 10759 阅读 · 1 评论 -
echarts地图省市坐标
用的是省会的坐标const geoCoordMap = { '北京': ['116.46', '39.92'], '上海': ['121.48', '31.22'], '天津': ['117.2', '39.13'], '重庆': ['106.54', '29.59'], '河北': ['114.48', '38.03'], '山西': ['112.53', '37....原创 2018-12-10 18:15:04 · 5225 阅读 · 2 评论