大飞_dafei

导航

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 50 下一页

2021年3月18日 #

JavaScript 那些操作会造成内存泄漏

摘要: JavaScript 那些操作会造成内存泄漏 意外的全局变量 被遗忘的计时器活回调函数 脱离DOM的引用 闭包 第一种情况是我们由于使用未声明的变量,而意外的创建了一个全局变量,而使这个变量一直留在内存中无法被回收。第二种情况是我们设置了 setInterval 定时器,而忘记取消它,如果循环函数有 阅读全文

posted @ 2021-03-18 10:08 大飞_dafei 阅读(101) 评论(0) 推荐(0)

2021年3月17日 #

Vue 自定义指令简单使用

摘要: Vue 自定义指令简单使用 main.js //指令--1 Vue.directive('my-fei-directive', { inserted: function (el, binging, vnode, oldVnode) { el.focus(); el.style.borderColor 阅读全文

posted @ 2021-03-17 16:21 大飞_dafei 阅读(100) 评论(0) 推荐(0)

2021年2月21日 #

React 生命周期

摘要: React 生命周期 阅读全文

posted @ 2021-02-21 16:32 大飞_dafei 阅读(82) 评论(0) 推荐(0)

2021年2月19日 #

Vue 之 v-model 修饰符

摘要: Vue 之 v-model 修饰符 .lazy - 取代 input 监听 change 事件 .number - 输入字符串转为有效的数字 .trim - 输入首尾空格过滤 demo: 首尾空格过滤 <template> <div> <p> <input v-model.trim="message 阅读全文

posted @ 2021-02-19 19:53 大飞_dafei 阅读(141) 评论(0) 推荐(0)

React 和 antd 之 rowKey 问题

摘要: React 和 antd 之 rowKey 问题 Warning: Each child in a list should have a unique "key" prop.Check the render method of `Body`. See https://fb.me/react-warn 阅读全文

posted @ 2021-02-19 04:43 大飞_dafei 阅读(326) 评论(0) 推荐(0)

2021年2月16日 #

在 React 中使用 element-ui

摘要: 在 React 中使用 element-ui 安装 npm i element-react --save npm install element-theme-default --save #主题 使用 import React from 'react'; import ReactDOM from ' 阅读全文

posted @ 2021-02-16 21:58 大飞_dafei 阅读(1652) 评论(0) 推荐(0)

2021年1月25日 #

运算符 typeof 和 instanceof

摘要: 运算符 typeof 和 instanceof typeof 识别所有值类型 识别函数 判断是否是引用类型(但是不能区分是那种引用类型) (typeof "abc123"); // string (typeof 123); // number (typeof a); // undefined (ty 阅读全文

posted @ 2021-01-25 20:09 大飞_dafei 阅读(120) 评论(0) 推荐(0)

2021年1月6日 #

BASE64图片_获取BASE64字符串

摘要: BASE64图片_获取BASE64字符串 BASE64图片: <input type="file" id="image"><br/> <button id="up">上传</button> <script src="https://cdn.staticfile.org/jquery/1.10.2/j 阅读全文

posted @ 2021-01-06 18:08 大飞_dafei 阅读(164) 评论(0) 推荐(0)

RegExp 正则简单使用

摘要: RegExp 正则简单使用 "123".match(/^\d*$/g); // ["123"] "123_fei".match(/^[0-9]*$/g); // null "123_fei_456_foo_789".replace(/[0-9]{3}/g,","); ",_fei_,_foo_," 阅读全文

posted @ 2021-01-06 09:18 大飞_dafei 阅读(182) 评论(0) 推荐(0)

2021年1月4日 #

Vue 中mixins,extends,class简单使用

摘要: Vue 中mixins,extends,class简单使用 demo: index.vue, feiMixins,feiExtends,feiClass 四个文件 index.vue <template> <div id="index"> <div>{{foo}}</div> <div>{{bar} 阅读全文

posted @ 2021-01-04 09:08 大飞_dafei 阅读(942) 评论(0) 推荐(0)

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 50 下一页