From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 四月 2022 19:23:18 +0800
Subject: [PATCH] 2022-04-26

---
 src/templates/zshare/customscript/index.jsx |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx
index 4ddae3f..8daf4ab 100644
--- a/src/templates/zshare/customscript/index.jsx
+++ b/src/templates/zshare/customscript/index.jsx
@@ -9,6 +9,7 @@
 import Api from '@/api'
 import CodeMirror from '@/templates/zshare/codemirror'
 import asyncComponent from '@/utils/asyncComponent'
+import MKEmitter from '@/utils/events.js'
 import './index.scss'
 
 const { Paragraph } = Typography
@@ -39,12 +40,12 @@
         render: (text) => {
           let title = text.match(/^\s*\/\*.+\*\//)
           title = title && title[0] ? title[0] : ''
-          text = title ? text.replace(title, '') : text
+          let _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>
+              {title ? <span style={{color: '#a50'}}>{title}<span style={{fontSize: '12px', marginLeft: '5px'}}>{_text.length}</span></span> : null}
+              <Paragraph copyable={{ text: text }} ellipsis={{ rows: 4, expandable: true }}>{_text}</Paragraph>
             </div>
           )
         }
@@ -260,6 +261,8 @@
         editItem: null
       })
 
+      MKEmitter.emit('editLineId', values.uuid)
+
       this.props.scriptsUpdate(_scripts)
       this.props.form.setFieldsValue({
         sql: ''
@@ -390,6 +393,9 @@
                   onChange={this.selectScript}
                 >
                   <Select.Option key="default" value={defaultSql}>榛樿sql</Select.Option>
+                  <Select.Option key="debugger" value={`z_debug: select @ErrorCode='E',@retmsg='娴嬭瘯鏂偣' goto aaa`}>
+                    娴嬭瘯鏂偣
+                  </Select.Option>
                   {systemScripts.map((option, i) =>
                     <Select.Option style={{whiteSpace: 'normal'}} key={i} value={option.value}>{option.name}</Select.Option>
                   )}

--
Gitblit v1.8.0