From f895e8af9e6a393f71fec0dc26fdf1b9b6616cb4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 11 十二月 2020 18:53:04 +0800 Subject: [PATCH] 2020-12-11 --- src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index ea18718..91870f9 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -170,9 +170,18 @@ title: 'SQL', dataIndex: 'sql', width: '60%', - render: (text) => ( - <Paragraph copyable ellipsis={{ rows: 5, expandable: true }}>{text}</Paragraph> - ) + render: (text) => { + let title = text.match(/^\s*\/\*.+\*\//) + title = title && title[0] ? title[0] : '' + text = title ? text.replace(title, '') : text + + return ( + <div> + {title ? <span style={{color: '#a50'}}>{title}</span> : null} + <Paragraph copyable ellipsis={{ rows: 4, expandable: true }}>{text}</Paragraph> + </div> + ) + } }, { title: '鎵ц浣嶇疆', -- Gitblit v1.8.0