Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
max_android_panel
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xin
max_android_panel
Commits
26a7ee62
Commit
26a7ee62
authored
Jul 31, 2018
by
yaxiLiuu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公用图片组件天添加而æ二态åº
parent
b348498f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
2 deletions
+14
-2
client/components/CommonComponent/ImgToolComponent/CommonSmalContainer.jsx
+9
-0
client/components/CommonComponent/ImgToolComponent/index.css
+0
-1
client/image/plusIcon_disabled.png
+0
-0
client/image/refresh_disabled.png
+0
-0
client/util/image.js
+5
-1
No files found.
client/components/CommonComponent/ImgToolComponent/CommonSmalContainer.jsx
View file @
26a7ee62
...
...
@@ -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"
}
>
...
...
client/components/CommonComponent/ImgToolComponent/index.css
View file @
26a7ee62
...
...
@@ -8,7 +8,6 @@
box-sizing
:
border-box
;
margin-right
:
25px
;
position
:
relative
;
border
:
1px
solid
#e5e5e5
;
}
.ImgToolComponent
.uploadImgRight
{
float
:
left
;
...
...
client/image/plusIcon_disabled.png
0 → 100644
View file @
26a7ee62
979 Bytes
client/image/refresh_disabled.png
0 → 100644
View file @
26a7ee62
1.79 KB
client/util/image.js
View file @
26a7ee62
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment