feat: remove view options from collections

This commit is contained in:
chenos 2020-12-12 16:31:05 +08:00
parent d1372e273a
commit c776229540

View File

@ -43,6 +43,7 @@ export default {
title: '标识',
unique: true,
required: true,
developerMode: true,
component: {
type: 'string',
showInTable: true,
@ -63,73 +64,73 @@ export default {
showInDetail: true,
},
},
{
interface: 'radio',
type: 'virtual',
name: 'defaultView',
title: '默认视图',
defaultValue: 'table',
dataSource: [
{label: '表格', value: 'table'},
{label: '看板', value: 'kanban', disabled: true},
{label: '日历', value: 'calendar', disabled: true},
],
component: {
type: 'radio',
showInTable: true,
showInForm: true,
showInDetail: true,
},
},
{
interface: 'radio',
type: 'virtual',
name: 'mode',
title: '表格模式',
defaultValue: 'default',
dataSource: [
{label: '常规模式', value: 'default'},
{label: '简易模式', value: 'simple'},
],
component: {
type: 'radio',
tooltip: `
<p><br/></p>
`,
showInForm: true,
showInDetail: true,
},
},
{
interface: 'radio',
type: 'virtual',
name: 'defaultPerPage',
title: '每页显示几行数据',
defaultValue: 50,
dataSource: [
{label: '20', value: 20},
{label: '50', value: 50},
{label: '100', value: 100},
],
component: {
type: 'radio',
showInForm: true,
showInDetail: true,
},
},
{
interface: 'boolean',
type: 'virtual',
name: 'draggable',
title: '支持拖拽数据排序',
showInForm: true,
showInDetail: true,
component: {
type: 'checkbox',
showInForm: true,
showInDetail: true,
},
},
// {
// interface: 'radio',
// type: 'virtual',
// name: 'defaultView',
// title: '默认视图',
// defaultValue: 'table',
// dataSource: [
// {label: '表格', value: 'table'},
// {label: '看板', value: 'kanban', disabled: true},
// {label: '日历', value: 'calendar', disabled: true},
// ],
// component: {
// type: 'radio',
// showInTable: true,
// showInForm: true,
// showInDetail: true,
// },
// },
// {
// interface: 'radio',
// type: 'virtual',
// name: 'mode',
// title: '表格模式',
// defaultValue: 'default',
// dataSource: [
// {label: '常规模式', value: 'default'},
// {label: '简易模式', value: 'simple'},
// ],
// component: {
// type: 'radio',
// tooltip: `
// <p>常规模式:点击数据进入详情页进行各项查看和操作;<br/>简易模式:点击数据直接打开编辑表单</p>
// `,
// showInForm: true,
// showInDetail: true,
// },
// },
// {
// interface: 'radio',
// type: 'virtual',
// name: 'defaultPerPage',
// title: '每页显示几行数据',
// defaultValue: 50,
// dataSource: [
// {label: '20', value: 20},
// {label: '50', value: 50},
// {label: '100', value: 100},
// ],
// component: {
// type: 'radio',
// showInForm: true,
// showInDetail: true,
// },
// },
// {
// interface: 'boolean',
// type: 'virtual',
// name: 'draggable',
// title: '支持拖拽数据排序',
// showInForm: true,
// showInDetail: true,
// component: {
// type: 'checkbox',
// showInForm: true,
// showInDetail: true,
// },
// },
{
interface: 'boolean',
type: 'boolean',
@ -278,19 +279,19 @@ export default {
actionNames: ['update'],
developerMode: true,
},
{
type: 'table',
name: 'simple',
title: '简易模式',
template: 'SimpleTable',
actionNames: ['create', 'destroy'],
detailsViewName: 'details',
updateViewName: 'form',
},
// {
// type: 'table',
// name: 'simple',
// title: '简易模式',
// template: 'SimpleTable',
// actionNames: ['create', 'destroy'],
// detailsViewName: 'details',
// updateViewName: 'form',
// },
{
type: 'table',
name: 'table',
title: '列表',
title: '全部数据',
template: 'Table',
actionNames: ['create', 'destroy'],
default: true,