2019-04-30 11:11:25 +08:00
|
|
|
export default {
|
2019-11-07 10:41:14 +08:00
|
|
|
title: 'Test 信息:${page}',
|
|
|
|
body: {
|
|
|
|
type: 'crud',
|
|
|
|
api: '/api/sample',
|
|
|
|
syncLocation: false,
|
|
|
|
title: null,
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
name: 'id',
|
|
|
|
label: 'ID',
|
|
|
|
width: 20
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'engine',
|
|
|
|
label: 'Rendering engine',
|
|
|
|
sortable: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'grade',
|
|
|
|
type: 'map',
|
|
|
|
label: 'Rendering engine',
|
|
|
|
map: {
|
2019-12-06 09:58:08 +08:00
|
|
|
'A': "<span class='label label-info'>A</span>",
|
|
|
|
'B': "<span class='label label-success'>B</span>",
|
|
|
|
'C': "<span class='label label-primary'>C</span>",
|
|
|
|
'X': "<span class='label label-danger'>X</span>",
|
2019-11-07 10:41:14 +08:00
|
|
|
'*': 'Unkown'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'operation',
|
|
|
|
label: '操作',
|
|
|
|
width: 200,
|
|
|
|
buttons: [
|
|
|
|
{
|
|
|
|
type: 'button-group',
|
|
|
|
buttons: [
|
|
|
|
{
|
|
|
|
type: 'button',
|
|
|
|
label: '查看',
|
|
|
|
actionType: 'dialog',
|
|
|
|
dialog: {
|
|
|
|
disabled: true,
|
|
|
|
body: {
|
|
|
|
type: 'form',
|
2021-06-07 10:09:55 +08:00
|
|
|
body: [
|
2019-11-07 10:41:14 +08:00
|
|
|
{
|
|
|
|
name: 'engine',
|
|
|
|
label: 'Rendering engine',
|
|
|
|
type: 'static'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
}
|
2019-11-07 10:41:14 +08:00
|
|
|
},
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-11-07 10:41:14 +08:00
|
|
|
{
|
|
|
|
type: 'button',
|
|
|
|
label: '编辑',
|
|
|
|
actionType: 'dialog',
|
|
|
|
dialog: {
|
|
|
|
body: {
|
|
|
|
api: '/api/sample/$id',
|
|
|
|
type: 'form',
|
2021-06-07 10:09:55 +08:00
|
|
|
body: [
|
2019-11-07 10:41:14 +08:00
|
|
|
{
|
|
|
|
name: 'engine',
|
|
|
|
label: 'Rendering engine',
|
|
|
|
type: 'text'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2019-04-30 11:11:25 +08:00
|
|
|
|
2019-11-07 10:41:14 +08:00
|
|
|
{
|
|
|
|
type: 'button',
|
|
|
|
label: '删除',
|
|
|
|
level: 'danger',
|
|
|
|
actionType: 'ajax',
|
|
|
|
confirmText: '确定?',
|
|
|
|
api: 'delete:/api/sample/$id'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
]
|
2019-11-07 10:41:14 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2019-04-30 11:11:25 +08:00
|
|
|
};
|