摘要: 1. var、let、const之间的区别 var声明变量可以重复声明,而let不可以重复声明var是不受限于块级的,而let是受限于块级var会与window相映射(会挂一个属性),而let不与window相映射var可以在声明的上面访问变量,而let有暂存死区,在声明的上面访问变量会报错cons 阅读全文
posted @ 2021-10-15 16:26 学习。。。 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 安装 npm i react-router-dom -- save<Router basename="/admin"> <Route path="/" exact component={()=>{<div>首页</div>}}> <Route path="/about" exact componen 阅读全文
posted @ 2020-04-28 19:58 学习。。。 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 生命周期的三个状态 mounting : 组件插入到dom updating: 将数据更新到dom unmounting:将组件移除dom 生命周期的钩子函数 ComponentWillMount: 组件将要渲染 ajax ComponentDidMount:组件渲染完毕 添加动画 Componen 阅读全文
posted @ 2020-04-27 14:34 学习。。。 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 一 基础 props: 父传子 单向 import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; class ParentCom extends React.Component { constr 阅读全文
posted @ 2020-04-23 15:28 学习。。。 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 一,组件 import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; // 函数式组件 return function Hello(props) { let titleName = <p> 这是 阅读全文
posted @ 2020-04-22 19:38 学习。。。 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 一,react 特点 1. 声明式设计 2.虚拟dom 3.jsx 4.组件化,模块化 5.单向数据流 二,脚手架 Create React App npm i -g create-react-app create-react-app --version create-react-app 项目名称 阅读全文
posted @ 2020-04-22 15:40 学习。。。 阅读(156) 评论(0) 推荐(0) 编辑
摘要: vue cli3 创建的项目 1.安装包 npm install filemanager-webpack-plugin --save-dev npm install silly-datetime --save-dev 2. 配置vue.config.js //引入包 const path = req 阅读全文
posted @ 2020-03-30 16:55 学习。。。 阅读(697) 评论(0) 推荐(0) 编辑
摘要: 一。 基本操作 1.创建完项目, code . 直接在vscode 中打开 2.设置--首选项 检测 package.json 文件 点击serve 是可以运行 3.常用的vscode 插件 4. 左侧项目文件控制显示隐藏 查看--命令面板 5. 配置代码片段 首选项--用户代码片段 -ts 版本 阅读全文
posted @ 2020-03-30 15:17 学习。。。 阅读(666) 评论(0) 推荐(0) 编辑
摘要: demo.ts // DataHelpler 类 用于操作localStorage class DataHelpler { dataKey: string; //localstorage key primaryKey: string; // id constructor(dataKey: strin 阅读全文
posted @ 2020-03-24 21:29 学习。。。 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 一,环境 1 新增的数据类型和部分语法,没有办法在浏览器和node 中执行,需要安装typescript 环境 安装:npm i -g typescript 成功:tsc -v 2 在浏览器中使用ts tsc xxx.ts 执行后会生成.js 文件 tsc 无法加载文件 (1)以管理员身份运行vsc 阅读全文
posted @ 2020-03-24 17:15 学习。。。 阅读(181) 评论(0) 推荐(0) 编辑