Pārlūkot izejas kodu

feat: 替换iconPark引入方式

lanjianrong 4 gadi atpakaļ
vecāks
revīzija
64a8c2dcb8

+ 1 - 1
.gitignore

@@ -21,6 +21,7 @@ yarn.lock
 package-lock.json
 *bak
 .vscode
+deploy.config.js
 
 # visual studio code
 .history
@@ -38,4 +39,3 @@ screenshot
 .eslintcache
 
 build
-deploy.config.js

+ 14 - 1
deploy.config.js

@@ -1,5 +1,5 @@
 module.exports = {
-  win: {
+  qa: {
     script: 'npm run build',
     host: '192.168.1.76',
     port: 22,
@@ -11,5 +11,18 @@ module.exports = {
     addressee: '',
     title: '',
     content: ''
+  },
+  prod: {
+    script: 'npm run build',
+    host: '120.27.200.79',
+    port: 2222,
+    username: 'zongheng',
+    password: 'zongheng@)!%#*%)ok',
+    localPath: 'dist',
+    remotePath: '/mnt/cld2/console_management',
+    needEmail: false,
+    addressee: '',
+    title: '',
+    content: ''
   }
 }

+ 2 - 1
package.json

@@ -6,7 +6,8 @@
   "scripts": {
     "analyze": "cross-env ANALYZE=1 umi build",
     "build": "umi build",
-    "deploy:qa": "auto-deploy build -t win",
+    "deploy:qa": "auto-deploy build -t qa",
+    "deploy:prod": "auto-deploy build -t prod",
     "deploy": "npm run site && npm run gh-pages",
     "dev": "npm run start:dev",
     "gh-pages": "gh-pages -d dist",

+ 0 - 3
src/components/IconPark/index.tsx

@@ -1,3 +0,0 @@
-import Icon from '@icon-park/react/es/all'
-
-export default Icon

+ 3 - 3
src/pages/Business/Attendance/index.tsx

@@ -1,7 +1,7 @@
 import React, { useState, useEffect } from 'react'
 import AttendanceMenu from './components/AttendanceMenu/attendanceMenu'
 import { useRequest } from 'umi'
-import Icon from '@/components/IconPark'
+import { Plus, Delete } from '@icon-park/react'
 import ConnectModal from './components/ConnectModal'
 import { Table, Tag, Popconfirm, Popover, Button } from 'antd'
 import { fetchAttendanceList, unlinkAttendance, deleteAttendance } from '@/services/user/system'
@@ -91,7 +91,7 @@ const Attendance = () => {
                 type: modalType.linkAttendance
               })
             }>
-            <Icon type="plus" />
+            <Plus />
             添加
           </span>
         </div>
@@ -110,7 +110,7 @@ const Attendance = () => {
             cancelText="取消"
             onConfirm={() => tryDeleteAttendance({ id: record.id })}>
             <span className="hover:text-hex-e7026e cursor-pointer">
-              <Icon type="delete" fill="#fd3995" />
+              <Delete fill="#fd3995" />
             </span>
           </Popconfirm>
         </Popover>

+ 4 - 12
src/pages/Role/Customer/index.tsx

@@ -1,5 +1,5 @@
 import { useModel, useRequest } from 'umi'
-import Icon from '@/components/IconPark'
+import { Delete, EveryUser } from '@icon-park/react'
 import ProForm, { ProFormCheckbox, ProFormDependency, ProFormSwitch } from '@ant-design/pro-form'
 import type { FormInstance } from 'antd'
 import { message, Table, Tabs } from 'antd'
@@ -51,7 +51,7 @@ const Customer = () => {
       width: '20%',
       render: () => (
         <span className="hover:text-hex-e7026e">
-          <Icon type="delete" fill="#fd3995" />
+          <Delete fill="#fd3995" />
         </span>
       )
     }
@@ -143,11 +143,7 @@ const Customer = () => {
                       name="showClient"
                       label={
                         <span className="flex items-center">
-                          <Icon
-                            type="every-user"
-                            className="mr-1"
-                            className="flex items-baseline mr-1"
-                          />
+                          <EveryUser className="mr-1" className="flex items-baseline mr-1" />
                           联系人
                         </span>
                       }
@@ -169,11 +165,7 @@ const Customer = () => {
                       name="showCompany"
                       label={
                         <span className="flex items-center">
-                          <Icon
-                            type="every-user"
-                            className="mr-1"
-                            className="flex items-baseline mr-1"
-                          />
+                          <EveryUser className="mr-1" className="flex items-baseline mr-1" />
                           客户
                         </span>
                       }

+ 3 - 7
src/pages/Role/System/index.tsx

@@ -1,5 +1,5 @@
 import { useModel, useRequest } from 'umi'
-import Icon from '@/components/IconPark'
+import { Delete, EveryUser } from '@icon-park/react'
 import ProForm, { ProFormCheckbox, ProFormDependency, ProFormSwitch } from '@ant-design/pro-form'
 import type { FormInstance } from 'antd'
 import { message, Table, Tabs } from 'antd'
@@ -49,7 +49,7 @@ const System = () => {
       width: '20%',
       render: () => (
         <span className="hover:text-hex-e7026e">
-          <Icon type="delete" fill="#fd3995" />
+          <Delete fill="#fd3995" />
         </span>
       )
     }
@@ -156,11 +156,7 @@ const System = () => {
                       name="showSystem"
                       label={
                         <span className="flex items-center">
-                          <Icon
-                            type="every-user"
-                            className="mr-1"
-                            className="flex items-baseline mr-1"
-                          />
+                          <EveryUser className="mr-1" className="flex items-baseline mr-1" />
                           角色权限管理
                         </span>
                       }