diff --git a/client/components/CommonComponent/ImgToolComponent/CommonSmalContainer.jsx b/client/components/CommonComponent/ImgToolComponent/CommonSmalContainer.jsx index ffb5163..cb03a3a 100644 --- a/client/components/CommonComponent/ImgToolComponent/CommonSmalContainer.jsx +++ b/client/components/CommonComponent/ImgToolComponent/CommonSmalContainer.jsx @@ -2,6 +2,8 @@ import React from 'react'; require('./index.css'); let addIconSrc = UTILPATH.localImg.plusIcon; let refreshIconSrc = UTILPATH.localImg.refreshIcon; +let addIconDisabledSrc = UTILPATH.localImg.plusIcon_disabled; +let refreshIconDisabledSrc = UTILPATH.localImg.refresh_disabled; /** * 组件说明 需要props type 与imgSrc * type == custom 为要显示的图片 @@ -19,6 +21,7 @@ export default class ImgToolComponent extends React.Component{ render(){ let props = this.props; let type = props.type; + let disabled = props.disabled; let imgSrc = ''; let noCloseBtn = props.noCloseBtn; let handleClikImgFunc = props.handleClikImgFunc; @@ -36,6 +39,12 @@ export default class ImgToolComponent extends React.Component{ break; } + if(type == "add" && disabled){ + imgSrc = addIconDisabledSrc; + } + if(type == "refresh" && disabled){ + imgSrc = refreshIconDisabledSrc; + } return( <div className={"ImgToolComponent"}> <div className={"imgItem"}> diff --git a/client/components/CommonComponent/ImgToolComponent/index.css b/client/components/CommonComponent/ImgToolComponent/index.css index d53483c..38db6ea 100644 --- a/client/components/CommonComponent/ImgToolComponent/index.css +++ b/client/components/CommonComponent/ImgToolComponent/index.css @@ -8,7 +8,6 @@ box-sizing: border-box; margin-right: 25px; position: relative; - border: 1px solid #e5e5e5; } .ImgToolComponent .uploadImgRight{ float: left; diff --git a/client/image/plusIcon_disabled.png b/client/image/plusIcon_disabled.png new file mode 100644 index 0000000..eb9ba62 Binary files /dev/null and b/client/image/plusIcon_disabled.png differ diff --git a/client/image/refresh_disabled.png b/client/image/refresh_disabled.png new file mode 100644 index 0000000..a5be7a4 Binary files /dev/null and b/client/image/refresh_disabled.png differ diff --git a/client/util/image.js b/client/util/image.js index 732ea19..a603bf7 100644 --- a/client/util/image.js +++ b/client/util/image.js @@ -5,6 +5,9 @@ import refreshIcon from '../image/refresh.png'; import plusIcon from '../image/plusIcon.png'; import clockIcon from '../image/clock.png'; import breakImg from '../image/breakImg.png'; +import plusIcon_disabled from '../image/plusIcon_disabled.png'; +import refresh_disabled from '../image/refresh_disabled.png'; + const localHost = 'http://localhost:7788'; const devHost = 'http://test.mjitech.com'; @@ -78,6 +81,6 @@ const handleImgLoad = (ref)=>{ return style; } -const localImg = {headlogo,defaultImg,addIcon,refreshIcon,plusIcon,clockIcon,breakImg} +const localImg = {headlogo,defaultImg,addIcon,refreshIcon,plusIcon,clockIcon,breakImg,refresh_disabled,plusIcon_disabled} module.exports = {localHost,devHost,masterHost,getPic,handleImgError,handleImgLoad,localImg}; \ No newline at end of file