会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xmyd
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
下一页
2021年6月16日
提取字符串中的中文、英文、数字
摘要: var str="你好$123aaa-&ABC 99" str = str.replace(/[^\d]/g,''));" //提取数字 12399 str = str.replace(/[^\u4E00-\u9FA5]/g,'')); //提取中文 你好 str = str.replace(/[^
阅读全文
posted @ 2021-06-16 17:58 奶包迷了鹿
阅读(422)
评论(0)
推荐(0)
2021年6月9日
本地项目使用git上传码云或GitHub
摘要: 创建git 仓库 git init touch README.md git add README.md git commit -m "first commit" git remote add origin +码云/github仓库链接 git push -u origin master Git 提示
阅读全文
posted @ 2021-06-09 11:26 奶包迷了鹿
阅读(54)
评论(0)
推荐(0)
2021年1月5日
Vue---前端crypto.js加解密
摘要: 安装 1 npm install crypto-js --save-dev 加解密 import CryptoJS from 'crypto-js'; ... /** * CryptoJS加密 */ var getAES = function(data){ //加密 var key = 'AAAAA
阅读全文
posted @ 2021-01-05 17:41 奶包迷了鹿
阅读(561)
评论(0)
推荐(0)
如何在vue项目中使用md5加密
摘要: 注意:无法解密,md5的特性就是只能加密,所以用md5加密的时候,一定要记住你填写的内容 第一步: npm安装: 1 npm install --save js-md5 第二步: 全局引用 1 import md5 from 'js-md5'; 2 Vue.prototype.$md5 = md5;
阅读全文
posted @ 2021-01-05 17:32 奶包迷了鹿
阅读(8121)
评论(0)
推荐(0)
2020年12月10日
js-cookie使用心得
摘要: NPM 安装 $ npm install js-cookie --save //引入 import Cookies from 'js-cookie' 设置cookie 创建一个cookie,在整个站点有效: cookies.set('name','value'); 创建一个7天后过期的cookie,
阅读全文
posted @ 2020-12-10 11:14 奶包迷了鹿
阅读(219)
评论(0)
推荐(0)
2020年12月7日
vue el-form常用的表单正则验证【用户名、密码、身份证号、邮箱号,手机号,车牌号、ip地址等】
摘要: <script> export default { name: "form", data() { //ip地址校验 var IPValidator = (rule, value, callback) => { let ip_ip = '(25[0-5]|2[0-4]\\d|1\\d\\d|\\d\\
阅读全文
posted @ 2020-12-07 11:13 奶包迷了鹿
阅读(3796)
评论(0)
推荐(0)
2020年12月2日
vue解决移动端和pc端适配
摘要: //App.vue mounted() { if (this._isMobile()) { alert("手机端"); // this.$router.replace('/m_index'); } else { alert("pc端"); // this.$router.replace('/pc_i
阅读全文
posted @ 2020-12-02 17:16 奶包迷了鹿
阅读(1361)
评论(0)
推荐(0)
2020年11月5日
原生JS 如何拼接字符串添加标签
摘要: 原生js有类似功能的API: var str = '<div>代码1</div><span>代码2<span>'; var node = document.querySelector('#dom'); node.insertAdjacentHTML('beforeEnd', str);
阅读全文
posted @ 2020-11-05 16:07 奶包迷了鹿
阅读(2267)
评论(0)
推荐(0)
2020年8月20日
element-ui的table表格控件表头与内容列不对齐问题
摘要: element-ui的table表格控件表头与内容列不对齐问题 解决方法:将以下样式代码添加到index.html、或app.vue中(必须是入口文件,起全局作用!)body .el-table th.gutter{display: table-cell!important;}
阅读全文
posted @ 2020-08-20 14:25 奶包迷了鹿
阅读(696)
评论(0)
推荐(0)
2020年4月17日
常用正则表达式
摘要: var checkmail = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/; var passw=/^[\x21-\x7E]{6,20}$/;//6~20个字符,可使用字母、数字、字符组合! passw.tes
阅读全文
posted @ 2020-04-17 18:28 奶包迷了鹿
阅读(176)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告