摘要: node服务 const dir = path.join(__dirname, 'download') app.get('/downloadfile', (req, res) => { const { filename } = req.query var filepath = path.join(d 阅读全文
posted @ 2021-05-17 19:28 黑色外套 阅读(692) 评论(0) 推荐(0)
摘要: table { /* 合并表格相邻边框 */ border-collapse: collapse; width: 800px; /* 表格布局算法,防止文字过多撑开单元格 */ table-layout: fixed; } th, td { border: 1px solid #ccc; } tr 阅读全文
posted @ 2021-04-13 17:41 黑色外套 阅读(46) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content=" 阅读全文
posted @ 2021-03-12 22:55 黑色外套 阅读(82) 评论(0) 推荐(0)
摘要: 只需要添加如下一行代码 /** @type {HTMLCanvasElement} */ 阅读全文
posted @ 2021-03-12 21:24 黑色外套 阅读(77) 评论(0) 推荐(0)
摘要: 安装依赖项 npm i crypto-js --save 新建 crypto.js 文件 /* /utils/crypto.js */ export const encrypt = (word, keyStr) => { keyStr = keyStr ? keyStr : '^*_*^' var 阅读全文
posted @ 2021-03-10 15:49 黑色外套 阅读(40) 评论(0) 推荐(0)
摘要: 谷歌引入英文字体 仅支持引文字体:https://fonts.google.com 阅读全文
posted @ 2021-02-05 01:20 黑色外套 阅读(24) 评论(0) 推荐(0)
摘要: 路由懒加载 npm i @babel/plugin-syntax-dynamic-import 被访问的时候才加载对应的组件。 // [babel.config.js] module.exports = { //...... plugins: [ // ...... '@babel/plugin-s 阅读全文
posted @ 2020-12-23 11:10 黑色外套 阅读(77) 评论(0) 推荐(0)
摘要: Cookie // 设置cookie function setCookie(name, value, time) { var date = new Date() date.setHours(date.getDate() + time) // 存储时间/小时 document.cookie = `${ 阅读全文
posted @ 2020-12-17 10:14 黑色外套 阅读(67) 评论(0) 推荐(0)