会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yw3692582
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
8
9
10
11
12
13
14
15
16
···
23
下一页
2021年8月9日
python+fastapi写接口
摘要: 此内容均以 win10 系统为参照: 前提条件: 首先确定安装了Python,我安装的是Python3.9版本,地址如下 1、官网链接:https://www.python.org/downloads/release/python-390/ 2、直接下载链接:https://www.python.o
阅读全文
posted @ 2021-08-09 11:36 yw3692582
阅读(860)
评论(0)
推荐(0)
2021年8月8日
Vue中移除监听事件
摘要: 原生放在 mounted 添加正常: document.getElementById('real_center_box').addEventListener('scroll', this.get_scrollTop) 移除,放在 beforeDestroy 或者 destroyed 中,移除时会报错
阅读全文
posted @ 2021-08-08 10:45 yw3692582
阅读(2293)
评论(0)
推荐(0)
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
阅读(207)
评论(0)
推荐(0)
2021年8月6日
在一个元素上同时绑定单击事件和双击事件,解决冲突(双击会触发两次单击)
摘要: /***** 主要需要一个变量(distinguish )来判断是哪种状态*****/ // 单击 once_click(item) { this.distinguish = true setTimeout(() => { if (this.distinguish) { // 处理单击事件的代码块
阅读全文
posted @ 2021-08-06 17:18 yw3692582
阅读(394)
评论(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
阅读(2960)
评论(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
阅读(1268)
评论(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
阅读(1278)
评论(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
阅读(2260)
评论(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
阅读(257)
评论(0)
推荐(0)
2021年7月30日
js去掉字符串中的 \u0000
摘要:
阅读全文
posted @ 2021-07-30 15:14 yw3692582
阅读(2549)
评论(0)
推荐(0)
上一页
1
···
8
9
10
11
12
13
14
15
16
···
23
下一页
公告