会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
振锋小哥
博客园
首页
新随笔
联系
订阅
管理
2025年6月16日
字符串新增API
摘要: 更好的Unicode支持 早期,由于存储空间宝贵,Unicode使用16位二进制来存储文字。我们将一个16位的二进制编码叫做一个码元(Code Unit)。 后来,由于技术的发展,Unicode对文字编码进行了扩展,将某些文字扩展到了32位(占用两个码元),并且,将某个文字对应的二进制数字叫做码点(
阅读全文
posted @ 2025-06-16 10:43 振锋小哥
阅读(6)
评论(0)
推荐(0)
2024年11月19日
码元和码点的区别
摘要: charCodeAt与codePointAt的用法: 相同点: charCodeAt与codePointAt都是字符串实例上的方法,用途都是用来返回指定索引位字符的Unicode编码。 不同点: charCodeAt与codePointAt匹配索引位的规则不一样。charCodeAt是根据码元来匹配
阅读全文
posted @ 2024-11-19 14:07 振锋小哥
阅读(166)
评论(0)
推荐(0)
2023年7月26日
H5页面中调用微信和支付宝支付
摘要: 第一步:先判断当前环境 判断用户所属环境,根据环境不同,执行不同的支付程序。 if (/MicroMessenger/.test(window.navigator.userAgent)) { // alert('微信'); } else if (/AlipayClient/.test(window.
阅读全文
posted @ 2023-07-26 16:12 振锋小哥
阅读(4497)
评论(0)
推荐(0)
2023年6月21日
去掉img,video默认的间距(3种方式)
摘要: img,video{ /*第1种方式*/ border: 0; vertical-align: bottom; /*第2种方式*/ outline-width:0px; vertical-align:top; /*第3种方式*/ margin: 0; padding: 0; float: left;
阅读全文
posted @ 2023-06-21 18:16 振锋小哥
阅读(19)
评论(0)
推荐(0)
2023年3月28日
vue-cookies用法
摘要: import Cookies from 'vue-cookies'; const cookies = {}; cookies.set = function (name = 'default', value = '', cookieSetting = 60 * 60 * 24 * 365) { Coo
阅读全文
posted @ 2023-03-28 17:09 振锋小哥
阅读(212)
评论(0)
推荐(0)
2022年9月27日
html2canvas 将html转成图片,并传给后端
摘要: htmlTransImage('#app', { width: 300}, function(data){ console.log(data) }, function(err){ console.log('上传失败') }) function htmlTransImage(dom,arg,succe
阅读全文
posted @ 2022-09-27 15:09 振锋小哥
阅读(223)
评论(0)
推荐(0)
2022年8月31日
vue-cli 配置优化
摘要: 本文整理了一些 vue 开发中常用 vue-cli 配置,使用的 vue-cli 版本为 3.11.0,主要内容包括: 移除 preload 与 prefetch 使用 webpack-bundle-analyzer 做打包分析 使用 terser-webpack-plugin 清除 console
阅读全文
posted @ 2022-08-31 13:52 振锋小哥
阅读(876)
评论(0)
推荐(0)
2022年8月9日
日期范围工具类
摘要: /** * 日期范围工具类 */ util.dateRangeUtil = function () { /*** * 获得当前时间 */ this.getCurrentDate = function () { return new Date(); }; /*** * 获得本周起止时间 */ this
阅读全文
posted @ 2022-08-09 17:12 振锋小哥
阅读(27)
评论(0)
推荐(0)
2022年3月31日
实现promise.all
摘要: 何为Promise.all? Promise.all 是 es6 Promise 对象上的一个方法,它的功能就是将多个Promise实例包装成一个promise实例。以下是 MDN 对 Promise.all 的描述: Promise.all() 方法接收一个 promise 的 iterable
阅读全文
posted @ 2022-03-31 14:58 振锋小哥
阅读(1667)
评论(0)
推荐(0)
Vue 项目的权限管理
摘要: 路由守卫 permission.js: import router from './router' import store from './store' import { Message } from 'element-ui' import NProgress from 'nprogress' /
阅读全文
posted @ 2022-03-31 14:08 振锋小哥
阅读(126)
评论(0)
推荐(0)
下一页
公告