Selaa lähdekoodia

Changed: 富文本编辑器默认字号改为 14px

洪海涛 4 vuotta sitten
vanhempi
sitoutus
eb487608fc
3 muutettua tiedostoa jossa 24 lisäystä ja 8 poistoa
  1. 1 0
      public/index.html
  2. 18 8
      src/app.js
  3. 5 0
      src/components/searchInput/components/editor/index.js

+ 1 - 0
public/index.html

@@ -2,5 +2,6 @@
 <html>
   <body>
     <div id="app" />
+    <!-- <script src="https://cdn.staticfile.org/tinymce/5.8.2/tinymce.min.js" referrerpolicy="origin" defer=""></script> -->
   </body>
 </html>

+ 18 - 8
src/app.js

@@ -1,5 +1,6 @@
 import React from 'react';
 import ReactDOM from 'react-dom';
+// import './assets/css/index.less'
 import AgileTCEditor from './kityminderEditor';
 import { FromChooseItem, ModalTip } from './index'
 // import t from './index'
@@ -19,6 +20,11 @@ class App extends React.Component {
       this.setState({ show });
     }, 100);
   };
+  onDel() {
+    this.setState({
+      tab: 2
+    })
+  }
   render() {
     const { tab } = this.state;
     let content = null;
@@ -28,19 +34,20 @@ class App extends React.Component {
         title = {'删除确认'}
         content = {`删除用例集将会一并删除它的子用例集和用例,是否确定删除?`}
         onClose = {() => {
-          setDelModel(false)
+          // setDelModel(false)
         }}
-        onOk = {(e) => onDel(e)}
+        onOk = {(e) => this.onDel(e)}
       />
     } else {
-      content = <FromChooseItem 
+      content = <FromChooseItem
         renderFormList={[
           {
-            name: '描述',
+            name: '步骤描述',
             colSpan: 24,
-            key: 'remark',
-            type: 'textarea',
-            placeholder: '请填写描述'
+            key: 'stepDescription',
+            type: 'editor',
+            required: true,
+            placeholder: '请输入用例操作步骤',
           }
         ]}
         valueData={{}}
@@ -48,11 +55,14 @@ class App extends React.Component {
         onChange={(key, value) => console.log(111)}
       />;
     }
+    setTimeout(() => {
+      this.onDel()
+    }, 2000)
     return (
       <div>
         <Button onClick={() => this.handleClick(1, false)}>1</Button>
         <button onClick={() => this.handleClick(2, true)}>2</button>
-        <div>{content}</div>
+        <div style={{width: '900px'}}>{content}</div>
       </div>
     );
   }

+ 5 - 0
src/components/searchInput/components/editor/index.js

@@ -81,6 +81,11 @@ class EditorInput extends React.Component {
       images_upload_url: 'http://star.xiaojukeji.com/upload/img.node',
       image_advtab: true,
       image_uploadtab: true,
+      content_style: `
+      p {
+        font-size: 14px;
+      }
+    `,
       images_upload_handler: (blobInfo, success, failure) => {
         //这里写你上传图片的方法
         console.log(11111, blobInfo, success, failure)