前端
weixin_41619400
这个作者很懒,什么都没留下…
展开
-
vue不是内部或外部命令,也不是可运行的程序
vue原创 2022-07-13 09:26:28 · 273 阅读 · 0 评论 -
headers Authorization
var auth = `${host.user}:${host.pass}` const buf = Buffer.from(auth, 'ascii'); strauth = buf.toString('base64'); console.info(buf.toString('base64')); rejectUnauthorized: false, headers: { '...原创 2022-05-18 10:33:19 · 833 阅读 · 0 评论 -
Web 文件下载方式
1、window.open(downloadUrl);2、 // 获取XMLHttpRequest var xmlResquest = new XMLHttpRequest(); // 发起请求 xmlResquest.open('GET', downloadUrl, true); // 设置请求头类型 xmlResquest.se原创 2021-03-11 15:40:53 · 497 阅读 · 0 评论 -
layui 拦截button跳转刷新页面
form.on('submit(form)', function (data) { return false; });原创 2020-11-11 16:57:48 · 753 阅读 · 0 评论 -
JS 非四舍五入保留小数点相应位数
toFixed(num,decimal) { num = num.toString(); let index = num.indexOf('.'); if (index !== -1) { num = num.substring(0, decimal + index + 1) } else { num = num.substring(0) } return parseFloat(num).toFixed(decimal)}let num = 89.369;console.log(.原创 2020-11-11 16:56:22 · 258 阅读 · 0 评论 -
JS 监听滚动条事件
$(".layui-code-ol").scroll(function () { viewH = $(".layui-code-ol").height(),//可见高度 contentH = $(".layui-code-ol").get(0).scrollHeight,//内容高度 scrollTop = $(".layui-code-ol").scrollTop();//滚动高度 //判断执行事件})置底$(".layui-code-ol").scrollTop($(.原创 2020-11-11 16:56:45 · 1070 阅读 · 0 评论 -
非脚手架搭建自己的vue
1、创建项目文件夹xxx2、cd到xxx下: cmd 回车3、xxx下运行 npm init 回车 最终生成 package.json4、你怕吗install --save dev webpack5、新建 文件夹src 下新建App.vue main.js index.html components文件夹6、根目录西安新建 webpack.config.js7、安装依赖报 npm install --save XXX > npm...原创 2020-08-28 15:05:40 · 419 阅读 · 0 评论 -
laydate 当前可选日期不超过当前日期
<script> layui.use('laydate', function(){ var laydate = layui.laydate; //执行一个laydate实例 laydate.render({ elem: '#birthDate', //指定元素 max: getN...原创 2020-08-26 16:20:52 · 484 阅读 · 0 评论 -
layui-table 伪重写 表格导出事件
layui-table 自带的defaultToolbar:['filter','print','exports'],中的exports ,导出既是当前页面的导出,由于我的数据是分页拿到的,所以需要重定义导出 事件。html<script type="text/html" id="toolbar"> <div class="layui-inline">...原创 2020-01-13 17:50:04 · 2001 阅读 · 1 评论