mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-27 01:32:10 +08:00 
			
		
		
		
	radio component
This commit is contained in:
		
							parent
							
								
									f2260deaa3
								
							
						
					
					
						commit
						5235ba42be
					
				| @ -63,6 +63,27 @@ export default { | ||||
| </script> | ||||
| ``` | ||||
| 
 | ||||
| ### 与Cell组件一起使用 | ||||
| 
 | ||||
| ```html | ||||
| <z-radio-group v-model="radio4"> | ||||
|   <z-cell-group> | ||||
|     <z-cell><z-radio name="1">单选框1</z-radio></z-cell> | ||||
|     <z-cell><z-radio name="2">单选框2</z-radio></z-cell> | ||||
|   </z-cell-group> | ||||
| </z-radio-group> | ||||
| 
 | ||||
| <script> | ||||
| export default { | ||||
|   data() { | ||||
|     return { | ||||
|       radio4: '1' | ||||
|     } | ||||
|   } | ||||
| }; | ||||
| </script> | ||||
| ``` | ||||
| 
 | ||||
| ### Radio API | ||||
| 
 | ||||
| | 参数       | 说明      | 类型       | 默认值       | 可选值       | | ||||
|  | ||||
| @ -9,7 +9,10 @@ | ||||
|         <span class="z-cell__label" v-if="label" v-text="label"></span> | ||||
|       </slot> | ||||
|     </div> | ||||
|     <div class="z-cell__value" :class="{ 'is-link' : isLink }"> | ||||
|     <div class="z-cell__value" :class="{ | ||||
|       'is-link': isLink, | ||||
|       'is-alone': !title && !label | ||||
|     }"> | ||||
|       <slot> | ||||
|         <span v-text="value"></span> | ||||
|       </slot> | ||||
|  | ||||
| @ -52,6 +52,10 @@ | ||||
|       @when link { | ||||
|         margin-right: 20px; | ||||
|       } | ||||
| 
 | ||||
|       @when alone { | ||||
|         float: left; | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
|     .zui-icon-arrow { | ||||
|  | ||||
| @ -2,8 +2,6 @@ | ||||
| 
 | ||||
| @component-namespace z { | ||||
|   @b radio { | ||||
|     margin: 10px 0; | ||||
| 
 | ||||
|     @when disabled { | ||||
|       .zui-icon { | ||||
|         color: #d1dbe5; | ||||
| @ -33,6 +31,8 @@ | ||||
|     .zui-icon { | ||||
|       font-size: 22px; | ||||
|       line-height: 1; | ||||
|       position: relative; | ||||
|       top: 1px; | ||||
|     } | ||||
| 
 | ||||
|     .zui-icon-checked { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user