wenbobowen 4 年之前
父節點
當前提交
f4640c78b5

二進制
.DS_Store


File diff suppressed because it is too large
+ 0 - 0
dist/bundle.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@didi/platformui",
-  "version": "0.1.69",
+  "version": "0.1.70",
   "description": "A platformui",
   "main": "dist/bundle.js",
   "author": "wenbobowen",

+ 43 - 0
src/components/codemirror/index.js

@@ -0,0 +1,43 @@
+import React, { useState, useMemo, useEffect, Fragment } from 'react';
+import { UnControlled as CodeMirror } from 'react-codemirror2'
+import 'codemirror/lib/codemirror.css'
+import 'codemirror/lib/codemirror.js'
+import 'codemirror/theme/solarized.css'
+import 'codemirror/mode/clike/clike.js'
+import 'codemirror/addon/selection/active-line';
+// 折叠行
+import 'codemirror/addon/fold/foldgutter.css'; 
+import 'codemirror/addon/fold/foldcode.js';
+import 'codemirror/addon/fold/foldgutter.js';  
+import 'codemirror/addon/fold/brace-fold.js';  
+import 'codemirror/addon/fold/comment-fold.js'
+// 代码补全
+import 'codemirror/addon/hint/show-hint.css'; // start-ctrl+空格代码提示补全
+import 'codemirror/addon/hint/show-hint.js'; 
+import 'codemirror/addon/hint/anyword-hint.js'; // end 
+// 设置语言
+import 'codemirror/mode/javascript/javascript';
+
+export default function CodeInput(props) {
+  const { value, onChange, onBeforeChange } = props
+  const [code, setCode] = useState(value)
+  // useEffect(() => {
+  //   console.log(1)
+  //   setCode(code)
+  // }, [])
+  return (
+    <CodeMirror
+      value={code}
+      options={{
+        lineNumbers: true,
+        mode: { name: 'text/javascript' },
+        extraKeys: { 'Ctrl': 'autocomplete' },
+        styleActiveLine: true,
+        lineWrapping: true,
+        foldGutter: true,
+        gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter']
+      }}
+      onChange={(editor, data, value) => onChange(editor, data, value)}
+    />
+  )
+}

+ 0 - 0
src/components/codemirror/style.module.less


+ 2 - 2
src/components/editTable/index.js

@@ -38,8 +38,8 @@ export default function EditTable(props) {
               ))
             }
             {/* <th className=""></th> */}
-            {/* <th class="">分组</th>
-            <th>分组名</th> */}
+            {/* <th class="">模块</th>
+            <th>模块名</th> */}
           </tr>
         </thead>
         <tbody>

+ 1 - 1
src/components/pageHeader/components/searchHeader/style.module.less

@@ -8,7 +8,7 @@
       margin-right: 10px;
     }
     .btn {
-      width: 88px;
+      width: 88px; 
       text-align: right;
     }
   }

+ 1 - 1
src/components/searchInput/components/editor/index.js

@@ -73,7 +73,7 @@ class EditorInput extends React.Component {
       toolbar: 'fullscreen bold italic underline strikethrough | fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent table | undo redo | removeformat formatselect',
       table_toolbar: 'tableprops | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol | tablemergecells tablesplitcells',
       relative_urls: false,
-      images_upload_url: 'https://star.xiaojukeji.com/upload/img.node',
+      images_upload_url: 'http://star.xiaojukeji.com/upload/img.node',
       image_advtab: true,
       image_uploadtab: true,
       images_upload_handler: (blobInfo, success, failure) => {

Some files were not shown because too many files changed in this diff