From e6cce3100ff7e5b495064fec11b20a91d964f927 Mon Sep 17 00:00:00 2001 From: "carlos.czw" Date: Mon, 31 Aug 2020 16:28:22 +0800 Subject: [PATCH] feat: window._table --- packages/rax-render/src/utils/request.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/rax-render/src/utils/request.js b/packages/rax-render/src/utils/request.js index e5fe1f5ff..abf12c2e6 100644 --- a/packages/rax-render/src/utils/request.js +++ b/packages/rax-render/src/utils/request.js @@ -172,14 +172,16 @@ export function bzb(apiCode, params, otherProps = {}) { export async function webTableProxy(req) { console.log(req); + const { _table } = window; const { VisualEngine } = window; const { Bus, Table } = VisualEngine; - if (Table) { + // if (Table) { + if (_table) { const { options } = req; const { params, OneAPIConfig } = options; const { code } = OneAPIConfig; const sheetId = OneAPIConfig['x-model']; - const sheet = await Table.find({ id: sheetId }); + const sheet = await _table.find({ id: sheetId }); const result = await sheet.instance.fetch({ code }, params); return result; }