|
@@ -69,7 +69,7 @@ class TemplateItems extends React.Component {
|
|
|
}
|
|
|
floderSlide(e,item,i){
|
|
|
e.stopPropagation()
|
|
|
- const {floderSlide} = this.props
|
|
|
+ const {floderSlide,admin} = this.props
|
|
|
const {showIndex} = this.state
|
|
|
if(!item.templateInfo){
|
|
|
return;
|
|
@@ -81,16 +81,19 @@ class TemplateItems extends React.Component {
|
|
|
$(tmpD).children().eq(1).slideUp()
|
|
|
}
|
|
|
floderSlide(item.id)
|
|
|
- if(showIndex === i) {
|
|
|
- this.setState({
|
|
|
- showIndex: -1
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.setState({
|
|
|
- showIndex: i
|
|
|
- })
|
|
|
+ if(admin) {
|
|
|
+ if(showIndex === i) {
|
|
|
+ this.setState({
|
|
|
+ showIndex: -1
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.setState({
|
|
|
+ showIndex: i
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
|
floderAction(e,id){
|
|
@@ -141,8 +144,8 @@ class TemplateItems extends React.Component {
|
|
|
Floder.push(
|
|
|
<div className={style.floderPart}>
|
|
|
<div className={style.floderPartFl} onClick={(e)=>this.floderSlide(e,tmpItm,i)}>
|
|
|
- <img src={showIndex== i?floderD:floderR} className={style.floderRD}/>
|
|
|
- {/* <img src={tmpItm.slide == 1?floderD:floderR} className={style.floderRD}/> */}
|
|
|
+ {admin&&<img src={showIndex== i?floderD:floderR} className={style.floderRD}/>}
|
|
|
+ {!admin&&<img src={tmpItm.slide == 1?floderD:floderR} className={style.floderRD}/>}
|
|
|
{tmpItm.name}({tmpItm.templateInfoCount})
|
|
|
<span className={`${style.floderPartAction}`} id="floderActionBtn" onClick={(e)=>{this.floderAction(e,tmpItm.id)}}>...</span>
|
|
|
{tmpItm.action == 1&&<div className={style.floderAction} id="floderAction">
|