根本原因:是项目在升级了webpack到v4.0.0后,打包生产环境文件,报错走不下去。CommonsChunkPlugin主要是用来提取第三方库和公共模块,避免首屏加载的bundle文件或者按需加载的bundle文件体积过大,从而导致加载时间过长,着实是优化的一把利器。 解决办法 build/we ...
分类:
Web程序 时间:
2020-04-27 17:46:43
阅读次数:
107
var position = $(".element").offset(); position.top = position.top-60; $("html,body").animate({scrollTop:position.top}, 100); 首先获取某元素的位置 第二部 top 就是元素在 ...
分类:
Web程序 时间:
2020-04-27 17:12:05
阅读次数:
300
#!/bin/bashread-p"Enterpassword:"PASSWDforUNAMEin`cat/root/Desktop/users.txt`doid$UNAME&>/dev/nullif[$?-eq0]thenecho"Alreadyexisted"elseuseradd$UNAME&>/dev/nullecho"$PASSWD"|passwd--stdi
分类:
其他好文 时间:
2020-04-27 15:09:27
阅读次数:
58
var provinceCodeArr = @Html.Raw(Json.Encode(ConfigHelperProvinceCode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))); ...
分类:
Web程序 时间:
2020-04-27 11:54:21
阅读次数:
85
<script src="js/jquery-3.4.1.min.js"></script> <script> $(function () { $('#btn').click(function () { //发送ajax请求 $.ajax({ url:"user/testAjax", content ...
分类:
Web程序 时间:
2020-04-27 11:23:58
阅读次数:
92
Jquery再熟悉不过,其中的$.ajax封装也不陌生,其中 $.ajax({ url:url, type:"GET", data:data, success:function(res){ }, error:function(err){ } }); 以前比较喜欢success固定回调这种写法,很清晰 ...
分类:
其他好文 时间:
2020-04-26 20:49:13
阅读次数:
72
可能大家做web自动化是都会遇到click事件失效,定位不到元素。 可以使用jquery操作呦 ...
分类:
编程语言 时间:
2020-04-26 18:56:56
阅读次数:
75
方法重新封装了 layer.tips 使用前,请仔细阅读此文本 @Author: 羽渡尘 @两种实现方法 @需要引用jquery.js、layer.js、ydcTip.js @统一可传递的参数形式 let option = { / 加载您的自定义样式文件(注意 样式文件必须在layer/skin目录 ...
分类:
其他好文 时间:
2020-04-26 17:20:23
阅读次数:
242
加载静态文件 一个Web项目不仅需要HTML模板,还需要许多静态文件,比如CSS、JavaScript文件、图片和声音声。 在flask程序中,默认需要将静态文件存储在与主脚本(包含程序实例的脚本)同级目录的static文件夹中。 为了在HTML文件中引用静态文件,我们需要使用url_for()函数 ...
分类:
Web程序 时间:
2020-04-26 14:13:53
阅读次数:
280
You are given two integers aa and bb. You can perform a sequence of operations: during the first operation you choose one of these numbers and increas ...
分类:
其他好文 时间:
2020-04-26 10:35:56
阅读次数:
78