会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小贝馨
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2019年3月27日
H5 移动端开发中 ios/安卓坑 和经验总结
摘要: H5 移动端开发中 ios/安卓坑总结
阅读全文
posted @ 2019-03-27 15:30 小贝馨
阅读(1023)
评论(0)
推荐(0)
2018年12月20日
正则验证规则整理
摘要: const validate = { //验证非空 isEmpty(value, text) { return value; }, //验证身份证 idCard(value) { return /^\d{15}(\d{2}[A-Za-z0-9])?$/i.test(value); }, //验证最少
阅读全文
posted @ 2018-12-20 11:21 小贝馨
阅读(1243)
评论(0)
推荐(0)
2018年12月19日
获取本周、上周、本月、上月 的开始日期和结束日期
摘要: 方法返回的是一个对象: {startDate: 年-月-日, endDate: 年-月-日}使用方法: 获取上月 :getAppointedDate(2, 1) 获取上周 getAppointedDate(1, 1) 获取本月 :getAppointedDate(2, 0) 获取本周 getAppo
阅读全文
posted @ 2018-12-19 14:24 小贝馨
阅读(3314)
评论(0)
推荐(0)
时间戳或日期格式转换的方法
摘要: 用法: format(time, "yyyy-MM-dd mm:hh:ss") 或者 format(time, "yyyy-MM-dd") 或者 format(时间戳, "yyyy-MM-dd") format:(date,fmt)=>{ if( !date ) { return '-' } els
阅读全文
posted @ 2018-12-19 13:55 小贝馨
阅读(1174)
评论(0)
推荐(0)
对象或数组 或数组对象的深拷贝
摘要: objDeepCopy: (source) => { var sourceCopy = source instanceof Array ? [] : {}; for (var item in source) { if(typeof source[item] 'object') { sourceCop
阅读全文
posted @ 2018-12-19 11:33 小贝馨
阅读(220)
评论(0)
推荐(0)
2018年9月19日
artTemplate 根据key循环对象
摘要: artTemplate 根据key循环对象var dataObj={ data:{ a:{ name:'卡卡', age:10 }, b:{ name:'卡卡', age:10 }, c:{ name:'卡卡', age:10 } }} html如下:{{each data as obj key}}
阅读全文
posted @ 2018-09-19 11:53 小贝馨
阅读(2568)
评论(0)
推荐(0)
2018年8月11日
复制功能 js
摘要: 示例: <input class="herf" type="text" v-model="herfUrl" readonly="true" id="herfValue" placeholder="http://"> <el-button @click="copy">复制链接</el-button>
阅读全文
posted @ 2018-08-11 15:24 小贝馨
阅读(125)
评论(0)
推荐(0)
指纹获取 Fingerprint2
摘要: 指纹插件 Fingerprint2 import Fingerprint2 from 'fingerprintjs2' new Fingerprint2().get(function(result, components) { sessionStorage.setItem('fingerprint2
阅读全文
posted @ 2018-08-11 15:07 小贝馨
阅读(2924)
评论(0)
推荐(0)
2018年7月23日
Vue 封装的组件生命周期钩子
摘要: export default { // ... // 在组件初始化时调用,可以简单理解为页面加载时 created () { // 存在 localStorage 的缓存内容 if (localStorage.data) { this.myData = JSON.parse(localStorage
阅读全文
posted @ 2018-07-23 21:27 小贝馨
阅读(421)
评论(0)
推荐(0)
vue富文本编辑,编辑自动预览,单个图片上传不能预览的问题解决:
摘要: //预览<div class="htmlViewBox"> <p v-html="activity_html_defaultMsg" v-show="htmlDefaultMsg"></p> <p v-show="defaultMsg=='' && htmlDefaultMsg==''">请在富文本
阅读全文
posted @ 2018-07-23 11:25 小贝馨
阅读(1640)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告