fix: adjust the view mode(temporary)

This commit is contained in:
chenos 2021-01-04 23:27:38 +08:00
parent 65c7ec9060
commit 63033d57c4
2 changed files with 10 additions and 6 deletions

View File

@ -112,9 +112,12 @@ export const DrawerForm = forwardRef((props: any, ref) => {
text(...args: any[]) {
return React.createElement('span', {}, ...args)
},
html(html: string) {
return <div dangerouslySetInnerHTML={{__html: html}}></div>
},
tooltip(title: string, offset = 3) {
return (
<Tooltip title={title}>
<Tooltip title={<div dangerouslySetInnerHTML={{__html: title}}></div>}>
<QuestionCircleOutlined
style={{ margin: '0 3px', cursor: 'default', marginLeft: offset }}
/>

View File

@ -199,19 +199,20 @@ export default {
},
},
{
interface: 'select',
interface: 'radio',
type: 'string',
name: 'template',
title: '模板',
title: '查看和编辑模式',
required: true,
dataSource: [
// { label: '表单', value: 'DrawerForm' },
{ label: '常规表格', value: 'Table' },
{ label: '简易表格', value: 'SimpleTable' },
{ label: '常规模式', value: 'Table' },
{ label: '快捷模式', value: 'SimpleTable' },
// { label: '日历模板', value: 'Calendar' },
],
component: {
type: 'string',
tooltip: "{{ html('常规模式:点击数据进入查看界面,再次点击进入编辑界面<br/>快捷模式:点击数据直接打开编辑界面') }}",
type: 'radio',
default: 'Table',
showInTable: true,
showInDetail: true,