- 博客(11)
- 资源 (1)
- 收藏
- 关注
原创 CentOS7安装docker和docker-compose
CentOS7安装docker和docker-compose 1.安装docker # 使用yum安装docker yum -y install docker # 启动 systemctl start docker.service # 设置为开机自启动 systemctl enable docker.service 2.安装docker-compose # 下载docker-compose sudo curl -L "https://github.com/docker/compose/rele
2021-10-13 10:50:24
190
原创 python2环境托管静态页
1.永久关闭防火墙 systemctl disable firewalld.service 2.加载开机自启动服务 vi /etc/rc.d/rc.local 2.1 文件夹编辑内容(通过which 查看命令所在绝对路径) cd /root/html/ && /usr/bin/nohup /usr/bin/python -m SimpleHTTPServer 80 3.把自启动文件提权成可执行文件 chmod +x /etc/rc.d/rc.local 4.重启 reboot ...
2020-09-15 11:53:15
172
原创 vue Failed to execute ‘insertBefore‘ on ‘Node‘
如果vue中报这个错误,由于两个遍历组件间存在空格导致。组件间去掉空格即可,下面这个示例是有空格的。 <flow-area v-for="area in data.areaList" @delete-area="deleteArea" :isconnect="isConnect" @change-area="changeArea":id="area.id" :key="area.id" :node="area"></flow-area> <flow-node v-for.
2020-08-04 14:35:08
2811
翻译 实战中的策略模式
export const StrategyMap = { /* Strategy 1: 将文件大小(bit)转化为 KB */ bitToKB: val => { const num = Number (val) return ...
2019-08-30 19:32:53
197
转载 element 的el-upload的change事件如何传递当前索引
on-change 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用 function(file, fileList) 公司有个项目需求需要在一个列表中分别上传图片,饿了么的方法不支持传递index,可以这样传递: :on-change="(file,fileList)=>{return changeFile(file,fileList, scope.$in...
2019-08-30 11:33:21
2336
3
原创 前端安全问题
#前端如何预防xss攻击 可使用js-xss库(自定义配置过滤规则) ,针对xss问题,一般采用前端在回显时过滤,后端在输入时过滤。 网址:http://jsxss.com #前端避免明文传输 可以采用MD5、hase或者加密策略 #漏扫如果提示表单采用get方式提交 需要在表单标签加method="post"避免此问题。 #避免CSRF问题 前端在请求头增加 xhr.setRequestHe...
2019-08-13 19:52:05
454
原创 在Vue中使用highlight.js高亮显示代码
安装 npm install highlight.js 编码 // Vue-cli生成的工程文件的src/main.js import hljs from 'highlight.js' import 'highlight.js/styles/googlecode.css' //样式文件 Vue.directive('highlight',function (el) { let bloc...
2019-03-14 19:30:21
8253
5
原创 vue表格嵌套内容展开收起
<table class="tab-left table tab-zn"> <thead> <tr> <th>在线状态<...
2018-10-19 18:45:43
6412
3
原创 获取上传文件大小
<input type="file" multiple id="a" onchange="change(this)"> <br/> 总大小: <span id="toatlSize"></span> <script> var a = document
2018-10-08 12:13:37
913
转载 Linux常用命令
常用命令 ls 显示文件或目录 -l 列出文件详细信息l(list) -a 列出当前目录下所有文件及目录,包括隐藏的a(all) mkdir 创建目录 -p 创建目录,若无父目录,则创建p(parent) cd 切换目录 touch ...
2018-10-08 11:30:34
184
原创 html中显示格式化的json
function JsonFormat(json) { if (typeof json != 'string') { json = JSON.stringify(json, undefined, 2); } json = json.replace(/&/g, '&').replace(/</g, '&l...
2018-10-08 10:56:57
1647
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