数据库插件

This commit is contained in:
robin
2022-06-01 06:42:50 +08:00
parent 3494cecb9d
commit 8150466cbd
7 changed files with 791 additions and 72 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ module.exports = class Bamboo extends Koa {
for (let listElement of list) {
await listElement.res(this)
}
this.willReadyList.push(()=>{
this.willReadyList.push(() => {
this.startServer()
})
await this.willReady()
@@ -36,7 +36,7 @@ module.exports = class Bamboo extends Koa {
/*扩展已经加载完成触发*/
async willReady() {
for (let WRL of this.willReadyList) {
WRL()
await WRL()
}
}
@@ -56,7 +56,7 @@ module.exports = class Bamboo extends Koa {
if (er) {
reject(er)
}
console.log("获取到的文件:", files);
// console.log("获取到的文件:", files);
files = files.map(item => {
const parse = path.parse(item);
return {
+2 -2
View File
@@ -483,8 +483,8 @@ module.exports = class Bamboo extends Koa {
}
/**
* 数据分组
* @param {string|array} value 传需要分组的字段['createdAt'].
* 仅选择某些属性
* @param {array} value 仅选择某些属性['foo', ['bar', 'baz'], 'qux'].
*/
attributes(value) {
this.tableAttributes = value