会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
1
2 3 4
无序
找到自己的舞台,演出自己的精彩
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
···
7
下一页
2024年12月28日
各种值得的库
摘要: React UI 组件库 Ant Design :https://ant.design/ React Bootstrap: https://react-bootstrap.github.io/ MATERIAL-UI : https://material-ui.com/ Vue UI组件库 Elem
阅读全文
posted @ 2024-12-28 11:04 无序
阅读(21)
评论(0)
推荐(0)
2024年5月8日
js方法
摘要: // 千分符显示 toThousands(str) { if (!str) return 0 return str.toString().replace(/\d+/, function(n) { // 先提取整数部分 return n.replace(/(\d)(?=(\d{3})+$)/g, fu
阅读全文
posted @ 2024-05-08 10:49 无序
阅读(17)
评论(0)
推荐(0)
2023年6月2日
设计模式小记
摘要: 创建型模式(Creational Patterns): 工厂模式(Factory Pattern):就像是一个生产线,根据需要创建不同类型的产品,隐藏了产品的具体制造过程。例如,一个按钮工厂可以根据类型创建不同样式的按钮。 // 简单工厂模式 class ButtonFactory { create
阅读全文
posted @ 2023-06-02 14:34 无序
阅读(17)
评论(0)
推荐(0)
2023年6月1日
常用的js判断简写技巧
摘要: 空值合并运算符(??)是一个逻辑运算符,当左侧的操作数为 null 或者 undefined 时,返回其右侧操作数,否则返回左侧操作数。 function(obj){ var b = obj ?? {} } // 等价于 =>> function(obj){ var b; if( obj null
阅读全文
posted @ 2023-06-01 15:04 无序
阅读(184)
评论(0)
推荐(0)
2023年3月28日
vue3中ref,triggerRef,customRef,shallowRef的区别
摘要: 在 Vue 3 中,ref 和 shallowRef 都是用来创建响应式数据的函数,它们之间的主要区别在于它们对于传入的对象的处理方式不同。 1.ref 用于创建一个包装器对象,可以将基本类型值或对象转换为响应式数据。例如: import { ref } from 'vue' const count
阅读全文
posted @ 2023-03-28 15:10 无序
阅读(640)
评论(0)
推荐(0)
2023年3月14日
vue+element-ui实现分页表格可勾选,翻页后保持所有勾选操作
摘要: <template> <div> <el-table :data="tableData" v-loading="loading" :row-key="rowKey" @select="handleSelect" @select-all="handleSelectAll" @selection-cha
阅读全文
posted @ 2023-03-14 15:34 无序
阅读(974)
评论(0)
推荐(0)
2023年3月9日
JS关于导出文件流方法封装的使用
摘要: 如果需要频繁地在JavaScript中导出文件流,可以将上述的方法封装为函数,以便在不同的代码中调用。 /** * 导出文件 * @param {string|Uint8Array} data - 文件内容 * @param {string} fileName - 文件名称 * @param {st
阅读全文
posted @ 2023-03-09 14:29 无序
阅读(321)
评论(0)
推荐(0)
js去重
摘要: 1. 使用ES6的Set去重 // Set是ES6中新增的数据类型,它可以帮助我们快速去重。将数组转化为Set之后,再转化回数组即可。 ```javascript const arr = [1, 2, 3, 1, 2, 3]; const arrUnique = Array.from(new Set
阅读全文
posted @ 2023-03-09 10:59 无序
阅读(51)
评论(0)
推荐(0)
2023年2月24日
关于使用es新特性优化代码这回事
摘要: 1.解构 const obj = { a:1, b:2, c:3, d:4, e:5, } const a = obj.a; const b = obj.b; const c = obj.c; const d = obj.d; const e = obj.e; const f = obj.a + o
阅读全文
posted @ 2023-02-24 08:32 无序
阅读(22)
评论(0)
推荐(0)
2023年2月22日
项目部署构建中node-sass构建突然失败
摘要: 项目中部署安装node-sass失败,由于node版本导致的问题 使用dart-sass 替换 node-sass 1.卸载node-sass npm uninstall node-sass 2.安装dart-sass npm install sass sass-loader -D 3.将项目中原有
阅读全文
posted @ 2023-02-22 15:49 无序
阅读(45)
评论(0)
推荐(0)
1
2
3
4
5
···
7
下一页
公告