backup
|
@ -0,0 +1,3 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="corretto-11" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/Front-end.iml" filepath="$PROJECT_DIR$/.idea/Front-end.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
After Width: | Height: | Size: 50 KiB |
|
@ -0,0 +1 @@
|
||||||
|
{"editorState":{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"只有在保存的时候获取","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1},{"children":[],"direction":null,"format":"","indent":0,"type":"paragraph","version":1},{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Node.js has two module systems: CommonJS modules and ","type":"text","version":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"ECMAScript modules","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"link","version":1,"rel":null,"target":null,"title":null,"url":"https://nodejs.cn/api/modules.html#"},{"detail":0,"format":0,"mode":"normal","style":"","text":"。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"listitem","version":1,"value":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"Calling ","type":"text","version":1},{"detail":0,"format":16,"mode":"normal","style":"","text":"require()","type":"text","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":" always use the CommonJS module loader. Calling ","type":"text","version":1},{"detail":0,"format":16,"mode":"normal","style":"","text":"import()","type":"text","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":" always use the ECMAScript module loader.","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"listitem","version":1,"value":2},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"ECMAScript modules are ","type":"text","version":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"the official standard format","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"link","version":1,"rel":null,"target":null,"title":null,"url":"https://nodejs.cn/api/esm.html#"},{"detail":0,"format":0,"mode":"normal","style":"","text":" to package JavaScript code for reuse. Modules are defined using a variety of ","type":"text","version":1},{"children":[{"detail":0,"format":16,"mode":"normal","style":"","text":"import","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"link","version":1,"rel":null,"target":null,"title":null,"url":"https://nodejs.cn/api/esm.html#"},{"detail":0,"format":0,"mode":"normal","style":"","text":" and ","type":"text","version":1},{"children":[{"detail":0,"format":16,"mode":"normal","style":"","text":"export","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"link","version":1,"rel":null,"target":null,"title":null,"url":"https://nodejs.cn/api/esm.html#"},{"detail":0,"format":0,"mode":"normal","style":"","text":" statements.","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"listitem","version":1,"value":3}],"direction":"ltr","format":"","indent":0,"type":"list","version":1,"listType":"number","start":1,"tag":"ol"},{"children":[],"direction":null,"format":"","indent":0,"type":"paragraph","version":1},{"children":[],"direction":null,"format":"","indent":0,"type":"paragraph","version":1}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}}
|
|
@ -1,14 +1,23 @@
|
||||||
查看当前镜像
|
查看当前镜像
|
||||||
|
|
||||||
```apl
|
```javascript
|
||||||
npm help config
|
npm help config
|
||||||
npm config get registry
|
npm config get registry
|
||||||
```
|
```
|
||||||
|
|
||||||
设置全局镜像
|
设置全局镜像
|
||||||
|
|
||||||
```shell
|
```javascript
|
||||||
npm config set registry https://registry.npm.taobao.org --global
|
npm config set registry https://registry.npm.taobao.org --global
|
||||||
```
|
```
|
||||||
|
|
||||||
版本管理:[GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions](https://github.com/nvm-sh/nvm#usage)
|
版本管理:[GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions](https://github.com/nvm-sh/nvm#usage)
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
## nvm
|
||||||
|
node version manage
|
||||||
|
## npm
|
||||||
|
node package manage
|
||||||
|
## nrm
|
||||||
|
node remote manage
|
||||||
|
```
|
|
@ -0,0 +1,25 @@
|
||||||
|
HashRouter路径中有#
|
||||||
|
BrowserRouter路径中无#
|
||||||
|
BrowserRouter as Router ,可以将Router写在代码中。
|
||||||
|
BrowserRouter 没有#的路径,好看,真正朝后端发请求要页面,后端没有对应的路径处理路径就回404,不好看。
|
||||||
|
## 动态路由
|
||||||
|
```js
|
||||||
|
<Router path="/detail/:myid" component={Detail}/>
|
||||||
|
props.match.params.myid
|
||||||
|
```
|
||||||
|
## 路由拦截
|
||||||
|

|
||||||
|
## 路由模式
|
||||||
|
|
||||||
|
## withRouter 包裹路由
|
||||||
|
## 反向代理
|
||||||
|
|
||||||
|
## CSSModule
|
||||||
|
.module.css 模块化css文件
|
||||||
|
import style from './css/film.module.css'
|
||||||
|
{style.clazz}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
id选择器,class选择器生效
|
||||||
|
标签选择器,不生效
|
|
@ -0,0 +1,4 @@
|
||||||
|
# 纯函数
|
||||||
|
1. 对外界没有副作用。
|
||||||
|
2. 同样的输入得到同样的输出。
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
- vh视图size
|
||||||
|
- position:"sticky",top:0 吸顶效果
|
||||||
|
- visibility:"hidden" 是否可见
|
||||||
|
- padding: 调整周边距离
|
|
@ -0,0 +1,2 @@
|
||||||
|
# immutable
|
||||||
|
数据深拷贝
|
After Width: | Height: | Size: 176 KiB |
After Width: | Height: | Size: 275 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 206 KiB |
After Width: | Height: | Size: 154 KiB |
After Width: | Height: | Size: 250 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 141 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 39 KiB |
|
@ -0,0 +1,27 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>WebSocket</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
var ws = new WebSocket("ws://172.21.13.108:30052/jeecg-boot/ems/websocket/123");
|
||||||
|
ws.onopen = function() {
|
||||||
|
document.write('<span>ws: ' + ws.url + ' opened</span><br/>');
|
||||||
|
ws.send('{"cmd":"EMS_REPAIR_TASK_EQUIPMENT_STATE_SHOW_ON"}');
|
||||||
|
};
|
||||||
|
ws.onmessage = function(evt) {
|
||||||
|
console.log(evt);
|
||||||
|
};
|
||||||
|
ws.onclose = function(evt) {
|
||||||
|
document.write('{"msgId":"123","cmd":"EMS_REPAIR_TASK_EQUIPMENT_STATE_UPDATE_ON"}');
|
||||||
|
console.log(evt);
|
||||||
|
};
|
||||||
|
ws.onerror = function(evt) {
|
||||||
|
document.write('<span font="darkred">ws: closed</span><br/>');
|
||||||
|
console.log(evt);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|