会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
陈正山
博客园
首页
新随笔
联系
订阅
管理
1
2
3
下一页
2023年8月2日
小程序请求封装
摘要: ``` export const BASE_URL = `http://192.168.**.***:****` export const request = (options) =>{ return new Promise((resolve,reject)=>{ uni.request({ url
阅读全文
posted @ 2023-08-02 14:12 你笑的好瓜
阅读(28)
评论(0)
推荐(0)
2023年7月24日
修改对象数组中的属性名
摘要: ``` JSON.parse(JSON.stringify(data).replace(/title/g, 'label').replace(/id/g, 'value').replace(/childList/g, 'children'))
阅读全文
posted @ 2023-07-24 21:51 你笑的好瓜
阅读(53)
评论(0)
推荐(0)
2023年7月12日
正则去除p标签
摘要: ``` .replace('','').replace('','') ```
阅读全文
posted @ 2023-07-12 17:49 你笑的好瓜
阅读(115)
评论(0)
推荐(0)
2023年7月7日
js获取当前时间并格式化时间
摘要: const time = new Date() console.log(time) //Fri Jul 07 2023 14:50:28 GMT+0800 (中国标准时间) console.log(time.toLocaleString()) //2023/7/7 14:50:28 console.
阅读全文
posted @ 2023-07-07 14:51 你笑的好瓜
阅读(199)
评论(0)
推荐(0)
2023年7月5日
css文本超过两行溢出显示点点点
摘要: .box{ overflow: hidden; text-overflow: ellipsis; white-space: normal; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; word-
阅读全文
posted @ 2023-07-05 11:12 你笑的好瓜
阅读(70)
评论(0)
推荐(0)
2023年7月3日
input框限制输入内容
摘要: 对应在methods中的方法 ``` typeInput(event) { // 只能输入数字和字母的验证; const inputType = /[\W]/g //想限制什么类型在这里换换正则就可以了 this.$nextTick(function() { //这里的 this.request.i
阅读全文
posted @ 2023-07-03 11:57 你笑的好瓜
阅读(81)
评论(0)
推荐(0)
2023年7月1日
vue中router-link路由携带参数跳转
摘要: 在对应的路由模块儿中 ``` path: 'courseList/:id?' ``` router-link中书写方法如下 ``` 跳转按钮 ``` 跳转页面获得传递的参数 ``` console.log(this.$route.params) ```
阅读全文
posted @ 2023-07-01 15:06 你笑的好瓜
阅读(181)
评论(0)
推荐(0)
2023年6月30日
css如何让图片宽度固定高度自适应
摘要: 我们只需给image标签加上 mode="widthFix" 的属性即可
阅读全文
posted @ 2023-06-30 20:01 你笑的好瓜
阅读(716)
评论(0)
推荐(0)
2023年6月29日
js格式化时间
摘要: let timeFormatSeconds = function(time) { let d = time ? new Date(time) : new Date(); let year = d.getFullYear(); let month = d.getMonth() + 1; let day
阅读全文
posted @ 2023-06-29 18:36 你笑的好瓜
阅读(59)
评论(0)
推荐(0)
2023年6月20日
bind方法,call方法,apply方法的区别
摘要: const zangSan = { name:'张三', money:20, addMoney:function(arg1,arg2){ this.money = arg1 + arg2 } } const liSi = { name: '李四', money:10 } //bind方法 conso
阅读全文
posted @ 2023-06-20 15:22 你笑的好瓜
阅读(19)
评论(0)
推荐(0)
1
2
3
下一页
公告