会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
jiaqiq
1140103268@qq.com
博客园
首页
新随笔
联系
管理
订阅
2021年12月4日
js 一次性删除数组中的多个元素
摘要: 错误使用方式 根据数组中某些元素是否选中删除 // arr.forEach((item, index) => { // if(item.checked) { // arr.splice(index, 1); // } // }); 正确使用方式举例: // filter 使用方式 arr = arr
阅读全文
posted @ 2021-12-04 21:31 jiaqiq
阅读(574)
评论(0)
推荐(0)
2021年8月26日
监听 storage localStorage sessionStorage
摘要: let self = this; window.addEventListener("storage", function(event){ console.log('object:', event); if(event.key == 'xxxxxx') { if (sessionStorage.get
阅读全文
posted @ 2021-08-26 15:38 jiaqiq
阅读(82)
评论(1)
推荐(0)
监听网络是否连接 连网or断网
摘要: window.addEventListener("online", function(){ // _this.$message({ // type: 'warning', // message: '网络连接成功', // }); _this.$alert('网络连接成功', '提示', {type:
阅读全文
posted @ 2021-08-26 15:33 jiaqiq
阅读(76)
评论(0)
推荐(0)
2021年7月19日
js 判断手机机型
摘要: <script> $(function(){ function isIOS() { var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g var i
阅读全文
posted @ 2021-07-19 15:13 jiaqiq
阅读(415)
评论(0)
推荐(0)
2021年5月26日
Vue 中 v-for 图片不显示的解决办法
摘要: Vue 中 v-for 图片不显示的解决办法 (亲测可用) 一般我们使用 v-for 循环图片的时候习惯使用以下代码: <el-carousel :interval="4000" type="card" height="200px"> <el-carousel-item v-for="item in
阅读全文
posted @ 2021-05-26 14:29 jiaqiq
阅读(1105)
评论(0)
推荐(0)
2021年4月14日
上传选取文件(非样式库封装)
摘要: <el-button size="small" type="primary" @click="selectFile">选择文件</el-button> <input ref="file" type="file" hidden @change="inputChange" /> <span style=
阅读全文
posted @ 2021-04-14 09:28 jiaqiq
阅读(46)
评论(0)
推荐(0)
字典值计算属性
摘要: private get dicInfoComp() { return (type: any, options: any) => { for (const item of options) { if (item.dicKey String(type)) { return item.dicValue;
阅读全文
posted @ 2021-04-14 09:17 jiaqiq
阅读(33)
评论(0)
推荐(0)
请求传参,过滤掉参数为空的字段
摘要: for (let i in this.form) { if (this.form.hasOwnProperty(i)) { if (!this.form[i]) { this.form[i] = undefined; } } }
阅读全文
posted @ 2021-04-14 09:15 jiaqiq
阅读(341)
评论(0)
推荐(0)
2021年3月16日
浏览器有新消息之后,图标在电脑任务栏闪烁提示
摘要: js实现很简单,获取浏览器焦点,以下是实现方式: window.onload = function(){ setTimeout(function() { this.focus(); this.blur(); alert(1); },3000); } 来自:https://blog.csdn.net/
阅读全文
posted @ 2021-03-16 09:41 jiaqiq
阅读(1021)
评论(0)
推荐(0)
2021年3月10日
vue 滚动条到最底部 vue进入页面时滚动条始终在底部
摘要: private scrollToBottom() { this.$nextTick(() => { const container = this.$el.querySelector(".chatDialog-wrap"); // @ts-ignore container.scrollTop = co
阅读全文
posted @ 2021-03-10 10:57 jiaqiq
阅读(2032)
评论(0)
推荐(0)
下一页
公告