ソースを参照

Merge remote-tracking branch 'origin/dev/otherHis' into dev/new1

zhouna 6 年 前
コミット
af359067b1

+ 7 - 1
src/common/less/variables.less

@@ -165,4 +165,10 @@
 
 .borderd{
    border:1px #000 solid;
- }
+ }
+
+.blue-border{
+  border:2px @blue solid;
+  border-radius: 2px;
+  /*box-shadow: 0px 0px 2px @blue;*/
+}

+ 7 - 1
src/components/MultSpread/index.jsx

@@ -125,9 +125,15 @@ class MultSpread extends Component{
       saveAddItem&&saveAddItem(copyId,data);
     }
   }
+  getContClass(){
+    const {editable} = this.state;
+    const edit = editable?style['blue-border']:'';
+    return classNames(edit);
+  }
   render(){
     const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix} = this.props;
-    return (<div style={{display:'inline-block'}}
+    return (<div className={this.getContClass()}
+                 style={{display:'inline-block'}}
                  onDoubleClick={this.changeToEdit}
                  contentEditable={this.state.editable}
                  onBlur={this.handleEdit}

+ 2 - 1
src/components/NumberDrop/index.jsx

@@ -112,9 +112,10 @@ class NumberDrop extends Component{
   }
   getClasses(){         //整个标签是否有值的状态
     const {value,hideTag,placeholder} = this.props;
+    const blueBorder = this.state.editable?style['blue-border']:'';
     const isSelected = value&&value!=placeholder?style['selected']:style['container'];
     const noTag = hideTag?style['no-tag']:'';
-    return className(isSelected,noTag);
+    return className(isSelected,noTag,blueBorder);
   }
   changeToEdit(e){        //整个标签双击编辑状态
     const {value,id,handleDbclick,patId} = this.props;

+ 2 - 1
src/components/NumberUnitDrop/index.jsx

@@ -131,6 +131,7 @@ class NumberUnitDrop extends Component{
   getClasses(){         //整个标签是否有值的状态
     const {value,hideTag,show} = this.props;
     const inpValue = this.state.value;
+    const blueBorder = this.state.editable?style['blue-border']:'';
     const isSelected = value||inpValue?style['selected']:style['container'];
     const noTag = hideTag?style['no-tag']:'';
     if(show){
@@ -138,7 +139,7 @@ class NumberUnitDrop extends Component{
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
     }
-    return className(isSelected,noTag);
+    return className(isSelected,noTag,blueBorder);
   }
   changeToEdit(e){        //整个标签双击编辑状态
     e.stopPropagation();

+ 2 - 1
src/components/RadioDrop/index.jsx

@@ -37,6 +37,7 @@ class RadioDrop extends Component{
   }
   getClass(){
     const {value,hideTag,placeholder,show} = this.props;
+    const blueBorder = this.state.editable?style['blue-border']:'';
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
@@ -46,7 +47,7 @@ class RadioDrop extends Component{
       return style['no-tag'];
     }
     if(value){
-      return style['selected-tag'];
+      return blueBorder?style['selected-tag']+' '+blueBorder:style['selected-tag'];
     }
     return style['tag'];
   }

+ 2 - 1
src/components/SpreadDrop/index.jsx

@@ -300,13 +300,14 @@ class SpreadDrop extends Component{
     });
   }
   getClass(){
+    const blueBorder = this.state.editable?style['blue-border']:'';
     if(this.props.show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
       $(this.$div.current).removeClass(style['borderd']);
     }
     if(this.props.value){
-      return style['selected-tag'];
+      return classNames(style['selected-tag'],blueBorder);
     }
     return style['tag'];
   }