2019-05-13 14:14:04 +08:00
|
|
|
|
export default {
|
2019-11-07 10:41:14 +08:00
|
|
|
|
title: '一次性加载,前端分页,前端排序',
|
|
|
|
|
body: {
|
|
|
|
|
type: 'crud',
|
|
|
|
|
loadDataOnce: true,
|
|
|
|
|
api: '/api/sample?waitSeconds=1',
|
|
|
|
|
filter: {
|
|
|
|
|
title: '条件搜索',
|
|
|
|
|
submitText: '',
|
2021-06-07 10:09:55 +08:00
|
|
|
|
body: [
|
2019-11-07 10:41:14 +08:00
|
|
|
|
{
|
2021-06-07 10:09:55 +08:00
|
|
|
|
type: 'input-text',
|
2019-11-07 10:41:14 +08:00
|
|
|
|
name: 'keywords',
|
|
|
|
|
placeholder: '通过关键字搜索',
|
|
|
|
|
addOn: {
|
|
|
|
|
label: '搜索',
|
|
|
|
|
type: 'submit'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
name: 'id',
|
|
|
|
|
label: 'ID',
|
|
|
|
|
width: 20,
|
|
|
|
|
sortable: true,
|
|
|
|
|
type: 'text',
|
|
|
|
|
toggled: true,
|
|
|
|
|
remark: 'Bla bla Bla'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'engine',
|
|
|
|
|
label: 'Rendering engine',
|
|
|
|
|
sortable: true,
|
|
|
|
|
type: 'text',
|
|
|
|
|
toggled: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'browser',
|
|
|
|
|
label: 'Browser',
|
|
|
|
|
sortable: true,
|
|
|
|
|
type: 'text',
|
|
|
|
|
toggled: false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'platform',
|
|
|
|
|
label: 'Platform(s)',
|
|
|
|
|
sortable: true,
|
|
|
|
|
type: 'text',
|
|
|
|
|
toggled: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'version',
|
|
|
|
|
label: 'Engine version',
|
|
|
|
|
type: 'text',
|
|
|
|
|
toggled: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'grade',
|
|
|
|
|
label: 'CSS grade',
|
|
|
|
|
type: 'text',
|
|
|
|
|
toggled: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'operation',
|
|
|
|
|
label: '操作',
|
|
|
|
|
width: 100,
|
|
|
|
|
buttons: [
|
|
|
|
|
{
|
|
|
|
|
type: 'button',
|
|
|
|
|
icon: 'fa fa-eye',
|
|
|
|
|
actionType: 'dialog',
|
|
|
|
|
tooltip: '查看',
|
|
|
|
|
dialog: {
|
|
|
|
|
title: '查看',
|
|
|
|
|
body: {
|
|
|
|
|
type: 'form',
|
2021-06-07 10:09:55 +08:00
|
|
|
|
body: [
|
2019-11-07 10:41:14 +08:00
|
|
|
|
{
|
|
|
|
|
type: 'static',
|
|
|
|
|
name: 'engine',
|
|
|
|
|
label: 'Engine'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'static',
|
|
|
|
|
name: 'browser',
|
|
|
|
|
label: 'Browser'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'static',
|
|
|
|
|
name: 'platform',
|
|
|
|
|
label: 'Platform(s)'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'static',
|
|
|
|
|
name: 'version',
|
|
|
|
|
label: 'Engine version'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'static',
|
|
|
|
|
name: 'grade',
|
|
|
|
|
label: 'CSS grade'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'html',
|
|
|
|
|
html:
|
|
|
|
|
'<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
2019-05-13 14:14:04 +08:00
|
|
|
|
}
|
2019-11-07 10:41:14 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'button',
|
|
|
|
|
icon: 'fa fa-pencil',
|
|
|
|
|
tooltip: '编辑',
|
|
|
|
|
actionType: 'drawer',
|
|
|
|
|
drawer: {
|
|
|
|
|
position: 'left',
|
|
|
|
|
size: 'lg',
|
|
|
|
|
title: '编辑',
|
|
|
|
|
body: {
|
|
|
|
|
type: 'form',
|
|
|
|
|
name: 'sample-edit-form',
|
|
|
|
|
api: '/api/sample/$id',
|
2021-06-07 10:09:55 +08:00
|
|
|
|
body: [
|
2019-11-07 10:41:14 +08:00
|
|
|
|
{
|
2021-06-07 10:09:55 +08:00
|
|
|
|
type: 'input-text',
|
2019-11-07 10:41:14 +08:00
|
|
|
|
name: 'engine',
|
|
|
|
|
label: 'Engine',
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
2021-06-07 10:09:55 +08:00
|
|
|
|
type: 'input-text',
|
2019-11-07 10:41:14 +08:00
|
|
|
|
name: 'browser',
|
|
|
|
|
label: 'Browser',
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
2021-06-07 10:09:55 +08:00
|
|
|
|
type: 'input-text',
|
2019-11-07 10:41:14 +08:00
|
|
|
|
name: 'platform',
|
|
|
|
|
label: 'Platform(s)',
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
2021-06-07 10:09:55 +08:00
|
|
|
|
type: 'input-text',
|
2019-11-07 10:41:14 +08:00
|
|
|
|
name: 'version',
|
|
|
|
|
label: 'Engine version'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'divider'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'select',
|
|
|
|
|
name: 'grade',
|
|
|
|
|
label: 'CSS grade',
|
|
|
|
|
options: ['A', 'B', 'C', 'D', 'X']
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'button',
|
|
|
|
|
icon: 'fa fa-times text-danger',
|
|
|
|
|
actionType: 'ajax',
|
|
|
|
|
tooltip: '删除',
|
|
|
|
|
confirmText: '您确认要删除?',
|
|
|
|
|
api: 'delete:/api/sample/$id'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
toggled: true
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
2019-05-13 14:14:04 +08:00
|
|
|
|
};
|