Pārlūkot izejas kodu

Update: 升级4.x完成

洪海涛 3 gadi atpakaļ
vecāks
revīzija
eaf5efbf4b

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 6 - 12470
package-lock.json


+ 7 - 6
package.json

@@ -17,19 +17,20 @@
     "dev": "webpack-dev-server"
   },
   "dependencies": {
-    "antd": "^3.25.2",
+    "@ant-design/icons": "^4.6.4",
+    "antd": "^4.16.13",
     "clsx": "^1.1.1"
   },
   "devDependencies": {
     "@babel/core": "^7.7.4",
-    "@babel/runtime": "^7.15.3",
     "@babel/plugin-proposal-class-properties": "^7.14.5",
     "@babel/plugin-proposal-decorators": "^7.14.5",
     "@babel/plugin-transform-runtime": "^7.11.5",
     "@babel/preset-env": "^7.7.4",
     "@babel/preset-react": "^7.10.4",
+    "@babel/runtime": "^7.15.3",
     "@tinymce/tinymce-react": "^3.12.6",
-    "antd": "^3.25.2",
+    "antd": "^4.16.13",
     "axios": "^0.21.1",
     "babel-loader": "^8.0.5",
     "babel-plugin-import": "^1.13.3",
@@ -37,11 +38,13 @@
     "clean-webpack-plugin": "^3.0.0",
     "clsx": "^1.1.1",
     "codemirror": "^5.62.0",
+    "crypto-js": "^4.0.0",
     "css-loader": "^3.2.1",
     "html-webpack-plugin": "^3.2.0",
     "less": "^3.10.3",
     "less-loader": "^5.0.0",
     "lodash": "^4.17.21",
+    "moment": "^2.25.3",
     "optimize-css-assets-webpack-plugin": "^5.0.3",
     "react": "^16.6.0",
     "react-codemirror2": "^7.2.1",
@@ -51,9 +54,7 @@
     "tinymce": "^5.8.1",
     "uglifyjs-webpack-plugin": "^2.2.0",
     "url-loader": "^3.0.0",
-    "moment": "^2.25.3",
     "webpack": "^4.41.2",
-    "crypto-js": "^4.0.0",
     "webpack-cli": "^3.3.10",
     "webpack-dev-server": "^3.9.0",
     "webpack-merge": "^4.2.2",
@@ -61,7 +62,7 @@
     "webpack-parallel-uglify-plugin": "^1.1.2"
   },
   "peerDependencies": {
-    "antd": "^3.25.2",
+    "antd": "^4.16.13",
     "react": ">=16.6.0",
     "react-dom": ">=16.6.0"
   },

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 369 - 429
pnpm-lock.yaml


+ 1 - 1
public/index.html

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

+ 10 - 10
src/app.js

@@ -1,6 +1,6 @@
 import React from 'react';
 import ReactDOM from 'react-dom';
-// import './assets/css/index.less'
+import './assets/css/index.less'
 import AgileTCEditor from './kityminderEditor';
 import { FromChooseItem, ModalTip } from './index'
 // import t from './index'
