fix: 1. 小程序导航配置 pagePath -> path 2.OneAPIConfig -> oneAPIConfig

This commit is contained in:
wanying.jwy 2020-09-18 14:55:04 +08:00
parent 890ec7617f
commit 2714285393
4 changed files with 10 additions and 11 deletions

View File

@ -83,7 +83,7 @@ export class Project {
const documentInstances = this.data.componentsTree.map((data) => this.createDocument(data));
// TODO: 暂时先读 config tabBar 里的值,后面看整个 layout 结构是否能作为引擎规范
if (this.config?.layout?.props?.tabBar?.items?.length > 0) {
documentInstances.find((i) => i.fileName === this.config.layout.props.tabBar.items[0].pagePath)?.open();
documentInstances.find((i) => i.fileName === this.config.layout.props.tabBar.items[0].path)?.open();
} else {
documentInstances[0].open();
}

View File

@ -80,7 +80,7 @@ export interface ObjectOf {
[k: string]: any;
}
export interface Shape {
type: 'shape';
type: "shape";
value: {
name?: string;
propType?: PropType;
@ -89,7 +89,7 @@ export interface Shape {
[k: string]: any;
}
export interface Exact {
type: 'exact';
type: "exact";
value: {
name?: string;
propType?: PropType;

View File

@ -173,15 +173,14 @@ export function bzb(apiCode, params, otherProps = {}) {
}
export async function webTableProxy(req) {
console.log(req);
const { _table } = window.parent;
const { VisualEngine } = window;
const { Bus } = VisualEngine;
if (_table) {
const { options } = req;
const { params, OneAPIConfig } = options;
const { code } = OneAPIConfig;
const sheetId = OneAPIConfig['x-model'];
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);
return result;
@ -189,9 +188,9 @@ export async function webTableProxy(req) {
return new Promise((resolve, reject) => {
Bus.emitter.on('table.ready', async (table) => {
const { options } = req;
const { params, OneAPIConfig } = options;
const { code } = OneAPIConfig;
const sheetId = OneAPIConfig['x-model'];
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);
resolve(result);

View File

@ -57,5 +57,5 @@
"publishConfig": {
"registry": "https://registry.npm.alibaba-inc.com"
},
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-rax-simulator-renderer@1.0.8-0/build/index.html"
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-rax-simulator-renderer@1.0.9-2/build/index.html"
}