流浪のwolf

卷帝

导航

2024年7月18日

docker-compose -- 创建 redis && mysql

摘要: version: '3' services: nest-admin-web: image: buqiyuan/vue3-antdv-admin:stable container_name: nest-admin-web volumes: - ./deploy/web:/etc/nginx/conf. 阅读全文

posted @ 2024-07-18 10:27 流浪のwolf 阅读(4) 评论(0) 推荐(0) 编辑

2024年7月5日

前端导出excel文件,后端返回二进制文件 application/octet-stream 前端处理数据并下载excel文件

摘要: 通过URL.createObjectURL(blob)可以获取当前文件的一个内存URL const href = URL.createObjectURL(res.data); const box = document.createElement('a'); console.log(res.filen 阅读全文

posted @ 2024-07-05 10:52 流浪のwolf 阅读(1) 评论(0) 推荐(0) 编辑

2024年7月1日

js正则表达式 禁止输入汉字

摘要: const validateChinese = (rule, value, callback) => { var regex = /[\u4e00-\u9fa5]/; console.log('testtest',regex.test(value),value); if (regex.test(va 阅读全文

posted @ 2024-07-01 10:58 流浪のwolf 阅读(3) 评论(0) 推荐(0) 编辑

2024年6月18日

使用DBeaver连接高斯100数据库 gaussdb100

摘要: 1. 自定义驱动 参考:DBeaver配置GaussDB 100指导手册-云社区-华为云 (huaweicloud.com) 搜索_华为云 (huaweicloud.com) DBeaver连接华为高斯数据库 DBeaver连接Gaussdb数据库 DBeaver connect Gaussdb_d 阅读全文

posted @ 2024-06-18 13:57 流浪のwolf 阅读(18) 评论(0) 推荐(0) 编辑

2024年6月14日

树形结构体按照 sort 进行排序先按照字母排序 然后按照数字排序

摘要: // 先按照字母排序 然后按照数字排序 function sortListByLetter(arr) { return arr.sort((a, b) => { if (isNaN(a.name) && isNaN(b.name)) { // 都不是数字,按字母顺序排序 return a.name. 阅读全文

posted @ 2024-06-14 15:23 流浪のwolf 阅读(4) 评论(0) 推荐(0) 编辑

2024年6月9日

封装一个Promise.all 的函数

摘要: // 1. 准备三个异步函数 const promise1 = Promise.resolve('prom11ise1'); const promise2 = new Promise(function (resolve, reject) { setTimeout(resolve, 2000, 'pr 阅读全文

posted @ 2024-06-09 21:05 流浪のwolf 阅读(2) 评论(0) 推荐(0) 编辑

2024年6月8日

工具函数

摘要: 是否为对象 function isObject(value) { return value !== null && typeof value 'object'; } 阅读全文

posted @ 2024-06-08 11:35 流浪のwolf 阅读(3) 评论(0) 推荐(0) 编辑

2024年6月6日

ts 的 declare 用途

摘要: declare namespace API { /** 新增数据集合 */ type CreateDataSet = { createdAt: string; dname: string; headImg: string; id: number; kind: string; groups: stri 阅读全文

posted @ 2024-06-06 09:31 流浪のwolf 阅读(6) 评论(0) 推荐(0) 编辑

2024年6月5日

js有效括号匹配

摘要: // 定义一个括号映射 const bracketMap = [ { left: '[', right: ']' }, { left: '<', right: '>' }, { left: '(', right: ')' }, { left: '【', right: '】' }, { left: ' 阅读全文

posted @ 2024-06-05 14:53 流浪のwolf 阅读(5) 评论(0) 推荐(0) 编辑

什么是类数组

摘要: 类数组就是伪数组,array-like 有属性length 可以通过索引访问元素,但是没有数组原型上的方法 比如 push 、pop 等。 类数组有哪些? 类数组:1、拥有length属性,其它属性(索引)为非负整数2、不具有数组所具有的的方法;3、类数组是一个普通对象,而真实的数组是Array类型 阅读全文

posted @ 2024-06-05 13:41 流浪のwolf 阅读(1) 评论(0) 推荐(0) 编辑