安装 npm install weishilun-test1 导入 const tt = require('./test1/index') 格式化时间 // 导入dateFormat 格式化时间的方法 const time = tt.dateFormat(new Date()) //转化的结果 2023-02-11 09:09:41 console.log(time)