egg RESTful Method Path Route Name Controller.Action GET /posts posts app.controllers.posts.index GET /posts/new new_post app.controllers.posts.new GET /posts/:id p...
egg 上传文件 #route.js中添加一个路由规则 router.post('/upload',controller.upload.index); 在controller中新建upload文件 'use strict'; //node.js 文件操作对象 const fs = require('fs'); //nod...
elementui select下拉框输入完全匹配值则下拉隐藏 链接: https://codepen.io/liniaa/pen/PooGoMM?&editable=true 这个产品设计实际有缺陷的,如果有a,ab那么只能选中a,解决方案是设置个定时器更新value, 如果继续输入则关闭定时器,不过还不如让用户选,产品设计有缺陷 <script src="//u...
egg使用jwt验证 原理:vue前端登录,提交账号密码给egg后端,后端比对信息后,使用jsonwebtoken对用户信息进行签名生成token,之后通过cookie返回给vue前端,前端需要使用token里的信息就使用js-base64进行token第二段解码即可。 vue前端路由跳转,进入路由前置守卫检测cookie中...
常用util /** * 存储localStorage */ export const setStore = (name, content) => { if (!name) return; if (typeof content !== 'string') { content = JSON.stringify(cont...
v2ray https://www.v2ray.com/chapter_00/install.html https://sixu.life/cloudflare-v2ray-ip.html caddy -conf /etc/caddy/Caddyfile --agree nohup /usr/local/bin/c...
vue使用html2canvas进行页面截图 Install npm install html2canvas Use import html2canvas from 'html2canvas'; html <!-- 截图区域 --> <div id="faultTree" ref="faultTree" :style="{width: '100%'...
axios上传文件 二、实现方法 1、读取文件 通过input标签,我们可以得到一个file文件将这个file进行处理。 <input class="upload" type="file" ref="upload" accept="image/jpeg,image/jpg,image/png" @change="uploa...
linux挂载google Drive 安装 Rclone Linux或macOS有多种安装方式,这里选择脚本安装: curl https://rclone.org/install.sh | sudo bash install.sh #!/usr/bin/env bash # error codes # 0 - exited without...