摘要: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="viewport" 阅读全文
posted @ 2021-08-26 17:12 飞渝 阅读(60) 评论(0) 推荐(0)
摘要: js 运算符 1.JavaScript 算数运算符 1.1 (+) 加法 1.2 (-) 减法 1.3 (*) 乘法 1.4 (/) 除法 1.5 (%) 取模(余数) 1.6 (++)&(--) 递加&递减 2.JavaScript 赋值运算符 2.1 (=) 赋值运算符 2.2 (+=) 加法赋 阅读全文
posted @ 2021-08-14 01:06 飞渝 阅读(1158) 评论(0) 推荐(0)
摘要: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="viewport" 阅读全文
posted @ 2021-08-13 14:39 飞渝 阅读(70) 评论(0) 推荐(0)
摘要: History 对象 History 对象包含用户(在浏览器窗口中)访问过的 URL。 History 对象是 window 对象的一部分,可通过 window.history 属性对其进行访问。 注释:没有应用于 History 对象的公开标准,不过所有浏览器都支持该对象。 window.hist 阅读全文
posted @ 2021-08-11 17:32 飞渝 阅读(113) 评论(0) 推荐(0)
摘要: 在创建了远程仓库并初始化了README.md、README.en.md文件,本地推送或拉取时出现以下错误: fatal: refusing to merge unrelated histories。 致命的:拒绝合并不相关的历史。 字面意思可见是历史原因不和造成的。 原因是远程库和本地库两个分支是两 阅读全文
posted @ 2021-08-08 19:27 飞渝 阅读(917) 评论(0) 推荐(0)
摘要: 一、首先得有 node,并确保 node 版本是 10.13 或以上。(mac 下推荐使用 nvm 来管理 node 版本) 查看node $ node -v v10.13.0 二、推荐使用 yarn 管理 npm 依赖,并使用国内源(阿里用户使用内网源)。(我选用的国内源,后面将以国内源举例) # 阅读全文
posted @ 2021-08-01 18:31 飞渝 阅读(311) 评论(0) 推荐(0)
摘要: import React, { createContext, useEffect, useState } from 'react' export default function index() { const [name, setname] = useState<number>(1) useEff 阅读全文
posted @ 2021-08-01 17:39 飞渝 阅读(55) 评论(0) 推荐(0)
摘要: import React, { Component } from 'react' export default class index extends Component { //1[constructor].做一些组件的初始化工作,如果不初始化 state 或不进行方法绑定,则不需要为 React 阅读全文
posted @ 2021-08-01 17:37 飞渝 阅读(93) 评论(0) 推荐(1)
摘要: 语言特性 TypeScript 是一种给 JavaScript 添加特性的语言扩展。增加的功能包括: 类型批注和编译时类型检查 类型推断 类型擦除 接口 枚举 Mixin 泛型编程 名字空间 元组 Await 以下功能是从 ECMA 2015 反向移植而来: 类 模块 lambda 函数的箭头语法 阅读全文
posted @ 2021-08-01 13:59 飞渝 阅读(1164) 评论(0) 推荐(0)
摘要: 首先定义一个div。 然后稍微装修一下 下面开始区分 一、clientWidth和clientHeigh 、 clientTop和clientLeft 1,clientWidth的实际宽度 clientWidth = width+左右padding 2,clientHeigh的实际高度 client 阅读全文
posted @ 2021-07-26 10:39 飞渝 阅读(99) 评论(0) 推荐(0)