随笔分类 -  node

摘要:1.安装: npm install lowdb --save 2..引入lowdb,设置表 const low = require('lowdb'); const FileSync = require('lowdb/adapters/FileSync'); // 有多种适配器可选择 const ad 阅读全文
posted @ 2020-12-25 14:25 北海等风吹 阅读(1728) 评论(0) 推荐(0)
摘要:1.引入fs const fs = require('fs') const path = reqire('path') 2.方法 const downloadFile = function (destDir, callback) { let fileName = '文件' + Date.now(). 阅读全文
posted @ 2020-12-25 14:09 北海等风吹 阅读(290) 评论(0) 推荐(0)
摘要:1.安装和引入xlsx 安装 npm install xlsx 引入:let xlsx = require('xlsx');2.读取excel数据function readFile(file) { let f = file.raw; let reader = new FileReader(); re 阅读全文
posted @ 2020-12-25 11:31 北海等风吹 阅读(1027) 评论(0) 推荐(0)