KamYee
摘要: import React from 'react' import { Map, LngLat } from 'react-amap' import { Row, Col, Spin } from 'antd' import { connect } from 'react-redux' import 阅读全文
posted @ 2020-05-07 10:40 KamYee 阅读(796) 评论(0) 推荐(1) 编辑
摘要: 安装组件react-grid-layout yarn add react-grid-layout 引入拖动样式,不然没有拖动效果 import '../../../node_modules/react-grid-layout/css/styles.css' import React from 're 阅读全文
posted @ 2020-03-24 14:51 KamYee 阅读(1390) 评论(0) 推荐(0) 编辑
摘要: 创建项目,app-name = 项目名称 yarn create react-app app-name --template typescript 执行完毕控制台输入 cd app-name 然后输入运行命令,等待运行起来,项目基本功能已经初始化完毕了 yarn start 增加状态管理器 切换镜像 阅读全文
posted @ 2020-03-17 15:48 KamYee 阅读(612) 评论(0) 推荐(0) 编辑
摘要: var a = {n: 1}; var b = a; a.x = a = {n: 2}; console.log(a.x) // undefined console.log(b.x) // {n: 2} 解答: 点的优先级高于等号,所以先执行a.x 然后在从右执行赋值 传送门 mdn 优先级运算类型 阅读全文
posted @ 2020-03-05 10:45 KamYee 阅读(351) 评论(0) 推荐(0) 编辑
摘要: for...in for...in语句以任意顺序遍历一个对象的除Symbol以外的可枚举属性。 for...in会循环原型链上的属性 function test() { } test.prototype.testa = '123123' var c1 = new test() c1.testb = 阅读全文
posted @ 2020-03-04 17:11 KamYee 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1、防抖节流 触发高频事件后n秒内函数只会执行一次 2、数据集合 Set > 不允许重复,只有健值没有健名和数组类似,可以遍历循环有add, delete,has 方法 Map > 字典 键值对的集合,类似集合 4、将数组扁平化并去除其中重复数据,最终得到一个升序且不重复的数组 Array.from 阅读全文
posted @ 2020-02-28 15:18 KamYee 阅读(166) 评论(0) 推荐(0) 编辑
摘要: CDN 方式 配置externals 文件路径 build>webpack.base.conf.js > module.exports = {} 页面实现 debugger; //得到的数据 }); AMap.event.addListener(marker2, "click", function( 阅读全文
posted @ 2019-10-22 14:02 KamYee 阅读(2834) 评论(0) 推荐(1) 编辑
摘要: 基于Angular7.1和TypeScript实现 Html代码 TS代码 因为完成的比较匆忙,功能实现的不完美,后续在优化 阅读全文
posted @ 2018-12-03 11:45 KamYee 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 根据T类型将传入进来的Object对象进行反射,有待完善记录一下 阅读全文
posted @ 2018-07-23 10:39 KamYee 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 通过Nuget安装Entity Framework, 创建model;[Table("")] 代表在数据库对应的名称,可以自定义规则,[Key]代表是主键 创建EF上下文文件DBCommon,并继承DbContextDbContext是指数据库连接信息 打开nuget命令行工具,输入Enable-M 阅读全文
posted @ 2018-06-29 10:42 KamYee 阅读(169) 评论(0) 推荐(0) 编辑