mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
Merge pull request #7156 from hsm-lv/fix-inputtable
fix:input-table构建dataschema报错问题
This commit is contained in:
commit
463c53d855
@ -1039,15 +1039,27 @@ export class TableControlPlugin extends BasePlugin {
|
|||||||
const columns: EditorNodeType = node.children.find(
|
const columns: EditorNodeType = node.children.find(
|
||||||
item => item.isRegion && item.region === 'columns'
|
item => item.isRegion && item.region === 'columns'
|
||||||
);
|
);
|
||||||
for (let current of columns?.children) {
|
|
||||||
const schema = current.schema;
|
// todo:以下的处理无效,需要cell实现才能深层细化
|
||||||
if (schema.name) {
|
// for (let current of columns?.children) {
|
||||||
itemsSchema.properties[schema.name] = current.info?.plugin
|
// const schema = current.schema;
|
||||||
?.buildDataSchemas
|
// if (schema.name) {
|
||||||
? await current.info.plugin.buildDataSchemas(current, region)
|
// itemsSchema.properties[schema.name] = current.info?.plugin
|
||||||
: {
|
// ?.buildDataSchemas
|
||||||
|
// ? await current.info.plugin.buildDataSchemas(current, region)
|
||||||
|
// : {
|
||||||
|
// type: 'string',
|
||||||
|
// title: schema.label || schema.name
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 一期先简单处理,上面todo实现之后,这里可以废弃
|
||||||
|
for (let current of node.schema?.columns) {
|
||||||
|
if (current.name) {
|
||||||
|
itemsSchema.properties[current.name] = {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: schema.label || schema.name
|
title: current.label || current.name
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user