From c776229540488cfb89d4ee52e476a1abb4be955e Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 12 Dec 2020 16:31:05 +0800 Subject: [PATCH] feat: remove view options from collections --- .../src/collections/collections.ts | 155 +++++++++--------- 1 file changed, 78 insertions(+), 77 deletions(-) diff --git a/packages/plugin-collections/src/collections/collections.ts b/packages/plugin-collections/src/collections/collections.ts index 1083fa89a..4e6211600 100644 --- a/packages/plugin-collections/src/collections/collections.ts +++ b/packages/plugin-collections/src/collections/collections.ts @@ -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: ` -

常规模式:点击数据进入详情页进行各项查看和操作;
简易模式:点击数据直接打开编辑表单

- `, - 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: ` + //

常规模式:点击数据进入详情页进行各项查看和操作;
简易模式:点击数据直接打开编辑表单

+ // `, + // 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,