diff --git a/spug_web/src/libs/functools.js b/spug_web/src/libs/functools.js index 8bc5359..66c58d1 100644 --- a/spug_web/src/libs/functools.js +++ b/spug_web/src/libs/functools.js @@ -35,6 +35,10 @@ export function hasPermission(strCode) { return false } +export function clsNames(...args) { + return args.filter(x => x).join(' ') +} + export function includes(s, key) { key = key.toLowerCase(); if (Array.isArray(s)) { diff --git a/spug_web/src/pages/deploy/request/Ext2Form.js b/spug_web/src/pages/deploy/request/Ext2Form.js index 56d697a..ff8cdb4 100644 --- a/spug_web/src/pages/deploy/request/Ext2Form.js +++ b/spug_web/src/pages/deploy/request/Ext2Form.js @@ -9,7 +9,7 @@ import { UploadOutlined } from '@ant-design/icons'; import { Modal, Form, Input, Upload, DatePicker, message, Button } from 'antd'; import hostStore from 'pages/host/store'; import HostSelector from './HostSelector'; -import { http, X_TOKEN } from 'libs'; +import { http, clsNames, X_TOKEN } from 'libs'; import styles from './index.module.less'; import store from './store'; import lds from 'lodash'; @@ -91,11 +91,12 @@ export default observer(function () { {require_upload && ( - - - {fileList.length === 0 ? : null} - + + + + )} diff --git a/spug_web/src/pages/deploy/request/index.module.less b/spug_web/src/pages/deploy/request/index.module.less index 3ff3d9f..56ec90d 100644 --- a/spug_web/src/pages/deploy/request/index.module.less +++ b/spug_web/src/pages/deploy/request/index.module.less @@ -99,8 +99,19 @@ padding: 0; } -.upload :global(.ant-upload-list-item) { +.upload { + :global(.ant-upload-btn) { + padding: 0 !important; + } +} + +.uploadHide { + :global(.ant-upload-drag) { + display: none; + } + :global(.ant-upload-list-item) { margin: 0; + } } .min120 {