import Vue from "vue"; // vue自定义指令节流 Vue.directive("throttle", { bind: function(el, binding, vnode) { let { delay, fn } = binding.value; //参数:时间,执行函数 ...
分类:
其他好文 时间:
2021-04-26 13:55:45
阅读次数:
0
先说结论:遍历对象用for in 遍历数组用for of 不要用for in 遍历数组会出问题,实际中已经遇到了 function getAreaQueryGrid(res) { let features = new ol.format.GeoJSON().readFeatures(res); fo ...
分类:
Web程序 时间:
2021-04-26 13:46:30
阅读次数:
0
问题描述 当需要在应用中有大量的出站连接时候,就会涉及到SNAT(源地址网络转换)耗尽的问题。而通过Azure App Service/Function的默认监控指标图表中,却没有可以直接查看到SNAT是否耗尽的问题(可以间接参考App Service Plan级中Metrics的 Socket O ...
分类:
移动开发 时间:
2021-04-26 13:08:25
阅读次数:
0
__thread 线程局部存储 Thread Local Storage(tls),是一种机制,通过这一机制分配的变量,每个当前线程有一个该变量的实例。 在用户层,用一个新的存储类型关键字:__thread 表示这一扩展。 __thread 使用规则: 如果一个线程局部存储变量有一个初始化器,它必须 ...
分类:
其他好文 时间:
2021-04-26 12:57:45
阅读次数:
0
一、PubSubJS的使用 工具库: PubSubJS 下载: npm install pubsub-js --save 使用: 1) import PubSub from 'pubsub-js' //引入 2) PubSub.subscribe('delete', function(data){ ...
分类:
其他好文 时间:
2021-04-24 13:38:03
阅读次数:
0
事件捕获 事件捕获中,父级元素先触发,子集元素后触发 事件会从最外层开始,直到具体的元素,比如click的捕获过程document->html->body->div->p 事件冒泡 事件冒泡时,子元素先出发,父级元素后触发 元素自身事件被触发后,如果父元素有相同的事件,那么元素本身的触发状态就会传递 ...
分类:
编程语言 时间:
2021-04-24 13:29:34
阅读次数:
0
1 // 防抖 2 function debounce(func,delay){ 3 let timer = null 4 return function(){ 5 let context = this 6 let args = arguments 7 if(timer) clearTimeout( ...
分类:
Web程序 时间:
2021-04-24 11:51:25
阅读次数:
0
//php获取指定范围内的日期 function periodDate($startDate, $endDate) { $startTime = strtotime($startDate); $endTime = strtotime($endDate); $arr = []; while ($sta ...
分类:
Web程序 时间:
2021-04-23 12:27:28
阅读次数:
0
百度下载QueryList类库文件 /** * 抓取数据源 * @param $rules array 抓取规则 * @param $url string url * @return mixed */ function getQueryList($rules, $url) { $html = fil ...
分类:
Web程序 时间:
2021-04-23 12:26:15
阅读次数:
0
打开Excel文档,按“Alt+F11”进入VBA环境。右击“Microsoft Excel 对象”,从其扩展菜单中选择“插入”-“模块”项。 接着在打开的“模块1”编辑界面中,输入如图所示的代码: Function GetActAddress(HlinkCell) Application.Vola ...
分类:
其他好文 时间:
2021-04-23 12:26:01
阅读次数:
0