Browse Source

fix: radio demo代码修改

lilinsen 5 years ago
parent
commit
bb4b3690f8
2 changed files with 19 additions and 1 deletions
  1. 11 0
      src/packages/radio/demo.vue
  2. 8 1
      src/packages/radio/radio.scss

+ 11 - 0
src/packages/radio/demo.vue

@@ -37,6 +37,11 @@
           />
      </span>
     </nut-cell>
+    <nut-cell>
+      <span slot="title">
+    输入结果 {{radioDisable}}
+     </span>
+    </nut-cell>
     <h4>1. styleType= "radio" 基本样式输出属性为 {{resloutdemo1}} 的值</h4>
     <nut-cell>
       <span slot="title">
@@ -165,6 +170,12 @@ export default {
             return !isNaN(item)?parseInt(item):''
           })          
         }
+        if(val === 'true'){
+          this.radioDisable = true;
+        }
+        if(val === 'false'){
+          this.radioDisable = false;
+        }
       }
     }
   }

+ 8 - 1
src/packages/radio/radio.scss

@@ -98,7 +98,14 @@
 	input:checked +.text-box + .box-border{
 		background: rgba(255,239,235,1);
 		border: 1px solid rgba(225,37,27,1);
-	}	
+	}
+	input[disabled="disabled"]+.text-box{
+		color:#C8C8C8 ;
+	}
+	input[disabled="disabled"] +.text-box + .box-border{
+		background: #f7f7f7;
+		border: 1px solid #dcdcdc;
+	}
 }
 .nut-radio-list-list{
 	height: 50px;