mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-06 05:49:32 +08:00
65ac422ed6
* 补充容错 * fix: form 中 name 关联顶层数据初始化失效 * 更新 examples * 文档调整 * 删除多余的文档, 调整 schema * schema 调整 * schema 调整 * control 类型容器 control 改成 body * 修复一个选项加载的bug * form 注册直接用 type
78 lines
1.8 KiB
JavaScript
78 lines
1.8 KiB
JavaScript
export default {
|
|
title: 'Table 全键盘操作示例',
|
|
remark: 'bla bla bla',
|
|
body: [
|
|
{
|
|
type: 'plain',
|
|
className: 'text-danger',
|
|
text:
|
|
'请通过上下左右键切换单元格,按 `Space` 键进入编辑模式,按 `Enter` 提交编辑,并最后点左上角的全部保存完成操作。'
|
|
},
|
|
{
|
|
type: 'crud',
|
|
className: 'm-t',
|
|
api: '/api/sample',
|
|
quickSaveApi: '/api/sample/bulkUpdate',
|
|
quickSaveItemApi: '/api/sample/$id',
|
|
columns: [
|
|
{
|
|
name: 'id',
|
|
label: 'ID',
|
|
width: 20,
|
|
sortable: true,
|
|
type: 'text',
|
|
toggled: true
|
|
},
|
|
{
|
|
name: 'engine',
|
|
label: 'Rendering engine',
|
|
sortable: true,
|
|
quickEdit: {
|
|
type: 'input-text',
|
|
required: true,
|
|
mode: 'inline'
|
|
},
|
|
type: 'text',
|
|
toggled: true
|
|
},
|
|
{
|
|
name: 'browser',
|
|
label: 'Browser',
|
|
sortable: true,
|
|
quickEdit: {
|
|
type: 'input-text',
|
|
required: true
|
|
},
|
|
type: 'text',
|
|
toggled: true
|
|
},
|
|
{
|
|
name: 'platform',
|
|
label: 'Platform(s)',
|
|
sortable: true,
|
|
quickEdit: true,
|
|
type: 'text',
|
|
toggled: true
|
|
},
|
|
{
|
|
name: 'version',
|
|
label: 'Engine version',
|
|
quickEdit: true,
|
|
type: 'text',
|
|
toggled: true
|
|
},
|
|
{
|
|
name: 'grade',
|
|
label: 'CSS grade',
|
|
quickEdit: {
|
|
type: 'select',
|
|
options: ['A', 'B', 'C', 'D', 'X']
|
|
},
|
|
type: 'text',
|
|
toggled: true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|