摘要: 错误使用方式 根据数组中某些元素是否选中删除 // arr.forEach((item, index) => { // if(item.checked) { // arr.splice(index, 1); // } // }); 正确使用方式举例: // filter 使用方式 arr = arr 阅读全文
posted @ 2021-12-04 21:31 jiaqiq 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(76) 评论(1) 推荐(0) 编辑
摘要: window.addEventListener("online", function(){ // _this.$message({ // type: 'warning', // message: '网络连接成功', // }); _this.$alert('网络连接成功', '提示', {type: 阅读全文
posted @ 2021-08-26 15:33 jiaqiq 阅读(69) 评论(0) 推荐(0) 编辑
摘要: <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 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(841) 评论(0) 推荐(0) 编辑
摘要: <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 阅读(43) 评论(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 阅读(30) 评论(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 阅读(325) 评论(0) 推荐(0) 编辑
摘要: js实现很简单,获取浏览器焦点,以下是实现方式: window.onload = function(){ setTimeout(function() { this.focus(); this.blur(); alert(1); },3000); } 来自:https://blog.csdn.net/ 阅读全文
posted @ 2021-03-16 09:41 jiaqiq 阅读(791) 评论(0) 推荐(0) 编辑
摘要: private scrollToBottom() { this.$nextTick(() => { const container = this.$el.querySelector(".chatDialog-wrap"); // @ts-ignore container.scrollTop = co 阅读全文
posted @ 2021-03-10 10:57 jiaqiq 阅读(1944) 评论(0) 推荐(0) 编辑