会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yw3692582
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
8
9
10
11
12
13
14
15
16
···
23
下一页
2021年8月7日
JavaScript将文字转为语音播放
摘要: // 语音播放 const synth = window.speechSynthesis const message = new SpeechSynthesisUtterance() function voice_playback(text) { message.text = text messag
阅读全文
posted @ 2021-08-07 18:00 yw3692582
阅读(202)
评论(0)
推荐(0)
2021年8月6日
在一个元素上同时绑定单击事件和双击事件,解决冲突(双击会触发两次单击)
摘要: /***** 主要需要一个变量(distinguish )来判断是哪种状态*****/ // 单击 once_click(item) { this.distinguish = true setTimeout(() => { if (this.distinguish) { // 处理单击事件的代码块
阅读全文
posted @ 2021-08-06 17:18 yw3692582
阅读(386)
评论(0)
推荐(0)
JavaScript获取div中的滚动条的位置
摘要: // 文件结构如下, 父容器高度固定,内容超出时出现滚动条,现在需要获取滚动条的位置 <div id="center" style="height: 500px;overflow-y: auto;"> <div></div> </div> script: var center_scrollTop =
阅读全文
posted @ 2021-08-06 13:53 yw3692582
阅读(2946)
评论(0)
推荐(0)
2021年8月5日
正则表达式提取url中的ip地址
摘要: let url = 'http://127.0.0.1:3000' let reg_str = /\d+\.\d+\.\d+\.\d+/ console.log(url.match(reg_str)) // ["127.0.0.1", index: 7, input: "http://127.0.0
阅读全文
posted @ 2021-08-05 12:57 yw3692582
阅读(1258)
评论(0)
推荐(0)
2021年8月4日
Vue的 transition 配合 animate.css 做元素显示/隐藏的动画
摘要: 1、在index.html中引入animate.css 2、使用 transition 标签包裹需要显示/隐藏的内容,通过 v-if 或者 v-show 来控制显示/隐藏,vue官网关于它的介绍:https://cn.vuejs.org/v2/guide/transitions.html 3、重点:
阅读全文
posted @ 2021-08-04 19:26 yw3692582
阅读(1270)
评论(0)
推荐(0)
2021年8月3日
css四宫格、九宫格(grid实现)
摘要: 1、HTML部分 <div class="parent"> <div class="box1"></div> <div class="box2"></div> <div class="box3"></div> <div class="box4"></div> <div class="box5"></
阅读全文
posted @ 2021-08-03 14:06 yw3692582
阅读(2225)
评论(0)
推荐(0)
js根据数组对象的某一个属性进行数组对象排序
摘要: // 升序function compare(property) { return function (a, b) { let value1 = a[property]; let value2 = b[property]; return value1 - value2; };} // 降序functi
阅读全文
posted @ 2021-08-03 09:06 yw3692582
阅读(250)
评论(0)
推荐(0)
2021年7月30日
js去掉字符串中的 \u0000
摘要:
阅读全文
posted @ 2021-07-30 15:14 yw3692582
阅读(2543)
评论(0)
推荐(0)
2021年7月28日
el-table的分页、搜索后的保持多选状态
摘要:
阅读全文
posted @ 2021-07-28 09:00 yw3692582
阅读(102)
评论(0)
推荐(0)
2021年7月27日
Vue中针对某些列进行搜索(对列转换大小写)
摘要: getSearchInfo() { let search = this.search if (search) { this.currpage = 1 this.currentPage = 1 return this.tableData.filter(data => { return Object.k
阅读全文
posted @ 2021-07-27 09:55 yw3692582
阅读(169)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
14
15
16
···
23
下一页
公告