摘要: 传统的文件上传会面临以下问题: 请求超时:HTTP请求通常有超时限制,大文件上传时间过长容易导致请求超时。 网络不稳定:网络波动、中断可能导致上传失败,用户体验差。 服务器压力:单个大文件上传会长时间占用服务器资源。 用户体验:上传失败后需要重新上传整个文件,十分耗时 针对以上问题,出现了分片上传和 阅读全文
posted @ 2025-07-05 21:52 我就起个名字不至于吧 阅读(13) 评论(0) 推荐(0)
摘要: 基本使用和各种中间件、session、跨域问题 import express from 'express' import querystring from 'querystring' import session from 'express-session' import cors from 'co 阅读全文
posted @ 2025-07-03 22:14 我就起个名字不至于吧 阅读(4) 评论(0) 推荐(0)
摘要: 动态路由,使用 ()=>import ('./Home.vue') 导入,按需加载 阅读全文
posted @ 2025-07-03 20:08 我就起个名字不至于吧 阅读(8) 评论(0) 推荐(0)
摘要: 1.HTML原生支持 <img src="example.jpg" alt="示例图片" loading="lazy"> 优点: 实现简单,不需要额外js代码 浏览器内部优化、性能较好 缺点: 兼容性问题:部分旧版本浏览器(如IE)不支持。 2.使用IntersectionObserver API 阅读全文
posted @ 2025-07-03 20:07 我就起个名字不至于吧 阅读(10) 评论(0) 推荐(0)
摘要: 目前用的是原生开发,后面搭建的时候改写一下vue3,原生开发的时候要注意对dom树操作的顺序 阅读全文
posted @ 2025-07-03 08:48 我就起个名字不至于吧 阅读(7) 评论(0) 推荐(0)
摘要: 通过数组索引的增加来代表单位的递增,与使用if不断判断相比,看起来就很优雅 function formatSizeUnits(unit){ const units = ['kB','MB','GB','TB','PB'] let unitIndex = 0 while(unit>=1024 && u 阅读全文
posted @ 2025-07-01 21:28 我就起个名字不至于吧 阅读(13) 评论(0) 推荐(0)
摘要: 使用beginPath()开始一条新路径, moveTo()移动到某一点, lineTo()连接到某一点, strokeStyle()设置连线颜色, stroke()连接该路径的点, closePath()闭合该路径(结束点连到开始点), fillStyle()设置填充颜色, fill()填充该路径 阅读全文
posted @ 2025-07-01 18:48 我就起个名字不至于吧 阅读(3) 评论(0) 推荐(0)
摘要: 1.vue3中使用ref对标签进行标记,使用时应在全局顶层使用,不可在局部函数内调用,否则时undefined 2.echarts中large模式,配合largeThreshold提升大数据下散点图渲染效率,提升性能,但无法对单个点进行配置 3. const file_path = @/store/ 阅读全文
posted @ 2025-06-24 00:08 我就起个名字不至于吧 阅读(10) 评论(0) 推荐(0)
摘要: <script setup> import { effect, onMounted, ref } from "vue"; import * as echarts from 'echarts' import chinaMapData from '@/store/china.json' const ch 阅读全文
posted @ 2025-06-24 00:05 我就起个名字不至于吧 阅读(12) 评论(0) 推荐(0)
摘要: 1.背景图片铺不满容器 错误写法 background-size: 100% 100%; background: url(../images/lbx.png); 调整后 background: url(../images/lbx.png); background-size: 100% 100%; 或 阅读全文
posted @ 2025-06-21 00:51 我就起个名字不至于吧 阅读(13) 评论(0) 推荐(0)