yarn add react-redux
|- redux
|- actions.js
|- reducer.js
|- store.js
actions.js
export const change_user_info = "changeUserInfo"
props
state
类型定义input
事件 event
类型定义// 定义 Props 类型
export interface Props {
name: string;
value: string;
}
// 定义 State 类型
export interface State{
value: string;
}
.editorconfig
编辑器配置缩进等
root = true
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
.babelrc
babel编辑配置
{
npm install -g typescript
index.ts
后缀名.ts
编译成 .js
> tsc index.ts
index.ts
===> index.js
string 字符串
number 数字
boolean 布尔值
date 日期
// 启动
> service mysqld start
// 关闭
> service mysqld stop
// 重启
> service mysqld restart
在ios软键盘收起时,页面键盘位置的内容留白
解决方法:
// input 添加 blur 事件
// ios键盘弹起 失焦后页面复原
window.scrollTo(0,0)
// vue
<input @blur="Inputblur" />
Inputblur(){
window.scrollTo(0,0)
}
docker images
镜像列表docker ps
服务列表
docker 隐藏打包文件.dockerignore
.git
node_modules
npm-debug.log
Dockerfile
FROM node:10.16.0-alpine
WORKDIR /app
环境: 阿里云 centos 7服务器
> ssh root@192.168.1.1
> 输入密码登陆
查看ssh状态 默认是开启的
//查看状态
> systemctl status sshd
// 参考 ssh常用命令
systemctl status sshd //查看状态
// 导入
import hljs from 'highlight.js/lib/highlight';
import 'highlight.js/styles/default.css';
安装 hiper 执行命令
// 安装
sudo npm install hiper -g
//报错
Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
Puppeteer
安装失败
解决方法