Skip to content

Commit

Permalink
steedos-input-table增加mode属性
Browse files Browse the repository at this point in the history
  • Loading branch information
tujiajun committed Jan 24, 2024
1 parent c14db62 commit a66b5a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions packages/@steedos-widgets/amis-lib/src/lib/input_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -1341,19 +1341,19 @@ export const getAmisInputTableSchema = async (props) => {
});
}
let schema = {
"type": "service",
"body": [
{
"type": "control",
"body": schemaBody,
"label": props.label,
"labelClassName": props.label ? props.labelClassName : "none",
"labelRemark": props.labelRemark,
"labelAlign": props.labelAlign
}
],
"className": props.className,
"id": serviceId
"type": "control",
"body": {
"type": "service",
"body": schemaBody,
"id": serviceId
},
"label": props.label,
"labelClassName": props.label ? props.labelClassName : "none",
"labelRemark": props.labelRemark,
"labelAlign": props.labelAlign,
//控制control的mode属性,https://aisuda.bce.baidu.com/amis/zh-CN/components/form/formitem#表单项展示
"mode": props.mode || null,
"className": props.className
};
// console.log("===schema===", schema);
return schema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const AmisInputTable = async (props) => {
// console.log("AmisInputTable props", props);
// columns内存在inlineEditMode属性, 控制字段级的內联模式
const { $schema, fields, name, id, data, columns, amis, className, tableClassName, headerToolbar, footerToolbar,
inlineEditMode, strictMode, dialog, primaryKey, showOperation, fieldPrefix, autoGeneratePrimaryKeyValue } = props;
inlineEditMode, strictMode, dialog, primaryKey, showOperation, fieldPrefix, autoGeneratePrimaryKeyValue, mode } = props;
const amisSchema = await getAmisInputTableSchema(props);
// console.log("=AmisInputTable==amisSchema====", amisSchema);
return amisSchema;
Expand Down

0 comments on commit a66b5a0

Please sign in to comment.