Merge branch 'feat/rax-miniapp' of http://gitlab.alibaba-inc.com/ali-lowcode/ali-lowcode-engine into feat/rax-miniapp

This commit is contained in:
wanying.jwy 2020-08-30 16:43:29 +08:00
commit d85ca25fca
2 changed files with 12 additions and 4 deletions

View File

@ -132,6 +132,18 @@ export class SettingField extends SettingPropEntry implements SettingEntry {
return this.transducer.toHot(v);
}
setMiniAppDataSourceValue(data: any, options?: any) {
this.hotValue = data;
const v = this.transducer.toNative(data);
this.setValue(v, false, false, options);
// dirty fix list setter
if (Array.isArray(data) && data[0] && data[0].__sid__) {
return;
}
this.valueChange();
}
setHotValue(data: any, options?: any) {
this.hotValue = data;
const v = this.transducer.toNative(data);

View File

@ -181,20 +181,16 @@ export async function webTableProxy(req) {
const sheetId = OneAPIConfig['x-model'];
const sheet = await Table.find({ id: sheetId });
const result = await sheet.instance.fetch({ code }, params);
// const result = await Table.find({ id: 'vip_info' });
return result;
}
return new Promise((resolve, reject) => {
Bus.emitter.on('table.ready', async (table) => {
// const { name } = req;
// const result = table.fetch({ id: name });
const { options } = req;
const { params, OneAPIConfig } = options;
const { code } = OneAPIConfig;
const sheetId = OneAPIConfig['x-model'];
const sheet = await table.find({ id: sheetId });
const result = await sheet.instance.fetch({ code }, params);
// const result = await Table.find({ id: 'vip_info' });
resolve(result);
});
});