@@ -41,14 +41,14 @@ class App extends React.Component {
     } else {
       content = <FromChooseItem
         renderFormList={[
-          // {
-          //   name: '步骤描述',
-          //   colSpan: 24,
-          //   key: 'stepDescription',
-          //   type: 'editor',
-          //   required: true,
-          //   placeholder: '请输入用例操作步骤',
-          // },
+          {
+            name: '步骤描述',
+            colSpan: 24,
+            key: 'stepDescription',
+            type: 'editor',
+            required: true,
+            placeholder: '请输入用例操作步骤',
+          },
           {
             name: '负责人',
             colSpan: 12,
@@ -71,7 +71,7 @@ class App extends React.Component {
     return (
       <div>
         <Button onClick={() => this.handleClick(1, false)}>1</Button>
-        <button onClick={() => this.handleClick(2, true)}>2</button>
+        <Button onClick={() => this.handleClick(2, true)}>2</Button>
         <div style={{width: '900px'}}>{content}</div>
       </div>
     );

+ 3 - 2
src/components/detialModalHeader/index.js

@@ -1,6 +1,7 @@
 import React, { useEffect, useState } from 'react'
 import clsx from 'clsx'
-import { Icon, Input, Select } from 'antd'
+import { CloseOutlined } from '@ant-design/icons';
+import { Input, Select } from 'antd';
 import styles from './style.module.less'
 
 const { Option } = Select
@@ -37,7 +38,7 @@ export default function DetialTable(props) {
         </div>
         <div className='flex-center-between'>
           {iconListRender}
-          <Icon type="close" className={styles.iconClose} onClick={() => onClose()}/>
+          <CloseOutlined className={styles.iconClose} onClick={() => onClose()} />
         </div>
       </header>
       <div className={styles.title}>

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

@@ -1,7 +1,7 @@
 import React, { useEffect, useState, useCallback } from 'react';
 import clsx from 'clsx';
-import { Input, Radio, Spin, Select, Icon } from 'antd';
-import { getDeepValue  } from '@platformui/utils'
+import { Input, Radio, Spin, Select } from 'antd';
+import { getDeepValue  } from '@/utils'
 // import { getPerson } from '@/request/common/api'
 import _ from 'lodash';
 import styles from './style.module.less'

+ 3 - 2
src/components/header/index.js

@@ -1,6 +1,7 @@
 import React from "react";
 import { withRouter } from 'react-router-dom'
-import { Dropdown, Icon, Menu, Tooltip, Select, Divider, Button } from "antd";
+import { DownOutlined } from '@ant-design/icons';
+import { Dropdown, Menu, Tooltip, Select, Divider, Button } from "antd";
 import MenuBox from "./menu";
 import "./style.less";
 
@@ -99,7 +100,7 @@ function Header(props) {
           }
         >
           <span style={{ color: "#fff", cursor: "pointer" }}>
-            {userInfo?.name} <Icon type="down" />
+            {userInfo?.name} <DownOutlined />
           </span>
         </Dropdown>
       </div>

+ 16 - 16
src/components/helpTips/index.js

@@ -1,17 +1,17 @@
-import React from 'react'
-import { Icon } from 'antd';
-import styles from './style.module.less'
-
-export default function helpTips(props) {
-  const { title, text = [], execute } = props
-  return (
-    <div className={styles.topContent}>
-      <Icon type="question-circle" className={styles.topIcon} />
-      <span className={styles.topTitle}>{title}</span>
-      <ul>
-        { text.map((item, key) => <li key={key} className={styles.topText}>{item}</li>) }
-      </ul>
-      <div className={styles.execute}>{ execute }</div>
-    </div>
-  )
+import React from 'react'
+import { QuestionCircleOutlined } from '@ant-design/icons';
+import styles from './style.module.less'
+
+export default function helpTips(props) {
+  const { title, text = [], execute } = props
+  return (
+    <div className={styles.topContent}>
+      <QuestionCircleOutlined className={styles.topIcon} />
+      <span className={styles.topTitle}>{title}</span>
+      <ul>
+        { text.map((item, key) => <li key={key} className={styles.topText}>{item}</li>) }
+      </ul>
+      <div className={styles.execute}>{ execute }</div>
+    </div>
+  );
 }

+ 0 - 1
src/components/loadingItem/index.js

@@ -1,5 +1,4 @@
 import React from 'react'
-import { Icon } from 'antd';
 import styles from './style.module.less'
 
 export default function helpTips(props) {

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

@@ -1,6 +1,6 @@
 import React, { useEffect, useState, useCallback, useMemo } from 'react';
 import clsx from 'clsx';
-import { Input, Radio, Spin, Select, Icon } from 'antd';
+import { Input, Radio, Spin, Select } from 'antd';
 import { getDeepValue, isChildOf  } from '@/utils'
 import { getPerson, getListPerson } from '@/request/common/api'
 import _ from 'lodash';

+ 17 - 8
src/components/searchInput/index.js

@@ -1,7 +1,18 @@
 import React, { useEffect, useState, useCallback } from 'react';
 import clsx from 'clsx';
 import moment from 'moment';
-import { Input, Radio, Spin, Select, Icon, DatePicker, TreeSelect, Cascader, Upload, Button } from 'antd';
+import { EditOutlined, UploadOutlined } from '@ant-design/icons';
+import {
+  Input,
+  Radio,
+  Spin,
+  Select,
+  DatePicker,
+  TreeSelect,
+  Cascader,
+  Upload,
+  Button,
+} from 'antd';
 import { getDeepValue, isChildOf  } from '@/utils'
 import SearchPeople from './components/searchPeople'
 import Editor from './components/editor'
@@ -172,17 +183,17 @@ export default function SearchInput(props) {
         )
       case 'uploadFile':
         return (
+          // <input type="file" id="file" onChange = {(e) => console.log(e)}></input>
           <Upload
             action={renderFormData.action}
             fileList={value}
             onChange = {({ file, fileList }) => onChange(renderFormData.key, fileList)}
           >
             <Button>
-              <Icon type="upload" /> Upload
+              <UploadOutlined /> Upload
             </Button>
           </Upload>
-          // <input type="file" id="file" onChange = {(e) => console.log(e)}></input>
-        )
+        );
       case 'tree':
         return (
           <TreeSelect
@@ -306,12 +317,10 @@ export default function SearchInput(props) {
               </span>
             }
             {renderFormData.layout !== 'vertical' && 
-              <Icon
+              <EditOutlined
                 id={`${renderFormData.key}Icon`}
                 className={styles.icon}
-                type="edit"
-                onClick={(e) => onEditChange(e)}
-              />
+                onClick={(e) => onEditChange(e)} />
             }
           </div>
           )

+ 9 - 14
src/components/searchTree/index.js

@@ -1,6 +1,7 @@
 import React from 'react'
 import clsx from 'clsx'
-import { Tree, Input, Icon, Tooltip } from 'antd'
+import { CloseOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons';
+import { Tree, Input, Tooltip } from 'antd';
 import styles from './style.module.less'
 const { TreeNode } = Tree;
 const { Search } = Input;
@@ -87,23 +88,19 @@ class SearchTree extends React.Component {
       <div className={styles.tools}>
         {
           item.level < maxLevel &&
-          <Icon
+          <PlusOutlined
             className={styles.icon}
-            type="plus"
             onClick={(e) => {
               e.stopPropagation()
               add(item)
-            }}
-          />
+            }} />
         }
-        <Icon
+        <EditOutlined
           className={styles.icon}
-          type="edit"
           onClick={(e) => {
             e.stopPropagation()
             edit(item)
-          }}
-        />
+          }} />
 
         {
           // (
@@ -112,16 +109,14 @@ class SearchTree extends React.Component {
           // ) ||
           showDelBtn
           &&
-          <Icon
+          <CloseOutlined
             className={styles.icon}
-            type="close"
             onClick={(e) => {
               e.stopPropagation()
               del(item)
-            }}
-          />}
+            }} />}
       </div>
-    )
+    );
   }
 
   render() {

+ 32 - 32
src/components/tagModular/index.js

@@ -1,33 +1,33 @@
-import React from 'react'
-import styles from './style.module.less'
-import { Icon } from 'antd'
-import clsx from 'clsx';
-
-export default function tagModular(props) {
-const { data = [], deleteMember, editMember } = props
-
-
-  return (
-    <span>
-      {
-        data.map((i, k) => {
-          return (
-          <span className= {styles.tagModular} key={k}>
-            <span className={clsx(styles.TagMember, 'flex-center-between')}>
-              {i.status && i.status.key === 'ACTIVE' || i.status && i.status.key === 'INIT' ? <Icon type="check-circle" theme="filled" className={styles.tagTrue} /> : ''}
-              {i.status && i.status.key === 'INACTIVE' || i.status && i.status.key === 'DESTROYED' ? <Icon type="close-circle" theme="filled" className={styles.tagfalse} /> : ''}
-              <span className={styles.tagName}>{i.name || i.machineName}</span>
-              {
-                i.machineName && <Icon type="edit" className={styles.tagEdit} onClick={() => editMember(i)}  />
-              }
-              {
-                deleteMember &&  <Icon type="close-circle" onClick={() => deleteMember(i)} />
-              }
-            </span>
-          </span>
-          )
-        })
-      }
-    </span>
-  )
+import React from 'react'
+import styles from './style.module.less'
+import { CheckCircleFilled, CloseCircleFilled, CloseCircleOutlined, EditOutlined } from '@ant-design/icons';
+import clsx from 'clsx';
+
+export default function tagModular(props) {
+const { data = [], deleteMember, editMember } = props
+
+
+  return (
+    <span>
+      {
+        data.map((i, k) => {
+          return (
+            <span className= {styles.tagModular} key={k}>
+              <span className={clsx(styles.TagMember, 'flex-center-between')}>
+                {i.status && i.status.key === 'ACTIVE' || i.status && i.status.key === 'INIT' ? <CheckCircleFilled className={styles.tagTrue} /> : ''}
+                {i.status && i.status.key === 'INACTIVE' || i.status && i.status.key === 'DESTROYED' ? <CloseCircleFilled className={styles.tagfalse} /> : ''}
+                <span className={styles.tagName}>{i.name || i.machineName}</span>
+                {
+                  i.machineName && <EditOutlined className={styles.tagEdit} onClick={() => editMember(i)} />
+                }
+                {
+                  deleteMember &&  <CloseCircleOutlined onClick={() => deleteMember(i)} />
+                }
+              </span>
+            </span>
+          );
+        })
+      }
+    </span>
+  );
 }

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels