Web js 技术

js解析api中返回的json数据中unicode编码的中文

使用res = eval(`(${res})`);
Web js 技术

第一次修改源码-将easyui里window组件拖动方式由延迟拖动改为实时拖动

这里以jquery-easyui-1.4.2为例我们一般引入的是 <script src="./jquery-easyui-1.4.2/jquery.easyui.min.js"></script>所以修改jquery.easyu...
Web js 技术

jq写的模糊查询

var datas = { // result: true, "total": 0, "rows": [] }; ...
Web js 技术

echarts柱状图一整条柱状图都显示tooltip

图的配置tooltip: { trigger: 'axis', formatter: '{b1}: {c1}%', axisPointer: { type: 'none' }, }
Web js 技术

手写各种数组方法

let a = [1, 2, 3];// 手写mapArray.prototype.myMap = function (fn) { let arr = this; let res = []; for (let i = 0; i < arr.le...
Web js 技术

一个挂载在数组原型上的累加函数,返回值为整数

Array.prototype.add = function () { let res = this.reduce((prev, cur) => { return prev + cur; }, 0); return Number...
Web js 技术

三层布局,main div无论是否撑满。footer div一直固定在浏览器最下面

html: <header>header</header> <main>main</main> <footer>footer</footer>css: header{ height: ...
Web js 技术 vue

vue-gridmanager插件里控制表头是否固定的方法

最开始为未锁定状态new GridManager(table, { height: 'auto', // ... 其它配置项});方法:resetLayout重置表格表布局,参数width与height支持格式以下: 1.像素: '1000px'2.百分比: '100%'3...
Web js 技术 vue

requestAnimationFrame()多次调用会越来越快解决方法

window.requestAnimationFrame()这个API是浏览器提供的js全局方法,针对动画效果。 相当与一个定时器.requestAnimationFrame的方式的优势如下:1.经过浏览器优化,动画更流畅2.窗口没激活时,动画将停止,省计算资源3.更省电,...