摘要: 父选择器 &: //aaaa a { font-weight: bold; text-decoration: none; &:hover { text-decoration: underline; } body.firefox & { font-weight: normal; } } 编译为 a { 阅读全文
posted @ 2020-09-07 15:24 红桃七716 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 居中:http://ife.baidu.com/note/detail/id/1549 阅读全文
posted @ 2020-09-06 14:14 红桃七716 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 在react组件开发中,遇到需要请求接口来判断展示组件A或者B,但由于react生命周期函数,组件第一次render的时候,接口还没有返回数据,无法确定render什么组件。此时,新增一个布尔值状态isResOk: false,如果isResOk为false,请求没有成功,则不展示任何组件;如果is 阅读全文
posted @ 2020-07-15 23:55 红桃七716 阅读(1477) 评论(0) 推荐(0) 编辑
摘要: 首次diff: 先 git status 接着 git add . 随后 git status 然后 git commit -m "填写备注" 最后arc diff --create 自动弹出进行备注填写:{ Summary:(备注一下这次提交做的什么) Test Plan: yes Reviewe 阅读全文
posted @ 2020-07-05 22:08 红桃七716 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1、react生命周期分4个阶段 2、example 1 import React,{ Component, Fragment } from "react" 2 import XiaojiejieItem from './XiaojiejieItem' 3 import './style.css' 阅读全文
posted @ 2020-06-28 00:19 红桃七716 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1、检查node与npm安装与否 node -v npm -v 可在nodejs.cn网站进行下载安装 2、全局安装react脚手架 npm install -g create-react-app 3、新建项目所在文件夹,并进入 mkdir ReactDemo cd ReactDemo 4、用rea 阅读全文
posted @ 2020-06-27 00:00 红桃七716 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 1、上传文件事件,对文件名称、文件大小进行后续校验处理 handleFileChange = event => { const file = event.target.files && event.target.files[0] console.log(event.target.files) con 阅读全文
posted @ 2020-06-21 18:27 红桃七716 阅读(2573) 评论(0) 推荐(0) 编辑
摘要: 1、ES6的扩展运算符:实现深拷贝 2、JSON.parse(JSON.stringify(js对象)):实现深拷贝 该方法存在弊端,如果JS对象中存在有时间对象,则JSON.stringify后再JSON.parse的结果,时间将只是字符串的形式。而不是时间对象; var test = { nam 阅读全文
posted @ 2020-06-20 17:41 红桃七716 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1、注册一个github账号 2、new 一个repositories,命名bilibili_todoList 3、安装git成功后,打开git bash here,进入本地项目文件夹bilibil_todoList cd 文件夹目录 4、将github上的仓库克隆到本地 git clone git 阅读全文
posted @ 2020-06-14 14:48 红桃七716 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1、Flex=Flexible Box的缩写,采用flex布局的元素,称为flex容器;它的所有子元素自动成为容器成员,称为flex项目(flex item)。设置容器属性display:flex。 2、属性 容器属性flex-flow: flex-direction flex-wrap flex- 阅读全文
posted @ 2020-05-31 22:37 红桃七716 阅读(149) 评论(0) 推荐(0) 编辑