update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/noco",
|
||||
"version": "0.0.9",
|
||||
"version": "0.0.10",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -29,6 +29,14 @@ export class NocoApi {
|
||||
set baseURL(url: string) {
|
||||
this.query.baseURL = url;
|
||||
}
|
||||
async getTableByName(table: string, baseId: string) {
|
||||
const res = await this.meta.tables.list(baseId)
|
||||
if (res.code === 200) {
|
||||
const tableMeta = res.data.list.find(t => t.table_name === table);
|
||||
return tableMeta;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param baseId
|
||||
|
||||
@@ -34,4 +34,8 @@ export const showMore = (obj: any) => {
|
||||
|
||||
export const users = new Users({
|
||||
query: nocoApi.query,
|
||||
});
|
||||
});
|
||||
|
||||
// const res = await nocoApi.getTableByName('控制中枢', 'p0np8adsoc79odk');
|
||||
|
||||
// console.log(showMore(res));
|
||||
Reference in New Issue
Block a user